How To Monitor Controller Signal 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
Setup sampling of Motor 4 and Driver 1 messages with 100ms period and 10ms delay.
CAN ID | DLC |
---|---|
0x0C7 | 8 |
Byte 0 | Byte 1 | Byte 2 - Byte 3 | Byte 4 - Byte 5 | Byte 6 - Byte 7 |
---|---|---|---|---|
Receiver address 0x0 | Setup sampling 0x8 | Bank selector Byte 2 = 0x2 (Motor4) Byte 3 = 0x4 (Driver 1) | Sampling period [ms] 0x64 (100ms period) | First period [ms] 0xA (10ms delay) Must be non-zero to initiate sending |
Bank selector byte | Bit | Description |
---|---|---|
0 | 0 | Motor 3 |
0 | 1 | Motor 4 |
0 | 2-3 | Reserved |
0 | 4 | Driver state 2 |
0 | 5-7 | Reserved |
1 | 0:1 | Reserved |
1 | 2 | Driver state 1 |
1 | 3 | Range and reference |
1 | 4 | Supply 1 |
1 | 6 | Motor 1 |
1 | 7 | Motor 2 |
How to Calculate CAN ID
SID is 24, sender address is 7 -> (24 � 3) + 7 = 192 + 7 = 199 (DEC) = 0xC7
Step 2: Receive Response
The controller will begin transmitting the requested banks. Each bank has a unique CAN ID. CAN IDs and their corresponding signal layouts are shown below:
| Bank | Driver state 1 | Range and reference | Supply 1 | Motor 1