Attribute 'obsolete'
The pragma causes a defined warning to be issued for a data type definition during compilation if the data type (structure, function block etc.) is used in the project. You can use this, for example, to indicate that a data type is no longer valid because an interface may have changed and this should be reflected in the project.
In contrast to a message pragma, this warning is defined centrally for all instances of a data type.
Syntax: {attribute 'obsolete' := 'user defined text'}
Insertion location: Line of the data type definition or one line above it.
Example:
The pragma is inserted in the definition of function block FB_Sample:
{attribute 'obsolete' := 'datatype FB_Sample() not valid!'}
FUNCTION_BLOCK FB_Sample
VAR_INPUT
nVar : INT;
END_VAR
If you use FB_Sample as a data type, for example, in fbSample : FB_Sample;
, a warning is issued when the project is compiled: "datatype FB_Sample not valid".
See also: