Mitsubishi Electric MELSEC IQ-R series Reference Manual page 481

Programmable controller
Hide thumbs Also See for MELSEC IQ-R series:
Table of Contents

Advertisement

Examples of device access in binary code (Format 5, 4C frame)
The following shows the setting example when using a command for format 5 and 4C frame.
■Device reading
• Format 5 (sum check enabled), 4C frame
• Access target: QCPU of the connected station (host station)
• Command: Batch read in word units (command: 0401)
• Device: M100 to M131 (for 2 words)
1.
Read values from devices.
Request message
Control code
Number of data
*1
bytes
DLE
STX
18 bytes
10H
02H
12H
00H
The subtotal of the additional value of binary data = 30BH
Request data
Command
Subcommand
0401
0000
01H
04H
00H
00H
The subtotal of the additional value of binary data = FBH
*1 Frame ID No. (1 byte) + Access route (7 bytes) + Request data (10 bytes)
*2 The addition result of the sum check range: 30BH + FBH = 406H
2.
Receive the result.
Response message (Normal completion: Response data)
Control code
Number of data
*1
bytes
DLE
STX
16 bytes
10H
02H
10H
10H
00H
*2
The subtotal of the additional value of binary data = 309H
Response ID
Normal
code
completion code
FFFFH
0000H
FFH
FFH
00H
00H
The subtotal of the additional value of binary data = 246H
*1 Frame ID No. (1 byte) + Access route (7 bytes) + Response ID code (2 bytes) + Normal completion code (2 bytes) + Response data (4
bytes)
*2 Additional code. Calculate the sum check code except for the additional code. (Page 35 Additional code (10H))
*3 The addition result of the sum check range: 309H + 246h = 54FH
*4 The value of read data corresponds to the access target device as follows.
34
12
02
H
H
3
4
1
2
0 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
M107
M100 M115
M108 M123
to
to
Frame ID
Access route
No.
Station
Network No.
No.
4C frame
Host station
F8H
00H
00H
Head device
Device code
number
100
M
64H
00H
00H
90H
Frame ID
Access route
No.
Station
Network No.
No.
4C frame
Host station
F8H
00H
00H
Response data (read data)
M100 to M115
34H
12H
00
H
H
0
2
0
0
0 = OFF
1 = ON
M116 M131
M124
to
to
PC No.
Request
destination
module I/O No.
FFH
FFH
Control code
Number of
device points
2
DLE
02H
00H
10H
PC No.
Request
destination
module I/O No.
FFH
FFH
*4
Control code
M116 to M131
DLE
02H
00H
10H
Request
Self-
destination
station
module station
No.
No.
03H
00H
00H
Sum check code
ETX
0
6
03H
30H
36H
Request
Self-
destination
station
module station
No.
No.
03H
00H
00H
Sum check code
ETX
4
F
03H
34H
46H
APPENDICES APPENDIX
Appendix 7 Setting Examples
*2
A
*3
479

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsecq seriesMelsec l series

Table of Contents