GN-9289 User Manual
Page 43 of (70)
G-series GN-9289 Modbus TCP_UDP Rev. 1.01.docx
8.2.10 23 (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
Function Code
0x17
Read Starting Address Hi
0x08
Read Starting Address Lo
0x00
Quantity of Read Hi
0x00
Quantity of Read Lo
0x02
Write Starting Address Hi
0x08
Write Starting Address Lo
0x00
Quantity of Write Hi
0x00
Quantity of Write Lo
0x02
Byte Count
0x04
Write Reg. Value#0 Hi
0x11
Write Reg. Value#0 Lo
0x22
Write Reg. Value#1 Hi
0x33
Write Reg. Value#1 Lo
0x44
Response
Field name
Example
Function Code
0x17
Byte Count
0x04
Read Reg. Value#0 Hi
0x11
Read Reg. Value#0 Lo
0x22
Read Reg. Value#1 Hi
0x33
Read Reg. Value#1 Lo
0x44
In case of address 0x0800, 0x0801 output register value: 0x0000, 0x0000 changes to 0x1122, 0x3344.