Configuration | Rules SA0103: Concurrent access on not atomic data [ } 58] SA0105: Multiple instance calls [ } 59] SA0106: Virtual method calls in FB_init [ } 60] SA0107: Missing formal parameters [ } 61] SA0140: Statements commented out [ } 69] SA0150: Violations of lower or upper limits of the metrics [ } 71] SA0160: Recursive calls [ } 71] SA0161: Unpacked structure in packed structure [ } 72] SA0162: Missing comments [ } 73] SA0163: Nested comments [ } 73] SA0164: Multi-line comments [ } 74] SA0167: Report temporary FunctionBlock instances [ } 75] SA0168: Unnecessary assignments [ } 76] SA0169: Ignored outputs [ } 76] SA0170:
Address of an output variable should not be used [ } 76] SA0171: Enumerations should have the 'strict' attribute [ } 77] SA0172: Possible attempt to access outside the array limits [ } 77] SA0175: Suspicious operation on string [ } 78] SA0180: Index range does not cover the entire array [ } 79] 4.2.1.1 SA0001 - SA0020 | SA0001 - SA0020 4.2.1.1.1 SA0001: Unreachable code | SA0001: Unreachable code Sample 1 – RETURN: PROGRAM MAIN VAR bReturnBeforeEnd : BOOL; END_VAR bReturnBeforeEnd := FALSE; RETURN; bReturnBeforeEnd := TRUE; // => SA0001 Sample 2 – CONTINUE: FUNCTION F_ContinueInLoop : BOOL VAR nCounter :
INT; END_VAR F_ContinueInLoop := FALSE; FOR nCounter := INT#0 TO INT#5 BY INT#1 DO CONTINUE; F_ContinueInLoop := FALSE; // => SA0001 END_FOR TE1200 20 Version: 2.11.1 Function Determines code that is not executed, for example due to a RETURN or CONTINUE statement. Reason Unreachable code should be avoided in any case. The check often indicates the presence of test code, which should be removed. Importance High PLCopen rule CP2