Semantic Error (SEM1063): Assignments to constant variables are not valid.
In a code worksheet, a variable declared as constant variable shall be written. This is not allowed because the values of variables declared with the CONSTANT attribute can be read but must not be changed.
Error example: Constant declaration in a local variables grid, code in FBD/LD and ST.
Remedy
- Double-click the error message to jump to the affected editor position.
- Either make the variable writeable by removing the 'Constant' property (deselecting the checkbox) or remove the write access to the variable in the code.