SRNE Modbus Protocol Overview
SRNE Modbus Protocol Overview
[Link]
SRNE_MODBUS PROTOCOL
Revision
Version Revision contents Modified by
date
This version and before,the controller fault
V3.4 2015-08-06 information is defined as low 16 bits,and high 16 bits
are reserved.
Changes to the controller fault information is placed
V3.5 2016-11-09
in the high 16 bits,and the low 16 bits are reserved.
In example 4.7,the temperature reading address 0X0102
changed to 0X0103.
V3.6 2017-07-05 In example 4.19,the seventh byte of the message is
missing the total number of bytes.
New:communication line description.
Tel: 0755-26458295
Fax: 0755-27325578
Website: [Link]
Specification
SRNE_MODBUS Protocol
Directory
1 Interface specification and serial port configuration information..................................................................................1
No. Definition
① Power supply positive
② D+
③ D-
④ Power supply grounding/signal grounding
⑤ NC
⑥ NC
⑦ NC
⑧ NC
No. Definition
① GND
② Transmitting terminal TX
③ Receiving terminal RX
④ 12.8V
2.1 Format
Start character Address code Function code Data Error check End character
2.2 Descriptions
1)start character:>10ms
2)address code:1 byte,range:01H to F7H(decimal 1 to 247),00His a broadcast address to which all slaves respond but
do not return commands.
Remarks:Using FFH as the address access can bypass the local device address with data return. It is generally used as a
stand-alone device such as some general monitoring screens, Bluetooth, etc.; FFH address is not suitable for multiple 485
bus access.
3)Function code:1 byte
Accessed data
Command name Function code Error code
type
Read a single or multiple
2 bytes 03H 83H
word register
Write a single word register 2 bytes 06H 86H
Write N word registers in a
2 bytes 10H 90H
row
No accessed
Reset to factory defaults 78H F8H
data
No accessed
Clear history 79H F9H
data
4)Data:N bytes
5)Error check:2 bytes,it’s the CRC checksum of the address code,function code and each byte of the data.
6)End character:>10ms
Note:
1)The data address and the data itself are 2 bytes,with the high byte sent first and then the low byte;for CRC,the low byte
is sent first and the high byte is sent next.
2)The error code is the error response function code returned by the client when there is some error in the frame data
sent by the server,error code=function code|80H.
2.3 Notes
1)PDU address:(0000 to 0009)/(000A to 001A)/(0100 to 0122)/(E001 to E02D)/(F000 to F3FF),these address segments
are not allowed to cross access and modification in the same command!!!
2)The parameters and options of this paper are for the planning and introduction of all the products of this company,so it
does not mean that each product has the functions and operation of the following [Link] to the instruction manual
for details.
3)Data below suffixed with an “H” are hexadecimal,and the others are decimal.
1.1
1.1
2.5 Example
Normal response:
No. of
Description Command
bytes
Device
BYTE 01H~F7H,FFH
address
Function
BYTE 03H
code
Data length BYTE 01H~FAH
Data read out (High byte sent first, low
Data content WORD
byte sent next)
Data read out (High byte sent first, low
... WORD
byte sent next)
Check code WORD CRC checksum of all the above bytes
Exception response:
No. of
Description Command
bytes
Device
BYTE 01H~F7H,FFH
address
Error code BYTE 83H
Exception
BYTE N (N=1,2,3,4)
code
Check code WORD CRC checksum of all the above bytes
Normal response:
No. of
Description Command
bytes
Device
BYTE 01H~F7H,FFH
address
Function code BYTE 06H
Start address WORD 0000H~FFFFH
Write data in WORD 0000H~FFFFH
Exception response:
No. of
Description Command
bytes
Device
BYTE 01H~F7H,FFH
address
Error code BYTE 86H
Exception
BYTE N (N=1,2,3,4)
code
Check code WORD CRC checksum of all the above bytes
Normal response:
No. of
Description Command
bytes
Device
BYTE 01H~F7H,FFH
address
Function code BYTE 10H
Start address WORD 0000H~FFFFH
No. of written
WORD 0001H~007DH
bytes
Check code WORD CRC checksum of all the above bytes
Exception response:
No. of
Description Command
bytes
Device
BYTE 01H~F7H,FFH
address
Error code BYTE 90H
Exception
BYTE N (N=1,2,3,4)
code
Check code WORD CRC checksum of all the above bytes
Normal response:
No. of
Description Command
bytes
Device address BYTE 01H~F7H,FFH
Function code BYTE 78H
Complementary
WORD 0000H
data
Complementary
WORD 0001H
data
Check code WORD CRC checksum of all the above bytes
Exception response:
No. of
Description Command
bytes
Device
BYTE 01H~F7H,FFH
address
Error code BYTE F8H
Exception
BYTE N (N=1,2,3,4)
code
Check code WORD CRC checksum of all the above bytes
Normal response:
No. of
Description Command
bytes
Device
BYTE 01H~F7H,FFH
address
Function code BYTE 79H
Complementa
WORD 0000H
ry data
Complementa
WORD 0001H
ry data
Check code WORD CRC checksum of all the above bytes
Exception response:
No. of
Description Command
bytes
Device
BYTE 01H~F7H,FFH
address
Error code BYTE F9H
Exception
BYTE N (N=1,2,3,4)
code
Check code WORD CRC checksum of all the above bytes
Reserved(20 bytes)
Parse instance
PDU Retur
Bytes R/ W Unit Description Data (range) Analysis (the data below is decimal
address n data
data)
0000H~
20 - Reserved
0009H
(8 higher
Indicates that the device
bits)Reserved
001AH 2 R/W - 1~247 00 01 address of the controller
(8 lower bits)
is 1
device address
Battery
0101H 2 R V Battery voltage 00 7A The battery voltage is 12.2V
voltage * 0.1
Charging current Charging The battery charging current is
0102H 2 R A 01 0A
(to battery) current * 0.01 2.66A
(8 higher bits)
Battery temperature
Load dc
0104H 2 R V Load voltage*0.1 00 7A The load voltage is 12.2V
voltage
Load dc Load
0105H 2 R A 04 0B The load current is 10.35A
current current*0.01
Load dc
0106H 2 R W Actual value 00 7E The load power is 126W
power
Solar panel information(6 bytes)
Solar panel Solar panel
0107H 2 R V 00 C8 The solar panel voltage is 20V
voltage voltage * 0.1
Solar panel
Solar panel
0108H 2 R A current (to 01 0A The solar panel current is 2.66A
current * 0.01
controller)
The solar panel charging power is
0109H 2 R W Charging power Actual value 00 35
53W
the load
Max.
Max. discharging
Discharging 04 10 The current day of battery max.
010EH 2 R A current of the
current of the discharging current is 10.4A
current day * 0.01
current day
Max. charging
The current day of battery max.
010FH 2 R W power of the Actual value 00 41
charging power is 65W
current day
Max.
The current day of battery
discharging
0110H 2 R W Actual value 00 78 max. discharging power is
power of the
120W
current day
Charging The current day of battery
0111H 2 R AH amp-hrs of the Actual value 06 08 charging amp-hrs is
current day 1544AH
Discharging The current day of battery
0112H 2 R AH amp-hrs of the Actual value 08 10 discharging amp-hrs is
current day 2064AH
Power
The current day of Power
0113H 2 R W generation of the Actual value 03 DE
generation is 990W
current day
Power
The current day of Power
0114H 2 R W consumption of Actual value 01 E3
consumption is 483W
the day
Total number
The system has been running for
0115H 2 R days of operating 00 08
eight days
days
Total number
of battery The battery is over-discharges one
0116H 2 R - 00 01
over-discharg time
es
Total number
The battery is fully charged 6
0117H 2 R - of battery 00 06
times
full-charges
Total charging
0118H 0001 The battery of total charging
4 R AH amp-hrs of the Actual value
0119H 0203 amp-hrs is 66051AH
battery
Total
011AH discharging 0000 The battery of total discharging
4 R AH Actual value
011BH amp-hrs of the 0108 amp-hrs is 264AH
battery
Cumulative
011CH 0000 The solar panel of Cumulative
4 R W power Actual value
011DH 07D0 power generation is 2000W
generation
Cumulative
011EH 0000 The load of Cumulative power
4 R W power Actual value
011FH 03E8 consumption is 1000W
consumption
Load information(2 bytes)
b7: 0 indicates Indicates that the load is
the load is off, open and the brightness is
- Load status
1 indicates the 100%.
load is on ((Algorithm: first convert
E4 to binary 11100100, the
8 higher bits E4
b0~b6: high 1 digit is 1 to turn on
brightness the light, then convert the
% Load brightness
value low 7 digits to decimal, the
00~64H current brightness is not
adjustable)
00H: charging
deactivated
01H: charging
activated
02H: mppt
charging mode
0120H 2 R
03H:
equalizing
charging mode
The current day of controller is
- Charging state 8 lower bits 04H: boost 02
MPPT charging.
charging mode
05H: floating
charging mode
06H: current
limiting
(overpower)
Controller fault information(4 bytes)
0121H Controller failure, alarm information 16 high bits Details refer to’4.15’
0122H Controller failure, alarm information 16 low bits Details refer to’4.15’
EEPROM
Controller parameter setting(50 bytes)
Boost charging
E00AH 2 R/W V recovery 70~170
voltage
Over-discharge
E00BH 2 R/W V recovery 70~170
voltage
Under-voltage
E00CH 2 R/W V 70~170
warning level
Over-discharge
E00DH 2 R/W V 70~170
voltage
Discharging
E00EH 2 R/W V 70~170
limit voltage
8 higher bits:
end-of-charge
SOC
E00FH 2 R/W - Unrealized
8 lower bits:
end-of-discharg
e SOC
Over-discharge
E010H 2 R/W S 0~120
time delay
Equalizing
E011H 2 R/W Min 0~300 Step length 10
charging time
Boost charging
E012H 2 R/W Min 10~300 Step length 10
time
Equalizing
0:closed,
E013H 2 R/W day charging 0~255
step length 5
interval
mV/ Temperature 0:not
E014H 2 R/W ℃/2 compensation 0~5 compensated,
V factor step length 1
E015H
~ 16 - Reserved
E01CH
off of load
Load working
E01DH 2 R/W - Load is turned on
modes
by light control,
a time delay of 1
hour
Set charging
1.1
current limit
*0.01
E001H 2 W (support a part Details refer to’4.23’
A
of the
controllers)
Battery parameter setting(38 bytes)
Nominal battery
E002H 2 R/W AH
capacity
12:12V
24:24V
recognized Others:automa
tic recognition
voltage
0=Self-custom
ized,
1=Open,
E004H 2 R/W - Battery type
2=Sealed,
3=Gel,
4=Lithium
Over-voltage
E005H 2 R/W V 70~170
threshold
Charging
E006H 2 R/W V 70~170
voltage limit
Equalizing
E007H 2 R/W V charging 70~170
Details refer to’4.18’
voltage
Boost charging
voltage/
E008H 2 R/W V overcharge 70~170
voltage (lithium
batteries)
Floating
charging
voltage/
E009H 2 R/W V overcharge 70~170
recovery
voltage (lithium
batteries)
Load is turned on
by light control,
a time delay of 2
hours
Load is turned on
by light control,
a time delay of 3
hours
Load is turned on
by light control,
a time delay of 4
hours
Load is turned on
by light control,
a time delay of 5
hours
Load is turned on
by light control,
a time delay of 6
hours
Load is turned on
by light control,
a time delay of 7
hours
Load is turned on
by light control,
a time delay of 8
hours
Load is turned on
by light control,
a time delay of 9
hours
Load is turned on
by light control,
a time delay of
10 hours
Load is turned on
by light control,
a time delay of
11 hours
Load is turned on
by light control,
a time delay of
12 hours
Load is turned on
by light control,
a time delay of
13 hours
Load is turned on
by light control,
a time delay of
14 hours
E020H 2 - Reserved
function enabled
0 special power
control function
disabled
b0: 1 each
The position 1 will clear the
night on
battery over discharging of
function mark once every night,and
enabled, (assuming that the battery over
0 each night discharging on the same day)at
F003H,
PDU
Bytes R/ W Data Meaning
address
0CH (decimal 12) 12V
18H (decimal 24) 24V
24H (decimal 36) 36V
8 higher bits: 30H (decimal 48) 48V
system voltage 60H (decimal 96) 96V
Automatic
FFH (decimal
000AH 2 R recognition of system
255)
voltage
0AH (decimal 10) 10A
14H (decimal 20) 20A
8 lower bits:
1EH (decimal 30) 30A
system current
2DH (decimal 45) 45A
3CH (decimal 60) 60A
According to "Table 1", the PDU address is known to be 000AH. Read 1 word (2 bytes)
To send: 01 03 000A 0001 A408
To receive: 01 03 02 181E 324C
Parsing: high byte 18H indicates the controller's system voltage is 24V, and low byte 1EH indicates the
system current is 30A.
The PDU addresses are known to be 000CH to 0013H in sequence and occupy a total of 16 bytes. Assume these addresses
store the following data (ASCII) in sequence:
’’, ' ', ' ', ' ', 'M', 'T', '4', '8', '3' , '0' , ' ', ' ', ' ', ' ', ' ', ' '
To send: 01 03 000C 0008 840F
To receive: 01 03 10 2020 2020 4D54 3438 3330 2020 2020 2020 EE98
Parsing: this controller's model is MT4830 (the ASCII corresponding to 20H is ' ', null character data)
The PDU addresses are known to be 0014H, 0015H, 0016H and 0017H in sequence
To send:01 03 0014 0004 040D
To receive:01 03 08 0003 0201 0001 0203 8A54
Parsing: (the highest byte is not used) 030201H indicates the controller's software version is V03.02.01
(the highest byte is not used) 010203H indicates the controller's hardware version is V01.02.03
The PDU addresses are 0018H and 0019H in sequence as shown in "Table 1"
To send: 01 03 0018 0002 440C
To receive:01 03 04 0F01 FFFF A957
Parsing: 0F01 FFFFH is the product serial number
The PDU addresses are known to be 0104H, 0105H and 0106H in sequence
To send: 01 03 0104 0003 45F6
To receive: 01 03 06 0078 00C8 00F0 00C5
Parsing:
Formula: load voltage = load voltage * 0.1
0078H is the load voltage, so the actual load voltage is: 0078H * 0.1 = 120 * 0.1 = 12.0V
Formula: load current =load current * 0.01
00C8H is the load current, so the actual load current is: 00C8H * 0.01 = 200 * 0.01 = 2.00A
00F0H is the load power (decimal 240W) which can also be calculated via formula: load voltage * load
current
Charging power, and the PDU addresses are known to be 0107H, 0108H and 0109H in sequence
To send: 01 03 0107 0003 B5F6
To receive: 0090 0096 00D8 011E
Parsing:
Formula: solar panel voltage = solar panel voltage * 0.1
00AAH is the solar panel voltage reading, so the actual solar panel voltage is: 0090H * 0.1 = 144 * 0.1 =
14.4V
Formula: solar panel charging current = solar panel charging current * 0.01
0096H is solar panel charging current reading, so the actual solar panel charging current is: 0096H * 0.01=
150 * 0.01 = 1.50A
00D8H is solar panel charging power (decimal 216 W) which can also be calculated via formula: solar panel
voltage * solar panel charging current
To read the current day's min. battery voltage, max. battery voltage, max. charging current, max. discharging current, max.
charging power, max. discharging power, charging amp-hrs, discharging amp-hrs, power generation, power consumption,
and the PDU addresses are 010BH to 0114H in sequence as shown in "Table 1"
Reading method 1:
To send: 01 03 010B 0003 75F5
To receive: 01 03 06 0070 0084 00D8 20CD
Parsing: in the returned command
The 4th and 5th bytes 0070H indicate the current day's min. battery voltage: 0070H * 0.1 = 112 * 0.1 =
11.2V
The 6th and 7th bytes 0084H indicate the current day's max. battery voltage: 0084H * 0.1 = 132 * 0.1 =
13.2V
The 8th and 9th bytes 00D8H indicate the current day's max. charging current: 00D8H * 0.01 = 216 *
0.01 = 2.16V
E.g.: to read the controller's charging amp-hrs and discharging amp-hrs on the current day, and the PDU
addresses are known to be 0111H and 0112H respectively
To send: 01 03 00111 0002 31D4
To receive: 01 03 04 0608 0810 7D75
Parsing: the 4th and 5th bytes 0608H are the current day's charging amp-hrs (decimal 1544AH);
Parsing: the 6th and 7th bytes 0810H are the current day's discharging amp-hrs (decimal 2064AH)
Reading method 2:Pass 01 03 F000 000A F6CD,details refer to’4.20’;
4.12、To read the battery's total charging amp-hrs and discharging amp-hrs,
The PDU addresses are known to be 0118H, 0119H, 011AH and 011BH in sequence
To send: 01 03 0118 0004 C5F2
To receive: 01 03 08 0001 0203 0000 0108 C0A3
Parsing: the 4th to 7th bytes 00010203H are the battery's total charging amp-hrs (decimal 66051AH = 66.051KAH)
The 8th to 11th bytes 00000108H are the battery's total discharging amp-hrs (decimal 264AH = 0.264KAH)
4.13 、 To read the controller's cumulative power generation and cumulative power
consumption
The PDU addresses are known to be 011CH to 011FH in sequence and occupy a total of 8 bytes.
To send: 01 03 011C 0004 840F
To receive: 01 03 08 0000 07D0 0000 03E8 550C
Parsing: 000007D0H are the controller's cumulative power generation (decimal 2000 kilowatt-hours)
The 8th to 11th bytes 000003E8H are the cumulative power consumption (decimal 1000 kilowatt-hours)
PDU
Bytes R/ W Item Value Meaning
address
b7:0 indicates the
Load status 0 or 1 load is off, 1 indicates
High
the load is on
byte
Load 00 to b0 to b6: brightness
brightness 64H value
00H: charging
deactivated
01H: charging
activated
0120H 2 R 02H: mppt charging
mode
Low 03H: equalizing
Battery status
byte charging mode
04H: boost charging
mode
05H: floating
charging mode
06H: constant current
(overpower)
B21~B16: reserved
B15~B13: reserved
(Remarks: The prerequisite is that E01DH has been set to 15 manual mode, and then the load can be controlled on/off
by this command, details refer to ‘4.19’)
Knowing the PDU address is 010AH, you need write on/ off command into this address
To turn on the load:
To send: 01 06 010A 0001 69F4
To receive:01 06 010A 0001 69F4
To turn off the load:
To send: 01 06 010A 0000 A834
To receive:01 06 010A 0000 A834
To set over-voltage threshold, charging limit voltage, equalizing charging voltage, boost charging voltage, floating
charging voltage, boost charging recovery voltage, over-discharge recovery voltage, over-discharge voltage, boost charging
time, equalizing charging interval, temperature compensation factor.
The addresses are known to be E005H to E014H in sequence, and occupy a total of 16 words or 32 bytes.
1) 、For each setting range, refer to the "Meaning" column of the "PDU Address Allocation Table".
2) 、 The following table sets the project not all controller support modification, and the controller specification is the
subject.
Note: a controller, battery type is SLD, when you issued the following orders, can send the command prompt to
success. But your controller is not allowed to change, because the battery type is a custom "User" or "LI" lithium-ion
batteries to support some parameter modify command, on the other hand is the controller factory setting parameters)
E.g.:
Data
Item to set Data to send
processing
Over-voltage threshold 17.0V Multiplied 17.0 * 10 = 170, hexadecimal
by 10 00AAH
Charging limit voltage 15.5V Multiplied 15.5 * 10 = 155, hexadecimal
by 10 009BH
Equalizing charging voltage Multiplied 14.6 * 10 = 146, hexadecimal
14.6V by 10 0092H
Boost charging voltage 14.4V Multiplied 14.4 * 10 = 144, hexadecimal
by 10 0090H
Floating charging voltage Multiplied 13.8 * 10 = 138, hexadecimal
13.8V by 10 008AH
Boost charging recovery Multiplied 13.2 * 10 = 132, hexadecimal
voltage 13.2V by 10 0084H
Over-discharge recovery Multiplied 12.6 * 10 = 126, hexadecimal
voltage 12.6V by 10 007EH
Under-voltage threshold 17.0 Multiplied 12.0 * 10 = 120, hexadecimal
V by 10 0078H
Over-discharge voltage 11.0V Multiplied 11.0 * 10 = 110, hexadecimal
by 10 006EH
Over-discharge limit voltage Multiplied 10.5 * 10 = 105, hexadecimal
10.5V by 10 0069H
End of charge and discharge 100<<8|50, hexadecimal 6432H
capacity 100%|50%
Over-discharge time delay 5S Hexadecimal 0005H
Equalizing charging time 003CH
60min
Boost charging time 60min 003CH
Parsing: 01 is the id number, 78 is the command to reset to factory defaults, and 6000 is for checking.
4.22、Clear history