Wiki source code of 6.1 CANopen PDO protocol
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 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 | === 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 | |||
54 | bit 2 – “Power down request”; | ||
55 | |||
56 | bit 3 – “Inhibit charging”; | ||
57 | |||
58 | bit 4 – “Inhibit discharging”; | ||
59 | |||
60 | bit 5 – “CH contactor feedback”; | ||
61 | |||
62 | bit 6 – “DCH contactor feedback”; | ||
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 | |||
97 | bit 7 – “Increased voltage” (EV); | ||
98 | |||
99 | bit 8 – “High DCH temperature”; | ||
100 | |||
101 | bit 9 – “Cooler”, state of the cooler (0 – off, 1 – on); | ||
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 | |||
113 | bit 15 – “Balancing series 1”; | ||
114 | |||
115 | bit 16 – “Balancing series 2”; | ||
116 | |||
117 | bit 17 – “Discharging (AUX)” (0 – opened, 1 – closed); | ||
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 | |||
135 | bits 26–31 – reserved. | ||
136 | )))|(% style="width:121px" %)U32|(% style="width:95px" %) | ||
137 | |**4–7**|(% style="width:332px" %)((( | ||
138 | Errors register 1 (bitfield): | ||
139 | |||
140 | bit 0 – “Overcurrent”; | ||
141 | |||
142 | bit 1 – “Undervoltage”; | ||
143 | |||
144 | bit 2 – “Overvoltage”; | ||
145 | |||
146 | bit 3 – “Low DCH temperature”, temperature is too low for discharging; | ||
147 | |||
148 | bit 4 – “High DCH temperature”, temperature is too high for discharging; | ||
149 | |||
150 | bit 5 – “Battery cover”; | ||
151 | |||
152 | bit 6 – “High humidity”; | ||
153 | |||
154 | bit 7 – “Water”; | ||
155 | |||
156 | bit 8 – “High logic temperature”, some BMS Logic device is overheated; | ||
157 | |||
158 | bit 9 – “Logic offline”, connection with some BMS Logic device is lost; | ||
159 | |||
160 | bit 10 – “Critical error”; | ||
161 | |||
162 | bit 11 – “Crown error”, connection with the Crown forklift is lost; | ||
163 | |||
164 | bit 12 – “Cell count error”, number of cells is incorrect; | ||
165 | |||
166 | bit 13 – “HYG offline”, connection with the HYG forklift is lost; | ||
167 | |||
168 | bit 14 – “Need acknowledgement”, errors were detected in the past and should be acknowledged; | ||
169 | |||
170 | bit 15 – “Combilift offline”, connection with the Combilift forklift is lost; | ||
171 | |||
172 | bit 16 – “Short circuit”; | ||
173 | |||
174 | bit 17 – “High contactor temperature”, the discharging contactor is overheated; | ||
175 | |||
176 | bit 18 – “Logic count error”, number of BMS Logic devices is incorrect; | ||
177 | |||
178 | bit 19 – “ADC error”, battery current cannot be measured by ADC; | ||
179 | |||
180 | bit 20 – “Current sensor error”, wires which connect the current sensor with the BMS are damaged; | ||
181 | |||
182 | bit 21 – “CH contactor cycles error”, the charging contactor switches very often; | ||
183 | |||
184 | bit 22 – “DCH contactor cycles error”, the discharging contactor switches very often; | ||
185 | |||
186 | bit 23 – “Shunt offline”, connection with the BMS Current sensor is lost; | ||
187 | |||
188 | bit 24 – “Shunt error”, internal error of the BMS Current sensor; | ||
189 | |||
190 | bit 25 – “Settings error”, checksum of the setting is incorrect; | ||
191 | |||
192 | bit 26 – “WDT reset”, device is reset by the watchdog timer; | ||
193 | |||
194 | bit 27 – “No temperature sensors”; | ||
195 | |||
196 | bit 28 – “Temperature sensor is shorted”; | ||
197 | |||
198 | bit 29 – “Spirit offline”, connection with the Spirit truck is lost; | ||
199 | |||
200 | bits 30–31 – reserved. | ||
201 | )))|(% style="width:121px" %)U32|(% style="width:95px" %) | ||
202 | |||
203 | ==== CANID ~= 0x380+COBID (0x3A0 by default) ==== | ||
204 | |||
205 | Packet length – 8 bytes. | ||
206 | |||
207 | Packet content: | ||
208 | |||
209 | (% style="width:656px" %) | ||
210 | |**Byte number**|(% style="width:337px" %)**Parameter name**|(% style="width:118px" %)**Parameter type**|(% style="width:100px" %)**Converting** | ||
211 | |**0–3**|(% style="width:337px" %)((( | ||
212 | Errors register 2 (bitfield): | ||
213 | |||
214 | bit 0 – “Low CH temperature”, temperature is too low for charging; | ||
215 | |||
216 | bit 1 – “High CH temperature”, temperature is too high for charging; | ||
217 | |||
218 | bit 2 – “SD mount error”; | ||
219 | |||
220 | bit 3 – “SD read/write error”; | ||
221 | |||
222 | bit 4 – “Unallowable charging”, charging the battery through the discharging contactor; | ||
223 | |||
224 | bit 5 – “Stuck contactor”; | ||
225 | |||
226 | bit 6 – “CH contactor feedback error”; | ||
227 | |||
228 | bit 7 – “DCH contactor feedback error”; | ||
229 | |||
230 | bit 8 – “Insulation fault”; | ||
231 | |||
232 | bit 9 – “PCH contactor feedback error”; | ||
233 | |||
234 | bit 10 – “CH/DCH contactor feedback error”; | ||
235 | |||
236 | bit 11 – “Main contactor feedback error”; | ||
237 | |||
238 | bit 12 – reserved (set to 0); | ||
239 | |||
240 | bit 13 – “General error”; | ||
241 | |||
242 | bits 14-31 — reserved. | ||
243 | )))|(% style="width:118px" %)U32|(% style="width:100px" %) | ||
244 | |**4-5**|(% style="width:337px" %)((( | ||
245 | Discrete input signals 2 (bitfield): | ||
246 | |||
247 | bit 0 – “Charge request”; | ||
248 | |||
249 | bit 1 – “Precharge request”; | ||
250 | |||
251 | bit 2 – “Discharge request”; | ||
252 | |||
253 | bit 3 – “PCH contactor feedback”; | ||
254 | |||
255 | bit 4 – “CH/DCH contactor feedback”; | ||
256 | |||
257 | bit 5 – “Main contactor feedback”; | ||
258 | |||
259 | bit 6 – “Interlock”; | ||
260 | |||
261 | bit 7 – “Fuse 1”; | ||
262 | |||
263 | bit 8 – “Fuse 2”; | ||
264 | |||
265 | bit 9 – “Fuse 3”; | ||
266 | |||
267 | bit 10 – “Circuit breaker status”; | ||
268 | |||
269 | bits 11-15 – reserved. | ||
270 | )))|(% style="width:118px" %)U16|(% style="width:100px" %) | ||
271 | |**6-7**|(% style="width:337px" %)Reserved|(% style="width:118px" %)U16|(% style="width:100px" %) |