![Ohkura RM10C Instruction Manual Download Page 94](http://html1.mh-extra.com/html/ohkura/rm10c/rm10c_instruction-manual_3527809094.webp)
―
93
―
HXPRM10mnC0001E
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)
Function code
(1 byte)
Data
(variable)
CRC
(2 bytes)
8.3.2 Function Codes
The following function codes are available on this product:
Code
Function
Maximum data
length
Modbus-specific function (reference)
03H
Setting data read
123 words
Data read from holding register
04H
Input data read
123 words
Data read from input register
06H
One-time data write
1 word
Data write to holding register
10H
Continuous data writes
123 words
Data write to holding register
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
Data
length
Data
Slave address (only for Modbus RTU)
1
-
Function code
+ 80H
1
86H
Error code
1
10H
Error check (only for Modbus RTU)
2
CRC
Total number of bytes
5
-
■
Error codes and their occurrence conditions
Error
code
Description
Occurrence condition(s)
01H
Invalid function code
An unsupported function code is specified.
02H
Invalid register address
The relative address range exceeds "9999."
03H
Invalid number of registers
- 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.
04H
Device error
The received data is shorter than the predefined data length.
10H
Command error
An attempt at a write over an area exceeding the writable range.