Omron CJ2 CPU - REV 10-2010 User Manual page 130

Cj2 cpu unit software
Table of Contents

Advertisement

5 Understanding Programming
Interrupt during Interrupt Task Execution
If an interrupt occurs while another interrupt task is being executed, the task for the interrupt will not
be executed until the original interrupt finishes executing.
Additional Information
If you do not want a specific I/O interrupt task number to be saved and executed for the CPU Unit
when it occurs while another interrupt task is being executed, execute the CLI (CLEAR INTER-
RUPT) instruction from the other interrupt task to CLEAR the interrupt number saved internally.
Scheduled interrupts and external interrupts cannot be cancelled.
Cyclic task
Additional Information
Only one interrupt will be recorded in memory for each interrupt task and an interrupt will not be
recorded for an interrupt that is already being executed. Because of the low order of priority of
scheduled interrupts and because that only one interrupt is recorded at a time, it is possible for a
scheduled interrupt to be skipped.
Application Precautions
Executing IORF(097), FIORF(225), IORD(222), or IOWR(223) for a Special I/O Unit
If a Special I/O Unit is being used and IORF(097), FIORF(225), IORD(222), or IOWR(223) will be
executed from an interrupt task, always disable cyclic refreshing for that Special I/O Unit in the PLC
Setup.
If a Special I/O Unit is being refreshed by cyclic refreshing or an I/O refreshing instruction, a dupli-
cate refresh error will occur if you try to refresh the same Special I/O Unit with an IORF(097) or
FIORF(225) instruction in an interrupt task or if an attempt is made to read/write data for the same
Special I/O Unit with an IORD(222) or IOWR(223) instruction. In this case, the IORF(097),
FIORF(225), IORD(222), or IOWR(223) instruction will not be executed, but the Error Flag (P_ER)
will not be turned ON. Cyclic refreshing will be performed normally.
If Duplicate Refresh Error Detection is enabled in the PLC Setup when a duplicate refresh error
occurs, A402.13 (Duplicate Refresh Error Flag) will turn ON and the unit number of the Special I/O
Unit will be stored in A426 (Duplicate Refresh Error Task Number).
Prohibiting Interrupts during Specific Processing with Cyclic Tasks
Processing will be interrupted and the interrupt task will be executed if an interrupt occurs during in
the following.
• While an instruction is being executed
• During Basic I/O Unit or Special I/O Unit refreshing
• During peripheral servicing
5-38
Interrupt task 101 will be ignored while
another interrupt task is being executed.
Interrupt task A
END
CLI
0
#0002
END
Interrupt
I/O interrupt task 101
during
execution
END
Interrupt task 101 will not
be executed.
CJ2 CPU Unit Software User's Manual

Advertisement

Table of Contents
loading

Table of Contents