Semantic Error (SEM1270): Invalid access to VAR_IN_OUT parameter '...' of function block '...'.
In ST code, an invalid write access to an InOut formal parameter of an FB has been detected. The data type of the InOut parameter is a user-defined structure which may not be accessed in the current way.
Error example
In the prototype of the function block MyFB, the InOut parameter status is of the user-defined data type MyStruct. This structured data type contains the field number of the data type INT.
The FB is instantiated in a program using the instance name MyFB1. In the program code, the field is incorrectly written as follows:
MyFB1.status.number := 1;
For a correct access to the InOut variable, a variable of the data type MyStruct must be assigned. Example:
MyFB1.status := StatusVar;
Remedy
Double-clicking the error message opens the code and marks the incorrect code position. Correct or delete the access to the function block formal parameter.