Skip to main content

Compiler Warning C0566

Message: The FB_ReInit method of a function block or struct must have no inputs and a return value of type BOOL. The FB_ReInit will not be called automatically.

Possible cause:

  • One or more inputs are defined for FB_ReInit.

  • The output is not only a BOOL variable.

Correction: Remove the inputs of the FB_ReInit method. Make sure that the FB_ReInit method has only one output and this output is of type BOOL.

Example 499. Example of the warning
METHOD FB_ReInit : BOOL
VAR_INPUT    
    input_var : INT; //C0566: unexpected input for FB_ReInit
END_VAR

VAR_OUT_PUT
    output_var : INT; //C0566: wrong type for output of FB_ReInit
END_VAR

Correction:

METHOD FB_ReInit : BOOL
// correction: inputs have been removed
VAR_OUTPUT
    output_var: BOOL; // correction: ouput has the correct type
END_VAR