Write multiple registers 16 (10 h) – Yaskawa V1000-Series Option SI-EM3D/V Dual Port EtherNet Modbus TCP/IP Technical Manual User Manual
Page 29
n
Write Multiple Registers 16 (10 H)
This function code is used to write to a contiguous block of registers in the drive. The command specifies the starting register
address, the number of registers and the values to be written. The command packs two bytes per register. For each register in
the command the first byte contains the most significant bits and the second byte contains the least significant bits. The normal
response returns the function code, starting address and quantity of registers written.
Table 23 Write Multiple Registers Command
Description
Byte
Data (Hex)
Slave Address
1
00 to FF
Function Code
1
10
Starting Register
2
0000 to FFFF
Quantity of Registers
2
N
<1>
Number of Data Bytes
1
N
<1>
x 2
Register Values
N
<1>
x 2
0000 to FFFF
<1> N = Quantity of Registers (range is 1 - 16)
Table 24 Write Multiple Registers Response
Description
Byte
Data (Hex)
Slave Address
1
00 to FF
Function Code
1
10
Starting Register
2
0000 to FFFF
Quantity of Registers
2
N
<1>
<1> N = Quantity of Registers
Table 25 Write Multiple Registers Error Response
Description
Byte
Data (Hex)
Slave Address
1
01
Error Code
1
90
Exception Code
1
Refer to Modbus TCP/IP Exception Codes
Examples of Multiple Registers Write Command
lists command examples when writing register values 0001H and 0258H to register addresses 0001H and 0002H in
a drive with the slave address (unit identifier) 01H.
specifies the beginning of the register address and the number of registers.
number error).
Table 26 Example Write Multiple Registers Command
Description
Data (Hex)
Slave Address
01
Function Code
10
Starting Register
Upper
00
Lower
01
Quantity of Registers
Upper
00
Lower
02
Number of Data Bytes
04
First Register Data
Upper
00
Lower
01
Next Register Data
Upper
02
Lower
58
7 Modbus TCP/IP Messaging
YASKAWA SIEP YAICOM 17A V1000 Option Dual-Port Modbus TCP/IP SI-EM3D/V Technical Manual
29