4. CANopen protocol

Last modified by Admin on 2025/01/29 11:04

CANopen protocol

General information

The BMS IMD device supports CiA 301 CANopen protocol for configuring and monitoring its state.

The communication parameters of the device are:

  • CAN speed – 125, 250 (by default), 500 or 1000 kbps.
  • Device COBID by default – 22 (0x16).

The BMS IMD supports the following features:

  • SDO protocol (for configuring the device).
  • PDO protocol (for interacting with external devices).
  • Heartbeat producer.

There is the description of the parameters in the PDO and SDO packets below. Column "Parameter type" contains an integer type of the parameter:

  • U8 – unsigned 8–bit integer;
  • U16 – unsigned 16–bit integer;
  • S16 – signed 16–bit integer;
  • U32 – unsigned 32–bit integer.

Words are in the little endian.

TPDO packets

CANID = 0x180+COBID (0x196 by default)

The packet length is 8 bytes. The transmission period is 100 ms.

Packet content:

Byte numberParameter nameParameter typeConverting
0

INSULATION_STATUS:

0 – NO_DATA (there is no data about the insulation resistance);

1 – OK (the insulation resistance has normal values);

2 – WARNING (low insulation resistance warning; insulation resistance is less than the WARNING_RESISTANCE level, but greater than the ALARM_RESISTANCE level);

3 – ALARM (message about emergency low insulation resistance; insulation resistance is less than ALARM_RESISTANCE level).

Note – When WORK_PERMISSION is reset and before the first measurement, the status is set to NO_DATA.

U8-
1

INTERNAL_ERROR (bitfield):

bit 0 – LOW_BUS_VOLTAGE_ERROR;

bit 1 – TIMEOUT_ERROR (transient measurement timeout);

bit 2 – ANOMALY_ERROR (an abnormal condition between the positive and negative bus bars of the battery and the chassis, may indicate intermittent contact of the battery bus bars with the chassis);

bit 3 – SELF_TEST_ERROR;

bits 4-7 – reserved.

U8-
2

STATE:

0 – IDLE (device is not working);

1 – WORK (device is working);

2 – CRITICAL_FAULT.

U8-
3-7Reserved (set to 0)--

CANID = 0x280+COBID (0x296 by default)

The packet length is 8 bytes. The transmission period is 100 ms.

Packet content:

Byte numberParameter nameParameter typeConverting
0

RESISTANCE_CALCULATED:

0 – insulation resistance values are not calculated;

1 – insulation resistance values are calculated.

U8-
1-2

RESISTANCE_PLUS – insulation resistance between the positive power bus and the chassis:

0 – minimum resistance

10000 – maximum resistance

U161kOhm/bit
3-4

RESISTANCE_MINUS – insulation resistance between the negative power bus and the chassis:

0 – minimum resistance

10000 – maximum resistance

U161kOhm/bit
5

BUS_VOLATGE_CALCULATED:

0 – voltage value is not calculated;

1 – voltage value is calculated.

U8-
6-7BUS_VOLTAGE – power bus voltageU160.1V/bit

RPDO packets

CANID = 0x200+COBID (0x216 by default)

The packet length is 8 bytes. The transmission period is 100 ms.

Packet content:

Byte numberParameter nameParameter typeConverting
0

ALLOW_WORK:

0 – work is not allowed;

1 – work is allowed.

U8-
1

FORCE_SELFTEST – command to force device self-diagnosis:

0 – using an internal algorithm for self-diagnosis;

1 – forced start of self-diagnosis (if active, only self-diagnosis is performed).

U8-
2-7Reserved (set to 0)--

SDO dictionary

To set the WARNING and ALARM signal generation levels, the following settings are available, which can be changed via the CANopen SDO protocol:

Parameter nameIndexSubindexParameter typeConverting
ALARM_RESISTANCE – ALARM signal generation level (default 50kOhm)0x40100x01U161kOhm/bit
WARNING_RESISTANCE – WARNING signal generation level (default 100kOhm)0x40100x02U161kOhm/bit

An example of setting ALARM_RESISTANCE to 50 kOhm (0x0032):

 Byte 0Byte 1Byte 2Byte 3Byte 4Byte 5Byte 6Byte 7
Command0x2B0x100x400x010x320x000x000x00
Answer0x600x100x400x010x000x000x000x00

An example of setting WARNING_RESISTANCE to 100 kOhm (0x0064):

 Byte 0Byte 1Byte 2Byte 3Byte 4Byte 5Byte 6Byte 7
Command0x2B0x100x400x020x640x000x000x00
Answer0x600x100x400x020x000x000x000x00