GN-9371_2_3 User Manual
Page 92 of (110)
G-series GN-9371_2_3 PIO Rev. 1.02.docx
A.3.10
(0x17) Read/Write Multiple Registers
This function code performs a combination of one read operation and one write operation in a single
MODBUS transaction. The write operation is performed before the read. The request specifies the starting
address and number of holding registers to be read as well as the starting address, number of holding
registers, and the data to be written. The byte count specifies the number of bytes to follow in the write data
field.
The normal response contains the data from the group of registers that were read. The byte count field
specifies the quantity of bytes to follow in the read data field.
•
Request
Field name
Example
RTU
Start of Frame
-
t1-t2-t3
Slave Address
0x07
0x07
Function Code
0x17
0x17
Read Starting Address Hi
0x08
0x08
Read Starting Address Lo
0x00
0x00
Quantity of Read Hi
0x00
0x00
Quantity of Read Lo
0x02
0x02
Write Starting Address Hi
0x08
0x08
Write Starting Address Lo
0x00
0x00
Quantity of Write Hi
0x00
0x00
Quantity of Write Lo
0x02
0x02
Byte Count
0x04
0x04
Write Reg. Value #0 Hi
0x11
0x11
Write Reg. Value #0 Lo
0x22
0x22
Write Reg. Value #1 Hi
0x33
0x33
Write Reg. Value #1 Lo
0x44
0x44
Error Check (CRC/LRC)
-
0x88, 0x3F
End of Frame
-
t1-t2-t3
•
Response
Field name
Example
RTU
Start of Frame
-
t1-t2-t3
Slave Address
0x07
0x07
Function Code
0x17
0x17
Byte Count
0x04
0x04
Write Reg. Value #0 Hi
0x11
0x11
Write Reg. Value #0 Lo
0x22
0x22
Write Reg. Value #1 Hi
0x33
0x33
Write Reg. Value #1 Lo
0x44
0x44
Error Check (CRC/LRC)
-
0x2E, 0xD2
End of Frame
-
t1-t2-t3
-
In case of address 0x0800, 0x0801 output register value: 0x0000, 0x0000 changes to 0x1122, 0x3344.