Message: Initialization of the static variable '<variable name>' is not constant, or replaced constants is disabled.
Possible error causes:
-
VAR_STATandCONSTANTdeclarations are used together in a function block declaration. -
The Replaces constants compile option is disabled.
Example 492. Example
The Replace constants compile option is disabled.
VAR CONSTANT
iMaxInst : INT := 2;
END_VAR
VAR_STAT
iIDs : INT := iMaxInst - 1;
END_VAR
Message:
C0549: Initialization of the static variable 'iIDs' is not constant, or replaced constants is disabled.
Error correction:
In , on the Compile Options tab, enable the Replace constants compile option.