32
Interrupt Functions
Section 1-4
PC Setup
When using interval timer interrupts, make the following settings in the PC
Setup in PROGRAM mode before executing the program.
Input Refresh Word Settings (DM 6636 to DM 6638)
Make these settings when it is necessary to refresh inputs.
High-speed Counter Settings (DM 6642)
When using interval timer 2, check before beginning operation to be sure that
the high-speed counter (PC Setup: DM 6642) is set to the default setting
(0000: High-speed counter not used).
Operation
Use the following instruction to activate and control the interval timer.
Starting Up in One-Shot Mode
Use the STIM(69) instruction to start the interval timer in the one-shot mode.
Each time that the interval specified in word C
2
+ 1 elapses, the decrementing
counter will decrement the present value by one. When the PV reaches 0, the
designated subroutine will be called just once and the timer will stop.
When a word address is used for C
2
, the time from when the STIM(69)
instruction is executed until time elapses is calculated as follows:
(Contents of word C
2
) x (Contents of word C
2
+ 1) x 0.1 ms = (0.5 to
319,968 ms)
15
0
Bit
Number of words (2-digit BCD) 00 to 16
Beginning word (2-digit BCD) 00 to 15
(IR 000 to IR 015)
Default:
No input refresh
DM 6636: Timer 0
DM 6637: Timer 1
DM 6638: Timer 2
DM 6636 to DM 6638
Word
Function
C
2
Decrementing counter set value (4-digit BCD): 0000 to 9999
C
2
+ 1
Decrementing time interval (4-digit BCD; unit: 0.1 ms): 0005 to 0320
(0.5 ms to 32 ms)
Note
If a constant is used for C
2
, the decrementing time interval is fixed
at 0010 or 1 ms, so the set value in C
2
is expressed in ms.
(@)STIM(69)
C
1
C
2
C
3
C
1
: Interval timer No.
Interval timer 0: 000
Interval timer 1: 001
Interval timer 2: 002
C
2
: Timer set value (first word address or constant)
C
3
: Subroutine No. (4-digit BCD): 0000 to 0255