External function, function block, method, Global variable list - gvl, L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 90

Advertising
background image

L-force | PLC Designer

Concepts and Base Components

88

DMS 4.1 EN 03/2011 TD29

3.7.9

External function, function block, method
For an external function, function block or method no code will be generated by the
programming system.
Perform the following steps to create an external POU:

1.

Add the desired POU object in the POUs view of your project like any internal object
and define the respective input and output variables.

Note: Local variables must be defined in "external" function blocks, but may not be
defined in "external" functions or methods! Also notice that VAR_STAT variables can
not be used in the runtime system!

2.

Define the POU to be external: For this purpose select the POU object in the POUs
view and use command 'Properties' from the context menu. Open the 'Build' tab
and activate option 'External Implementation (Late link in the runtime system)'

In the runtime system an equivalent function, function block or method must be
implemented. At a program download for each "external POU" the equivalent will be
searched in the runtime system and - if found - will be linked.

3.7.10

Global Variable List - GVL
A Global Variables List ("GVL") is used to declare global variables. If a GVL is placed in
the POUs view, the variables will be available all over the project, if a GVL is assigned to
a certain application, the variables will be valid within this application.
A GVL can be added via command "Add Object / Add Global Variable List...". To assign it
to an existing application, choose the command from the context menu while the
application is selected in the device tree. Otherwise the new GVL object will be added
to the POUs view.
The GVL Editor is used to edit a Global Variable List.
If the target system supports the network functionality, the variables contained in a
GVL can be defined to be available as network variables, i.e. for a broadcast data
exchange with other devices in the network. For this purpose appropriate Network
Properties must be configured for the GVL.
Regard that as from compiler version 3.2.0.0 variables declared in GVLs always get
initialized before local variables of POUs.

Advertising