Skip to main content

Compiler Error C0177

Message: '<object>' is of type '<type>' and cannot be instantiated

Possible error cause: An attempt is made to instantiate a function.

Error correction: Instantiate only objects that can be instantiated.

Example 413. Example of the error:
PROGRAM PLC_PRG
VAR
     inst : POU;
END_VAR

FUNCTION POU
VAR
END_VAR

Message:

C0177: 'POU' is of type 'FUNCTION' and cannot be instantiated