Conditional Return From Interrupt; Interrupt Routines; Interrupt Use Guidelines; System Support For Interrupt - Siemens SIMATIC S7-200 System Manual

Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

Conditional Return from Interrupt

L
A
D
F
B
D
S
CRETI
T
L
221
222 224

Interrupt Routines

The interrupt routine is executed in response to an associated internal or external
event. Once the last instruction of the interrupt routine has been executed, control
is returned to the main program. You can exit the routine by executing a conditional
return from interrupt instruction (CRETI).

Interrupt Use Guidelines

Interrupt processing provides quick reaction to special internal or external events.
You should optimize interrupt routines to perform a specific task, and then return
control to the main routine. By keeping the interrupt routines short and to the point,
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. For interrupts, the axiom, ''the shorter,
the better,'' is definitely true.
Restrictions
You cannot use the DISI, ENI, HDEF, LSCR, and END instructions in an interrupt
routine.

System Support for Interrupt

Because contact, coil, and accumulator logic may be affected by interrupts, 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 Programmable Controller System Manual
A5E00066097-02
The Conditional Return from Interrupt instruction may
be used to return from an interrupt, based upon the
condition of the preceding logic. To add an interrupt,
RETI
select Edit > Insert > Interrupt from the menu.
Operands:
Data Types: None
RETI
The Return from Interrupt routines are identified by
separate program tabs in the STEP 7-Micro/WIN 32
screen.
226
SIMATIC Instructions
None
9-171

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents