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

Table of Contents

Advertisement

Using DRXDU(261) in Interrupt Tasks
This example shows how to start interrupt task 5 in the CPU Unit when 10 bytes of data is received from
an external device (e.g., a barcode reader) connected to the Serial Communications Unit with unit
number 2 and store the data in memory starting from the lower byte of D00100.
1.
Settings in the DM Area Words Allocated to the Serial Communications Unit
The following settings would be made in the allocated DM Area words m+25 or m+35.
m = D30000 + 100
Port 1: m+25
Port 2: m+35
Example: The following settings would be made to use task 5 as the external interrupt task with the
Serial Communications Unit with unit number 0.
Port 1: D30025
The above settings in the allocated DM Area words can also be made by editing the CPU Bus Unit
settings of the Serial Communications Unit in the I/O tables of the CX-Programmer.
2.
The program to be assigned to the external interrupt task is right-clicked in the project tree in the
CX-Programmer and Properties is selected. Interrupt task 05 is selected for the task type in this
example.
3.
The following instructions are placed in the program assigned to the external interrupt task.
Note The Reception Completed Flag is not used in an interrupt task.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
unit number
15
12 11
08 07
External interrupt task No.
0
15
12 11
08 07
0 hex
5 hex
1 hex
0.00
04 03
00
0 0 1 0
0
0
0
Reception buffer clear setting
0: No notification
1: Notification
Interrupt notification setting
0: No notification
1: Notification
04 03
00
0 hex
Reception buffer clear setting
0: Do not clear
DRXDU
D100
D200
&10
3. Instructions
3
875

Advertisement

Table of Contents
loading

Table of Contents