L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual
Page 259
L-force | PLC Designer
Editors in PLC Designer
DMS 3.2 EN 02/2011 TD29
257
x = value will be retained - = value gets reinitialized
after Online command
VAR
VAR RETAIN
VAR PERSISTENT VAR RETAIN PERSISTENT
VAR PERSISTENT RETAIN
Reset
- x
Reset cold
-
-
Reset origin
- -
Download
x
x
Online Change
x x
Stop!
If a local variable in a program is declared as VAR RETAIN, then exactly that variable
will be saved in the retain area (like a global retain variable).
If a local variable in a function block is declared as VAR RETAIN, then the complete
instance of the function block will be saved in the retain area (all data of the POU),
whereby only the declared retain variable will be handled as a retain.
If a local variable in a function is declared as VAR RETAIN, then this will be without
any effect. The variable will not be saved in the retain area ! If a local variable is
declared as PERSISTENT in a function, then this will be without any effect also !