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

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

Advertisement

CPM2A/CPM2C Interrupt Functions
Normal program
Interval timer interrupt
Interval timer operation
Start timer
Ladder Diagram
Programming
Scheduled-interrupt Mode
Interrupt program
In the scheduled-interrupt mode, the timer is reset each time the interrupt pro-
gram is called when the set time elapses, and then the interval timer operates
again.
Be careful with regard to the interrupt program's execution time and the interval
timer's set time. If the interrupt program's execution time exceeds the interval
timer's set time, scheduled interrupts cannot be executed properly.
The following table shows the instruction operations related to interrupt input
control.
Instruction
Control
( )
(@)STIM(69) Start one-shot timer
(
)
Start scheduled-interrupt
timer
Read timer PV
Stop timer
(@)INT(89)
Mask all interrupts
Unmask all interrupts
Starting Timers
This function sets the mode (one-shot or scheduled-interrupt) and the timer's
SV, and starts the interval timer.
One-shot Mode
(@)STIM(69)
Scheduled-interrupt Mode
(@)STIM(69)
003
C
C
C
Decrementing counter initial value (4 digits Hex): 0000 to 9999
2
C
+1
Decrementing time interval (4 digits BCD; unit: 0.1 ms):
2
0005 to 0320 (0.5 to 32 ms)
Starts interval timer in one-shot mode.
Starts interval timer in
scheduled-interrupt mode.
Reads the timer PV.
Stops timer operations.
Prohibits all interrupts, including interrupt
inputs, interval timer interrupts,
high-speed counters, etc.
Permits all interrupts, including interrupt
inputs, interval timer interrupts,
high-speed counters, etc.
Control designation (000: Start one-shot timer)
000
C
First word of timer SV
2
Subroutine number (4 digits BCD: 0000 to 0049)
C
3
Control designation (003: Start scheduled-interrupt timer)
First word of timer SV
2
Subroutine number (4 digits BCD): 0000 to 0049
3
Section
2-1
Operation
39

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents