beckhoff TE1200 — 4.2.1.6.1 SA0121: Missing VAR_EXTERNAL declarations

Configuration | Rules 4.2.1.5.18 SA0119: Object-oriented features | SA0119: Object-oriented features Samples: Interface I_Sample: INTERFACE I_Sample // => SA0119 Function block FB_Base: FUNCTION_BLOCK FB_Base IMPLEMENTS I_Sample // => SA0119 Function block FB_Sub: FUNCTION_BLOCK FB_Sub EXTENDS FB_Base // => SA0119 Method FB_Sub.SampleMethod: METHOD SampleMethod : BOOL // no error Get function of the property FB_Sub.SampleProperty: VAR // => SA0119 END_VAR Set function of the property FB_Sub.SampleProperty: VAR // => SA0119 END_VAR 4.2.1.5.19 SA0120: Program calls | SA0120: Program calls Sample: Program SubProgram: PROGRAM SubProgram MAIN program:

PROGRAM MAIN SubProgram(); // => SA0120 4.2.1.6 SA0121 - SA0160 | SA0121 - SA0160 4.2.1.6.1 SA0121: Missing VAR_EXTERNAL declarations | SA0121: Missing VAR_EXTERNAL declarations TE1200 64 Version: 2.11.1 Function Determines the use of object-oriented features such as: • Function block declarations with EXTENDS or IMPLEMENTS • Property and interface declarations • Use of the THIS or SUPER pointer Reason Not all systems support object-oriented programming. The code becomes easier to port if object orientation is not used. Importance Low Function Determines program calls. Reason According to the IEC 61131-3 standard, programs can only be called in the task configuration.

The code becomes easier to port if program calls elsewhere are avoided. Importance Low Function Determines the use of a global variable in the function block, without it being declared as VAR EXTERNAL (required according to the standard). _ Reason According to the IEC 61131-3 standard, access to global variables is only permitted via an explicit import through a VAR EXTERNAL declaration. _ Importance Low PLCopen rule CP18