Skip to content

Move Servos (Delayed Mode) Query

The move servos query on delayed mode uses the message:

!s-mALL-e!

While acting under the delayed execution mode, the client can use this query to execute movements previously loaded through the normal servo movement query.

The possible responses for this query by the server are either a relayed generic ACK control query from the mcu after movement execution, or a negative control query with one of the following control codes:

  • _NACK_InvalidQuery (uint8_t c=255) → If the query format is invalid: contains null-bytes, invalid header or tail sequences, or the query function code is not recognized.
  • _NACK_NoActiveMCU (uint8_t c=254) → If client has not selected a mcu before issuing the movement command.
  • _NACK_OnRTMode (uint8_t c=253) → If the server is not operating on delayed mode.
  • _NACK_InvalidParameter (uint8_t c=252) → If no movements have been previously configured.
  • _NACK_NoMCUInfo (uint8_t c=250) → If the selected mcu is a "DumbMCU", and there's no PWM information available in the server database.
  • _NACK_MCUOffline (uint8_t c=249) → If the selected mcu is not currently connected to the server.

The server → mcu portion of this query behaves and uses the same messages than the normal servo movement query relayed to the mcu, with the exception of the message sent to the SmartMCU, which uses a different query:

-e-!
-m-[NUMBER_OF_MOVEMENTS]-[SERVO_ID:PWM_SIGNAL]-<...>-[SERVO_ID:PWM_SIGNAL]-!
  • [NUMBER_OF_MOVEMENTS] → A single uint8_t indicating how many servo movements the query contains. Since it cannot be zero, it's not affected by the offset.
  • [SERVO_ID:PWM_SIGNAL] → The information pair SERVO_ID, the id of the servo the client wants to move; and PWM_SIGNAL, the PWM signal for the given servo ID. These two values are separated by the ASCII character : (uint8_t c=58), and for multiple movements, each information pair SERVO_ID:PWM_SIGNAL is separated by a dash - (uint8_t c=45) from the information pair of the following servo movement. Both SERVO_ID (a single uint8_t value) and PWM_SIGNAL (a uint16_t value) must have the positive +1 offset applied, as they can take value zero.

The communication schema for this query is as follows:

mALL comm schema mALL comm schema

mALL comm schema mALL comm schema

failed mALL comm schema failed mALL comm schema