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

Page 1008

Advertising
background image

L-force | PLC Designer

Programming Reference

1006

DMS 4.1 EN 03/2011 TD29

Attribute Obsolete
An "obsolete" pragma can be added to a data type definition in order to cause a user-
defined warning during a build run, if the respective data type (structure, function
block etc.) is used within the project. Thus for example you might announce that the
data type should not be used any longer.
Unlike a locally used Message Pragma this warning is defined within the definition and
thus "globally" for all instances of the data type.
This pragma instruction always is valid for the current line or - if placed in a separate
line - for the subsequent line.
Syntax:
{attribute ''obsolete' := 'user defined text'}

Example:
The obsolete pragma is inserted in the definition of function block fb1:

{attribute 'obsolete' := 'datatype fb1 not valid!'}
FUNCTION_BLOCK fb1
VAR_INPUT
i:INT;
END_VAR
...

If fb1 is used as a data type in a declaration, e.g. "fbinst: fb1;" the following warning
will be dumped when the project is built: "datatype fb1 not valid"'

Advertising