Example Of Data Transmission - Mitsubishi Electric MELSEC iQ-R Series User Manual

Serial communication module
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Example of data transmission

The following example shows when transmitting binary data including a transparent code to a target device.
Transparent code for sending specification is enabled
Ex.
Transparent code designation (1st): Additional code: 10H (DLE), Transparent code: 02H (STX)
Transparent code designation (2nd): Additional code: 10H (DLE), transparent code: 03H (ETX)
Transparent code (2nd)
Target
device
Additional code (2nd)
E
Data
N
length
Q
CPU module
(0004H)
L
05H
04H
Transmission
X50
command
CPU module
Completion device
M0
Status display
device
M1
at completion
■Program example
Category
Label name
Module label
C24_1
Label to be defined
Define the global label as shown below.
For information on the module FB to be used, refer to the following manual.
MELSEC iQ-R Serial Communication Module Function Block Reference
Data area
D
D
C
L
L
L
H
E
E
R
F
(1102H)
A
B
(0003H)
00H
10H
02H
11H
41H 42H
10H
03H
00H
0DH0AH
B4H00H
Transparent code (1st)
Additional code (1st)
BIDOUT
A
C
K
06H
Sum
check
code
L
H
Data length (transmission data count):
ON
Excluding additional codes
For word unit : 0004H
For byte unit : 0008H
ON
Abnormal
completion
The following diagram is for word unit
Normal
completion
1 scan
00H , 04H
D3
D10
11H , 02H
D11
42H , 41H
Transmission data
D12
00H , 03H
(LF) (CR)
D13
0AH , 0DH
Program Buffer memory
device memory
Description
Target module
16 TRANSPARENT CODES AND ADDITIONAL CODES
16.6 Data Communication Using Bidirectional Protocol
Address
Un\G1024
00H , 04H
(1102H)
(1102H)
Un\G1025
11H , 02H
(B) (A)
(B) (A)
Un\G1026
42H , 41H
(0003H)
(0003H)
Un\G1027
00H , 03H
(LF) (CR)
Un\G1028
0AH , 0DH
Buffer memory
Device
16
345

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents