APPENDICES APPENDIX
Appendix 7 Setting Examples
479
A
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
*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)
*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.
Control code Number of data
bytes
*1
Frame ID
No.
Access route
Station
No.
Network No. PC No. Request
destination
module I/O No.
Request
destination
module station
No.
Self-
station
No.
DLE STX 18 bytes 4C frame Host station
10H 02H 12H 00H F8H 00H 00H FFH FFH 03H 00H 00H
The subtotal of the additional value of binary data = 30BH
Request data Control code Sum check code
*2
Command Subcommand Head device
number
Device code Number of
device points
0401 0000 100 M 2 DLE ETX 0 6
01H 04H 00H 00H 64H 00H 00H 90H 02H 00H 10H 03H 30H 36H
The subtotal of the additional value of binary data = FBH
Control code Number of data
bytes
*1
Frame ID
No.
Access route
Station
No.
Network No. PC No. Request
destination
module I/O No.
Request
destination
module station
No.
Self-
station
No.
DLE STX 16 bytes 4C frame Host station
10H 02H 10H 10H 00H F8H 00H 00H FFH FFH 03H 00H 00H
*2
The subtotal of the additional value of binary data = 309H
Response ID
code
Normal
completion code
Response data (read data)
*4
Control code Sum check code
*3
FFFFH 0000H M100 to M115 M116 to M131 DLE ETX 4 F
FFH FFH 00H 00H 34H 12H 02H 00H 10H 03H 34H 46H
The subtotal of the additional value of binary data = 246H
M107
34120200
001 1010 0000 1001 0000 0001 0000 0000 0
34
H
12
H
02
H
00
H
M100 M115 M108 M123 M116 M131 M124
0=OFF
1=ON
to to to to