External Interrupt Program Example
The following program selects Mode 40, then selects the external interrupt option. Inputs X1
and X2 are configured as filtered inputs with a 10 ms time constant. The program is
otherwise generic, and may be adapted to your application.
DirectSOFT
SP0
Mode 40
External Interrupt
Filtered Inputs
INT Enable
Main Program
INT
O0
Interrupt Routine
SP1
Appendix E: High-speed Input and Pulse Output Features
Load constant K40 into the accumulator. This
LD
selects Mode 40 as the HSIO mode.
K40
Output this constant to V7633, the location of the
OUT
HSIO Mode select register.
V7633
Load the constant K4 which is required to select the
LD
external interrupt option. X0 is the interrupt input.
K4
Output this constant to V7634, configuring the
OUT
external interrupt option for X0.
V7634
Load the constant K1006 which is required to select
LD
filtered inputs with a 10 ms filter time constant.
K1006
Output this constant to V7635, configuring X1.
OUT
V7635
Output this constant to V7636, configuring X2.
OUT
V7636
Y5
Reset output Y5.
RST
ENI
Enable Interrupts at the beginning of the program.
Insert Main Program rungs here for your application.
END
END coil marks the end of the main program..
The INT label marks the beginning of the interrupt
service routine program.
Insert interrupt service routine rungs here for your
application.
Y5
Use the pulse catch input to set output Y5 on.
SETI
IRT
Return to the main ladder program.
DL05 Micro PLC User Manual, 6th Edition, Rev. A
1
2
3
D
E
6
7
8
9
10
11
1
1
14
A
B
C
D
E–47
Need help?
Do you have a question about the DL05 and is the answer not in the manual?