Write Multiple Coils (Fc: 0Fh) - Mitsubishi Electric MELSEC iQ-R Series Reference Manual

Modbus and modbus/tcp
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

3.11

Write Multiple Coils (FC: 0FH)

Operation description
Writes values (ON/OFF) to multiple coils.
Request message format (from master to slave)
Function code
Start coil number specification
0FH
(0000H to FFFFH)
(H)
• Device data 1 to n
b7
b6
Device data 1
Device data n
• The values (ON/OFF) stored in device data 1 to n are written to the coils in the order of lower bit to higher bit of the device data.
Ensure that the specified number of write points matches the number of bits specified with the number of
bytes.
For example, when the specified number of write points is 16, set the number of bytes to 2 bytes (= 16 bits).
Response message format (from slave to master)
■ When completed successfully
Function code
Start coil number
0FH
(H)
• Start coil number: Stores the same value as the start coil number of the request message.
• Number of write points: Stores the same value as the number of write points of the request message.
■ When completed with an error
Function code
Data
Exception code
8FH
Data
Number of write points
(0001H to 07B0H)
(L)
(H)
(L)
b5
b4
b3
b2
b1
Data
Number of write points
(L)
(H)
Number of bytes
Device data 1
n
(01H to F6H)
Number of bytes n
b0
Bit device storage order
0: OFF
1: ON
(L)
3 MODBUS STANDARD FUNCTION DETAILS
Device data n
3.11 Write Multiple Coils (FC: 0FH)
3
41

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents