4 what is what in plc designer, Project components, Project – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 36: Pou (program organization unit), Function, What is what in plc designer, L-force | plc designer, 4what is what in plc designer

Advertising
background image

L-force | PLC Designer

What is What in PLC Designer

34

DMS 3.2 EN 02/2011 TD29



4

What is What in PLC Designer

4.1

Project Components...

4.1.1

Project

A project contains all of the objects in a PLC program. A project is saved in a file named
after the project. The following objects are included in a project:

POUs (Program Organization Units), data types, visualizations, resources, and libraries.

4.1.2

POU (Program Organization Unit)

Functions, function blocks, and programs are POUs which can be supplemented by
actions.

Each POU consists of a declaration part and a body. The body is written in one of the
IEC programming languages which include IL, ST, SFC, FBD, LD or CFC.

»PLC Designer« supports all IEC standard POUs. If you want to use these POUs in your
project, you must include the library standard.lib in your project.

POUs can call up other POUs. However, recursions are not allowed.

4.1.3

Function

A function is a POU, which yields exactly one data element (which can consist of
several elements, such as fields or structures) when it is processed, and whose call in
textual languages can occur as an operator in expressions.

When declaring a function do not forget that the function must receive a type. This
means, after the function name, you must enter a colon followed by a type.

A correct function declaration can look like this example:

FUNCTION Fct: INT

In addition, a result must be assigned to the function. That means that function name
is used as an output variable.

A function declaration begins with the keyword FUNCTION. Regard the
Recommendations on the naming.

Advertising