115
A2.1 Description of Modbus-RTU message format
When the Modbus-RTU mode is used for communication, the communication
information (message) is represented directly with hexadecimal code (1-9, A-F). Two
hexadecimal codes form one byte. The message format is shown as below:
Figure A.2 Modbus Message Format
As shown in Figure A.2, during the communication process, the master and slave
determine the start and end of Modbus message according to time interval of at least 3.5
characters. The message includes the complete data information to be transmitted: in
the sequence of slave address, command code, data and CRC code. Its length varies
with the change of the command code.
The message of Modbus-RTU is classified into three types and two formats:
1) Request (Interrogation) message: Command request message transmitted by master
to slave;
2) Normal response message: The slave’s feedback message when the master’s
command is correct.
3) Error response message: The slave’s feedback message when the master’s
command is false / invalid.
1) and 2) have the same format, while 3) adopts other format.
1
.
Format of request message and normal response message
Table A.2 Format of request message and normal response message
Num
ber
Name
Function
1
Slave
addre
ss
Configured from 0 to 247
All slaves execute command but provide no feedback
information; If slave address is set to 1~247, the dialog
is point-to-point mode. All address-matching slaves
execute command and provide feedback information.
Under the point-to-point mode, when the matching slave
responses, it sends back the slave address of itself.