Interrupt Control Instructions - Omron SYSMAC CP Series Instruction & Reference Manual

Cpu unit
Hide thumbs Also See for SYSMAC CP Series:
Table of Contents

Advertisement

2 Instructions

Interrupt Control Instructions

CP1E CPU Units support the following interrupts.
Type
I/O Interrupts
Scheduled Interrupts
Outline of Interrupt Control Instructions
SET INTERRUPT MASK: MSKS(690)
Both I/O interrupt tasks and scheduled interrupt tasks are masked (disabled) when the PLC enters RUN
mode. MSKS(690) can be used to unmask or mask I/O interrupts and set the time intervals for sched-
uled interrupts.
CLEAR INTERRUPT: CLI(691)
CLI(691) clears or retains recorded interrupt inputs for I/O interrupts or sets the time to the first sched-
uled interrupt for scheduled interrupts. It also clears or retains recorded high-speed counter interrupts.
DISABLE INTERRUPTS: DI(693)
DI(693) disables execution of all interrupt tasks.
ENABLE INTERRUPTS: EI(694)
EI(694) enables execution of all interrupt tasks.
Precautions in Using Interrupt Tasks
Precautions for All Interrupts
• When multiple interrupts occur at once, the order of execution of the interrupts is as follows:
I/O interrupt > scheduled interrupt
Note "A > B" indicates that A is given priority over B. On the same interrupt level, lower numbered tasks are given
priority over higher numbered tasks.
Precautions for I/O Interrupts
• Only built-in inputs from CP1E CPU Units are supported for interrupt tasks.
• Use interrupt inputs on the CPU Rack from 0ch02 bit to 0ch07 bit. I/O interrupt tasks will not be exe-
cuted if using any other input.
• All interrupt inputs that have been detected will be cleared when the interrupt mask is cleared.
• There is no limit on the number of I/O interrupt inputs that can be recorded, but only one interrupt is
recorded for each I/O interrupt number. Furthermore, the recorded interrupt is not cleared until its
interrupt task has been completed, so a new interrupt input will be ignored if it is received while its
interrupt task is being executed.
Precautions for Scheduled Interrupts
• Be sure that the time interval is longer than the time required to execute the scheduled interrupt task.
• To accurately control the time to the first interrupt and the interrupt interval, program CLI(691) to set
the time to the first schedule interrupt just before programming MSKS(690). If MSKS(690) is used to
restart a schedule interrupt, the time to the first scheduled interrupt will be accurate even if CLI(691)
is not used.
• The time unit for the scheduled interrupt is always 0.1ms.
2-298
Execution condition
Interrupt input from the built-in Input on the CPU
Rack turns ON/OFF.
Scheduled (fixed intervals)
Setting procedure
Use the MSKS instruction to assign inputs from Interrupt Input on
the CPU Rack.
Use the MSKS instruction to set the interrupt interval.
CP1E CPU Unit Instructions Reference Manual(W483)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents