Execution Of The User Program - Siemens SIMATIC S7-1200 Manual

Easy book
Hide thumbs Also See for SIMATIC S7-1200:
Table of Contents

Advertisement

You can configure the "startup after POWER ON" setting of the CPU complete with restart
method using the programming software. This configuration item appears under the Device
Configuration for the CPU under Startup. When power is applied, the CPU performs a
sequence of power-up diagnostic checks and system initialization. During system
initialization, the CPU deletes all non-retentive bit memory and resets all non-retentive DB
contents to initial values. The CPU then enters the appropriate power-up mode. Certain
detected errors will prevent the CPU from entering the RUN mode. The CPU supports the
following power-up modes: STOP mode, "Go to RUN mode after warm restart", and "Go to
previous mode after warm restart".
You can also include a STP instruction in your program to change the CPU to STOP mode.
This allows you to stop the execution of your program based on the program logic.
4.3

Execution of the user program

The CPU supports the following types of code blocks that allow you to create an efficient
structure for your user program:
● Organization blocks (OBs) define the structure of the program. Some OBs have
● Functions (FCs) and function blocks (FBs) contain the program code that corresponds to
● Data blocks (DBs) store data that can be used by the program blocks. Valid DB numbers
The size of the user program, data, and configuration is limited by the available load memory
and work memory in the CPU (Page 13). There is no specific limit to the number of each
individual OB, FC, FB and DB block. However, the total number of blocks is limited to 1024.
Easy Book
Manual, 11/2011, A5E02486774-04
The CPU does not provide a physical switch for changing the
operating mode. To change the operating mode of the CPU, STEP 7
provides the following tools:
 "Stop" and "Run" buttons on the STEP 7 toolbar
 CPU operator panel in the online tools
predefined behavior and start events, but you can also create OBs with custom start
events (Page 54).
specific tasks or combinations of parameters. Each FC or FB provides a set of input and
output parameters for sharing data with the calling block. An FB also uses an associated
data block (called an instance DB) to maintain state of values between execution that can
be used by other blocks in the program. Valid FC and FB numbers range from 1 to
65535.
range from 1 to 65535.
PLC concepts made easy
4.3 Execution of the user program
51

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents