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

Page 270

Advertising
background image

L-force | PLC Designer

Editors in PLC Designer

268

DMS 3.2 EN 02/2011 TD29



Pragma {flag} for Initialization, Monitoring, Creation of symbols

{flag [<flags>] [off|on]}

<flags> can be a combination of the following flags:

noinit:

The variable will not be initialized.

nowatch:

The variable can not be monitored

noread:

The variable is exported to the symbol file without read permission

nowrite:

The variable is exported to the symbol file without write permission

noread, nowrite: The variable will not get exported to the symbol file

With the „on" modifier, the pragma operates on all subsequent variable declarations
until it is ended by the pragma {flag off}, or until overwritten by another {flag <flags>

on} pragma.

Without the „on" or „off" modifier, the pragma operates only on the current variable
declaration (that is the declaration that is closed by the next semicolon).

Examples for use of pragma {flag}:

Initialization and monitoring of variables:

The variable a will not be initialized and will not be monitored. The variable b will not
be initialized:

VAR
a : INT {flag noinit, nowatch};
b : INT {flag noinit };

END_VAR

VAR
{flag noinit, nowatch on}
a : INT;
{flag noinit on}
b : INT;
{flag off}

END_VAR

Advertising