Semantic Error (SEM1141): Read-only variables cannot be assigned to VAR_IN_OUT parameters.
In a code worksheet, a variable has been assigned to a VAR_IN_OUT parameter ('Usage = InOut') of a function block which is- a read-only system variable
- or assigned to an input terminal.
This is not allowed. Replace this read-only variable by a variable which can be written by the FB.
A formal parameter declared with 'Usage = InOut' is not a "real variable" but a reference to another variable. It can be compared to a pointer that points to the address of another variable.
This referenced variable is read and written by the FB. Writing a read-only variable, however, is not possible. Thus, only writeable variables are allowed at in/output parameters.
Further Info
Also refer to the PLCnext Info Center which provides many information and practical user tips on the PLCnext Technology control platform and PLCnext Engineer. |
Further Info
Please refer to the user manual of the controller for further information on system variables. |