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