Input Interrupts - Omron CPM1 Programming Manual

Hide thumbs Also See for CPM1:
Table of Contents

Advertisement

CQM1 Interrupt Functions
1-5-2

Input Interrupts

Processing
PC Setup Parameters
40
The CPU Unit's inputs allocated IR 00000 to IR 00003 can be used for inter-
rupts from external sources. Input interrupts 0 through 3 correspond respec-
tively to these bits and are always used to call the subroutines numbered 000
through 003 respectively. When input interrupts are not used, subroutine num-
bers 000 to 003 can be used for ordinary subroutines.
There are two modes for processing input interrupts. The first is the Input
Interrupt Mode, in which the interrupt is carried out in response to an external
input. The second is the Counter Mode, in which signals from an external
source are counted at high speed, and an interrupt is carried out once for
every certain number of signals.
In the Input Interrupt Mode, signals with a length of 100 s or more can be
detected. In the Counter Mode, signals up to 1 kHz can be counted.
Before executing the program, make the following settings in the PC Setup in
PROGRAM mode.
Interrupt Input Settings (DM 6628)
If these settings are not made, interrupts cannot be used in the program.
Input interrupt 3 setting
Input interrupt 2 setting
Input interrupt 1 setting
Input interrupt 0 setting
Input Refresh Word Settings (DM 6630 to DM 6633)
Make these settings when it is necessary to refresh inputs.
DM 6630: Interrupt 0
DM 6631: Interrupt 1
DM 6632: Interrupt 2
DM 6633: Interrupt 3
Number of words (2 digits BCD)
Beginning word (2 digits BCD)
Default: No input refresh
Example: If DM 6630 is set to 0100, IR 000 will be refreshed when a signal is
received for interrupt 0.
Note If input refreshing is not used, input signal status within the interrupt routine
will not be reliable. This includes even the status of the interrupt input bit that
activated the interrupt. For example, IR 00000 would not be ON in interrupt
routine for input interrupt 0 unless it was refreshed (in this case, the Always
ON Flag, SR 25313 could be used in place of IR 00000).
Bit
DM6628
0: Normal input
1: Interrupt input
Default: All normal inputs.
DM6630 to DM 6633
00 to 08
00 to 07
Section 1-5
15
0
15
0
Bit

Advertisement

Table of Contents
loading

Table of Contents