Omron CJ2 CPU UNIT SOFTWARE User Manual page 117

Cj2 cpu unit software
Hide thumbs Also See for CJ2 CPU UNIT SOFTWARE:
Table of Contents

Advertisement

However, a high-speed interrupt function can be used with CJ2H CPU Units with unit version 1.1 or
later to set an interrupt interval of 0.1 ms for scheduled interrupt 0 (interrupt task 2). This setting can-
not be used for other interrupts. For details on the high-speed interrupts, refer to 10-2-6 High-speed
Interrupt Function.
Precautions for Correct Use
Precautions for Correct Use
• If you shorten the time interval for scheduled interrupts and increase the execution frequency
for scheduled interrupt tasks, be careful because the time until execution of cyclic tasks and
extra cyclic tasks is completed and the overall cycle time will increase.
• The scheduled interrupt tasks cannot be used if synchronous unit operation is being used.
Interrupt Overhead Time for Scheduled Interrupt Tasks
The time from when the specified time set using MSKS(690) elapses until the interrupt tasks is actu-
ally executed is called the scheduled interrupt task startup time. The time it takes to return to the
processing that was interrupted after the interrupt task program has been executed is called the
cyclic task return time. The combination of the interrupt task startup time and the cyclic task return
time is called the interrupt overhead time.
Interrupt overhead time for
scheduled interrupt tasks
*1 Using High-speed interrupt function
Refer to 10-2-6 High-speed Interrupt Function for information on High-speed interrupt function.
Resetting and Restarting with MSKS(690)
With CJ2M CPU Units, you can specify resetting the internal timer when you start a scheduled inter-
rupt with MSKS(690) (a "reset start"). This enables creating a consistent time until starting the first
interrupt without using CLI(691). When starting a scheduled interrupt, the scheduled interrupt time
(i.e., the interval between one interrupt and the next) is set using MSKS(690). However, the time
until the first time the scheduled interrupt task is started after MSKS(690) is executed depends on
the present value of the internal timer. Therefore, the time to the first interval would be inconsistent if
CLI(691) is not executed as well. For the CJ2M CPU Units, however, the internal timer can be reset
when starting, making the time to the first interrupt consistent even if CLI(691) is not executed.
MSKS(690) Operand for Scheduled Interrupts
Operand
N (interrupt identifier)
Reading the PV of Internal Timers with MSKR(692)
With the CJ2M CPU Units, the present value of the internal timer used to measure the scheduled
interrupt time can be read. Either the time that has elapsed until the scheduled interrupt is started or
the time since the previous scheduled interrupt can be read. MSKR(692) is used to read the present
value of the internal timer. The time unit is the same as the unit used for the scheduled interrupt
time, i.e., the Scheduled Interrupt Interval set in the PLC Setup.
CJ2 CPU Unit Software User's Manual
Item
Interrupt task startup time
Cyclic task return time
4: Scheduled interrupt 0, normal operation (internal timer not reset, interrupt task 2)
5: Scheduled interrupt 1, normal operation (internal timer not reset, interrupt task 3)
14: Scheduled interrupt 0, reset start (CJ2M CPU Units only, interrupt task 2)
15: Scheduled interrupt 1, reset start (CJ2M CPU Units only, interrupt task 3)
5 Understanding Programming
Time
CJ2H CPU Units
22 µs or 13 µs
*1
(27 µs for unit version 1.0)
11 µs or 8 µs
*1
(15 µs for unit version 1.0)
Set value
CJ2M CPU Units
30 µs
11 µs
5-25
5

Advertisement

Table of Contents
loading

Table of Contents