Configuration | Rules nVar : INT; eSample : E_Sample; END_VAR // IF constructs IF (bTest := TRUE) THEN // => SA0095 DoSomething(); END_IF IF (bResult := F_Sample(bInput := bValue)) THEN // => SA0095 DoSomething(); END_IF b1 := ((n1 := n2) = 99); // => SA0095 IF INT_TO_BOOL(nCond1 := nCond2) THEN // => SA0095 DoSomething(); ELSIF (nCond1 := 11) = 11 THEN // => SA0095 DoSomething(); END_IF IF bCond := TRUE THEN // => SA0095 DoSomething(); END_IF IF (bCond := FALSE) OR (nCond1 := nCond2) = 12 THEN // => SA0095 DoSomething(); END_IF IF (nVar := nVar + 1) = 120 THEN // => SA0095 DoSomething(); END_IF // CASE construct CASE (eSample := E_Sample.eMember0) OF // => SA0095 E_Sample.eMember0:
DoSomething(); E_Sample.eMember1: DoSomething(); END_CASE // WHILE construct WHILE (bCond = TRUE) OR (nCond1 := nCond2) = 12 DO // => SA0095 DoSomething(); END_WHILE // REPEAT construct REPEAT DoSomething(); UNTIL (bCond = TRUE) OR ((nCond1 := nCond2) = 12) // => SA0095 END_REPEAT 4.2.1.5.4 SA0100: Variables greater than bytes | SA0100: Variables greater than bytes Sample: In the following sample the variable aSample is greater than 1024 bytes. TE1200 56 Version: 2.11.1 Function Determines variables that use more than n bytes; n is defined by the current configuration.
You can configure the parameter that is taken into account in the check by double- clicking on the row for rule 100 in the rule configuration (PLC Project Properties > category "Static Analysis" > "Rules" tab > Rule 100). You can make the following settings in the dialog that appears: • Upper limit in bytes (default value: 1024) Reason Some programming guidelines specify a maximum size for a single variable. This function facilitates a corresponding check. Importance Low