Attribute noinit, L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 1005

Advertising
background image

L-force | PLC Designer

Programming Reference

DMS 4.1 EN 03/2011 TD29

1003

Attribute Noinit
Variables provided with the pragma {attribute 'no_init'} won't be initialised implicitly.
The pragma belongs to the variable declared subsequently.
Syntax:
{attribute 'no_init’}
also possible:
{attribute 'no-init’}
{attribute 'noinit’}

Example:

PROGRAM PLC_PRG
VAR
A : INT;
{attribute 'no_init'}
B : INT;
END_VAR

If a reset is performed on the associated application the integer variable "A" will be
again initialised implicitly with 0, whereas variable "B" maintains the value it is
currently assigned to.

Advertising