Omron CJ2 - 02-2010 User Manual page 113

Cj2 cpu unit software
Table of Contents

Advertisement

Scheduled Interrupt Tasks
Tasks are executed at specified time intervals by using the timer in the CPU Unit. Up to two interrupt
tasks (interrupt tasks 2 and 3) can be used for scheduled interrupts 0 and 1.
Cyclic task
Cyclic task
Interrupt Task Numbers and Interrupt Numbers
Scheduled interrupt 0
Scheduled interrupt 1
Executing Scheduled Interrupt Tasks
Scheduled interrupt tasks are disabled when the CPU Unit operation is started. They can be
enabled by using the MSKS(690) (SET INTERRUPT MASK) instruction. The time interval for sched-
uled interrupt tasks is determined by setting of the scheduled interrupt time unit in the PLC Setup
and setting for the scheduled interrupt time specified with the operand when MSKS(690) is exe-
cuted.
• Setting the Scheduled Interrupt Time Unit
Set the unit for the interrupt time that is set with MSKS(690) using the "Scheduled Interrupt Inter-
val" setting on the Timings/Synchronous Tab Page in the PLC Settings Dialog Box of the CX-
Programmer.
The unit can be set to 10 ms, 1.0 ms, or 0.1 ms. The default is 10 ms.
• Setting the Scheduled Interrupt Time Using MSKS(690)
Set the interval at which the scheduled interrupt task will be executed.
The unit can be set to between &1 and &9999 decimal (#0001 to #270F hex).
Example: If the scheduled interrupt time unit is set to 0.1 ms and the scheduled interrupt time is set
to &5 decimal, the time interval is 0.1 x 5 = 0.5 ms.
The minimum time intervals that can be set for scheduled interrupt tasks are as follows:
• CJ2H CPU Units: 0.2 ms
• CJ2M CPU Units: 0.4 ms
CJ2 CPU Unit Software User's Manual
Interrupt number 4 (Scheduled interrupt task 0)
will be executed at an interrupt interval (100 ×
MSKS
10 ms)
4
&100
END
Interrupt
Scheduled interrupt task 2
END
Interrupt task No.
2
3
5 Understanding Programming
Scheduled interrupt time unit
in PLC Setup = 10 ms (0.01 s)
Every second
Scheduled interrupt task
(Interrupt task No. 2) is
executed once per second.
END
Interrupt number
(MSKS(690))
4
5
5
5-23

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents