PACE RS485 Communication Protocal
(PACE-RS485-MS)
2018-06-15
考
参
锋
赣
供
1
仅
Change Record
2018-06-15 Initial finalization(V1.0) Wang
考
参
锋
赣
供
2
仅
For example
When the external monitoring equipment needs to obtain battery data through RS485 interface , the PACK
address range is 2-15, please set it in sequence . For example , to obain the PACK data of address 0 ,
follow these steps:
step1、Issue the confirm PACK address command with address 2 .If there is a correct response , the PACK
with address 2 can communicate normally. If no response is received ,steps2 and 3 are not required.(This
step is not required. You can directly perform steps 2 and 3)
7E 32 35 30 32 34 36 39 30 30 30 30 30 46 44 41 34 0D
step2、Issue the command to obtain the PACK analog quantity with address 2:
7E 32 35 30 32 34 36 34 32 45 30 30 32 30 32 46 44 32 45 0D
step3、Issue the command to obtain the PACK alert quantity with address 2::
7E 32 35 30 32 34 36 34 34 45 30 30 32 30 32 46 44 32 43 0D
To obtain the PACK data of other addresses , replace the ADR and INFO fields with the corresponding addresses
(marked in red in the preceding example)and calculate the correct CHKSUM
Response command information explanation::
Command information:7E 32 35 30 32 34 36 34 32 45 30 30 32 30 32 46 44 32 45 0D(Command to obtain analog
information of address 2)
Response information:
7E 32 35 30 32 34 36 30 30 46 30 37 41 30 30 30 32 31 30 30 44 33 37 30 43 45 35 30 44 30 38 30 43 45
44 30 44 30 36 30 43 45 37 30 44 31 44 30 43 45 42 30 43 46 38 30 43 46 41 30 43 46 42 30 44 30 37 30
43 45 31 30 43 46 31 30 43 43 32 30 44 30 36 30 36 30 42 41 41 30 42 41 43 30 42 41 36 30 42 41 37 30
42 41 39 30 42 42 32 30 30 30 30 43 46 39 34 30 36 44 36 30 33 31 33 38 38 30 30 30 30 31 33 38 38 45
32 36 31 0D
Response information explanation:
7E(SOI)
32 35(VER,that is veision 25H,V2.5)
30 30(ADR,the battery address is 0)
34 36(CID1,46H)
30 30(RTN,00H)
46 30 37 41(LENGTH,F07A,LENID is 07AH,DATAINFO length is 122 ,LCHKSUM is FH)
30 30(INFOFLAG is 00H。other information is DATAI)
30 30(COMMAND,as ADR,00H)
考
31 30(battery cell number M,is 10H,that has 16 cell)
30 44 33 37(first cell voltage:0D37H,that’s 3383mV)
参
30 43 45 35(second cell voltage:0CE5H,that’s 3301mV)
30 44 30 38(third cell voltage:0D08H,that’s 3336mV)
30 43 45 44(forth cell voltage:0CEDH,that’s 3309mV)
锋
30 44 30 36(fifth cell voltage:0D06H,that’s 3334mV)
30 43 45 37(sixth cell voltage:0CE7H,that’s 3303mV)
30 44 31 44(seventh cell voltage:0D1DH,that’s 3357mV)
赣
30 43 45 42(eighth cell voltage:0CEBH,that’s 3307mV)
30 43 46 38(ninth cell voltage:0CF8H,that’s 3320mV)
30 43 46 41(tenth cell voltage:0CFAH,that’s 3322mV)
供
3
仅
30 43 46 42(eleventh cell voltage:0CFBH,that’s 3323mV)
30 44 30 37(twelfth cell voltage:0D07H,that’s 3335mV)
30 43 45 31(thirteenth cell voltage:0CE1H,that’s 3297mV)
30 43 46 31(fourteenth cell voltage:0CF1H,that’s 3313mV)
30 43 43 32(fifteenth cell voltage:0CC2H,that’s 3266mV)
30 44 30 36(sixteenth cell voltage:0D06H,that’s 3334mV)
30 36(temperature number N,06H,has 6 temperatures)
30 42 41 41(first temperatur:0BAAH,that’s 2986,25.6℃)
30 42 41 43(second temperature:0BACH,that’s 2988,25.8℃)
30 42 41 36(third temperature:0BA6H,that’s 2982,25.2℃)
30 42 41 37(forth temperature:0BA7H,that’s 2983,25.3℃)
30 42 41 39(fifth temperature (MOS)
:0BA9H,that’s 2985,25.5℃)
30 42 42 32(sixth temperature(environment)
:0BB2H,that’s 2994,26.4℃)
30 30 30 30(PACK current,0000H,unit10mA,range:-327.68A-+327.67A)
43 46 39 34(PACK total voltage,CF94H that’s 53.140V)
30 36 44 36(PACK remain capacity,06D6H that’s 17.50AH)
30 33(user define number P,03H)
31 33 38 38(PACK full capacity,1388H that’s 50.00AH)
30 30 30 30(cycle times,0000H)
31 33 38 38(PACK design capacity,1388H that’s 50.00AH)
45 32 36 35(CHKSUM,E265H)
0D(EOI)
Remark:
when communication debugging between monitoring equipment and BMS by RS485,we should pay attention to
this situation:
1、 We should know the BMS is working or not, which can be judged by LED. if all LED is closed , we can
push the key at 3-6 seconds to wake up the BMS.
2、 Whether the address dialing switch is set correctly. The address setting range is 0-15 . Avoid setting
the address to the same situation . For products without address dialing switch , the default address
is 0 . The DIP switch is binary . For more information ,see product specifications.
3、 Corfirm whether RS485 connection is correct ?
4、 We should confirm that the monitoring equipment’s RS485 baud is suitable with specification.
5、 When parsing data , be careful to distinguish whether it is signed data ,and do not miss parsing INFOFLAG
考
when obtaining PACK analog quantity and alarm quantity response information.
6、 。
参
1、Physical interface and Communication mode
1.1 Physical interface
锋
The serial communication mode is adopted for Physical Interface,which is adopted by standard RS485
communication [Link] provides a information transmission methods by Asynchronous mode,a start bit,8data
bits,a stop bit,no check bit .The data transmission rate is 9600。
赣
1.2 Communication mode
The Communication mode adopts the Master-Slave response [Link] the PC software or monitoring
供
equipment initiates communication command as the host,the BMS responds the return command as the [Link]
4
仅
battery packs are slave PACK,and their address rangs from 0 to [Link] you need to communicate with the
external monitoring device through the RS485 interface of BMS,the external monitoring device is the host,
and the host cyclically polls each PACK of data. if the host don’t receive the response caomand or error
information in 500 ms when the host has sent the [Link] this case,this communication will be failed。
2、Protocal format
2.1 Frame format
Chart A.1 Frame format
Item 1 2 3 4 5 6 7 8 9
Bytes 1 1 1 1 1 2 LENID/2 2 1
Format SOI VER ADR CID1 CID2 LENGTH INFO CHKSUM EOI
2.2 basic format explanation
Chart A.2 Basic format
Item symbol meaning remark
1 SOI START OF INFORMATION (7EH)
2 VER Protocal version(2.5) (25H)
3 ADR Device address(0-15)
4 CID1 Device indication code(device type description)
5 CID2 Command information : control indication code ( data or action
description)
Response information:return code RTN
6 LENGTH INFO length of bytes(including LENID and LCHKSUM)
7 INFO Command information:control data infaomation (COMMAND_INFO)
Response information:response data information(DATA_INFO)
8 CHKSUM Check sum
9 EOI END OF INFORMATION CR(0DH)
Remark:VER-means communication veision,usually uses V2.5,as 25H。
考
ADR- battery pack address,the master PACK address is always set to 1,the salve pack address range is
2~15,Address 0 is used as a stand-alone machine。When the pack is used in parallel, avoid setting the
address to the same. The slave pack only responds to commands that match its address。
参
2.3 Data Format
2.3.1 Basic data Format
锋
Beyond that the SOI and EOI is transmitted by 16-hex format,other items is transmitted by 16-hex ascii
[Link] byte uses two ascii,for example,when the CID2 = 4BH,the 34H and 42H will be transmitted in
two bytes.
赣
2.3.2 LENGTH data Format
Chart A.3 LENGTH data Format
供
5
仅
MSB LSB
LCHKSUM LENID(means the information’s ascii bytes)
D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
2.3.3 LEDID
LENID means the ascii byte number of INFO,when LENID = 0,that means INFO is [Link] data bytes is not
uppt to 4096.
High byte is sent at first and low byte is sent at second for LENGTH information with four ASCII code
2.3.4 LCHKSUM
The calculation method of check code:D11D10D9D8+D7D6D5D4+D3D2D1D0
After sum, module 16 takes inverse plus 1
For example:
INFO:ASCII code number is 18,that’s LENID=0000 0001 0010B。
D11D10D9D8+D7D6D5D4+D3D2D1D0=0000B+0001B+0010B=0011B,module 16 is 0011B,0011B takes inverse plus
1 is 1101B,so LCHKSUM is 1101B。
so:LENGTH is 1101 0000 0001 0010B,that’s D012H.
2.4 CHKSUM data Format
CAll char ascii code is calculated for sum without SOI,EOI and CHKSUM,the result module 65536 takes
inverse plus 1。
For example:
When send or receive the data sequence:
“~1203400356ABCEFEFC72\R”(“~”is SOI,“CR” is EOI),
So the last five char “FC72\R”FC72 is CHKSUM,
Calculation method:
‘1’+ ‘2’+ ‘0’+ …+‘F’+ ‘E’=31H+32H+30H+…+46H+45H=038EH
038EH module 65536 is 038EH,038EH take inverse plus 1 is FC72H.
2.5 DATA_INFO data Format
This protocal use the fixed point data type to send information 1)Format(INTEGER,2bytes)
考
1)int format(INTEGER,2byte)
Signed int -32768-+32767
参
Unsigned int 0-+65535
High byte is send first,and the low byte is send second.
锋
2) unsigned char(CHAR,1byte,0-255)
赣
Chart A.4 Fixed point data type
Ordinal Telemetry content Data type Transmission unit
供
6
仅
1 Battery cell voltage Unsigned int mV
2 0.1K
temperature Unsigned int 25.5℃ = 25.5 * 10 + 2730 = 2985(0.1K)
-12.4℃ = -12.4 * 10 + 2730 = 2606(0.1K)
3 Total battery voltage Unsigned int mV
Charge or discharge
4 Signed int 10mA(the charge current is positive,the discharge
currnet current is negative)
5 Battery pack capacity Unsigned int 10mAH ( include the remain capacity,the
fullcapacity and designed capaticy)
2.6 data time
DATA_TIME and COMMAND_TIME format can see as the chart:
Chart A.5 Data time format
items range Data type remark
year (0-99) CHAR (one byte,decimal-format)
month (1-12) CHAR (one byte,decimal-format)
data (1-31) CHAR (one byte,decimal-format)
hour (0-23) CHAR (one byte,decimal-format)
minute (0-59) CHAR (one byte,decimal-format)
second (0-59) CHAR (one byte,decimal-format)
Remark:the year is transmitted by char-format,real value = data + 2000。The range is 2000-2099.
3、code allocation
3.1 equipment type code allocation table(CID1)
Chart A.6 CID1 table
考
item content CID1 remark
1 Iron lithium battery 46H ( suitable for
ternary lithium)
参
3.2 command information cade allocation chart(CID2)
锋
Chart A.7 CID2 table
item content CID2 remark
赣
1 Pack number 90H
2 Pack analog information 42H
供
7
仅
3 Pack warn information 44H
5 Software veision C1H define
6 Product information C2H define
Chart A.8 response information(RTN)
item symbol RTN remark
1 normal 00H
2 undefine 01H
3 Undefined 02H
4 Undefined 03H
5 CID2 undefine 04H define
4、command explanation
4.1 getting pack address
Chart A.9 Getting pack number information
Item 1 2 3 4 5 6 7 8 9
Bytes 1 1 1 1 1 2 LENID/2 2 1
Format SOI VER ADR 46H 90H LENGTH CHKSUM EOI
Remark:LENID = 00H。
This command is used to confirm whether the slave PACK exists. PC monitoring software or external monitoring
equipment can poll the slave PACK with addresses 0-15 in turn by changing the ADR field
Chart A.10 Response information
item 1 2 3 4 5 6 7 8 9
Bytes 1 1 1 1 1 2 LENID/2 2 1
考
Format SOI VER ADR 46H RTN LENGTH DATAINFO CHKSUM EOI
Remark:LENID = 02H,DATAINFO is the pack number information。
参
4.2 getting pack analog information
Chart A.11 Command information
锋
Item 1 2 3 4 5 6 7 8 9
Bytes 1 1 1 1 1 2 LENID/2 2 1
赣
Format SOI VER ADR 46H 42H LENGTH CHKSUM EOI
Remark:LENID = 02H
供
INFO has one byte,as COMMAND COMMAND = ADR ,getting all BMS analog information。
8
仅
COMMAND = 0FH,getting 15’s pack analog information
Chart A.12 response information
Item 1 2 3 4 5 6 7 8 9
Bytes 1 1 1 1 1 2 LENID/2 2 1
Format SOI VER ADR 46H RTN LENGTH DATAINFO CHKSUM EOI
remark:DATAINFO is up INFOFLAG with DATAI,DATAI as A.13:
INFOFLAG is 00H。
Chart A.13 DATAI data transmit order
item content DATAI bytes Remark
1 Command 1 As ADR
2 PACK number M / COMMAND value 1
3 PACK 1 battery data 2
4 PACK 2 battery data 2
5 …… ……
M + 2 PACK M battery data 2
When N = 6,the fist 4
are battery
temperature;The N-1
M + 3 Temperature’s number N 1
is MOS temperature;
The N is ambient
temperature.
M + 4 Temperature 1 2
M + 5 Temperature 2 2
M + 6 …… ……
M + N + 3 Temperature N 2
the charge current is
positive,the
M + N + 4 PACK current 2
discharge current is
考
negative (uint:10mA)
M + N + 5 PACK total voltage 2
参
M + N + 6 PACK remain capacity 2 uint:10mAH
M + N + 7 Define number P = 3 1
锋
M + N + 8 PACK full capacity 2 uint:10mAH
M + N + 9 Cycle number 2
赣
M + N + 10 PACK design capacity 2 uint:10mAH
4.3 getting warn information
供
9
仅
Chart A.14 Getting pack warn command information
Item 1 2 3 4 5 6 7 8 9
Bytes 1 1 1 1 1 2 LENID/2 2 1
Format SOI VER ADR 46H 44H LENGTH CHKSUM EOI
Remark:LENID = 02H。
INFO has one byte,as COMMAND:
COMMAND = 02H,getting PACK1 warn information。
……
ADR =0FH,getting PACK15 warn information。
Chart A.15 Getting pack warn command response information
Item 1 2 3 4 5 6 7 8 9
Bytes 1 1 1 1 1 2 LENID/2 2 1
Format SOI VER ADR 46H RTN LENGTH DATAINFO CHKSUM EOI
Remark :DATAINFO is consist of INFOFLAG and WARNSTATE,WARNSTATE can see at chart A.16
INFOFLAG can be 00H。
Chart A.16 Response DATAI data transmittion order
item content DATAI bytes Remark
1 Command 1 As ADR
2 PACK number M 1
3 PACK 1 warn information 1
4 PACK 2 warn information 1
5 …… ……
M + 2 PACK M warn information 1
M + 3 Temperature number N 1
考
M + 4 Temperature 1 warn 1
M + 5 Temperature 2 warn 1
M + 6 …… ……
参
M + N + 3 Temperature N warn 1
M + N + 4 PACK charge current warn 1
锋
M + N + 5 PACK total voltage warn 1
M + N + 6 PACK discharge current warn 1
赣
M + N + 7 Protect state 1 1 See at chart A.17
M + N + 8 Protect state 2 1 See at chart A.18
供
10
仅
M + N + 9 Instructions state 1 See at chart A.19
M + N + 10 Control state 1 See at chart A.20
M + N + 11 Fault state 1 See at chart A.21
M + N + 12 Balance state1 1 Balance state for 1-8
M + N + 13 Balance state2 1 Balance state for 9-16
M + N + 14 Warn state1 1 See at charA.22
M + N + 15 Protect state 2 1 See at charA.23
description:
—— 00H:normal;
—— 01H:below lower limit;
—— 02H:above upper limit;
—— 80H~EFH:user define;
—— F0H:other fault。
Chart A.17 Protect state1 explanation
BIT content Remark
7 undefine
6 Short circuit 1:Short circuit protect 0:normal
5 Discharge current protect 1:Discharge current protect 0:normal
4 charge current protect 1:charge current protect 0:normal
3 Lower total voltage protect 1:Lower total voltage protect 0:normal
2 Above total voltage protect 1:Above total voltage protect 0:normal
1 Lower cell voltage protect 1:Above total voltage protect 0:normal
0 Above cell voltage protect 1:Above cell voltage protect 0:normal
Chart A.18 Protect state 2 explanation
考
BIT content Remark
Fully 1:Fully 0:normal
参
7
Lower Env temperature protect 1:Lower Env temperature protect 0:
6
normal
锋
above Env temperature protect 1:above Env temperature protect 0:
5
normal
赣
Above MOS temperature protect 1:Above MOS temperature protect 0:
4
normal
Lower discharge temperature protect 1:Lower discharge temperature protect
供
11
仅
0:normal
Lower charge temperature protect 1:Lower charge temperature protect 0:
2
normal
above discharge temperature protect 1:above discharge temperature protect
1
0:normal
above charge temperature protect 1:above charge temperature protect 0:
0
normal
Chart A.19 Instructions state explanation
BIT content remark
7 Heart indicate 1:ON 0:OFF
undefine
6
5 ACin 1:ON 0:normal
4 Reverse indicate 1:ON 0:normal
3 Pack indicate 1:Pack indicate 0:unuse
2 DFET indicate 1:ON 0:OFF
1 * CFET indicate 1:ON 0:OFF
0 Current limit indicate 1:ON 0:OFF
If either of the charging MOS or the current limiting circuit is ON ,it is displayed as ON ; If both are
OFF ,it is displayed as OFF 。
Chart A.20 Control state explanation
BIT Content Remark
7 Undefined
Undefined
6
5 LED warn functiuon 1:unenable 0:enable
4 Current limit function 1:unenable 0:enable
考
3 Current limit gear 1:low gear 0:high gear
2 undefine
参
1 undefine
0 Buzzer warn function 1:enable 0:unenable
锋
Chart A.21 Fault state explanation
赣
BIT content remark
undefine
供
12
仅
6 undefine
5 Sample fault 1:fault 0:normal
4 Cell fault 1:fault 0:normal
3 Undefined
2 NTC fault(NTC) 1:fault 0:normal
1 Discharge MOS fault 1:fault 0:normal
0 Charge MOS fault 1:fault 0:normal
Chart A.22 Warn state1 explanation
BIT Content Remark
7 undefine
undefine
6
5 Discharge current warn 1:warn 0:normal
4 charge current warn 1:warn 0:normal
3 Lower tatal voltage warn 1:warn 0:normal
2 above tatal voltage warn 1:warn 0:normal
1 Lower cell voltage warn 1:warn 0:normal
0 above cell voltage warn 1:warn 0:normal
Chart A.23 Warn state2 explanation
BIT Content Remark
7 Low power warn 1:warn 0:normal
6 High MOS temperature warn 1:warn 0:normal
5 low env temperature warn 1:warn 0:normal
high env temperature warn 1:warn 0:normal
考
3 low discharge temperature warn 1:warn 0:normal
low charge temperature warn) 1:warn 0:normal
参
1 above discharge temperature warn 1:warn 0:normal
above charge temperature warn 1:warn 0:normal
锋
4.4 software version information
赣
Chart A.24 getting software version information command
供
Item 1 2 3 4 5 6 7 8 9
13
仅
Bytes 1 1 1 1 1 2 LENID/2 2 1
Format SOI VER ADR 46H C1H LENGTH CHKSUM EOI
Remark:LENID = 00H。
Chart A.25 response information for version command
Item 1 2 3 4 5 6 7 8 9
Bytes 1 1 1 1 1 2 LENID/2 2 1
Format SOI VER ADR 46H C2H LENGTH CHKSUM EOI
Remark:LENID = 28H。
DATAINFO is consist of software version,includes of 20 char,if not 20 char, you can set space。
4.5 getting product information
Chart A.26 getting product information command
Item 1 2 3 4 5 6 7 8 9
Bytes 1 1 1 1 1 2 LENID/2 2 1
Format SOI VER ADR 46H C2H LENGTH CHKSUM EOI
remark: LENID = 00H。
4.6 response for getting product information
Item 1 2 3 4 5 6 7 8 9
Bytes 1 1 1 1 1 2 LENID/2 2 1
Format SOI VER ADR 46H RTN LENGTH DATAINFO CHKSUM EOI
Remark:LENID = 50H or 28H。
DATAINFO is consist of product information,includes of 20 char,if not 20 char, you can set space。
考
参
锋
赣
供
14
仅