Omron C200HX Operation Manual page 308

Hide thumbs Also See for C200HX:
Table of Contents

Advertisement

Subroutines and Interrupt Control
Description
Mask/unmask Input
Interrupts
(N=000 or 001, C=000)
Clear Input Interrupts
(N=000 or 001, C=001)
Read Current Mask Status
(N=000 or 001, C=002)
Set Interrupt Interval
(N=004, C=000)
Set Time to First Interrupt
(N=004, C=001)
290
INT(89) is used to control interrupts and performs one of 11 functions depending
on the values of C and N. As shown in the following tables, six of the functions act
on input interrupts, three act on the scheduled interrupt, and the other two mask
or unmask all interrupts.
Interrupt
C
Input interrupts from
p
p
000
Interrupt Input Unit 0
I
I
U i 0
001
(N=000)
(N=000)
002
Input interrupts from
p
p
000
Interrupt Input Unit 1
I
I
U i 1
001
(N=001)
(N=001)
002
Scheduled (N=004)
(
)
000
001
002
The following 2 functions depend on the value of C only.
Value of C
INT(89) Function
100
Mask all interrupts
200
Unmask all interrupts
Set N=000 for Interrupt Input Unit 0 and N=001 for Interrupt Input Unit 1. This
function is used to mask and unmask input interrupts 00 to 07.Masked inputs are
recorded, but ignored. When an input is masked, the interrupt program for it will
be run as soon as the bit is unmasked (unless it is cleared beforehand by execut-
ing INT(89) with C=001 and N=000).
Set the corresponding bit in D to 0 to unmask or to 1 to mask an I/O interrupt
input. Bits 00 to 07 correspond to 00 to 07.
Set N=000 for Interrupt Input Unit 0 and N=001 for Interrupt Input Unit 1. This
function is used to clear I/O interrupt inputs 00 to 07. Since interrupt inputs are
recorded, masked interrupts will be serviced after the mask is removed unless
they are cleared first.
Set the corresponding bit in D to 1 to clear an interrupt input. Bits 00 to 07 corre-
spond to 00 to 07.
Set N=000 for Interrupt Input Unit 0 and N=001 for Interrupt Input Unit 1. This
function is used to write the current mask status for input interrupts 00 to 07 to
word D. The corresponding bit will be ON if the input is masked. (Bits 00 to 07
correspond to 00 to 07.)
This function is used to set the interval between scheduled interrupts. The con-
tent of D (BCD: 0001 to 9999) is multiplied by the scheduled interrupt time unit
(1 ms or 10 ms) to obtain the scheduled interrupt interval.
The scheduled interrupt time unit is set in DM 6622 of the PC Setup. Refer to
3-6-4 PC Setup for details on setting this time unit.
This function is used to set the time to the first scheduled interrupt. The content
of D (BCD: 0000 to 9999) is multiplied by the scheduled interrupt time unit (1 ms
or 10 ms) to obtain the time to the first scheduled interrupt. The scheduled inter-
rupt time unit is set in DM 6622 of the PC Setup. Refer to 3-6-4 PC Setup for
details on setting this time unit.
Be sure to set the time to the first interrupt. If this setting is not made, the interval
to the first interrupt (set with N=004, C=000) will be uncertain.
Use the First Cycle Flag (SR 25315) for the execution condition to INT(89) when
setting the time to the first interrupt (C=001). The scheduled interrupt might nev-
er occur if the C=001 setting is made continuously.
INT(89) Function
Mask/unmask input interrupts Bits 00 to 07 of D indi-
Clear input interrupts
Read current mask status
Mask/unmask input interrupts Bits 00 to 07 of D indi-
Clear input interrupts
Read current mask status
Set interrupt interval
Set time to first interrupt
Read interrupt interval
Section 5-23
Comments
cate inputs 00 to 07.
i
00
07
Status written to D.
cate inputs 00 to 07.
i
00
07
Status written to D.
---
---
---

Advertisement

Table of Contents
loading

This manual is also suitable for:

C200hgC200he

Table of Contents