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

Table of Contents

Advertisement

Note 1 The CJ1M-CPU11/21 supports only one scheduled interrupt task, interrupt task 2 for scheduled interrupt
0.
2 The time unit for the scheduled interrupt time is set as the Schedule Interrupt Interval in the PLC Setup
(default: 10 ms).
Hint
The longest interrupt task processing time is stored in A440 (Maximum Interrupt Task Processing
Time). At the same time, the task number of the interrupt task with the longest interrupt task processing
time is stored in A441 (Interrupt Task with Maximum Processing Time).
Precaution
• Be sure that the scheduled interrupt set time interval is longer than the time required to execute the
scheduled interrupt task.
• For scheduled interrupts, MSKS(690) is used only to set the scheduled interrupt interval and does not
set the time to the first scheduled interrupt after execution of MSKS(690). The internal timer when
MSKS(690) is executed will continue from the value where is previously stopped. This means that the
time to the first scheduled interrupt will not be consistent. To accurately control the time to the first
interrupt and the interrupt interval, program CLI(691) to set the time to the first scheduled interrupt
just before programming MSKS(690). If MSKS(690) is used to restart a scheduled interrupt for a
CJ1M or CJ2M CPU Unit, however, the time to the first scheduled interrupt will be accurate even if
CLI(691) is not used.
• Scheduled interrupt tasks cannot be used for CJ2H CPU Units if synchronous unit operation is being
used. An instruction error will occur if the MSKS(690) instruction is executed with N (interrupt
identifier) set to 4 or 5.
Example Programming
Examples for CS1W-INT01/CJ1W-INT01
When CIO 0.00 turns ON in the following example, MSKS(690) unmasks (enables) interrupt inputs in
Interrupt Input Unit 0.
0.00
MSKS
N
S
When CIO 0.01 turns ON in the following example, MSKS(690) sets the rising/falling edge designations
for Interrupt Input Unit 0.
0.01
MSKS
N
S
Example for Scheduled Interrupts
1. When W0.00 goes from OFF to ON in the following example, MSKS(690) sets a 15 ms time interval
for scheduled interrupt 0, and starts the internal timer. (In this case, the scheduled time interval units
are set to 1 ms.)
2. When W0.01 goes from OFF to ON, the internal timer is stopped for scheduled interrupt 0, which
stops the generation of timer interrupts.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
15
14
13
D100
0
0
1
0
D100
3
0: Enabled
1: Masked
15
14
13
D101
0
0
0
2
D101
0
0: Rising edge
1: Falling edge
12
11
10
9
8
7
6
5
1
1
1
1
1
0
0
1
F
2
12
11
10
9
8
7
6
5
0
0
1
0
1
0
0
0
5
0
3. Instructions
4
3
2
1
0
0
0
1
1
1
7
4
3
2
1
0
0
0
0
1
1
2
3
713

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - REFERENCE MANUAL 02-2010 and is the answer not in the manual?

Table of Contents