Industry Sector, IA&DT
4.3Program structure
Program execution is written in what are referred to as blocks. The Main [OB1] organization block is provided as default. This block represents the interface to the CPU operating system and is automatically called and cyclically processed by this operating system.
From this organization block, additional blocks can be called in turn for structured programming, such as the function calculate_tankcontent [FC140]
This function is used to break an overall task down into subtasks. These can then be solved more easily and tested in their functionality.
Structure of the tank content sample task
Main organization block [OB1]
Block called cyclically by the operating system. Here is the call of the function calculate_tankcontent [FC140]
Function:
calculate_tankcontent [FC140]
The actual program is contained in this example.
Is called by Main [OB1].
SCE Training Curriculum | Page 9 of 30 | To be used only at Educational and R&D Facilities |
TIA Portal Module |
| Unrestricted / © Siemens AG 2013. All Rights Reserved |
| ||
|
|
|