Omron C200HG Computer Hardware User Manual


 
289
This function is used to write the current setting for the scheduled interrupt inter-
val to word D.
This function is used to mask or unmask all interrupt processing. Masked inputs
are recorded, but ignored. The masked inputs will be serviced as soon as they
are unmasked. This function masks or unmask all interrupts at the same time
and is independent of the masks created with other functions.
The control data, D, and interrupt type, N, are not used for this function. Set them
to #0000.
Flags ER: Indirectly addressed DM word is non-existent. (Content of DM word is
not BCD, or the DM area boundary has been exceeded.)
C, and/or N are not within specified values.
All interrupts within the subroutine are masked or unmasked.
Example 1: Input Interrupt This example shows how to unmask a particular interrupt input. Input interrupt
subroutines will be executed when the CPU Unit receives the corresponding in-
terrupt input, regardless of the location in the CPU Units cycle. These interrupts
are useful when using program sections of uncertain length, such as event pro-
grams.
All input interrupts are masked at the start of operation, and the desired interrupt
input is unmasked using INT(89) with N=000 and C=000. As shown in the follow-
ing diagram, the subroutine would be executed if there were an input from input
interrupt 00 of Interrupt Input Unit 0 when that interrupt input was unmasked.
LD 25315
INT(89) 000
000
#00FE
SBN(92) 00
RET(93)
END(01)
Main program
Subroutine
Main program
Interrupt from
interrupt input 00
Only interrupt input
00 is unmasked.
First Cycle Flag
Note Depending on the setting of DM 6621 in the PC Setup, Host Link servicing, Re-
mote I/O servicing, Special I/O Unit servicing, and individual instruction execu-
tion will be completed before the subroutine is executed. Refer to page 280 for
details.
This example shows how to set the interval between scheduled interrupts.
Scheduled interrupt subroutines will be executed at fixed intervals, regardless of
the location in the CPU Units cycle. This interrupt is useful for program sections
such as regular monitoring programs.
Read Interrupt Interval
(N=004, C=002)
Mask/Unmasking All
Interrupts (C=100/200)
Example 2: Scheduled
Interrupt
Subroutines and Interrupt Control Section 5-23