Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Binding needs a variable of the interface type

This note follows an E126 type mismatch for an argument that is bound by reference or is an output, or for the right side of REF=. It points at the declaration of the parameter or reference that needs the variable, and names the type that the variable must have.

FUNCTION update
    VAR_IN_OUT
        ref : IA;   // Note: Parameter 'ref' is passed by reference and needs a variable of type 'IA'
    END_VAR
END_FUNCTION

FUNCTION main
    VAR
        instance : FbA;
    END_VAR
    update(instance);  // Error: expected type 'IA' but received 'FbA'
END_FUNCTION

Use plc explain E126 for the rules and how to fix the error. Ignoring E126 with --error-config does not hide this note; ignore E159 as well.