User Manual

Note that the position value returned by this command is equal to four times the number displayed in
the Position box in the Status tab of the Maestro Control Center.
Get Moving State (Mini Maestro 12, 18, and 24 only)
Compact protocol: 0x93
Pololu protocol: 0xAA, device number, 0x13
Response: 0x00 if no servos are moving, 0x01 if servos are moving
This command is used to determine whether the servo outputs have reached their targets or are
still changing and will return 1 as long as there is at least one servo that is limited by a speed or
acceleration setting still moving. Using this command together with the Set Target command, you can
initiate several servo movements and wait for all the movements to finish before moving on to the next
step of your program.
The Get Moving State command only works on the Mini Maestros. The Micro Maestro 6-channel
controller implements the command, but it has a bug that could make this command return 0 when
it should return 1. (The bug does not affect the GET_MOVING_STATE command in the scripting
language, and it does not affect the Mini Maestros.) Therefore, we do not recommend using this
command on a Micro Maestro. Instead, as a workaround, you could load the following script onto the
Micro Maestro:
This script loops until GET_MOVING_STATE returns 0. You can use the “Restart Script at Subroutine”
serial command to start the script and the “Get Script Status” serial command to check whether it is
still running. These commands are documented in Section 5.f. If you start the script and then wait for
it to stop running, it will mean that the servos have stopped moving.
Get Errors
Compact protocol: 0xA1
Pololu protocol: 0xAA, device number, 0x21
Response: error bits 0-7, error bits 8-15
Use this command to examine the errors that the Maestro has detected. Section 4.e lists the specific
errors that can be detected by the Maestro. The error register is sent as a two-byte response
immediately after the command is received, then all the error bits are cleared. For most applications
using serial control, it is a good idea to check errors continuously and take appropriate action if errors
occur.
1
2
3
sub wait_for_movement_to_end
begin get_moving_state while repeat
quit
?
Pololu Maestro Servo Controller User’s Guide © 2001–2019 Pololu Corporation
5. Serial Interface Page 58 of 102