Standard
RLL Instructions
5–105
Standard RLL Instructions
Interrupt Instructions
In the following example, we do some initialization on the first scan, using the
first-scan contact SP0. The interrupt feature is the HSIO Mode 40. Then we
configure the HSIO timer as a 10 mS interrupt by writing K104 to the configuration
register for X0 (V7634). See Chapter 3, Mode 40 Operation for more details.
When X4 turns on, the interrupt will be enabled. When X4 turns off, the interrupt will
be disabled. Every 10 mS the CPU will jump to the interrupt label INT O 0. The
application ladder logic in the interrupt routine will be performed. If X3 is not on
Y0–Y7 will be reset to off and then the CPU will return to the main body of the
program.
DirectSOFT
INT O0
X4
ENI
DISI
S
S
X4
END
Y5
SETI
X2
X3
RSTI
Y0 Y7
IRT
Handheld Programmer Keystrokes
LD
K40
X1
Load the constant value
(K40) into the lower 16 bits
of the accumulator
OUT
V7633
Copy the value in the lower
16 bits of the accumulator to
V7633
STR
$
SHFT
ANDST
L
3
D
SHFT
0
A
OUT
GX
SHFT
AND
V
ENT
JMP
K
1
B
ENT
7
H
6
G
3
D
4
E
STR
$
SHFT
4
E
TMR
N
8
I
ENT
STRN
SP
SHFT ENT
3
D
8
I
RST
S
8
I
8
I
ORN
R
MLR
T
STR
$
SHFT
8
I
2
C
ENT
SHFT
8
I
5
F
ENT
SHFT
8
I
ENT
SHFT
8
I
ENT
0
A
SHFT
4
E
TMR
N
3
D
ENT
SHFT
8
I
TMR
N
MLR
T
ENT
SHFT
ENT
0
A
1
B
ENT
ENT
ENT
4
E
4
E
7
H
3
D
SET
X
SET
X
STRN
SP
LD
K104
Load the constant value
(K10) into the lower 16 bits
of the accumulator
OUT
V7634
Copy the value in the lower
16 bits of the accumulator to
V7634
SHFT
ANDST
L
3
D
SHFT
0
A
OUT
GX
SHFT
AND
V
ENT
JMP
K
4
E
ENT
7
H
6
G
3
D
3
D
4
E
S
S
Interrupt O1 is also available as an interrupt. This interrupt is independent of the
HSIO features. Interrupt O1 uses an internal timer that is configured in V memory
location V7647. The interrupt period can be adjusted from 5 to 9999 mS. Once the
interrupt period is set and the interrupt is enabled in the program, the CPU will
continuously call the interrupt routine based on the time setting in V7647.
Input Configuration
Register
Function Hex Code
Required
– V7647 High-Speed
Timed Interrupt
xxxx (xxxx = timer setting)
5 - 9999 mS (BCD)
Timed Interrupt
Program Example
Independent Timed
Interrupt