14
3 MODBUS STANDARD FUNCTION DETAILS
3.1 Read Coils (FC: 01H)
3 MODBUS STANDARD FUNCTION DETAILS
This chapter describes protocol data unit formats.
3.1 Read Coils (FC: 01H)
Operation description
Reads the status (ON/OFF) of one or multiple coils.
Request message format (from master to slave)
Response message format (from slave to master)
■ When completed successfully
• Device data 1 to n
■ When completed with an error
• The read coil status is stored in the order of lower bit to higher bit.
• If the number of read points is not a multiple of eight, the remaining bits are all set to 0.
(H) (L) (H) (L)
01H
Data
Number of read pointsStart coil number specification
Function code
(0000H to FFFFH) (0001H to 07D0H)
01H
DataFunction code
Number of read
bytes n
Device data 1 Device data n
Number of read bytes n
b0b1b2b3b4b5b6b7
0: OFF
1: ON
Device data 1
Device data n
Bit device storage order
81H
Data
Exception code
Function code