Rules for the validation of an application
The following rules for the validation of an application are included in the standard package of logi.CAD 3.
If it is not possible to change one of these rules in your logi.CAD 3-Version (as specified in the following), the configuration of this rule has been changed by the system integrator.
Rule group |
Name of the rule |
Possible for "Active" (1) |
Possible |
Possible type (1) |
Scope (2) |
Language (4) |
IEC 61131-3 portability rule |
C-blocks must only be contained in libraries. |
|
ERROR (def), |
FAST (def), |
file |
all |
IEC 61131-3 design rule |
The usage of blocks is restricted either completely or only for defined types.
|
|
ERROR (def), |
FAST (def), |
not relevant |
all |
IEC 61131-3 design rule |
Direct lines across pages must not be used. See under " Automatic routing of lines " for information when logi.CAD 3 creates such direct lines. |
|
ERROR, INFO, |
FAST, |
not relevant |
FBD |
IEC 61131-3 design rule |
Direct lines on the same page must not be used.
|
|
ERROR, INFO, |
FAST, |
not relevant |
FBD |
IEC 61131-3 design rule |
Inputs must be positioned on the left block edge, outputs on the right one. |
|
ERROR, |
NORMAL (def), |
not relevant |
ST, FBD |
IEC 61131-3 design rule |
Inputs and outputs must not be negated. |
|
ERROR, |
FAST (def), |
not relevant |
FBD |
IEC 61131-3 design rule |
Each program must be assigned to a task. |
|
ERROR, |
FAST, |
file |
all |
IEC 61131-3 design rule |
Negations of unconnected block inputs are not allowed. |
|
ERROR, |
FAST (def), |
not relevant |
FBD |
IEC 61131-3 design rule |
A connector must be connected to a source.
|
|
ERROR (def), |
FAST (def), |
not relevant |
FBD |
IEC 61131-3 design rule |
Only identifiers conform to predefined specifications must be used for projects/folders/objects.
|
|
ERROR, |
EXPENSIVE |
not relevant |
all |
IEC 61131-3 design rule |
Lines leading from right to left must not be used. |
|
ERROR, INFO, |
FAST, |
not relevant |
FBD |
IEC 61131-3 design rule |
Namespaces of language elements must match the identifier of the parent namespace folder. |
|
ERROR, |
FAST, |
not relevant |
all |
IEC 61131-3 design rule |
Namespace folders need a unique identifier. |
|
ERROR, |
FAST, |
not relevant |
all |
IEC 61131-3 design rule |
ST-objects must not contain more than one element on the top level.
|
|
ERROR, |
NORMAL (def), |
file |
ST |
IEC 61131-3 design rule |
ST-objects may only contain elements with the name of the ST-object on the top level.
|
|
ERROR, |
NORMAL (def), |
file |
ST |
IEC 61131-3 design rule |
Illegal elementary data types must not be used.
|
|
ERROR, |
FAST, NORMAL (def), |
element |
all |
IEC 61131-3 usage rule |
Number of resources per platform is limited. |
|
ERROR (def), |
FAST (def), |
not relevant |
– |
IEC 61131-3 usage rule |
References to local variables must not be used in functions/methods.
Here, "local, temporary variables" identifies the variables for which a temporary memory is assigned while the function/methods is executed. Hence, the following variables are affected:
Moreover, observe that it is possible to implement constructs leading to invalid memory accesses. Such constructs are not detected by logi.CAD 3 . Hence, avoid appropriate constructs. See "Example for a problematic access". |
|
ERROR (def), |
FAST (def), |
element |
ST, FBD |
IEC 61131-3 usage rule |
Connections from an output of a function block are not allowed to a VAR_IN_OUT variable.
|
|
ERROR (def), |
FAST, |
element |
all |
IEC 61131-3 usage rule |
Assignments to output variables of a function block are not allowed outside of function blocks.
|
|
ERROR (def), |
FAST (def), |
element |
ST, FBD |
IEC 61131-3 usage rule |
Assignments to input variables within the POUs are not allowed.
|
|
ERROR (def), |
FAST (def), |
element |
ST, FBD |
The following rule is not provided in all variants of logi.CAD 3:
Rule group |
Name of the rule |
Possible for "Active" (1) |
Possible |
Possible type (1) |
Scope (2) |
Language (4) |
IEC 61131-3 usage rule |
Library configurations of type "LOGISAFE" and/or "LOGIWEB" must only contain elements that are allowed for this type.
|
|
ERROR |
NORMAL (def), |
not relevant |
– |
Notes on the tables:
(1) The setting can be changed in the property page Validation and/or in the dialog Configure Validation for resource. Details: see "Changing the configuration of rules". This article also describes the meaning of the severities and types.
(2) The scope is relevant, if you want to suppress warnings for this rule. Details: see "Suppressing warnings for the validation".
The entry "not relevant" indicates that the warnings cannot be suppressed for this rule.
(3) (def) = (default); When restoring the default values in the property page Validation or in the dialog Configure Validation for resource, logi.CAD 3 resets the rules to the setting labeled with "(def)" in the table.
Restriction
The presettings of rules can only be modified in the file configuring the model rule.
If you want to adapt the files for the model rules, contact logi.cals and ask for the appropriate information from the English documentation "logi.CAD 3 administrator's manual".
The following ST-code is not highlighted as faulty due to the deactivated rule References to local variables must not be used in functions/methods although the code contains a problematic access:
(* The function returns a reference to a variable that - after the function call - is not provided anymore. Note: Functions do not store their state *)
FUNCTION MyFun : REF_TO INT
VAR
Var1 : INT;
END_VAR
MyFun := REF(Var1);
END_FUNCTION
(4)
The column "Language" informs to which language elements the rule is applied during the validation:
Item |
Meaning |
all |
The rule is applied to ST-objects, FBD-objects and LD-objects. |
ST |
The rule is applied to ST-objects. |
FBD |
The rule is applied to FBD-objects. |
– |
The rule is not relevant for ST-objects, FBD-objects or LD-objects . |