beckhoff TE1200 — 4.2.1.7.5 SA0166: Maximum number of input/output/VAR_IN_OUT variables

Configuration | Rules (* That is // nested comment number 4 *) nCounter := nCounter + 1; (* This is not a nested comment *) 4.2.1.7.4 SA0164: Multi-line comments | SA0164: Multi-line comments You can disable this check with the pragma {analysis ...} [ } 122] , including for comments in the declaration part. Samples: (* This comment leads to error: "SA0164 …" *) PROGRAM MAIN VAR /// Documentation comment not reported by SA0164 nCounter1: DINT; nCounter2: DINT; // Standard single-line comment not reported by SA0164 END_VAR (* This comment leads to error: "SA0164 …" *) nCounter1 := nCounter1 + 1; nCounter2 := nCounter2 + 1; 4.2.1.7.5 SA0166:

Maximum number of input/output/VAR_IN_OUT variables | SA0166: Maximum number of input/output/VAR_IN_OUT variables Corresponding metrics available The following metrics are available for calculating the input and output variables as part of the metrics table: Number of input variables [ } 97] Number of output variables [ } 98] TE1200 74 Version: 2.11.1 Function Determines code positions at which the multi-line comment operator (* *) is used. Only the two single-line comment operators are allowed: // for standard comments, /// for documentation comments.

Reason Some programming guidelines prohibit multi-line comments in the code, because the beginning and end of a comment could get out of sight and the closing comment bracket could be deleted by mistake. Importance Low PLCopen rule C5 Function The check determines whether a defined number of input variables (VAR INPUT), _ output variables (VAR OUTPUT) or VAR IN OUT variables is exceeded in a function _ _ _ block. You can configure the parameters that are taken into account in the check by double- clicking on the row for rule 166 in the rule configuration (PLC Project Properties > category "Static Analysis" > "Rules" tab > Rule 166).

You can make the following settings in the dialog that appears: • Maximum number of inputs (default value: 10) • Maximum number of outputs (default value: 10) • Maximum number of inputs/outputs (default value: 10) Reason This is about checking individual programming guidelines. Many programming guidelines stipulate a maximum number of parameters for function blocks. Too many parameters make the code unreadable and the function blocks difficult to test. Importance Medium PLCopen rule CP23