2-1
Section
CPM2A/CPM2C Interrupt Functions
39
Scheduled-interrupt Mode
Normal program
Interrupt program
Interval timer interrupt
Interval timer operation
Start timer
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
Operation
(@)STIM(69)
Start one-shot timer
Starts interval timer in one-shot mode.
(
)
(
)
Start scheduled-interrupt
timer
Starts interval timer in
scheduled-interrupt mode.
Read timer PV
Reads the timer PV.
Stop timer
Stops timer operations.
(@)INT(89)
Mask all interrupts
Prohibits all interrupts, including interrupt
inputs, interval timer interrupts,
high-speed counters, etc.
Unmask all interrupts
Permits all interrupts, including interrupt
inputs, interval timer interrupts,
high-speed counters, etc.
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
Control designation (000: Start one-shot timer)
First word of timer SV
Subroutine number (4 digits BCD: 0000 to 0049)
(@)STIM(69)
000
C
2
C
3
Scheduled-interrupt Mode
Control designation (003: Start scheduled-interrupt timer)
First word of timer SV
Subroutine number (4 digits BCD): 0000 to 0049
Decrementing counter initial value (4 digits Hex): 0000 to 9999
Decrementing time interval (4 digits BCD; unit: 0.1 ms):
0005 to 0320 (0.5 to 32 ms)
(@)STIM(69)
003
C
2
C
3
C
2
C
2
+1
Ladder Diagram
Programming