Skip to main content

Attribute: analysis

The attribute deactivates specific rules for an entire programming object so that they are excluded from the static analysis. You deactivate the code rules by specifying the rule numbers with a prepended minus sign ("-"). You can specify any number of rules in the attribute.

Insert location: In the declaration part of a POU, in the first line.

Syntax:

{attribute 'analysis' := '-<rule number> ( , -<further rule number> )* '}
* : none, one or more further rule numbers

Example

Rules 33 and 31 are deactivated for the entire structure:

{attribute 'analysis' := '-33, -31'}
TYPE My_Structure :
STRUCT
        iLocal : INT;
        uiLocal : UINT;
        udiLocal : UDINT;
END_STRUCT
END_TYPE

Rule 100 is deactivated for the array:

{attribute 'analysis' := '-100'}
PROGRAM PLC_PRG
VAR
        aBigData: ARRAY[1..10000] OF DWORD;
        aBigDATA_2: ARRAY[1..10000] OF DWORD;
END_VAR
;