3  MODBUS STANDARD FUNCTION DETAILS
3.2  Read Discrete Inputs (FC: 02H)
15
3
3.2 Read Discrete Inputs (FC: 02H)
Operation description
Reads the status (ON/OFF) of one or multiple inputs.
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 input 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)
02H
Start input number specification
Data
Number of read points
Function code
(0000H to FFFFH) (0001H to 07D0H)
02H
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
82H
Data
Exception code
Function code