Skip to main content

Compiler Warning C0568

Message: Interface of overridden method '<method name>' of interface '<function block name>' doesn't match declaration

Possible cause: The signature of the method of the first interface does not match the signature of the method in the second interface, which is extended by the first.

Correction: Align the signatures.

Example 501. Example of the warning:
PROGRAM PLC_PRG
VAR
     xyz : XY2;
END_VAR

FUNCTION_BLOCK XY
METHOD METH1
VAR_INPUT
END_VAR

FUNCTION_BLOCK XY2 EXTENDS XY
METHOD METH1
VAR_INPUT
    iPar : BOOL;
END_VAR

Message:

C0568: Interface of the overridden method 'METH1' of base 'XY' doesn't match declaration