83
6 Useful Functions
83
Useful Functions
Chapter
6
16 (0x10) Write Multiple Registers
For slave holding registers, a specified number of data are changed starting from a specified address.
When broadcast (0) is specified, holding registers of all slave devices with the same address will be
rewritten.
The register address, new number of registers, and data to be changed are specified in the request.
Slave devices transmit data by converting the
contents of each register to 2 bytes.
* N = Number of registers
Example 1) Changing the complete output time for 16-bit integer data area (address 40064) to
20 (0x0014), and the compensation feeding time (address 40065) to 100 (0x0064).
Note that the relative address is 0x40 when writing in the complete output time.
[Request]
Function 1 byte 0x10
Start address 2 bytes 0x0000 to 0xFFFF
Number of registers 2 byt
es 0x0001 to 0x0078 (120)
Number of bytes 1 byte 2 x N *
Changed data N x 2 bytes
[Response]
Function 1 byte 0x10
Start address 2 bytes 0x0000 to 0xFFFF
Number of registers 2 bytes 0x0001 to 0x007B (123)
[Error response]
Error code 1 byte 0x90 (Function +0x80)
Exception code 1 byte 01 or 02 or 03
[Request]
Function 10
[Response]
Function 10
Start address (HI) 00 Start address (HI) 00
Start address (LO) 40 Start address (LO) 40
Regist
er (HI) 00 Register (HI) 00
Register (LO) 02 Register (LO) 02
Data bytes 04
Complete output time (HI) 00
Complete output time (LO) 14
Compensation feeding time (HI)
00
Compensation feeding time (LO)
64