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

Data transmission example (ASCII-BIN conversion is enabled)
The following shows an example of data transmission with ASCII-BIN conversion used.
Ex.
Target
device
C24
Transmission
X50
command
CPU module
Completion
M0
device
Status display
M1
device
at completion
For data designated by the CPU module, data for one word is converted to 4-byte data ('0' to '9' and 'A' to 'F') and transmitted.
■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
17 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION)
364
17.6 Data Communication Using Bidirectional Protocol
E
Data length
N
(0004)
Q
L
H
0
0
1
4
4
0
2
3
5
A
05H
30H
34H 30H 30H
31H
32H
33H 34H 35H
41H 42H
BIDOUT
Sum
Data area
check
code
L
B
C
D
E
F
0
0
D
0
A
43H
44H
45H 46H
30H
30H
44H
30H 41H
6DH
ON
ON
Abnormal
completion
The following diagram is for word unit
Normal
completion
1 scan
Transmission
data
Description
Target module
A
C
K
06H
H
04H
Data length (Number of data transmitted): Excluding additional code
Word units
Number of bytes after ASCII-BIN conversion: (8)/2=4
Byte units
Number of bytes after ASCII-BIN conversion: (8)
Un\G1024
D3
00H , 04H
Un\G1025
D10
34H , 12H
Un\G1026
D11
BCH , 5AH
Un\G1027
D12
F0H , DEH
Un\G1028
D13
0AH , 0DH
Program
device memory
00H , 04H
34H , 12H
BCH , 5AH
F0H , DEH
0AH , 0DH
Buffer
memory
Device

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents