Attribute const_replaced, Attribute const_non_replaced
Insert the pragma {attribute 'const_replaced'} in the declaration of a global constant if you explicitly want to activate the compiler option Replace constants for this constant. This has the effect that the constant becomes available in the Symbol Configuration.
Correspondingly, you can insert the pragma {attribute 'const_non_replaced'} in order to deactivate the compiler option Replace constants.
The option Replace constants is pre-defined for the whole project in the Project Settings > Compile options dialog box.
{attribute 'const_replaced'}
{attribute 'const_non_replaced'}
The constants iTestCon and bTestCon are available in the Symbol Configuration because Replace constants is deactivated by pragmas.
VAR_GLOBAL CONSTANT
{attribute 'const_non_replaced'}
iTestCon : INT := 12;
{attribute 'const_non_replaced'}
bTestCon : BOOL := TRUE;
rTestCon : REAL := 1.5;
END_VAR
VAR_GLOBAL
iTestVar : INT := 12;
bTestVar : BOOL := TRUE;
END_VAR