11: M
ODBUS
C
OMMUNICATION
11-16 S
MART
AXIS P
RO
/L
ITE
U
SER
'
S
M
ANUAL
FT9Y-B1378
Function Code 15 (Force Multiple Coils)
Function code 15 changes bit device statuses of Q (output), R (shift register), or M (internal relay). One through 128 consecutive
bits 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 bit statuses to internal relays M605 through M624.
M605
(ON)
M606
(0N)
M607
(OFF)
M610
(ON)
M611
(OFF)
M612
(ON)
M613
(ON)
M614
(OFF)
M615
(OFF)
M616
(0N)
M617
(OFF)
M620
(OFF)
M621
(OFF)
M622
(OFF)
M623
(OFF)
M624
(OFF)
M605 (LSB) through M614 (MSB) binary data: 6B
M615 (LSB) through M624 (MSB) binary data: 02
M605 → (60 – 0) × 8 + 5 + 1001 = 1486
Modbus address: 1486
1486 – 1 = 1485 = 5CDh
Communication frame address: 05CDh
Condition Slave No. 8
Request from Modbus Master 08 0F 05CD 0010 02 6B 02 (CRC)
ACK Reply from Modbus Slave 08 0F 05CD 0010 (CRC)
NAK Reply from Modbus Slave 08 8F xx (CRC)
Slave No.
Function
Code
Address No. of Bits
Quantity of
Data
First
8 Bits
Second
8 Bits
Last
8 Bits
xxh 0Fh xxxxh xxxxh xxh xxh xxh xxh
Slave No. Function Code Address No. of Bits
xxh 0Fh xxxxh xxxxh
Slave No. Function Code Error Code
xxh 8Fh xxh