Specifications

Program Example 1: External Interrupt
The following program selects Mode 40, then selects the external interrupt option for inputs
X0 and X1. Inputs X2 and X3 are configured as filtered inputs with a 10 ms time constant.
The program is otherwise generic, and may be adapted to your application.
DL06 Micro PLC User Manual, 3rd Edition, Rev. C
E–70
Appendix E: High-speed Input and Pulse Output Features
1
2
3
4
E
6
7
8
9
10
11
12
13
14
A
B
C
D
SP0
LD
K40
Load constant K40 into the accumulator. This
selects Mode 40 as the HSIO mode.
OUT
V7633
Output this constant to V7633, the location of the
HSIO Mode select register.
Direct SOFT
M
ode 40
LD
K1006
Load the constant K1006 which is required to select
filtered inputs with a 10 mS filter time constant.
OUT
V7636
Output this constant to V7636, configuring X2.
Filtered Inputs
OUT
V7637
Output this constant to V7637, configuring X3.
LD
K4
Load the constant K4 which is required to select the
external interrupt option. X0 is the interrupt input.
OUT
V7634
Output this constant to V7634, configuring the
external interrupt option for X0.
External Interrupt
INT Enable
ENI
Enable Interrupts at the beginning of the program.
END
END coil marks the end of the main program..
INT O0
IRT
Return to the main ladder program.
The INT label marks the beginning of the interrupt
service routine program.
Main Program
Insert Main Program rungs here for your application.
Interrupt Routine
Insert interrupt service routine rungs here for your
application.
Set output Y5
SP1
SETI
Y5
RST
Reset output Y5.
Y5
RST
Reset output Y6.
Y6
IRT
Return to the main ladder program.
Interrupt Routine
Insert interrupt service routine rungs here for your
application.
Set output Y6.
SP1
SETI
Y6
INT O1
OUT
V7635
Output this constant to V7635, configuring the
external interrupt option for X1.