Hardware manual

12 Modbus
2-247
Chap.2
12.6.6.4 Functions
The MICRO/I supports the following functions.
Function code Function name Description
3 Read multiple
registers
Reading of Holding Register (HR) consecutively
16 (10Hex) Write multiple
registers
Writing to Holding Register (HR) consecutively
1 Read coils Reading of Coil (C) consecutively
2 Read discrete inputs Reading of Input Relay (I) consecutively
4 Read input registers Reading of Input Register (IR) consecutively
5 Write coil Writing to a single Coil (C)
6 Write single register Writing to a single Holding Register (HR)
Read exception status Reading of exception status (0 to 7th bit of
HR400001)
The following section describes the details of the functions.
The communication example listed for each function is only for the 7
th
and later bytes of the data.
Refer to the description of the basic format and add bytes 0 to 6 in the actual communications.
FC3 Read multiple registers
Reading of Holding Register (HR) consecutively
(Request)
Byte 7 FC (Function code) = 03
Byte 8-9 Reference No.
Byte 10-11 Number of read words (1 to 125 words)
(Normal response)
Byte 7 FC (Function code) = 03
Byte 8 Number of bytes of the response (number of read words x 2)
From Byte 9 Read data
(Abnormal response)
Byte 7 FC (Function code) = 83 (HEX)
Byte 8 Exception code 01 or 02
(Example)
Reading of HR400001 (1 word). The read value is 1234 (HEX).
03 00 00 00 01 => 03 02 12 34