Read Discrete Inputs (Fc: 02) - Mitsubishi QJ71MB91 User Manual

Table of Contents

Advertisement

4
MODBUS(R) STANDARD FUNCTIONS

4.5 Read Discrete Inputs (FC: 02)

Reads the status (ON/OFF) of one or more inputs.
(1) Request message format (Master
(2) Response message format (Slave
4
- 19
4.5 Read Discrete Inputs (FC: 02)
Function code
Function
Head input number
code
(0000
to FFFF
H
(02
)
H
(H)
Figure 4.12 Read discrete inputs (Request message)
(When completed normally)
Function code
Function
Number of
code
read bytes
(02
)
n
H
(Device data 1 to n)
Device data 1
Device data n
The read input statuses are stored in order from low-order to high-order bits.
When the number of read points is not a multiple of 8, the excess bits turn to 0.
Figure 4.13 Read discrete inputs (Normal response message)
(When completed with an error)
Data
Function code
Function
Exception
code
code*
1
(82
)
H
Figure 4.14 Read discrete inputs (Exception message)
* 1 Exception and error codes are stored in the buffer memory in the case of error completion.
Refer to the following for storage location, confirmation methods, and detailed contents.
Section 11.4
Slave)
Data
Read points
)
(0001
to 07D0
H
H
(L)
(H)
Master)
Data
Device data
1
(Number of read bytes n)
b7
b6
b5
b4
)
H
(L)
Device data
n
b3
b2
b1
b0
Bit device
storage order
0 : OFF
1 : ON

Advertisement

Table of Contents
loading

Table of Contents