Configuration | Rules nSub := 456; // access to member of FB_Sub SUPER^.MyInit(); // call of base implementation MyInit := nSub; MAIN program: PROGRAM MAIN VAR fbBase : FB_Base; fbSub : FB_Sub; END_VAR The instance MAIN.fbBase has the following variable values after the initialization: nBase is 123 The instance MAIN.fbSub has the following variable values after the initialization: nBase is 123 nSub is 0 The variable MAIN.fbSub.nSub is 0 after the initialization, because the following call sequence is used during the initialization of fbSub: Initialization of the basic function block: ◦implicit initialization ◦explicit initialization:
FB_Base.FB_init ◦FB_Base.FB_init calls FB_Sub.MyInit → SA0106 ◦FB_Sub.MyInit calls FB_Base.MyInit (via SUPER pointer) Initialization of the derived function block: ◦implicit initialization 4.2.1.5.10 SA0107: Missing formal parameters | SA0107: Missing formal parameters Sample: Function F_Sample: FUNCTION F_Sample : BOOL VAR_INPUT bIn1 : BOOL; bIn2 : BOOL; END_VAR F_Sample := bIn1 AND bIn2; MAIN program: PROGRAM MAIN VAR bReturn : BOOL; END_VAR bReturn := F_Sample(TRUE, FALSE); // => SA0107 bReturn := F_Sample(TRUE, bIn2 := FALSE); // => SA0107 bReturn := F_Sample(bIn1 := TRUE, bIn2 := FALSE); // no error 4.2.1.5.11 SA0111: Pointer variables | SA0111: Pointer variables TE1200 61 Version:
2.11.1 Function Determines where formal parameters are missing. Reason Code becomes more readable if the formal parameters are specified when it is called. Importance Low Function Determines variables of type POINTER TO. Reason The IEC 61131-3 standard does not allow pointers. Importance Low