4 - 12 4 - 12
MELSEC-Q
4 MODBUS
R
STANDARD FUNCTIONS
4.3.7 Write multiple coils (FC: 15)
Writes values (ON/OFF) to multiple coils.
Number of accessible devices with one message
1 to 1968 points
(1) Request message format (Master Slave)
Head coil number
Data
Write points*
(H)
(L)
(H)
(L)
Function code
Function code
Device data
1
Device data
n
(Number of bytes n)
(Device data 1 to n)
Device data 1
b0
b1
b2
b3
b4
b5
b6
b7
Device data n
0 : OFF
1 : ON
Data storage order
(0000
H
to FFFF
H
)
(0001
H
to 07B0
H
)
(0001
H
to 00F6
H
)
(0F
H
)
Number
of bytes
n*
The values (ON/OFF) stored into the device data 1 to n are written to the coils in
order from low-order to high-order bits of the device data.
: The number of points specified as the write points must be matched with the
number of bits specified as the number of bytes.
For example, when the write points are 16, set the number of bytes to 2 bytes
(= 16 bits).
(2) Response message format (Slave Master)
(When completed normally)
Head coil number
Data
Write points
(H)
(L)
(H)
(L)
Function code
Function code
(0F
H
)
(The value same as in the head
coil number in the request
message is stored.)
(The value same as in the
write points in the request
message is stored.)