User`s manual

51
FX3U Series Programmable Controllers
User’s Manual - MODBUS Serial Communication Edition
7 MODBUS Standard Commands
7.5 Read Discrete Inputs (Command Code: 0x02)
1
Outline
2
Specifications
3
System
Configuration
4
Wiring
5
Communication
Setup
6
Related
Devices and
Comm. Status
7
MODBUS
Standard
Commands
8
Master
Specification
9
Slave
Specification
10
Creating
Programs
7.5 Read Discrete Inputs (Command Code: 0x02)
Reads the status (ON/OFF) of one or more inputs.
1) Request message format (Master Slave)
2) Response message format (Slave Master)
(When completed normally)
(When completed with an error)
*1. Exception and error codes are stored in special data registers and special auxiliary relays in the case
of error completion. Refer to Chapter 6 for storage location, confirmation methods, and other detailed
contents.
Data
(L) (L)
Function code
Function
code
(02
H)
Head input number
(0000
H to FFFFH)
Read points
(0001H to 07D0H)
(H)
(H)
Data
b0b1b2b3b4b5b6b7
Function code
Function
code
(02
H)
Number of
read bytes
n
Device data
1
Device data
n
(Number of read bytes n)
(Device data 1 to n)
Device data 1
Device data n
Bit device
storage order
0 : OFF
1 : ON
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.
Data
Function code
Function
code
(82
H)
Exception
code*
1