-

Semantic Error (SEM1042): '...' is not a valid function.

In a graphical worksheet, a function is used which is no longer available because e.g., the library where it is defined has been removed, or the user POU has been deleted in a 'Functions & Function Blocks' folder in the COMPONENTS area.

In ST code, a variable is used in the same way as a function or function block. In the error message, the data type of the misused variable is indicated.

In the following error example, MyVar is declared as an INT variable. In ST, an invalid function call is programmed using MyVar.

temp := MyVar(a, b);