Skip to main content
FW version: Stable

How to Perform Motor Identification Using CAN Bus

Prerequisites:

  • An ESCx controller that is powered ON
  • CAN bus is functioning properly
  • Controller address is set to 0
note
  • All payloads use big-endian byte order

Step 1: Compose the CAN Frame

CAN IDDLC
0x0C78
Byte 0Byte 1Byte 2Byte 3 - Byte 7
Receiver address
0x0
Perform task
0x4
task ID0x0
How to Calculate CAN ID

SID is 24, sender address is 7 -> (24 � 3) + 7 = 192 + 7 = 199 (DEC) = 0xC7

Task ID List

Task IDDescription
1Driver reinit
2Execute identlin
3Execute identrun
128Save parameters
129Load parameters from flash
255Request task result
OtherUnsupported command (can be used as heartbeat)

Step 2: Receive Response

CAN IDDLC
0x0C03
Byte 0Byte 1Byte 2
Receiver address
0x7
Perform task - response
0x44
Task ID
How to Calculate CAN ID

SID is 24, sender address is 0 -> (24 � 3) + 0 = 192 (DEC) = 0xC0

note
  • DLC = 7 with Byte 3 - Byte 7 containing value -1 indicates unsupported task
  • If a task is unfinished, the response includes the ID of the unfinished task

Step 3: Request Task Result

CAN IDDLC
0x0C78
Byte 0Byte 1Byte 2Byte 3 - Byte 7
Receiver address
0x0
Perform task
0x4
Request result
0xFF
0x0

Task is Still Running

Response when a task is in progress:

CAN IDDLC
0x0C03
Byte 0Byte 1Byte 2
Receiver address
0x7
Perform task - response
0x44
Running task ID

Task Finished

Response containing the latest task result:

CAN IDDLC
0x0C07
Byte 0Byte 1Byte 2Byte 3 - Byte 7
Receiver address
0x7
Perform task - response
0x44
Running task IDTask result

A result of 0 typically indicates success, while any other value indicates failure.