12: M
ODBUS
ASCII/RTU C
OMMUNICATION
FC5A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
FC9Y-B1268
12-21
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 con-
secutive bits can be changed.
Communication Frame
Request from Modbus Master
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
ACK Reply from Modbus Slave
Slave No.
Function Code
Address
No. of Bits
xxh
0Fh
xxxxh
xxxxh
NAK Reply from Modbus Slave
Slave No.
Function Code
Error Code
xxh
8Fh
xxh
Communication Example
Purpose
Write the following bit statuses to internal relays M605 through M624.
M605
M606
M607
(ON)
(0N)
(OFF)
M610
M611
M612
M613
M614
M615
M616
M617
(ON)
(OFF)
(ON)
(ON)
(OFF)
(OFF)
(0N)
(OFF)
M620
M621
M622
M623
M624
(OFF)
(OFF)
(OFF)
(OFF)
(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
ASCII Mode
Request from Modbus Master
‘:’ 3038 3046 30354344 30303130 3032 3642 3032 (LRC) CRLF
ACK Reply from Modbus Slave
‘:’ 3038 3046 30354344 30303130 (LRC) CRLF
NAK Reply from Modbus Slave
‘:’ 3038 3846 xxxx (LRC) CRLF
RTU Mode
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)
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]