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.
- All listed datagram types are unicast with SID = 25
- All listed payloads use big-endian format
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 byte | Datatype | Description |
---|---|---|
0 | uint8 | Driver mode |
1-2 | int16 | Driver cmd , -32768 to 32767 mapped to range -1 to 1. Value transmitted as big-endian (MSB first) |
With Live Counter (payload length = 4)
Payload byte | Datatype | Description |
---|---|---|
0 | uint8 | Live counter |
1 | uint8 | Driver mode |
2-3 | int16 | Driver 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 byte | Datatype | Description |
---|---|---|
0 | uint8 | Driver mode |
1-4 | float | Driver cmd . Float value transmitted as big-endian (MSB first) |
With Live Counter (payload length = 6)
Payload byte | Datatype | Description |
---|---|---|
0 | uint8 | Live counter |
1 | uint8 | Driver mode |
2-5 | float | Driver cmd . Float value transmitted as big-endian (MSB first) |
Driver Command 3 (Fixed Point Command with Multipliers)
Without Live Counter (payload length = 7)
Payload byte | Datatype | Description |
---|---|---|
0 | uint8 | Driver mode |
1-2 | int16 | Driver cmd , -32768 to 32767 mapped to range -1 to 1. Value transmitted as big-endian (MSB first) |
3-4 | uint16 | Driver imult and rmult , 0 to 65535 mapped to range 0 to 1 |
5-6 | uint16 | Driver umult , 0 to 65535 mapped to range 0 to 1 |