16 (0x10) write multiple resgisters, 23 (0x17) read/write multiple resgisters, Specification – Beijer Electronics NA-9379 User Manual
Page 17

NA-9379
Specification
Revision 1.02
FnBus PIO N/A
Page 17
3.1.9.
16 (0x10) Write Multiple Resgisters
This function code is used to write a block of contiguous registers (1 to approx. 120 registers) in a remote device.
The requested written values are specified in the request data field. Data is packed as two bytes per register.
The normal response returns the function code, starting address, and quantity of registers written.
•
Request
Field name
Example
Function Code
0x0F
Starting Address Hi
0x10
Starting Address Lo
0x08
Quantity of Registers Hi
0x00
Quantity of Registers Lo
0x02
Byte Count
0x04
Register Value#0 Hi
0x11
Register Value#0 Lo
0x22
Register Value#1 Hi
0x33
Register Value#1 Lo
0x44
•
Response
Field name
Example
Function Code
0x0F
Starting Address Hi
0x10
Starting Address Lo
0x08
Quantity of Registers Hi
0x00
Quantity of Registers Lo
0x02
.- In case of address 0x0800, 0x0801 output register value: 0x0000, 0x0000 changes to 0x1122, 0x3344.
3.1.10. 23 (0x17) Read/Write Multiple Resgisters
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
PRELIMINARY