Attribute: obsolete
The effect of this pragma is that a defined warning is displayed for a data type definition during compilation if the data type (structure, function block, etc.) is used in the project. This enables you, for example, to draw attention to the fact that a data type is no longer valid because, for example, an interface has changed and this should also be implemented 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'}
Insert location: Line of the data type definition or in a line above it.
The pragma is inserted in the declaration of the FB_I1
function block:
{attribute 'obsolete' := 'Data type FB_I1 not valid'} FUNCTION_BLOCK FB_I1 VAR_INPUT i:INT; END_VAR ;
If you use FB_I1 as a data type, for example in fbI1 :
FB_I1;
, then the following warning will be displayed when compiling the project: Data type FB_I1 not valid
.