l From the variable properties dialog, select Retain, and click OK.
Creating a Programming Organization Unit
Logical Program Organization Units (POUs) are the language
elements of a program. They are small, independent software units
containing the program code. The name of a POU must be unique
within the project.
There are three different POU types:
n Program: contains a logical combination of function or function
block calls. Programs have input and output parameters and they
can have an internal memory.
n Function Block: POUs with multiple input/output parameters and
internal memory.
n Function: POUs with multiple input parameters and exactly one
output parameter.
To create a POU
1. Click IEC Programming Workspace from the toolbar, or from Home
Page, click Program with IEC61131-3.
2. From the Project Tree Window, right-click Logical POUs and select
Insert > Program/Function Block/Function, the Insert dialog appears.
3. Enter the Name for the new POU.
62
Chapter 4 - Software