EasyManua.ls Logo

Siemens SIMATIC S7 - Page 332

Siemens SIMATIC S7
866 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Program instructions
7.10 Interrupt
S7-200 SMART
332 System Manual, V2.3, 07/2017, A5E03822230-AF
Example 1: Input signal edge detector interrupt
LAD
STL
MAIN
Network 1
On the first scan:
1. Define interrupt routine
INT_0 to be a falling-edge
interrupt for I0.0.
2. Globally enable interrupts.
Network 1
LD SM0.1
ATCH INT_0, 1
ENI
Network 2
If an I/O error is detected, disa-
ble the falling-edge interrupt for
I0.0.
(This network is optional.)
Network 2
LD SM5.0
DTCH 1
Network 3
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.
Network 3
LD M5.0
DISI
INT 0
Network 1
I0.0 falling-edge interrupt rou-
tine: Conditional return based
on an I/O error.
Network 1
LD SM5.0
CRETI

Table of Contents

Other manuals for Siemens SIMATIC S7

Related product manuals