Skip to main content

Compiler Error C0142

Message: A local variable named '<variable name>' is already defined in '<pou name>'

Possible error cause: The same variable name is used two times.

Error correction: Use different variable names.

Example 399. Example of the error:
PROGRAM PLC_PRG
VAR
    i : INT;
    i : INT;
END_VAR

Message:

C0142: A local variable named 'i' is already defined in 'PLC_PRG