
Modbus Commands
C-25
TIWAY I Gateway User Manual
Code
16 allows the host computer to write multiple values into successive
registers. Addressing is sequential up to the maximum memory size for a
particular PLC. The maximum number of registers that can be addressed
with one command is 100. If more are given, the whole command will be
rejected with an Exception code 03.
[This command is equivalent to a TIW
A
Y I request using Primitive 30 with
TT
-type 01 (V
ariable memory)].
I000000
02 10 0078 0002 04 000B 0201 XXXX
Checksum (XXXX)
2nd register data (0201)
1st register data (000B)
Number of bytes (04)
Number of registers (0002)
Start register address (0078)
Function code 16 (10 hex)
Slave address (02)
Request:
Figur
e C-29
Write
Multiple Registers Example — Request
This request is to the secondary node to change the values of 2 holding
registers, starting at address 0078 (120 decimal) to 1
1 and 513 respectively
.
I000000
Response: 02 10 0078 0002 XXXX
Checksum (XXXX)
Number of registers (0002)
Start register address (0078)
Function code 16 (10 hex)
Slave address (02)
Figur
e C-30
Write
Multiple Registers Example — Response
The response to this command is to return the address, code, starting
address, and the numbers of registers to be changed.
Code 16 — W
rite
Multiple Registers
Comentarios a estos manuales