User`s manual

73
FX3U Series Programmable Controllers
User’s Manual - MODBUS Serial Communication Edition
7 MODBUS Standard Commands
7.14 Write Multiple Coils (Command Code: 0x0F)
1
Outline
2
Specifications
3
System
Configuration
4
Wiring
5
Communication
Setup
6
Related
Devices and
Comm. Status
7
MODBUS
Standard
Commands
8
Master
Specification
9
Slave
Specification
10
Creating
Programs
7.14 Write Multiple Coils (Command Code: 0x0F)
Writes values (ON/OFF) to multiple coils.
1) Request message format (Master Slave)
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.
*1. The number of the specified write points must be matched with the number of bits specified as the
number of bytes. For example, when the write points are set to 16, set the number of bytes to 2 bytes
(= 16 bits).
2) Response message format (Slave Master)
(When completed normally)
(When completed with an error)
*2. Exception and error codes are stored in special data registers and special auxiliary relays in the case
of error completion. Refer to Chapter 6 for storage location, confirmation methods, and other detailed
contents.
Data
(L) (L)
. . .
b0b1b2b3b4b5b6b7
Function code
Function
code
(0F
H)
Head coil number
(0000
H to FFFFH)
Write points
*1
(0001
H to 07B0H)
Number of
bytes n
*1
(0001
H to
00F6
H)
Device
data
1
Device
data
n
(Number of bytes n)
(Device data 1 to n )
Device data 1
Device data n
Data storage order
0 : OFF
1 : ON
(H)
(H)
Data
(L) (L)
Function code
Function
code
(0F
H)
Head coil number
(The same head coil number
value as in the request
message is stored.)
Write points
(The same write points
value as in the request
message is stored.)
(H)
(H)
Data
Function code
Function
code
(8F
H)
Exception
code*
2