Skip to main content
FW version: Stable

How to get a signal from the driver using CAN bus

What do you need to prepare before:

  • The controller is turned ON
  • CANbus works properly
  • The controller CAN address is set to 0
note
  • All the values are in big-endian

Step 1: Compose the CAN frame

Setup sampling of Motor 4 and Driver 1 messages with 100ms period and 10ms delay.

CAN IDDLC
0x0C78
Byte 0Byte 1Byte 2 - Byte 3Byte 4 - Byte 5Byte 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)
This must be non-zero to start sending.
Bank selector byteBitDescription
00Motor 3
01Motor 4
02-3reserved
04Driver state 2
05-7reserved
10:1reserved
12Driver state 1
13Range and reference
14Supply 1
16Motor 1
17Motor 2
How to compute CAN ID

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

Step 2: Receive response

The controller started to send out the requested banks. Each bank has its CAN ID. CAN IDs with signal layouts are in the table below

BankDriver state 1Range and referenceSupply 1Motor 1Motor 2Motor 3Motor 4Driver state 2
CAN ID0x0D00x0D80x0E00x0F00x0F80x1000x1080x120

Decription of the received messages