4. CANopen protocol
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 number | Parameter name | Parameter type | Converting |
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-7 | Reserved (set to 0) | - | - |
CANID = 0x280+COBID (0x296 by default)
The packet length is 8 bytes. The transmission period is 100 ms.
Packet content:
Byte number | Parameter name | Parameter type | Converting |
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 | U16 | 1kOhm/bit |
3-4 | RESISTANCE_MINUS – insulation resistance between the negative power bus and the chassis: 0 – minimum resistance 10000 – maximum resistance | U16 | 1kOhm/bit |
5 | BUS_VOLATGE_CALCULATED: 0 – voltage value is not calculated; 1 – voltage value is calculated. | U8 | - |
6-7 | BUS_VOLTAGE – power bus voltage | U16 | 0.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 number | Parameter name | Parameter type | Converting |
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-7 | Reserved (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 name | Index | Subindex | Parameter type | Converting |
ALARM_RESISTANCE – ALARM signal generation level (default 50kOhm) | 0x4010 | 0x01 | U16 | 1kOhm/bit |
WARNING_RESISTANCE – WARNING signal generation level (default 100kOhm) | 0x4010 | 0x02 | U16 | 1kOhm/bit |
An example of setting ALARM_RESISTANCE to 50 kOhm (0x0032):
Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 | |
Command | 0x2B | 0x10 | 0x40 | 0x01 | 0x32 | 0x00 | 0x00 | 0x00 |
Answer | 0x60 | 0x10 | 0x40 | 0x01 | 0x00 | 0x00 | 0x00 | 0x00 |
An example of setting WARNING_RESISTANCE to 100 kOhm (0x0064):
Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 | |
Command | 0x2B | 0x10 | 0x40 | 0x02 | 0x64 | 0x00 | 0x00 | 0x00 |
Answer | 0x60 | 0x10 | 0x40 | 0x02 | 0x00 | 0x00 | 0x00 | 0x00 |