User`s manual

49
FX3U Series Programmable Controllers
User’s Manual - MODBUS Serial Communication Edition
7 MODBUS Standard Commands
7.3 Protocol Data Unit Formats by Commands
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
3) How to see the request/response message formats provided in Section 7.4 to 7.18:
a) Request/Response message format diagram
The following shows how to see the request/response message format diagrams
provided in Section 7.4 to 7.18.
b) Frame mode of the message format
The messages shown in Section 7.4 to 7.18 are displayed in RTU format.
For use in ASCII mode, convert the values into ASCII codes.
(Conversion example)
c) Response message format
The response message formats issued from the slave to the master differs depending on whether the
slave has normally completed or failed to handle the requested processing (read/write, diagnostics,
etc.)
The formats for normal and error completions are shown in Section 7.4 to 7.18.
Data
(L) (L)
. . .
Function
code
(01
H)
Function code
Area name
Frame contents
[For request message format]
Setting range
[For response message format]
Value stored to the
response message
1 byte (8 bits) 1 byte (8 bits)
Head coil number
(0000
H to FFFFH)
Read points
(0001
H to 07D0H)
When a single data is expressed by 2 bytes,
set the upper byte (8 bits) as (H) and the lower
byte (8 bits) as (L). Note: no switching of the
high and low byte takes place (big endian).
(H)
(H)
Data
(L)
Data
(L)
(L)(L)
Data
(L)
Read points
0
(30
H)
0
(30H)
3
(33H)
F
(46H)
(RTU mode)
Function code
Function
code
(01
H)
Head coil number
(006E
H)
Read points
(003FH)
Convert RTU mode to ASCII mode
(ASCII mode)
Function code
Function code
0
(30
H)
1
(31H)
Head coil number
0
(30
H)
0
(30H)
6
(36H)
E
(45
H)
(H)
(H)
(H)
(H) (H)