Modbus communication protocol
83
Begin code:
The lower computer judge the frame of ASCII frame. This is :’:’
Slave address:
Single inverter ID code
,
range:0
~
247.
Thereinto, address 0 is broadcast address. Broadcast address can
control all the lined Slave simultaneously
,
and the Slave will not
send back any Data to the host. That means the Slave only accept
and do not send.
Modbus protocol is without host address.
Command code:
The command of reading parameter or data from inverter, the value
is:’0’’3’.
Data byte:
The number of parameters read by a frame. It is 4 byte, which is
ASCII mode transformed from hexadecimal.
Data string value
:
The detail return Data
,
the length of Data string is the register
address “Data byte”, which is ASCII mode transformed from
hexadecimal. Range: 4~40 byte
Checksum:
From “slave address” to the character before checksum, the LRC
checksum of the character string.
The function terminal can be seen in the later text.
Ending symbol:
enter, line break. Is 0x0D,0x0A
The followings are the example of command frame and return frame,
all the Data are ASCII character.
Inquiry frame:
: 0 1 0 3 0 0 0 1 0 0 0 1 F A \n\r
(The detail introduction of every byte)
“:”: beginning symbol
0 1
: Slave address
0 3
:read the command
0 0 0 1:
storage address of reading parameter
0 0 0 1:
the number of reading the parameter
F A:
{
0 1 0 3 0 0 0 1 0 0 0 1
} for LRC checksum.
0xFA = 0x100 - (0x01 + 0x03 + 0x00 + 0x01 + 0x00 + 0x01)
Response frame:
: 0 1 0 3 0 2 0 0 3 3 C 7 \n\r
(The detail introduction of every byte)
“:”: beginning symbol
0 1
: Slave address
0 3
:read the command
0 2
:The byte length of return parameter Data.
0 0 3 3
:return parameter
,
current storage value
C 7
:{
0 1 0 3 0 2 0 0 3 3
} for LRC checksum.
0xC7 = 0x100 – (0x01 + 0x03 + 0x02 + 0x00 + 0x33)
ENC