User`s manual

53
FX3U Series Programmable Controllers
User’s Manual - MODBUS Serial Communication Edition
7 MODBUS Standard Commands
7.7 Read Input Registers (Command Code: 0x04)
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.7 Read Input Registers (Command Code: 0x04)
Reads the values of one or more input registers.
1) Request message format (Master Slave)
2) Response message format (Slave Master)
(When completed normally)
(When completed with an error)
*2. 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
(04
H)
Head input register number
(0000
H to FFFFH)
Read points
(0001H to 007DH)
(H) (H)
Data
Function code
Function
code
(04
H)
. . .
(L) (L)
Number of
read bytes
m = n x 2*
1
Device data
1
Device data
n
(Number of read bytes n x 2)
*1 For example, if n = 4, the number of bytes is
calculated as 4 x 2 = 8 bytes
(H)
(H)
Data
Function code
Function
code
(84
H)
Exception
code *
2