Event
29-31
7.10.3
Interrupt programming guidelines
Interrupt routine execution
An interrupt routine executes in response to an associated internal or external event. Once
the last instruction of an interrupt routine has executed, control returns to the point in the
scan cycle at the point of the interruption. You can exit the routine by executing a conditional
return from interrupt instruction (CRETI).
Interrupt processing provides quick reaction to special internal or external events. Optimize
your interrupt routines to perform a specific task, and then return control to the scan cycle.
Note
• You cannot use the disable interrupt (DISI), enable interrupt (ENI), high-speed counter
definition (HDEF), and end (END) instructions in an interrupt routine.
• Keep interrupt routine program logic short and to the point, so execution is quick and
other processes are not deferred for long periods of time. If this is not done, unexpected
conditions can cause abnormal operation of equipment controlled by the main program.
System support for interrupts
Because interrupts can affect contact, coil, and accumulator logic, the system saves and
reloads the logic stack, accumulator registers, and the special memory bits (SM) that
indicate the status of accumulator and instruction operations. This avoids disruption to the
main user program caused by branching to and from an interrupt routine.
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
Description
23
Port 0 Receive message complete
24
Port 1 Receive message complete
25
Port 1 Receive character
26
Port 1 Transmit complete
27
HSC0 Direction changed
28
HSC0 External reset
Reserved
32
HSC3 CV=PV (current value = preset value)
33
Reserved
34
PLS2 PTO pulse count complete interrupt
35
Rising edge, signal board input 0
36
Falling edge, signal board input 0
37
Rising edge, signal board Input 1
38
Falling edge, signal board input 1
Program instructions
7.10 Interrupt
CR40/CR60
SR20/ST20
SR30/ST30
SR40/ST40
SR60/ST60
Y
Y
N
Y
N
Y
N
Y
Y
Y
Y
Y
N
N
Y
Y
N
N
N
Y
N
Y
N
Y
N
Y
N
Y
285
Need help?
Do you have a question about the Simatic S7 Series and is the answer not in the manual?