Cpm1/Cpm1A Interrupt Functions; Types Of Interrupts - Omron CPM1 Programming Manual

Hide thumbs Also See for CPM1:
Table of Contents

Advertisement

CPM1/CPM1A Interrupt Functions

1-6

CPM1/CPM1A Interrupt Functions

1-6-1

Types of Interrupts

Interrupt Priority
Interrupt Program
Precautions
1,2,3...
The following diagram shows the relationship between absolute high-speed
counter 1's PV and Range Comparison Result flags AR 0500 to AR 0507 as
the above program is executed.
AR 0500
AR 0501
AR 0502
AR 0503
AR 0504 to AR 0507
PV=0
This section explains the settings and methods for using the CPM1/CPM1A
interrupt functions.
The CPM1/CPM1A has three types of interrupt processing, as outlined below.
Input Interrupts
CPM1/CPM1A PCs have two or four interrupt inputs. Interrupt processing is
executed when one of these inputs is turned ON from an external source.
Interval Timer Interrupts
Interrupt processing is executed by an interval timer with a precision of 0.1
ms.
High-speed Counter Interrupts
The high-speed counter counts pulse inputs to one of CPU bits 00000 to
00002. Interrupt processing is executed when the count reaches the set value
of a built-in high-speed counter.
When an interrupt is generated, the specified interrupt processing routine is
executed. Interrupts have the following priority ranking.
Input interrupts > Interval interrupts = High-speed counter interrupts
When an interrupt with a higher priority is received during interrupt process-
ing, the current processes will be stopped and the newly received interrupt will
be processed instead. After that routine has been completely executed, then
processing of the previous interrupt will be resumed.
When an interrupt with a lower or equal priority is received during interrupt
processing, then the newly received interrupt will be processed as soon as the
routine currently being processed has been completely executed.
When two interrupts with equal priority are received at the same time, they are
executed in the following order:
Input interrupt 0 > Input interrupt 1 > Input interrupt 2 > Input interrupt 3
Interval interrupts > High-speed counter interrupts
Observe the following precautions when using interrupt programs:
1. A new interrupt can be defined within an interrupt program. Furthermore,
an interrupt can be cleared from within an interrupt program.
2. Another interrupt program cannot be written within an interrupt program.
3. A subroutine program cannot be written within an interrupt program. Do not
write a SUBROUTINE DEFINE instruction, SBN(92), within an interrupt
program.
85 90
175 180
Section 1-6
265
270
355
360
67

Advertisement

Table of Contents
loading

Table of Contents