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

Modbus/tcp interface module
Table of Contents

Advertisement

4
MODBUS STANDARD FUNCTIONS

4.3.2 Read discrete inputs (FC: 02)

4 - 7
Reads the statuses (ON/OFF) of one or more inputs.
(1) Request message format (Master → Slave)
Function code
Function code
Head input number
(02
)
(0000
H
(H)
(2) Response message format (Slave → Master)
(When completed normally)
Function code
Function code
Number of
read bytes
(02
)
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.
(When completed with an error)
Function code
Function code
Exception
(82
)
H
: When completed with an error, the exception code and error code are stored
into the buffer memory.
Refer to Section 11.3 for the storage location, confirmation method and more
details.
Number of accessible devices with one message
Data
to FFFF
)
(0001
H
H
(L)
(H)
Data
Device data
1
n
(Number of read bytes n)
b7
b6
Data
code*
1 to 2000 points
Read points
to 07D0
)
H
H
(L)
Device data
n
b5
b4
b3
b2
Bit device storage
order
MELSEC-Q
b1
b0
0 : OFF
1 : ON
4 - 7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec q series

Table of Contents