Wiki source code of 7.1 CANopen PDO protocol
Last modified by Admin on 2026/04/24 16:31
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | (% data-numbered-headings-start="7" style="--numbered-headings-start: 6;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 Main X 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 – 64 (0x40). | ||
| 15 | |||
| 16 | The BMS Main 3X 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 Main 3X 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 | The bytes order of the word is **little endian**. | ||
| 34 | |||
| 35 | === TPDO packets === | ||
| 36 | |||
| 37 | ==== CANID ~= 0x180+COBID (0x1C0 by default) ==== | ||
| 38 | |||
| 39 | Packet length – 8 bytes. | ||
| 40 | |||
| 41 | Packet content: | ||
| 42 | |||
| 43 | |(% style="width:56px" %)**Byte number**|(% style="width:348px" %)**Parameter name**|(% style="width:81px" %)**Parameter type**|**Converting** | ||
| 44 | |(% style="width:56px" %)**0**|(% style="width:348px" %)((( | ||
| 45 | Discrete input signals 1 (bitfield): | ||
| 46 | |||
| 47 | bit 0 – signal “Battery cover”; | ||
| 48 | |||
| 49 | bit 1 – signal “Charge request”; | ||
| 50 | |||
| 51 | bit 2 – signal “Precharge request”; | ||
| 52 | |||
| 53 | bit 3 – signal “Discharge request”; | ||
| 54 | |||
| 55 | bit 4 – signal “CH contactor feedback”; | ||
| 56 | |||
| 57 | bit 5 – signal “DCH contactor feedback”; | ||
| 58 | |||
| 59 | bit 6 – signal “CH/DCH contactor feedback”; | ||
| 60 | |||
| 61 | bit 7 – signal “Insulation status”. | ||
| 62 | )))|(% style="width:81px" %)U8| | ||
| 63 | |(% style="width:56px" %)**1–2**|(% style="width:348px" %)Battery current|(% style="width:81px" %)S16|0.1A/bit | ||
| 64 | |(% style="width:56px" %)**3**|(% style="width:348px" %)Minimum cell temperature|(% style="width:81px" %)S8|1ºC/bit | ||
| 65 | |(% style="width:56px" %)**4**|(% style="width:348px" %)Maximum cell temperature|(% style="width:81px" %)S8|1ºC/bit | ||
| 66 | |(% style="width:56px" %)**5**|(% style="width:348px" %)State of charge (SOC)|(% style="width:81px" %)U8|1%/bit | ||
| 67 | |(% style="width:56px" %)**6–7**|(% style="width:348px" %)Battery voltage|(% style="width:81px" %)U16|0.1V/bit | ||
| 68 | |||
| 69 | ==== CANID ~= 0x280+COBID (0x2A0 by default) ==== | ||
| 70 | |||
| 71 | Packet length – 8 bytes. | ||
| 72 | |||
| 73 | Packet content: | ||
| 74 | |||
| 75 | (% style="width:572px" %) | ||
| 76 | |(% style="width:63px" %)**Byte number**|(% style="width:345px" %)**Parameter name**|(% style="width:79px" %)**Parameter type**|(% style="width:76px" %)**Converting** | ||
| 77 | |(% style="width:63px" %)**0–3**|(% style="width:345px" %)((( | ||
| 78 | Internal signals (bitfield): | ||
| 79 | |||
| 80 | bit 0 – signal “Init” (current sensor calibration or battery modules scanning is performed); | ||
| 81 | |||
| 82 | bit 1 – signal “Charging” (0 – open, 1 – closed); | ||
| 83 | |||
| 84 | bit 2 – signal “Discharging” (0 – open, 1 – closed); | ||
| 85 | |||
| 86 | bit 3 – signal “Charging current present”; | ||
| 87 | |||
| 88 | bit 4 – signal “Discharging current present”; | ||
| 89 | |||
| 90 | bit 5 – signal “Charging/Discharging” (0 – open, 1 – closed); | ||
| 91 | |||
| 92 | bit 6 – signal “Precharging” (0 – open, 1 – closed); | ||
| 93 | |||
| 94 | bit 7 – signal “Interlock”; | ||
| 95 | |||
| 96 | bit 8 – signal “Fuse 1”; | ||
| 97 | |||
| 98 | bit 9 – signal “Fuse 2”; | ||
| 99 | |||
| 100 | bit 10 – signal “Fuse 3”; | ||
| 101 | |||
| 102 | bit 11 – signal “Heater” (0 – off, 1 – on); | ||
| 103 | |||
| 104 | bit 12 – signal “Cooler” (0 – off, 1 – on); | ||
| 105 | |||
| 106 | bit 13 – signal “Main contactor” (0 – open, 1 – closed); | ||
| 107 | |||
| 108 | bit 14 – signal “Service reset”; | ||
| 109 | |||
| 110 | bit 15 – signal “Coolant pump”; | ||
| 111 | |||
| 112 | bits 16-31 – not used. | ||
| 113 | )))|(% style="width:79px" %)U32|(% style="width:76px" %) | ||
| 114 | |(% style="width:63px" %)**4–7**|(% style="width:345px" %)((( | ||
| 115 | Errors (bitfield): | ||
| 116 | |||
| 117 | bit 0 – error “Battery cover”; | ||
| 118 | |||
| 119 | bit 1 – error “Modules offline”; | ||
| 120 | |||
| 121 | bit 2 – “Critical error”; | ||
| 122 | |||
| 123 | bit 3 – error “Voltage unbalance (CH)”; | ||
| 124 | |||
| 125 | bit 4 – error “Voltage unbalance (DCH)”; | ||
| 126 | |||
| 127 | bit 5 – error “Current unbalance (CH)”; | ||
| 128 | |||
| 129 | bit 6 – error “Current unbalance (DCH)”; | ||
| 130 | |||
| 131 | bit 7 – error “Charging current unbalance”; | ||
| 132 | |||
| 133 | bit 8 – error “Discharging current unbalance”; | ||
| 134 | |||
| 135 | bit 9 – reserved (set to 0); | ||
| 136 | |||
| 137 | bit 10 – “CH contactor feedback error”; | ||
| 138 | |||
| 139 | bit 11 – “DCH contactor feedback error”; | ||
| 140 | |||
| 141 | bit 12 – “CH/DCH contactor feedback error”; | ||
| 142 | |||
| 143 | bit 13 – “Insulation fault”; | ||
| 144 | |||
| 145 | bit 14 – error “WDT reset”; | ||
| 146 | |||
| 147 | bit 15 – error “Overcurrent”; | ||
| 148 | |||
| 149 | bit 16 – reserved (set to 0); | ||
| 150 | |||
| 151 | bit 17 – error “High humidity”; | ||
| 152 | |||
| 153 | bit 18 – error “Water”; | ||
| 154 | |||
| 155 | bit 19 – error “Short circuit”; | ||
| 156 | |||
| 157 | bit 20 – error “Contactor high temperature”; | ||
| 158 | |||
| 159 | bit 21 – error “Stuck contactor”; | ||
| 160 | |||
| 161 | bit 22 – reserved (set to 0); | ||
| 162 | |||
| 163 | bit 23 – “ADC error”; | ||
| 164 | |||
| 165 | bit 24 – reserved (set to 0); | ||
| 166 | |||
| 167 | bit 25 – “Mount error”; | ||
| 168 | |||
| 169 | bit 26 – “FS error”; | ||
| 170 | |||
| 171 | bit 27 – reserved (set to 0); | ||
| 172 | |||
| 173 | bit 28 – “PCH contactor feedback error”; | ||
| 174 | |||
| 175 | bit 29 – “Main contactor feedback error”; | ||
| 176 | |||
| 177 | bit 30 – “Precharge error”; | ||
| 178 | |||
| 179 | bit 31 – “Current limit error”. | ||
| 180 | )))|(% style="width:79px" %)U32|(% style="width:76px" %) | ||
| 181 | |||
| 182 | ==== CANID ~= 0x380+COBID (0x3A0 by default) ==== | ||
| 183 | |||
| 184 | Packet length – 8 bytes. | ||
| 185 | |||
| 186 | Packet content: | ||
| 187 | |||
| 188 | |(% style="width:66px" %)**Byte number**|(% style="width:339px" %)**Parameter name**|(% style="width:81px" %)**Parameter type**|(% style="width:85px" %)**Converting** | ||
| 189 | |(% style="width:66px" %)**4-5**|(% style="width:339px" %)((( | ||
| 190 | Discrete input signals 2 (bitfield): | ||
| 191 | |||
| 192 | bit 0 – signal “Join to charge”; | ||
| 193 | |||
| 194 | bit 1 – signal “Join to discharge; | ||
| 195 | |||
| 196 | bit 2 – signal “PCH contactor feedback”; | ||
| 197 | |||
| 198 | bit 3 – signal “Main contactor feedback”; | ||
| 199 | |||
| 200 | bit 4 – signal “Interlock”; | ||
| 201 | |||
| 202 | bits 5-15 – not used. | ||
| 203 | )))|(% style="width:81px" %)U16|(% style="width:85px" %) | ||
| 204 | |(% style="width:66px" %)**6-7**|(% style="width:339px" %)Reserved|(% style="width:81px" %)U16|(% style="width:85px" %) |