Cyclic Program Execution (Ob1) - Siemens SIMATIC S5-90U System Manual

Table of Contents

Advertisement

Integrated Blocks and Their Functions
9.1.1

Cyclic Program Execution (OB1)

Function of OB1
OB1 can be used for both linear and structured program execution.
For structured programming, only block calls should be written into OB1. The blocks called (PBs,
FBs and SBs) should form self-contained functional units to obtain a clear overall program structure.
A time monitor (scan time trigger) is activated each time cyclic program execution starts. If the scan
time trigger is not activated again within the monitoring time, the PLC enters the "STOP" mode.
The monitoring time is preset to 300 ms.
If the scan time for your control program is greater than 300 ms, OB31 can be used in the S5-95U
(see Section 9.1.5) to retrigger the scan time monitor in the control program.
If the maximum scan time is exceeded for a program with a scan time < 300 ms, the program may
have entered a continuous loop or a fault may have occurred in the PLC.
Calling OB1
OB1 is called cyclically by the operating system.
Prerequisites for OB1 Execution
Cyclic program execution using OB1 is possible only if the following requirements are met:
OB1 is programmed.
The PLC is in the "POWER ON" state and switched to "RUN".
Interrupting OB1 Execution
The cyclic processing of OB1 can be interrupted after any STEP 5 operation:
During interrupt-driven program execution
(branching to OB3; if OB3 is not programmed, cyclic program execution will be resumed)
During time-controlled program execution
(branching to OB13; if OB13 is not programmed, cyclic program execution is resumed).
After processing the interrupt, cyclic program execution is continued starting at the point of
interruption.
OB1 cannot interrupt other program sections on its own.
9-2
S5-90U/S5-95U
EWA 4NEB 812 6115-02b

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s5-95u

Table of Contents