SRM1(-V2) Interrupt Functions
1, 2, 3...
1, 2, 3...
1. When C
is entered as a word address:
2
C
: Decrementing counter set value (4 digits BCD): 0000 to 9999
2
C
+ 1: Decrementing time interval (4 digits BCD; unit: 0.1 ms): 0005 to 0320
2
(0.5 ms to 32 ms)
Each time that the interval specified in word C
ing 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.
The time from when the STIM(69) instruction is executed until time elapses
is calculated as follows:
(Content of C
)
(Content of C
2
2. When C
is entered as a constant:
2
The set value of the decrementing counter will equal the specified constant
(in ms) and the decrementing time interval will be 10 (1 ms).
Starting Up in Scheduled Interrupt Mode
Use the STIM(69) instruction to start the interval timer in the scheduled interrupt
mode.
(@)STIM(69)
C
1
C
2
C
3
1. When C
is entered as a word address:
2
C
: Decrementing counter set value (4 digits BCD): 0000 to 9999
2
C
+ 1: Decrementing time interval (4 digits BCD; unit: 0.1 ms): 0005 to 0320
2
(0.5 ms to 32 ms)
The meanings of the settings are the same as for the one-shot mode, but in
the scheduled interrupt mode the timer PV will be reset to the set value and
decrementing will begin again after the subroutine has been called. In the
scheduled interrupt mode, interrupts will continue to be repeated at fixed in-
tervals until the operation is stopped.
2. When C
is entered as a constant:
2
The settings are the same as for the one-shot mode, but interrupts will con-
tinue to be repeated at fixed intervals until the operation is stopped.
Reading the Timer's Elapsed Time
Use the STIM(69) instruction to read the timer's elapsed time.
(@)STIM(69)
C
: Number of times the decrementing counter has been decremented (4 digits
2
BCD)
C
+ 1: Decrementing counter time interval (4 digits BCD; unit: 0.1 ms)
2
C
: Elapsed time from previous decrement (4 digits BCD; unit: 0.1 ms)
3
The time from when the interval timer is started until the execution of this instruc-
tion is calculated as follows:
{(Content of C2)
(Content of C2+1) + (Content of C3)}
If the specified interval timer is stopped, then "0000" will be stored.
+ 1 elapses, the decrement-
2
+ 1)
0.1 ms = (0.5 to 319,968 ms)
2
C
: Interval timer, scheduled interrupt mode (003)
1
C
: Timer set value (leading word no.)
2
C
: Subroutine no. (4 digits BCD): 0000 to 0049
3
C
: Read elapsed time (006)
1
C
1
C
: Leading word of parameter 1
2
C
2
C
: Parameter 2
3
C
3
Section
2-4
0.1 ms
95
Need help?
Do you have a question about the CPM1 - PROGRAMING MANUAL 02-2001 and is the answer not in the manual?