Wiki source code of 5.1 CANopen PDO protocol
Last modified by Admin on 2026/04/24 10:30
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | (% data-numbered-headings-start="5" style="--numbered-headings-start: 4;font-size: 0px;color: rgba(0, 0, 0, 0.0);margin-bottom: 0px; margin-top: 0px;" %) | ||
| 2 | = Communication protocols = | ||
| 3 | |||
| 4 | (% data-numbered-headings-start="1" style="--numbered-headings-start: 0;font-size: 0px;color: rgba(0, 0, 0, 0.0);margin-bottom: 0px; margin-top: 0px;" %) | ||
| 5 | == CANopen PDO protocol == | ||
| 6 | |||
| 7 | (% class="wikigeneratedid" %) | ||
| 8 | [[CANopen_PDO_Main_Mini.dbc>>FileManager.CANopen_PDO_Main_Mini\.dbc]] | ||
| 9 | |||
| 10 | === General information === | ||
| 11 | |||
| 12 | The BMS Main 2.x device supports CiA 301 CANopen protocol for configuring and monitoring the battery system. | ||
| 13 | |||
| 14 | The communication parameters of the device are: | ||
| 15 | |||
| 16 | * CAN speed – 125, 250 (by default), 500 or 1000 kbps. | ||
| 17 | * COBID of the device (by default) – 32 (0x20). | ||
| 18 | |||
| 19 | The BMS Main 2.x supports the following features: | ||
| 20 | |||
| 21 | * SDO protocol (for configuring the system); | ||
| 22 | * PDO protocol (for interacting with external devices); | ||
| 23 | * Sync; | ||
| 24 | * Heartbeat producer; | ||
| 25 | * Heartbeat consumer. | ||
| 26 | |||
| 27 | The BMS Main 2.x transmits TPDO packets on every Sync message (CANID = 0x80, data length is 0). The device can send Sync messages itself. | ||
| 28 | |||
| 29 | There is the description of the parameters in the TPDO packets below. Column "Parameter type" contains an integer type of the parameter: | ||
| 30 | |||
| 31 | * U8 – unsigned 8–bit integer; | ||
| 32 | * U16 – unsigned 16–bit integer; | ||
| 33 | * S16 – signed 16–bit integer; | ||
| 34 | * U32 – unsigned 32–bit integer. | ||
| 35 | |||
| 36 | Words are in the **little endian**. | ||
| 37 | |||
| 38 | === TPDO packets === | ||
| 39 | |||
| 40 | ==== CANID ~= 0x180+COBID (0x1A0 by default) ==== | ||
| 41 | |||
| 42 | Packet length – 8 bytes. | ||
| 43 | |||
| 44 | Packet content: | ||
| 45 | |||
| 46 | (% style="width:524px" %) | ||
| 47 | |**Byte number**|**Parameter name**|(% style="width:116px" %)**Parameter type**|(% style="width:93px" %)**Converting** | ||
| 48 | |**0**|((( | ||
| 49 | Discrete input signals 1 (bitfield): | ||
| 50 | |||
| 51 | bit 0 – “Battery cover”; | ||
| 52 | |||
| 53 | bit 1 – “Charger connected”; | ||
| 54 | |||
| 55 | bit 2 – “Power down request”; | ||
| 56 | |||
| 57 | bit 3 – “Inhibit charging”; | ||
| 58 | |||
| 59 | bit 4 – “Inhibit discharging”; | ||
| 60 | |||
| 61 | bit 5 – “CH contactor feedback”; | ||
| 62 | |||
| 63 | bit 6 – “DCH contactor feedback”; | ||
| 64 | |||
| 65 | bit 7 – “Insulation status”. | ||
| 66 | )))|(% style="width:116px" %)U8|(% style="width:93px" %) | ||
| 67 | |**1–2**|Battery current|(% style="width:116px" %)S16|(% style="width:93px" %)0.1A/bit | ||
| 68 | |**3**|Minimum cell temperature|(% style="width:116px" %)S8|(% style="width:93px" %)1ºC/bit | ||
| 69 | |**4**|Maximum cell temperature|(% style="width:116px" %)S8|(% style="width:93px" %)1ºC/bit | ||
| 70 | |**5**|State of charge (SOC)|(% style="width:116px" %)U8|(% style="width:93px" %)1%/bit | ||
| 71 | |**6–7**|Battery voltage|(% style="width:116px" %)U16|(% style="width:93px" %)0.1V/bit | ||
| 72 | |||
| 73 | ==== CANID ~= 0x280+COBID (0x2A0 by default) ==== | ||
| 74 | |||
| 75 | Packet length – 8 bytes. | ||
| 76 | |||
| 77 | Packet content: | ||
| 78 | |||
| 79 | (% style="width:651px" %) | ||
| 80 | |**Byte number**|(% style="width:332px" %)**Parameter name**|(% style="width:121px" %)**Parameter type**|(% style="width:95px" %)**Converting** | ||
| 81 | |**0–3**|(% style="width:332px" %)((( | ||
| 82 | Internal signals (bitfield): | ||
| 83 | |||
| 84 | bit 0 – “Low SOC”; | ||
| 85 | |||
| 86 | bit 1 – “High charging current”; | ||
| 87 | |||
| 88 | bit 2 – “Charging” (0 – open, 1 – closed); | ||
| 89 | |||
| 90 | bit 3 – “Allow charging” (0 – open, 1 – closed); | ||
| 91 | |||
| 92 | bit 4 – “Charging current present”; | ||
| 93 | |||
| 94 | bit 5 – “Discharging” (0 – open, 1 – closed); | ||
| 95 | |||
| 96 | bit 6 – “Discharging current present”; | ||
| 97 | |||
| 98 | bit 7 – “Increased voltage” (EV); | ||
| 99 | |||
| 100 | bit 8 – “High DCH temperature”; | ||
| 101 | |||
| 102 | bit 9 – “Cooler”, state of the cooler (0 – off, 1 – on); | ||
| 103 | |||
| 104 | bit 10 – “HYG shutdown”, command from the HYG forklift to open the discharging contactor; | ||
| 105 | |||
| 106 | bit 11 – “Init”, initialization signal (during the initialization current sensor is calibrating and BMS Logic devices are scanning); | ||
| 107 | |||
| 108 | bit 12 – “Precharging” (0 – open, 1 – closed); | ||
| 109 | |||
| 110 | bit 13 – “Combilift shutdown”, command from the Combilift forklift to open the discharging contactor; | ||
| 111 | |||
| 112 | bit 14 – “Cell analysis”, signal of started analysis of the cells; | ||
| 113 | |||
| 114 | bit 15 – “Balancing series 1”; | ||
| 115 | |||
| 116 | bit 16 – “Balancing series 2”; | ||
| 117 | |||
| 118 | bit 17 – “Discharging (AUX)” (0 – opened, 1 – closed); | ||
| 119 | |||
| 120 | bit 18 – “Acknowledgement of power down”; | ||
| 121 | |||
| 122 | bit 19 – “Crown EWS”; | ||
| 123 | |||
| 124 | bit 20 – “Main contactor” (0 – open, 1 – closed); | ||
| 125 | |||
| 126 | bit 21 – “Service reset”; | ||
| 127 | |||
| 128 | bit 22 – “Charging/Discharging” (0 – open, 1 – closed); | ||
| 129 | |||
| 130 | bit 23 – “Ready to charge” (the voltage of the cells is less than the threshold value and there are no errors that prohibit charging); | ||
| 131 | |||
| 132 | bit 24 – “Ready to discharge” (the voltage of the cells is greater than the threshold value and there are no errors that prohibit discharging); | ||
| 133 | |||
| 134 | bit 25 – “Power up”; | ||
| 135 | |||
| 136 | bits 26–31 – reserved. | ||
| 137 | )))|(% style="width:121px" %)U32|(% style="width:95px" %) | ||
| 138 | |**4–7**|(% style="width:332px" %)((( | ||
| 139 | Errors register 1 (bitfield): | ||
| 140 | |||
| 141 | bit 0 – “Overcurrent”; | ||
| 142 | |||
| 143 | bit 1 – “Undervoltage”; | ||
| 144 | |||
| 145 | bit 2 – “Overvoltage”; | ||
| 146 | |||
| 147 | bit 3 – “Low DCH temperature”, temperature is too low for discharging; | ||
| 148 | |||
| 149 | bit 4 – “High DCH temperature”, temperature is too high for discharging; | ||
| 150 | |||
| 151 | bit 5 – “Battery cover”; | ||
| 152 | |||
| 153 | bit 6 – “High humidity”; | ||
| 154 | |||
| 155 | bit 7 – “Water”; | ||
| 156 | |||
| 157 | bit 8 – “High logic temperature”, some BMS Logic device is overheated; | ||
| 158 | |||
| 159 | bit 9 – “Logic offline”, connection with some BMS Logic device is lost; | ||
| 160 | |||
| 161 | bit 10 – “Critical error”; | ||
| 162 | |||
| 163 | bit 11 – “Crown error”, connection with the Crown forklift is lost; | ||
| 164 | |||
| 165 | bit 12 – “Cell count error”, number of cells is incorrect; | ||
| 166 | |||
| 167 | bit 13 – “HYG offline”, connection with the HYG forklift is lost; | ||
| 168 | |||
| 169 | bit 14 – “Need acknowledgement”, errors were detected in the past and should be acknowledged; | ||
| 170 | |||
| 171 | bit 15 – “Combilift offline”, connection with the Combilift forklift is lost; | ||
| 172 | |||
| 173 | bit 16 – “Short circuit”; | ||
| 174 | |||
| 175 | bit 17 – “High contactor temperature”, the discharging contactor is overheated; | ||
| 176 | |||
| 177 | bit 18 – “Logic count error”, number of BMS Logic devices is incorrect; | ||
| 178 | |||
| 179 | bit 19 – “ADC error”, battery current cannot be measured by ADC; | ||
| 180 | |||
| 181 | bit 20 – “Current sensor error”, wires which connect the current sensor with the BMS are damaged; | ||
| 182 | |||
| 183 | bit 21 – “CH contactor cycles error”, the charging contactor switches very often; | ||
| 184 | |||
| 185 | bit 22 – “DCH contactor cycles error”, the discharging contactor switches very often; | ||
| 186 | |||
| 187 | bit 23 – “Shunt offline”, connection with the BMS Current sensor is lost; | ||
| 188 | |||
| 189 | bit 24 – “Shunt error”, internal error of the BMS Current sensor; | ||
| 190 | |||
| 191 | bit 25 – “Settings error”, checksum of the setting is incorrect; | ||
| 192 | |||
| 193 | bit 26 – “WDT reset”, device is reset by the watchdog timer; | ||
| 194 | |||
| 195 | bit 27 – “No temperature sensors”; | ||
| 196 | |||
| 197 | bit 28 – “Temperature sensor is shorted”; | ||
| 198 | |||
| 199 | bit 29 – “Spirit offline”, connection with the Spirit truck is lost; | ||
| 200 | |||
| 201 | bits 30–31 – reserved. | ||
| 202 | )))|(% style="width:121px" %)U32|(% style="width:95px" %) | ||
| 203 | |||
| 204 | ==== CANID ~= 0x380+COBID (0x3A0 by default) ==== | ||
| 205 | |||
| 206 | Packet length – 8 bytes. | ||
| 207 | |||
| 208 | Packet content: | ||
| 209 | |||
| 210 | (% style="width:656px" %) | ||
| 211 | |**Byte number**|(% style="width:337px" %)**Parameter name**|(% style="width:118px" %)**Parameter type**|(% style="width:100px" %)**Converting** | ||
| 212 | |**0–3**|(% style="width:337px" %)((( | ||
| 213 | Errors register 2 (bitfield): | ||
| 214 | |||
| 215 | bit 0 – “Low CH temperature”, temperature is too low for charging; | ||
| 216 | |||
| 217 | bit 1 – “High CH temperature”, temperature is too high for charging; | ||
| 218 | |||
| 219 | bit 2 – “SD mount error”; | ||
| 220 | |||
| 221 | bit 3 – “SD read/write error”; | ||
| 222 | |||
| 223 | bit 4 – “Unallowable charging”, charging the battery through the discharging contactor; | ||
| 224 | |||
| 225 | bit 5 – “Stuck contactor”; | ||
| 226 | |||
| 227 | bit 6 – “CH contactor feedback error”; | ||
| 228 | |||
| 229 | bit 7 – “DCH contactor feedback error”; | ||
| 230 | |||
| 231 | bit 8 – “Insulation fault”; | ||
| 232 | |||
| 233 | bit 9 – “PCH contactor feedback error”; | ||
| 234 | |||
| 235 | bit 10 – “CH/DCH contactor feedback error”; | ||
| 236 | |||
| 237 | bit 11 – “Main contactor feedback error”; | ||
| 238 | |||
| 239 | bit 12 – reserved (set to 0); | ||
| 240 | |||
| 241 | bit 13 – “General error”; | ||
| 242 | |||
| 243 | bits 14-16 – reserved; | ||
| 244 | |||
| 245 | bit 17 – "Precharge error"; | ||
| 246 | |||
| 247 | bits 14-31 — reserved. | ||
| 248 | )))|(% style="width:118px" %)U32|(% style="width:100px" %) | ||
| 249 | |**4-5**|(% style="width:337px" %)((( | ||
| 250 | Discrete input signals 2 (bitfield): | ||
| 251 | |||
| 252 | bit 0 – “Charge request”; | ||
| 253 | |||
| 254 | bit 1 – “Precharge request”; | ||
| 255 | |||
| 256 | bit 2 – “Discharge request”; | ||
| 257 | |||
| 258 | bit 3 – “PCH contactor feedback”; | ||
| 259 | |||
| 260 | bit 4 – “CH/DCH contactor feedback”; | ||
| 261 | |||
| 262 | bit 5 – “Main contactor feedback”; | ||
| 263 | |||
| 264 | bit 6 – “Interlock”; | ||
| 265 | |||
| 266 | bit 7 – “Fuse 1”; | ||
| 267 | |||
| 268 | bit 8 – “Fuse 2”; | ||
| 269 | |||
| 270 | bit 9 – “Fuse 3”; | ||
| 271 | |||
| 272 | bit 10 – “Circuit breaker status”; | ||
| 273 | |||
| 274 | bit 11 – “Balancing request”; | ||
| 275 | |||
| 276 | bit 12 – “Close Main contactor”; | ||
| 277 | |||
| 278 | bit 13 – “Close External 1”; | ||
| 279 | |||
| 280 | bits 14-15 – reserved. | ||
| 281 | )))|(% style="width:118px" %)U16|(% style="width:100px" %) | ||
| 282 | |**6-7**|(% style="width:337px" %)Reserved|(% style="width:118px" %)U16|(% style="width:100px" %) |