Specifications

SIMATIC Instructions
9-174
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
Interrupt Examples
Figure 9-65 shows an example of the Interrupt Routine instructions.
ATCH
INT
EVNT
SM0.1
4
0
On the first scan:
Define interrupt routine 4
to be a rising edge
interrupt routine for I0.0.
Disable all interrupts
when M5.0 is on.
Network 1
LD SM0.1
ATCH 4, 0
ENI
Network 2
LD SM5.0
DTCH 0
Network 3
LD M5.0
DISI
.
.
M5.0
Globally enable
interrupts.
I/0 rising edge interrupt
subroutine.
End of I0.0 rising edge
interrupt routine.
SM5.0
EVNT0
DTCH
If an I/O error is detected,
disable the rising edge
interrupt for I0.0.
(This rung is optional.)
EN
EN
Network 1
Network 2
Network 3
.
.
.
Network 1
SM5.0
Conditional return based
on I/O error
DISI
RETI
ENI
LAD STL
ENO
ENO
Network 1
LD SM5.0
CRETI
RETI
MAIN OB1
INTERRUPT 4
ATCH
INT
EVNT
4
0
EN ENO
SM0.1
ENI
EVNT0
DTCH
EN ENOSM5.0
MAIN OB1
DISI
INTERRUPT 4
M5.0
SM5.0
Network 1
FBD
Network 1
Network 2
Network 3
Figure 9-65 Example of Interrupt Instructions