S
MART
AXIS P
RO
/L
ITE
U
SER
'
S
M
ANUAL
FT9Y-B1378 11-17
11: M
ODBUS
C
OMMUNICATION
Function Code 16 (Preset Multiple Registers)
Function code 16 changes word device data of D (data register). One through 64 consecutive words can be changed.
Communication Frame
Request from Modbus Master
ACK Reply from Modbus Slave
NAK Reply from Modbus Slave
Communication Example
• RTU Mode
Purpose
Write the following data to four data registers D1708 through D1711.
D1708
(1234h)
D1709
(5678h)
D1710
(ABCDh)
D1711
(EF01h)
D1708 → (1708 – 0) + 400001 = 401709
Modbus address: 401709
Extract lower 5 digits → 1709
1709 – 1 = 1708 = 6ACh
Communication frame address: 06ACh
Condition Slave No. 8
Request from Modbus Master 08 10 06AC 0004 08 12 34 56 78 AB CD EF 01 (CRC)
ACK Reply from Modbus Slave 08 10 06AC 0004 (CRC)
NAK Reply from Modbus Slave 08 90 xx (CRC)
Slave No.
Function
Code
Address
No. of
Words
Quantity of
Data
First High
Byte
First Low
Byte
Last Low
Byte
xxh 10h xxxxh xxxxh xxh xxh xxh xxh
Slave No. Function Code Address No. of Words
xxh 10h xxxxh xxxxh
Slave No. Function Code Error Code
xxh 90h xxh