Installation manual

Publication 1747-RM001G-EN-P - November 2008
11-14 Understanding Interrupt Routines
STI Example
0000
S:1
15
First Pass
U
B3:0
0
Indicate Valid
Measurement
MOV
Move
Source 0
0<
Dest N10:2
0<
MOV
0001
T4:0
DN
EN
DN
TON
Timer On Delay
Timer T4:0
Time Base 0.01
Preset 50<
Accum 0<
TON
0002
T4:0
DN
MOV
Move
Source N10:2
0<
Dest N10:3
0<
MOV
0003
END
The following program will demonstrate a STI.
The follwoing values need to be loaded into S:30 (1), S:31 (4) and S:2/10 (0) in STI setup.
This will guarantee that subroutine (4) will be executed every 10 ms.
The subroutine program will calculate the time difference from its last execution.
The following rung will ensure that the interrupt measurement is initialized each time the run mode is entered
The following rung will allow a timer to self reset every 1/2 second.
Each time the timer completes, a reading will be displayed for visual purposes.