![background image](http://html1.mh-extra.com/html/omron/srm1-programing-02-2001/srm1-programing-02-2001_programming-manual_742414104.webp)
2-3
Section
CPM1/CPM1A Interrupt Functions
83
Program Example
When input 00003 (interrupt no. 0) goes ON 10 times, operation moves immedi-
ately to the interrupt program with subroutine number 000. The following table
shows where the counters‘ set values and present values –1 are stored. Inputs
for DM 6628 have been set to 0001.
Interrupt
Word containing
SV
Word containing
PV–1
Input 00003 (input interrupt 0)
SR 240
SR 244
Input 00004 (input interrupt 1)
SR 241
SR 245
Input 00005 (input interrupt 2)
SR 242
SR 246
Input 00006 (input interrupt 3)
SR 243
SR 247
MOV(21)
#000A
240
SBN(92)
000
RET(93)
25315 First Cycle Flag
ON for 1 cycle
Interrupt program
Sets the SV to 10. (0000 to FFFF)
Word containing the SV (SR 240)
@INT(89)
003
000
#000E
Refresh counter SVs.
Refreshes the SV of 00003 (interrupt input 0) only.
2-3-3 Masking All Interrupts
All interrupts, including input interrupts, interval timer interrupts, and high-speed
counter interrupts, can be masked and unmasked as a group by means of the
INT(89) instruction. The mask is in addition to any masks on the individual types
of interrupts. Furthermore, clearing the masks for all interrupts does not clear the
masks on the individual types of interrupts, but restores them to the masked
conditions that existed before INT(89) was executed to mask them as a group.
Do not use INT(89) to mask interrupts unless it is necessary to temporarily mask
all interrupts and always use INT(89) instructions in pairs to do so, using the first
INT(89) instruction to mask and the second one to unmask interrupts.
INT(89) cannot be used to mask and unmask all interrupts from within interrupt
routines.
Masking Interrupts
Use the INT(89) instruction to disable all interrupts.
(@)INT(89)
100
000
000
If an interrupt is generated while interrupts are masked, interrupt processing will
not be executed but the interrupt will be recorded for the input, interval timer, and
high-speed counter interrupts. The interrupts will then be serviced as soon as
interrupts are unmasked.
Содержание 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 ...