EasyManua.ls Logo

Siemens S7-1200 - Program Cycle ob; Startup ob

Siemens S7-1200
1028 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
PLC concepts
4.1 Execution of the user program
S7-1200 Programmable controller
86 System Manual, 03/2014, A5E02486680-AG
4.1.3.1
Program cycle OB
Program cycle OBs execute cyclically while the CPU is in RUN mode. The main block of the
program is a program cycle OB. This is where you place the instructions that control your
program and where you call additional user blocks. You can have multiple program cycle
OBs, which the CPU executes in numerical order. Main (OB1) is the default.
Program cycle events
The program cycle event happens once during each program cycle (or scan). During the
program cycle, the CPU writes the outputs, reads the inputs and executes program cycle
OBs. The program cycle event is required and is always enabled. You might have no
program cycle OBs, or you might have multiple OBs selected for the program cycle event.
After the program cycle event occurs, the CPU executes the lowest numbered program cycle
OB (usually "Main" OB 1). The CPU executes the other program cycle OBs sequentially (in
numerical order) within the program cycle. Program execution is cyclical such that the
program cycle event occurs at the following times:
When the last startup OB finishes execution
When the last program cycle OB finishes execution
Table 4- 2 Start information for a program cycle OB
Input
Data type
Description
Initial_Call
Bool
True for initial call of the OB
Remanence
Bool
True if retentive data are available
4.1.3.2
Startup OB
Startup OBs execute one time when the operating mode of the CPU changes from STOP to
RUN, including powering up in the RUN mode and in commanded STOP-to-RUN transitions.
After completion, the main "Program cycle" begins executing.
Startup events
The startup event happens one time on a STOP to RUN transition and causes the CPU to
execute the startup OBs. You can configure multiple OBs for the startup event. The startup
OBs execute in numerical order.
Table 4- 3 Start information for a startup OB
Input
Data type
Description
LostRetentive
Bool
True if retentive data are lost
LostRTC
Bool
True if date and time are lost

Table of Contents

Other manuals for Siemens S7-1200

Related product manuals