Message: Initialization of the static variable '<variable name>' is not constant, or replaced constants is disabled.
Possible error cause: VAR_STAT and CONSTANT declarations are used together in a function block declaration. The Replaces constants compile option is disabled.
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 Project → Project Settings, on the “Compile Options” tab, enable the “Replace constants ” compile option.