You can assign arbitrary user-defined or application-defined attribute pragmas to POUs, type declarations, or variables. This attribute can be queried before compilation by conditional pragmas.
{attribute 'attribute'}
This pragma instruction is valid for the subsequent POU declaration or variable declaration.
You can assign a user-defined attribute to:
oa POU or action
oa variable
oa data type
Attribute vision for function fun1:
{attribute 'vision'}
FUNCTION fun1 : INT
VAR_INPUT
i : INT;
END_VAR
VAR
END_VAR
Attribute DoCount for variable ivar :
PROGRAM PLC_PRG
VAR
{attribute 'DoCount'};
ivar:INT;
bvar:BOOL;
END_VAR
Attribute aType for data type DUT_1:
{attribute 'aType'}
TYPE DUT_1 :
STRUCT
a:INT;
b:BOOL;
END_STRUCT
END_TYPE
For the usage of conditional pragmas, refer to the chapter Conditional Pragmas.