2 project components, 1 project, 2 organization unit (pou) – Lenze DDS v2.3 User Manual

Page 14: 3 function, Project, Organization unit (pou), Function, Drive plc developer studio

Advertising
background image

Drive PLC Developer Studio

Introduction

2-2

l

DDS EN 2.3

2.2

Project components

2.2.1

Project

A project includes all objects of a control program. Links with the libraries are saved in a file bearing
the project name.

A project includes the following objects that can be accessed via the Object Organizer:

Organization units

Data types

Visualizations

Resources
– Libraries
– Codes

2.2.2

Organization unit (POU)

Functions, function blocks and programs are organization units of a project and referred to as
program organization units (POU) in the
IEC 61131 programming language.

Every organization unit consists of a declaration part and a body. The body is written in one of the
IEC programming languages (IL, ST, SFC, FBD, LD or CFC).

The DDS supports all IEC standard organization units as well as Lenze-specific organization units.
Use of these organization units in your project requires the associated function library to be linked
to your project with the help of the Library Manager.

Organization units can call other organization units. Recursions cause a compiler error and must be
avoided.

2.2.3

Function

A function is a software organization unit that returns exactly one data element (that may also consist
of several elements such as fields or structures, for example)on execution and whose call may occur
in textual languages as an operator in expressions.

Note when declaring a function that a type must be assigned to the function, i.e. the function name
must be followed by a colon plus type.

The names of function and function output are identical.

Example of a correct function declaration:

FUNCTION Fct: INT

A function declaration starts with the keyword FUNCTION.

A result must be assigned to the function, i.e. the function name is used like an output
variable.

In ST, a function call may occur as an operand in expressions.

Functions cannot save their internal statuses. Function calls using the same input parameters
always return the same value.

No functions can be programmed in SFC.

Show/Hide Bookmarks

Advertising