Skip to main content
FW version: Stable

Drive Command Message

The ESCx motor driver can be controlled remotely via communication interfaces such as CAN Bus by sending the drive command directly. The structure of drive command is detailed in the Driver documentation. Reception of this message overrides the Application and initiates direct control. This override lasts for 200ms. If no new command message is received within this period, control reverts to the Application.

info
  • All listed datagram types are unicast with SID = 25
  • All listed payloads use big-endian format
warning

Payload byte positions differ from transfer layer byte positions (CAN, UART, USB, Bluetooth...) Before implementation, carefully review message creation guides for:

warning

For driver command API usage, it is recommended to disable your application by setting parameter /common/appsel to 10.

While the API takes priority over the application, leaving the application enabled may cause errors or motor beeping.

For payloads with an even number of bytes, the first byte must contain a live counter. The receiver must increment this counter in each transmission, or the message will be ignored. This prevents runaway situations (e.g., transmitter repeating the same payload without process context linkage).

Multiple motor driver command message formats exist, varying in message length and datatypes.

Driver Command 1 (Fixed Point Command)

Without Live Counter (payload length = 3)

Payload byteDatatypeDescription
0uint8Driver mode
1-2int16Driver cmd, -32768 to 32767 mapped to range -1 to 1. Value transmitted as big-endian (MSB first)

With Live Counter (payload length = 4)

Payload byteDatatypeDescription
0uint8Live counter
1uint8Driver mode
2-3int16Driver cmd, -32768 to 32767 mapped to range -1 to 1. Value transmitted as big-endian (MSB first)

Driver Command 2 (Floating Point Command)

Without Live Counter (payload length = 5)

Payload byteDatatypeDescription
0uint8Driver mode
1-4floatDriver cmd. Float value transmitted as big-endian (MSB first)

With Live Counter (payload length = 6)

Payload byteDatatypeDescription
0uint8Live counter
1uint8Driver mode
2-5floatDriver cmd. Float value transmitted as big-endian (MSB first)

Driver Command 3 (Fixed Point Command with Multipliers)

Without Live Counter (payload length = 7)

Payload byteDatatypeDescription
0uint8Driver mode
1-2int16Driver cmd, -32768 to 32767 mapped to range -1 to 1. Value transmitted as big-endian (MSB first)
3-4uint16Driver imult and rmult, 0 to 65535 mapped to range 0 to 1
5-6uint16Driver umult, 0 to 65535 mapped to range 0 to 1