Program instructions
7.10 Interrupt
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
285
SR20/ST20
SR30/ST30
SR40/ST40
SR60/ST60
Port 0 Receive message complete
24 Port 1 Receive message complete
Y
26 Port 1 Transmit complete
Y
HSC3 CV=PV (current value = preset value)
PLS2 PTO pulse count complete interrupt
Rising edge, signal board input 0
Falling edge, signal board input 0
Rising edge, signal board Input 1
Falling edge, signal board input 1
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.
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.