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

Page 804

Advertising
background image

L-force | PLC Designer

PLC Designer Visualization

802

DMS 3.2 EN 02/2011 TD29



Implicit variables as remanent variables:

The implicit variables of a Target-Visualization can be declared as remanent variables:

For this purpose the variables must be declared explicitly as global variables. This
declaration MUST be done in the topmost (alphabetic order) global variables list in
folder 'Global Variables' in the Resources tab. If the declaration is placed in another
global variable list, a compile error will occur.

Example:

VAR_GLOBAL RETAIN

VisuDoExecuteUserlevelInit : BOOL := TRUE;

CurrentUserLevel : INT := 0;

CurrentPasswords : ARRAY[0..7] OF STRING[20] :=
'a','b','c','d','e','f','g','h';

END_VAR

* Regard for the variables CurrentUserLevel, CurrentPasswords[...]: Those must be of
the same type (normal, RETAIN, PERSISTENT...)! If they are defined as remanent
variables, additionally a variable "VisuDoExecuteUserlevelInit" of type BOOL must be
declared as a RETAIN variable in the global variables list, initialized with TRUE ("

VisuDoExecuteUserlevelInit : BOOL := TRUE;").

Advertising