Closed MrGloriousFast closed 3 years ago
Hello,
#motor.setStopOnStallVelocity(100)
# error in this line: TMCM_1240.py", line 77, in setStopOnStallVelocity
self.setAxisParameter(self.APs.SmartEnergyStallVelocity, velocity)
AttributeError: type object '_APs' has no attribute 'SmartEnergyStallVelocity'
This error has been fixed in d567d61da4e433f41749f2c46ee732421d03dc40 This should probably fix your script issue.
Regards, Lenard
Hello Pytrinamic,
I want to use the stallguard function with my motor module 1240 (and 1260 later on) I build a test setup: the motor can rotate freely for some degrees. then the motor hits a weight and has to lift it to keep rotating. i want to use the stallguard feature so the motor stops at the weight and not lift it with full force.
My idea is that the motor should rotate up until the weight freely but then not be able to lift the weight. The weight is representing the maximal force i want the motor to be able to apply.
Later i want to use this feature to run the motor against a wall and set that wall as the zero position.
I think i am using the functions completely wrong, because it does not do what i would expect it to do. It just Lifts the weight with full power and then puts it down again. No numbers i put into it seem to change that.
i put everything into try/finally blocks so i can just use CTRL+C to stop the program whenever i want including a motor stop.