I have connected a Zigbee Module(configured as router) to the Rx and Tx lines of the Pololu controller.
Coordinator is connected to the COM port of my PC.
I send serial commands using a serial terminal program, I am able to “Set Target Position” using compact protocol (0x84 0x00 0x70 0x2E) and the servo moves, am also able to read back the position using the “Get Position” Command (0x90 00) on which I receive 2 bytes of data.
What am not able to get.
When I send “Get Moving State” (0x93) always the response is 00 (ie the servos are no moving) even when they are moving!!
Please do give me some advice.
I suspect that you do not have a speed or acceleration limit set and that is why the “Get Moving State” command always returns 0.
Servos do not make their feedback available, so the Maestro has no way of knowing whether a servo actually made it to its target. The only thing the Maestro knows is the last pulse width that it sent the servo. When a channel has a speed or acceleration limit, the Maestro will break the set position into multiple smaller divisions, giving it a reference for the position of the servo. Then, the “Get Moving State” command can be used to check if the Maestro has finished sending all of the intermediate pulses associated with the last target it was given. It will only return a 1 if the last pulse width sent to the servo did not correspond to the actual target position. Without a speed or acceleration limit, the Maestro will send the pulse width corresponding to the target position immediately, so the “Get Moving State” command will always return 0.
Thank you so much. You were right. The Speed and Acceleration limits were not set.
Kindly include this info in the documentation of “Get Moving State” too.
I am glad you were able to get it working; thank you for letting us know. We have edited the “Get Moving State” description in the “Serial Servo Commands” section of the guide to more clearly explain how it works.