beautypg.com

Constants - constant, typed literals, L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 981

background image

L-force | PLC Designer

Programming Reference

DMS 4.1 EN 03/2011 TD29

979

At each re-load of the application the persistent variables list on the PLC will be
checked against that of the project. The list on the PLC inter alia is identified by the
application name. In case of inconsistencies the user will be prompted to re-initialize
all persistent variables of the application. Inconsistency might result from renaming or
removing or other modifications of the existing declarations in the list.

Note: So carefully consider any modifications in the declaration part of the
persistent variables list and the effect of the resultantly requested re-initialization !

New declarations only can be added at the end of the list. At a download those will be
detected as "new" and will not demand a re-initialization of the complete list.

Synoptic table on the behaviour of remanent variables

x = Value gets maintained - = Value gets
initialized
after Online command

VAR

VAR RETAIN VAR PERSISTENT

VAR RETAIN PERSISTENT
VAR PERSISTENT RETAIN

Reset warm

-

x

x

Reset cold

-

-

x

Reset origin

-

-

-

Download

-

-

x

Online Change

x

x

x

Reboot PLC

-

x

x

16.1.20

Constants - CONSTANT, Typed Literals
Constants are identified by the key word CONSTANT. They can be declared locally or
globally.
Syntax:
VAR CONSTANT
: := ;
END_VAR

Example:

VAR CONSTANT
c_iCon1:INT:=12; (* 1. Constant*)
END_VAR