2-1
Section
CPM2A/CPM2C Interrupt Functions
26
2-1
CPM2A/CPM2C Interrupt Functions
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.
Normal
program
Interrupt
program
Subroutine
1, 2, 3...
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.
Types of Interrupts
Writing Interrupt
Programs
Содержание SRM1 - PROGRAMING 02-2001
Страница 1: ...Programmable Controllers Cat No W353 E1 06 SYSMAC CPM1 CPM1A CPM2A CPM2C SRM1 V2 PROGRAMMING MANUAL ...
Страница 2: ...CPM1 CPM1A CPM2A CPM2C SRM1 V2 Programmable Controllers Programming Manual Revised February 2008 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 9: ...x ...
Страница 15: ...xvi ...