Overview and description (Rules)

Overview and description (Rules) 1:

Check strict IEC rules

The checks under the node "Check strict IEC rules" determine functionalities and data types that are allowed in TwinCAT, in extension of IEC61131-3.

Overview and description (Rules) 2:

Checking concurrent/competing access

The following rules exist on this topic:

SA0006: Write access from several tasks
Determines variables with write access from more than one task.

SA0103: Concurrent access on not atomic data
Determines non-atomic variables (for example with data types STRING, WSTRING, ARRAY, STRUCT, FB instances, 64-bit data types) that are used in more than one task.

 

Please note that only direct access can be recognized. Indirect access operations, for example via pointer/reference, are not listed.

Please also refer to the documentation on the subject "Multi-task data access synchronization in the PLC", which contains several notes on the necessity and options for data access synchronization.

Parameterizable rules

Please note that some rules can be parameterized and, for example, limits can be set individually. You can configure the parameters to be taken into account in the respective check by double-clicking on the row of the corresponding rule in the rule configuration (PLC project properties > "Static Analysis" category > "Rules" tab). You can set the control parameters in the dialog that opens. The currently configured parameters are displayed in the "Limits" column of the control configuration.

The following rules can be parameterized:

List unused objects

Conversions

Usage of direct addresses

Rules for operators

Rules for statements

FOR statements:

CASE statements:

Check strict IEC rules

Rules for initializations

Possible use of uninitialized variables

Metrics

More rules