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

Table of Contents

Advertisement

3. Instructions
• RXDU(255) can not be executed when the Reception Completed Flag (bit 6 of n+9 or n+19, where n
= CIO 1500 + 25
condition of RXDU(255).
Example Programming
When CIO 0.00 is ON, A202.03 (the Communications Port Enabled Flag) is ON, and CIO 1559.06 (the
Reception Completed Flag for port 1) is ON in the following example, RXDU(255) reads the data
received through serial port 1 of the Serial Communications Unit with unit number 2. (Logical
communications port number 3 is used to receive the data from a general-purpose device such as a
bar-code reader.) The 10 bytes of received data are written to the DM Area beginning at the rightmost
byte of D100.
0.00
862
unit number) is OFF. Program the Reception Completed Flag as a normally open
A202.03
1559.06
Communications
Reception
D
Port Enabled
Completed
C
Flag
Flag
N
15
12
11
8
7
C: D200
0
0
15
12
11
8
7
C+1: D201
3
1
Serial Communications Unit's serial port specifier
1: Serial port No. 1
Communication port No. specifier (internal logic port)
3: Communications port No. 3
Note: The Serial Communications Unit's serial port unit address can
also be directly specified in C+1.
15
12
11
8
7
4 3
3
0
8
C+1
0: Directly specified serial port unit address
Communications port No. specifier (internal logic port)
3: Communications port No. 3
Most significant bytes Least significant bytes
15
8
7
D: D100
3
4
D101
7
8
D102
C
D
D103
G
H
D104
K
L
Note: Allocated DM Area Settings
Start code/end code
15
12
11
8
7
4 3
0
2
0
D30204:
Start code (e.g., 02 hex)
Start code/end code specifier
15
12
11
8
7
4 3
D30205:
1
1
End code specifier
1: Use end code
Start code specifier
1: Use start code
RXDU
D100
D200
&10
4 3
0
0
1
1: Least significant byte to most significant byte
RS and ER signal control
0: No RS and ER signal control
4 3
0
1
2
Serial Communications Unit's unit address
(CPU Bus Unit's unit address)
12: Unit address + 10 hex
0
8
Serial Communications Unit's serial port unit address specifier
88: 80 + (04_Unit No. 2)
0
1
2
5
6
A
B
Received in
1 2 3 4 5 6 7 8 A B C D E F G H I J K L
specified
E
F
order:
I
J
Start and end codes added
according to setting in PC Setup
ST
12
34
0
ST: Start code (e.g., 02 hex)
3
ED: End code (e.g., 03 hex)
End code (e.g., 03 hex)
Data received
0
Number of receive data bytes
00: Unlimited (256 bytes max.)
CS/CJ/NSJ Series Instructions Reference Manual (W474)
10 bytes
56 78 AB CD
EF GH IJ
KL ED

Advertisement

Table of Contents
loading

Table of Contents