8.3
Modbus RTU Protocol
The Modbus protocol is a communication protocol developed for PLCs by Modicon Inc. (AEG Schneider
Automation International S.A.S). It is described in the protocol specification (PI-MBUS-300 Rev. J). Refer to
this document for information on the Modbus protocol specification.
8.3.1 Data Construction
Slave address
(1 byte)
8.3.2 Function Codes
The following function codes are available on this product:
Code
03H
Setting data read
04H
Input data read
06H
One-time data write
10H
Continuous data writes
8.3.3 Error Response
In accordance with the communication protocol for the pertinent function code, if an error
occurs during command transmission, an error response is returned in the fixed format
described in this section.
■
Example of slave response (function code = 06H, command error = 10H)
Component
Slave address (only for Modbus RTU)
Function code + 80H
Error code
Error check (only for Modbus RTU)
Total number of bytes
■Error codes and their occurrence conditions
Error
code
01H
Invalid function code
02H
Invalid register address
03H
Invalid number of registers
04H
Device error
10H
Command error
Function code
(1 byte)
(variable)
Function
Description
An unsupported function code is specified.
The relative address range exceeds "9999."
- The length of the accessed data is "0" or the sum of the
relative address and data length exceeds the limit.
- It is assumed that two or more function codes, each
executable for one area, are involved.
- Data longer than 2 words is specified for a one-time write
command.
- The data length exceeds 123 words.
The received data is shorter than the predefined data length.
An attempt at a write over an area exceeding the writable range.
―103―
Data
CRC
(2 bytes)
Maximum data
Modbus-specific function (reference)
length
123 words
Data read from holding register
123 words
Data read from input register
1 word
Data write to holding register
123 words
Data write to holding register
Data
Data
length
1
-
1
86H
1
10H
2
CRC
5
-
Occurrence condition(s)
HXPRM10mnCT002E
Need help?
Do you have a question about the TRM-10C and is the answer not in the manual?