Appendix 7 Setting Examples; Setting Examples Of Message For Serial Communication Module - Mitsubishi Electric MELSEC IQ-R series Reference Manual

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

Advertisement

Appendix 7
This section explains the setting example of the message.

Setting examples of message for serial communication module

The following shows the setting example when using a command from a serial communication module.
Examples of device access in ASCII code (Format 1, 3C frame)
The following shows the setting example when using a command for format 1 and 3C frame.
■Device reading
• Format 1 (sum check enabled), 3C 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
Frame ID No.
code
ENQ
3C frame
F
9
05H
46H
39H
The subtotal of the additional value of binary data = 22BH
Request data
Command
Subcommand
0
4
0
1
0
0
30H
34H
30H
31H
30H
30H
The subtotal of the additional value of binary data = 3DFH
*1 The addition result of the sum check range: 22BH+3DF=60AH
2.
Receive the result.
Response message (Normal completion: Response data)
Control code
Frame ID No.
STX
3C frame
F
9
02H
46H
39H
The subtotal of the additional value of binary data = 22BH
*2
Response data (read data)
1
2
3
31H
32H
33H
The subtotal of the additional value of binary data = 18FH
*1 The addition result of the sum check range: 22BH + 18F = 3BAH
*2 The value of read data corresponds to the access target device as follows.
1
2
3
4
31
32
33
34
H
H
H
H
1
2
3
4
0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
to
M115
M100 M131
Setting Examples
Access route
Station No.
Network No.
Host station
0
0
0
30H
30H
30H
Device code
0
0
M
*
30H
30H
4DH
2AH
Access route
Station No.
Network No.
Host station
0
0
0
30H
30H
30H
4
0
0
34H
30H
30H
0
0
0
2
30
30
30
32
H
H
H
H
0
0
0
2
0 = OFF
1 = ON
to
M116
PC No.
0
F
30H
46H
Head device number
0
0
0
1
0
0
30H
30H
30H
31H
30H
30H
PC No.
0
F
30H
46H
Control code
0
2
ETX
30H
32H
03H
Self-station No.
F
0
0
46H
30H
30H
Sum
check
Number of device
*1
code
points
0
0
0
2
0
30H
30H
30H
32H
30H
Self-station No.
F
0
0
46H
30H
30H
*1
Sum check code
B
A
42H
41H
APPENDICES APPENDIX

Appendix 7 Setting Examples

A
A
41H
477

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsecq seriesMelsec l series

Table of Contents