Variable configuration, L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 402

Advertising
background image

L-force | PLC Designer

The Resources

400

DMS 3.2 EN 02/2011 TD29



For the combination of retain and persistent properties both keywords are used:

VAR_GLOBAL RETAIN PERSISTENT

or VAR_GLOBAL PERSISTENT

RETAIN

Network variables (target specific) are also defined using this syntax.

Global Constants

Global constants additionally get the keyword CONSTANT.

Syntax:

VAR_GLOBAL CONSTANT

(* Variables declarations *)

END_VAR

8.4.4

Variable Configuration...

In function blocks it is possible to specify addresses for inputs and outputs that are
not completely defined, if you put the variable definitions between the key words VAR
and END_VAR. Addresses not completely defined are identified with an asterisk.

Example:

FUNCTION_BLOCK locio

VAR

loci AT %I*: BOOL := TRUE;

loco AT %Q*: BOOL;

END_VAR

Here two local I/O-variables are defined, a local-In (%I*) and a local-Out (%Q*).

If you want to configure local I/Os for variables configuration in the Object Organizer
in the Resources register card, the object Variable_Configuration will generally be
available. The object then can be renamed and other objects can be created for the
variables configuration.

The editor for variables configuration works like the declaration editor.

Variables for local I/O-configurations must be located between the key words
VAR_CONFIG and END_VAR.

Advertising