Program Execution; Restart Program Execution - Siemens SIMATIC S5-115U User Manual

Simatic s5 series cpu 941-7ub11 cpu 942-7ub11 cpu 943-7ub11 and cpu 943-7ub21 cpu 944-7ub11 and cpu 944-7ub21
Table of Contents

Advertisement

Introduction to STEP 5
7.4

Program Execution

Some organization blocks handle the task of structuring and managing the control program.
These OBs can be grouped as follows according to task:
OBs for RESTART program execution
OB for cyclic program execution
OBs for time-controlled program execution
OBs for (process) interrupt-driven program execution
OBs for handling programming errors and PLC malfunctions.
There are also OBs which offer functions similar to those of the integral function blocks (e.g. PID
control algorithm). These OBs are described in the chapter on "Integral Blocks" (see Chapter 11).
You will find a summary of all OBs in Section 7.3.1.
The following subsections indicate which special organization blocks are provided by the CPU for
the tasks listed above and the points to watch when programming them.
7.4.1

RESTART Program Execution

At restart, i.e.
after a STOP RUN transition (manual cold restart),
and
after a POWER OFF POWER ON transition (automatic cold restart after power restore, if the
CPU was previously in the RUN mode),
the operating system of the CPU automatically calls a RESTART OB; provided one is programmed:
OB21 (in the case of manual cold restart)
or
OB22 (in the case of automatic cold restart after power restore, if the CPU was previously in
the RUN mode).
If you have programmed these blocks, this program is executed before cyclic program execution;
it is therefore suitable for, e.g. (one-off) setting of specific system data. If the relevant RESTART
OB is not programmed, the CPU jumps direct to the RUN mode (cyclic program execution, OB1).
The restart characteristics of the CPUs are detailed in Section 2.5.2. Here we will give examples of
how a RESTART OB can be programmed.
Example 1: Programming OB22
After power restoration, check that all input/output modules are ready for operation. If one or
more modules cannot be accessed (are not plugged in or have malfunctioned), the PLC should
jump to the STOP mode.
7-18
S5-115U Manual
EWA 4NEB 811 6130-02b

Advertisement

Table of Contents
loading

Table of Contents