I'm pretty familiar with servos and motor control. Have reviewed the RoboClaw manual but have a question because of a difference in a reference to an Encoder Count and an Encoder Register. (not sure these are exactly the same).
The quadrature encoder is a differential encoder (i.e not absolute encoder) so it usually needs to be initialized to some start position at power up. I would just like to confirm that the command to set the initial counts are: Encoder Commands 22/23
and then from then on the positions can be read using Commands 16/17?
That is it; TIA.
Commands for reference below:
16 Read Encoder Count/Value for M1.
17 Read Encoder Count/Value for M2.
16 - Read Encoder Count/Value M1
Read M1 encoder count/position.
Send: [Address, 16]
Receive: [Enc1(4 bytes), Status, CRC(2 bytes)]
Quadrature encoders have a range of 0 to 4,294,967,295. Absolute encoder values are converted
from an analog voltage into a value from 0 to 2047 for the full 2v range.
22 Set Encoder 1 Register(Quadrature only).
23 Set Encoder 2 Register(Quadrature only).
22 - Set Quadrature Encoder 1 Value
Set the value of the Encoder 1 register. Useful when homing motor 1. This command applies to
quadrature encoders only.