Omron C200HX Operation Manual page 309

Hide thumbs Also See for C200HX:
Table of Contents

Advertisement

Subroutines and Interrupt Control
Read Interrupt Interval
(N=004, C=002)
Mask/Unmasking All
Interrupts (C=100/200)
Flags
Example 1: Input Interrupt
Example 2: Scheduled
Interrupt
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.
Indirectly addressed DM word is non-existent. (Content of DM word is
ER:
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.
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 Unit's 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.
First Cycle Flag
Only interrupt input
00 is unmasked.
Interrupt from
interrupt input 00
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 282 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 Unit's cycle. This interrupt is useful for program sections
such as regular monitoring programs.
Section 5-23
Main program
LD
25315
INT(89)
000
000
#00FE
Main program
SBN(92)
00
Subroutine
RET(93)
END(01)
291

Advertisement

Table of Contents
loading

This manual is also suitable for:

C200hgC200he

Table of Contents