Pragma 'analysis'Permalink

This pragma is used to deactivate the code rules for individual code lines of a POU. You deactivate code rules by specifying the rule numbers with a prepended minus sign ("-"). A prepended plus sign ("+") activates the rule. You can specify any number of rules in the pragma.

Insert location: Deactivation: In the implementation part, with ‎{analysis - ...}‎ before the first code line where the code analysis is deactivated. Activation: With ‎{analysis + ...}‎ after the last line of the deactivation. For Rule 164, the pragma can also be inserted in the declaration part before a comment.

Syntax:

Deactivation of rules:

{analysis -<rule number> ( , -<additional rule number> )* }
* : optional none, one or more additional rule numbers
Activation of rules:

{analysis +<rule number> ( , +<additional rule number> )* }
* : none, one or more additional rule numbers

Example

Rule 24 is deactivated for two lines and then reactivated. As a result, rule 24 is not checked in these lines so that ‎nTest:=DINT#99‎ is allowed for example.


{analysis -24} 
nTest := 99; 
iVar := INT#2; 
{analysis +24}

Deactivating multiple rules:

{analysis -10, -24, -18}