Cpm2A/Cpm2C Interrupt Functions - Omron CPM1 - PROGRAMING MANUAL 02-2001 Programming Manual

Hide thumbs Also See for CPM1 - PROGRAMING MANUAL 02-2001:
Table of Contents

Advertisement

CPM2A/CPM2C Interrupt Functions

2-1

CPM2A/CPM2C Interrupt Functions

Types of Interrupts
Writing Interrupt
Programs
1, 2, 3...
26
The CPM2A and CPM2C (including the CPM2C-S) provide the following kinds
of interrupt processing. Interrupts may be disabled temporarily when online edit-
ing is performed during operation or STUP(––) is executed to change settings.
Note *Input points 00005 and 00006 do not exist in CPM2C CPU Units with only 10 I/O
points or in CPM2C-S CPU Units. In these CPU Units, interrupt subroutine num-
bers 000 and 001 are allocated to input points 00003 and 00004.
Interrupt Inputs
Interrupt programs are executed when inputs to the CPU Unit's built-in input
points (00003 to 00006*) are turned from OFF to ON. Interrupt subroutine num-
bers 000 to 003* are allocated to input points 00003 to 00006*.
Interval Timer Interrupts
Interval timer interrupt programs are executed with a precision of 0.1 ms. Inter-
rupt subroutine numbers 000 to 049 are allocated by instructions.
Count-up Interrupts Using Interrupt Inputs (Counter Mode)
Input signals to the CPU Unit's built-in input points (00003 to 00006*) are
counted at high speed (2 kHz), and the normal program is stopped and an inter-
rupt program is executed. Interrupt subroutine numbers 000 to 003* are allo-
cated to input points 00003 to 00006*.
Count-check Interrupts Using the High-speed Counter
Pulse inputs to the CPU Unit's input points (00000 to 00002) are counted at high
speed (20 kHz/5 kHz), and an interrupt program is executed when the present
value matches the target value or falls within a given range. Interrupt subroutine
numbers 000 to 049 are allocated by instructions.
Note Interrupts will be temporarily disabled if online editing is performed during opera-
tion or if the PC Setup is changed during operation (including changes made
with STUP(––).
Interrupt programs are defined as interrupt subroutines within the user program.
Just like ordinary subroutines, an interrupt subroutine is defined by SBN(92) and
RET(93). It is written at the end of the normal program.
1. A new interrupt can be defined in an interrupt subroutine, and an existing
one can be cleared.
2. Within any given interrupt subroutine, it is not possible to write another sub-
routine for processing another interrupt. Do not nest another interrupt sub-
routine between the SBN(92) and RET(93) instructions.
Normal
program
Interrupt
Subroutine
program
Section
2-1

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CPM1 - PROGRAMING MANUAL 02-2001 and is the answer not in the manual?

Table of Contents