![background image](http://html1.mh-extra.com/html/omron/srm1-programing-02-2001/srm1-programing-02-2001_programming-manual_742414102.webp)
2-3
Section
CPM1/CPM1A Interrupt Functions
81
All of the input interrupts are masked when PC operation is started. If input inter-
rupt mode is being used, be sure to enable the inputs by executing INT(89) as
shown above.
Clearing Masked Interrupts
If the bit corresponding to an input interrupt turns ON while masked, that input
interrupt will be saved in memory and will be executed as soon as the mask is
cleared. In order for that input interrupt not to be executed when the mask is
cleared, the interrupt must be cleared from memory.
Only one interrupt signal will be saved in memory for each interrupt number.
With the INT(89) instruction, clear the input interrupt from memory.
(@)INT(89)
001
000
D
If D bits 0 to 3, which correspond to input interrupts 0 to 3, are
set to “1,” then the input interrupts will be cleared from memory.
0: Input interrupt retained.
1: Input interrupt cleared.
Reading Mask Status
With the INT(89) instruction, read the input interrupt mask status.
(@)INT(89)
002
000
D
The status of the rightmost digit of the data stored in word D (bits
0 to 3) show the mask status.
0: Mask cleared. (Input interrupt enabled.)
1: Mask set. (Input interrupt disabled.)
Program Example
When input 00003 (interrupt no. 0) goes ON, operation moves immediately to
the interrupt program with subroutine number 000. Inputs for DM 6628 have
been set to 0001.
SBN(92)
000
RET(93)
25315 First Cycle Flag
ON for 1 cycle
Interrupt program
@INT(89)
000
000
#000E
Mask/unmask input interrupts.
Unmasks 00003 (interrupt input 0), masks others.
Counter Mode
External signal inputs are counted at high speed and an interrupt is generated
when the count reaches the set value. When an interrupt is generated, the main
program is interrupted and the interrupt program is executed. Signals up to
1 kHz can be counted.
Set value
Main program
Interrupt program
Main program
Input interrupt
Содержание 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 ...