Skip to main content

Compiler Error C0236

Message: Wrong type definition for VAR_EXTERNAL <variable name>

Possible error cause: The variable is declared in VAR_GLOBAL / VAR_EXTERNAL as different types.

Error correction: Use the same type definition in VAR_GLOBAL and VAR_EXTERNAL.

Example 454. Example of the error:
PROGRAM PLC_PRG
VAR_EXTERNAL
    ig : STRING;
END_VAR

VAR_GLOBAL
    ig : INT;
END_VAR

Message:

C0236: Wrong type definition for VAR_EXTERNAL ig