the position of the motor is an integer that counts encoder steps. So if I set a position setpoint of 1000, and my encoder has 10 bits (1024 counts per revolution) I can expect my motor to perform roughly 1 revolution and stop. If I set it to 5000, it will do about 5 revolutions.
What’s the maximum value we can have? Is the position variable a int16 or int32?
Currently it’s a signed int32. We recently upgraded the back end for the protocol so it should support int64 trivially. We also want to make sure velocity and current control modes never overflow
With the int32 I have a reasonable margin for operation, but I actually have a chance of hitting overflow with my current design.
And because we are going to use CAN, I suppose it’s less trivial to expand from 32 to 64, as the message is expected to contain 32 bits there as far as I can tell. Well, probably hackable but still less trivial.
Is there a way to reset the position counter, just in case? Or I’d have to power the ODrive off and on?