Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 910

Table of Contents

Advertisement

3. Instructions
Example Programming
Using DRXDU(261) in Cyclic Tasks
When CIO 0.00 is ON and CIO 1559.06 (the Reception Completed Flag for port 1) is ON in the
following example, DRXDU(255) reads the data received from the general-purpose device connected to
serial port 1 of the Serial Communications Unit with unit number 2. The 10 bytes of received data are
written to the DM Area beginning at the rightmost byte of D100.
0.00
874
1559.06
DRXDU
Reception
D
D100
Completed
C
D200
Flag
N
&10
15
12
11
8
7
4 3
C: D200
0
0
0
1
RS and ER signal control
0: No RS and ER signal control
15
12
11
8
7
4 3
C+1: D201
0
1
1
2
Serial Communications Unit's unit address
(CPU Bus Unit's unit address)
12: Unit address + 10 hex
Serial Communications Unit's serial port specifier
1: Serial port No. 1
Most significant bytes Least significant bytes
15
8
7
D: D100
3
4
1
2
D101
7
8
5
6
D102
C
D
A
B
D103
G
H
E
F
D104
K
L
I
J
Note: Allocated DM Area Settings
Start code/end code
15
12
11
8
7
4 3
0
0
2
0
3
D30204:
End code (e.g., 03 hex)
Start code (e.g., 02 hex)
Start code/end code specifier
15
12
11
8
7
4 3
0
1
1
D30205:
Number of receive data bytes
00: Unlimited (256 bytes max.)
End code specifier
1: Use end code
Start code specifier
1: Use start code
0
1: Least significant byte to most significant byte
0
0
Received in
1 2 3 4 5 6 7 8 A B C D E F G H I J K L
specified
order:
10 bytes
Start and end codes added
according to setting in PC Setup
ST
12
34
56 78 AB CD
ST: Start code (e.g., 02 hex)
ED: End code (e.g., 03 hex)
Data received
CS/CJ/NSJ Series Instructions Reference Manual (W474)
EF GH IJ
KL ED

Advertisement

Table of Contents
loading

Table of Contents