Skip to main content

Compiler Error C0032

Message: Type '<type 1>' can not be converted to '<type 2>'

Possible error cause: A variable is assigned to another variable with an incompatible type.

Error correction: Use a type conversion.

Example 332. Example of the error:
PROGRAM PLC_PRG
VAR
    test1: INT;
    test2: STRING;
END_VAR

test1 := test2;

Message:

C0032: Type 'STRING' can not be converted to type 'INT'

Error correction:

test1 := TO_INT(test2);