Omron CPM1 - PROGRAMING MANUAL 02-2001 Programming Manual page 101

Hide thumbs Also See for CPM1 - PROGRAMING MANUAL 02-2001:
Table of Contents

Advertisement

CPM1/CPM1A Interrupt Functions
Input Interrupt Settings
Interrupt Subroutines
Input Refreshing
Input Interrupt Mode
Main program
Input interrupt
80
Inputs 00003 to 00006 must be set as interrupt inputs in DM 6628 if they are to
be used for input interrupts in the CPM1/CPM1A. Set the corresponding digit to 1
if the input is to be used as an interrupt input (input interrupt or counter mode);
set it to 0 if it is to be used as a regular input.
Word
Setting
DM 6628
DM 6628
0: Regular input (default setting)
0: Regular input (default setting)
1: Interrupt input
1: Interrupt input
2: Quick response input
2: Quick-response input
Setting for input 00006: Set to 1
Setting for input 00005: Set to 1
Setting for input 00004: Set to 1
Setting for input 00003: Set to 1
Interrupts from inputs 00003 to 00006 are allocated interrupt numbers 00 to 03
and call subroutines 000 to 003. If the input interrupts aren't being used, subrou-
tines 000 to 003 can be used in regular subroutines.
Input number
Interrupt number
00003
0
00004
1
00005
2
00006
3
If input refreshing is not used, input signal status within the interrupt routine will
not be reliable. Depending on the input time constant, the input signals might not
go ON even if input refreshing is used. This includes 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, use the Always ON Flag, SR 25313 in the
interrupt routine instead of IR 00000.
When an input interrupt signal is received, the main program is interrupted and
the interrupt program is executed immediately, regardless of the point in the
cycle in which the interrupt is received. The signal must be ON for 200 s or more
to be detected.
Interrupt program
Use the following instructions to program input interrupts using the Input Inter-
rupt Mode.
Masking/Unmasking of Interrupts
With the INT(89) instruction, set or clear input interrupt masks as required.
(@)INT(89)
000
000
D
Bit
15
DM 6628
Subroutine number
000
001
002
003
Main program
Make the settings with word D bits 0 to 3, which correspond
to input interrupts 0 to 3.
0: Mask cleared. (Input interrupt enabled.)
1: Mask set. (Input interrupt disabled.)
Section
2-3
0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents