beckhoff TE1200 — 4.2.1.5.6 SA0102: Access to program/fb variables from the outside

Configuration | Rules PROGRAM MAIN VAR aSample : ARRAY [0..1024] OF BYTE; // => SA0100 END_VAR 4.2.1.5.5 SA0101: Names with invalid length | SA0101: Names with invalid length Samples: Rule 101 is configured with the following parameters: Minimum number of characters: 5 Maximum number of characters: 30 Exceptions: MAIN, i Program PRG1: PROGRAM PRG1 // => SA0101 VAR END_VAR MAIN program: PROGRAM MAIN // no error due to configured exceptions VAR i : INT; // no error due to configured exceptions b : BOOL; // => SA0101 nVar1 : INT; END_VAR PRG1(); 4.2.1.5.6 SA0102: Access to program/fb variables from the outside | SA0102: Access to program/fb variables from the outside Samples:

Function block FB_Base: FUNCTION_BLOCK FB_Base VAR nLocal : INT; END_VAR Method FB_Base.SampleMethod: TE1200 57 Version: 2.11.1 Function Determines names with invalid length. The object names must have a defined length. You can configure the parameters that are taken into account in the check by double- clicking on the row for rule 101 in the rule configuration (PLC Project Properties > category "Static Analysis" > "Rules" tab > Rule 101). You can make the following settings in the dialog that appears: • Minimum number of characters (default value: 5) • Maximum number of characters (default value:

30) • Exceptions Reason Some programming guidelines specify a minimum length for variable names. Compliance can be verified with this analysis. Importance Low PLCopen rule N6 Function Determines read accesses from outside to local variables of programs or function blocks. Reason TwinCAT determines external write access operations to local variables of programs or function blocks as compilation errors. Since read access operations to local variables are not intercepted by the compiler and this violates the basic principle of data encapsulation (concealing of data) and contravenes the IEC 61131-3 standard, this rule can be used to determine read access to local variables. Importance Medium