Siemens CPU 948 Programming Manual page 198

Simatic s5 s5-155u
Table of Contents

Advertisement

RUN Mode
Interrupts at operation
boundaries
Reaction time
Program execution levels
and flags
4 - 46
• • Program the section that must not be interrupted in an interrupt OB
and assign the highest priority to it.
• • Use the special function OB 122. With this, you can disable
interrupts and timed interrupts (refer to Section 6.3).
• • Using the operation LIM and SIM (system operations - refer to
Section 3.5.4) read or set the 32-bit interrupt mask.
Interrupt servicing can be disabled completely or separately for
individual interrupts in data block DX 0. This is, however, only
possible following a COLD RESTART (refer to Chapter 7), since
DX 0 is only evaluated in a COLD RESTART.
The time required to react to a process interrupt/interrupt request
corresponds to the processing time of a block (for interrupts at block
boundaries) or a STEP 5 operation (for interrupts at operation
boundaries). If, however, at the time the cyclic program is interrupted
there are higher priority timed interrupts pending, the interrupt-driven
program is only executed when all the pending timed interrupts have
been completely processed.
The maximum reaction time between the occurrence and execution of
a process interrupt/hardware interrupt is increased in this case by the
processing time of the higher priority timed interrupts.
If you run your user program not only cyclically but also time and
interrupt-driven, you run the risk of overwriting flags.
This is the case when the same flag areas are accessed at different
program processing levels.
It is therefore advisable to assign flags to individual program
processing levels or at the beginning of time or interrupt-driven
program execution, to "save" the signal states of multiply assigned
flags in a data block and to write the values back at the end of the
interrupt servicing. The same applies for a warm restart.
To avoid double use of flags, you can also use the S flags for most
applications. Special "saving" strategies for flags are then no longer
necessary, providing the S flags are assigned exclusively to individual
program processing levels (there are enough S flags available).
CPU 948 Programming Guide
C79000-G8576-C848-04

Advertisement

Table of Contents
loading

Table of Contents