Trigger home or reset encoder on each pass
Posted: Thu Jul 11, 2019 12:06 pm
Hello,
I am using the roboclaw for continuous rotation, and there does not appear to be a way to programmatically determine the start and end encoder positions for homing. Basically, the motor is spinning at all times but must jump to a certain angle at times. I have tried to measure exactly how many encoder counts one full revolution is, but the reality is that this measurement is inconsistent and will grow in error the longer it spins.
This means that the roboclaw has to be able to do one of the following to work in this situation:
Thanks!
I am using the roboclaw for continuous rotation, and there does not appear to be a way to programmatically determine the start and end encoder positions for homing. Basically, the motor is spinning at all times but must jump to a certain angle at times. I have tried to measure exactly how many encoder counts one full revolution is, but the reality is that this measurement is inconsistent and will grow in error the longer it spins.
This means that the roboclaw has to be able to do one of the following to work in this situation:
- Receive a command to re-home at any time. This is not ideal because it adds indirect movement to my program, but I suppose it could work.
- Report the encoder value and home status at the exact same time even when spinning (I noticed that getting the status via packet 90 does not report if the motor passed home if the motor is spinning). This would allow my program to keep track of a new home offset each time it passes home. It should report the home status and encoder value in the same packet to be the most precise.
- Have an option to reset the encoder to 0 each time home is triggered (preferred and simplest option). This also means that the encoder value cannot possibly grow too large.
Thanks!