7
47D Series Modbus Reference Guide EM-9501-C Rev.4
2.4.2 WRITE MULTIPLE REGISTERS
This function code is used to write a block of contiguous registers (settings) in the remote device.
■
REQUEST FORMAT
FIELD
LENGTH
RANGE
(1) Device address
1 byte
1 to 247
(2) Function code
1 byte
16
(3) Starting address
2 bytes
0 to 65535
Address numbered minus 1 from the register described in the
tables in Section 3.
(4) Number of registers
2 bytes
1 to 123
(5) Byte count
1 byte
N x 2
N = Number of registers
(6) Register value
N x 2 bytes
(7) CRC
2 bytes
■
RESPONSE FORMAT
FIELD
LENGTH
RANGE
(1) Device address
1 byte
1 to 247
(2) Function code
1 byte
16
(3) Starting address
2 bytes
0 to 65535
Address numbered minus 1 from the register described in the
tables in Section 3.
(4) Number of registers
2 bytes
1 to 123
(5) CRC
2 bytes
■
REQUEST EXAMPLE
Here is an example of a request to write ‘6600’ (000019C8) at the 2-word register 5604 (15E3) in the device address
1.
01 10 15E3 0002 04 19C80000 C9C0
(1)
(2) (3) (4) (5) (6)
(7)
■
RESPONSE EXAMPLE
01 10 15E3 0002 B432
(1)
(2) (3) (4) (5)
The above examples are given in hexadecimal.