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