Global variables – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 395

Advertising
background image

L-force | PLC Designer

The Resources



DMS 3.2 EN 02/2011 TD29

393

8.4.3

Global Variables...

What are Global Variables

„Normal" variables, constants or remanent variables that are known throughout the
project can be declared as global variables, but also network variables that are also
used for data exchange with other network subscribers.

Note!

In a project you can define a local variable which has the same name like a global
variable. In this case within a POU the locally defined variable will be used.

It is not allowed to name two global variables identically. For example you will get a
compiler error,if you have defined a variable "var1" in the PLC Configuration as well as

in a global variables list.

Network variables

Note!

The use of network variables must be supported by the target system and must be
activated in the target settings (category Network functionality).

By an automatic data exchange (compare this to the non-automatic data exchange
via the Parameter Manager) it is possible to update the value of a network variable on
several controller systems within a PLC Designer compatible controller network. This

requires no controller-specific functions but the network subscribers must use
identical declaration lists and matching transfer configurations for network variables
in their projects. In order to make this possible it is recommended that the declaration
not be entered manually in each controller application, but loaded from a separate file
when creating the list. (see 'Create a global variables list').

For the exchange of network variables it is necessary that the variables are used in a
cyclic or free-wheeling task or in PLC_PRG. It is not sufficient to declare them in the
declaration part of the POU! If the variables are used in several tasks/PLC_PRG, then at
data exchange that task will be regarded which has the highest priority.

Advertising