multimove
Queue up to 32 acceleration or velocity moves for a servomotor in one command, requiring the final move to stop the motor to avoid fatal errors.
Instructions
The multimove command allows you to compose multiple moves one after another. Please note that when the queue becomes empty after all the moves are executed and the motor is not at a standstill then a fatal error will be triggered. [Firmware command "Multimove", group: Motion Control.] NOTE: moveList is a list of [value, duration_seconds] pairs (max 32): value is degrees/s^2 for acceleration moves (moveTypes bit = 0) or degrees/s for velocity moves (bit = 1); this server converts to firmware units. The final move must bring the motor to a standstill or the firmware raises a fatal error when the queue empties. This QUEUES the move and returns immediately; poll get_n_queued_items for completion, or use move_to/move_relative which wait. Requires enable_mosfets first. Parameters:
moveCount: Specify how many moves are being communicated in this one shot.
moveTypes: Each bit specifies if the move is a (bit = 0) MOVE_WITH_ACCELERATION_COMMAND or a (bit = 1) MOVE_WITH_VELOCITY_COMMAND.
moveList: A 2D list in Python format (list of lists). Each item in the list is of type [i32, u32] representing a series of move commands. Each move command specifies the acceleration to move at or the velocity to instantly change to (according to the bits above) and the number of time steps over which this command is to be executed. For example: '[[100, 30000], [-200, 60000]]'. There is a limit of 32 move commands that can be listed in this one multi-move command. Each of the moves takes up one queue spot, so make sure there is enough space in the queue to store all of the commands. Returns: success confirmation. motor: an alias number (e.g. 88), a 16-hex-digit unique ID (e.g. "0123456789ABCDEF"), or "all" to broadcast to every motor on the bus (broadcasts get no responses back).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| motor | Yes | ||
| moveList | Yes | ||
| moveCount | Yes | ||
| moveTypes | Yes |