3 General Programming
3.2 Program blocks
You project or your plant becomes more transparent. Error states in a plant
can be more easily detected, analyzed and removed. The maintainability of
your plant becomes easier. This is also the case for errors in programming.
Recommendation
Structure your automation task.
Divide the entire function of your plant into individual areas and form sub-
function units. Divide these sub function units again into smaller units and
functions. Divide until you get functions that you can use several times with
different parameters.
Specify the interfaces between the function units. Define the unique interfaces
for functionalities that are to be delivered by "third party companies".
All organization blocks, function blocks and functions can be programmed with the
following languages:
Table 3-1: Programming languages
Ladder (LAD)
Function block diagram (FBD)
Structured control language (SCL)
Graph
Statement list (STL)
3.2.1
Organization blocks (OB)
Figure 3-2: "Add new block" dialog (OB)
OBs are the interface between the operating system and the user program. They
are called by the operating system and control, e.g. the following processes:
Startup behavior of the controller
Cyclic program processing
Interrupt-controlled program processing
Error handling
Programming Guideline for S7-1200/1500
V1.2, Entry ID: 81318674
Programming language
S7-1200
S7-1500
planned
28