Program instructions
7.10 Interrupt
Example 1: Input signal edge detector interrupt
LAD
MAIN
Network 1
Network 2
Network 3
INT 0
Network 1
332
On the first scan:
1. Define interrupt routine
INT_0 to be a falling-edge
interrupt for I0.0.
2. Globally enable interrupts.
If an I/O error is detected, disa-
ble the falling-edge interrupt for
I0.0.
(This network is optional.)
When M5.0 is on, disable all
interrupts. When disabled,
attached interrupt events will be
queued, but the corresponding
interrupt routines will not be
executed until interrupts are re-
enabled with the ENI instruc-
tion.
I0.0 falling-edge interrupt rou-
tine: Conditional return based
on an I/O error.
System Manual, V2.3, 07/2017, A5E03822230-AF
STL
Network 1
LD SM0.1
ATCH INT_0, 1
ENI
Network 2
LD SM5.0
DTCH 1
Network 3
LD M5.0
DISI
Network 1
LD SM5.0
CRETI
S7-200 SMART