Configuration | Naming conventions Explanation: See option scenario 2: As the option "Recursive prefixes for combinable data types" is disabled, only the prefix of the outermost data type is expected as the data type prefix . This results in "p" or "a" as the data type prefix. As the option "Combine scope prefix with data type prefix" is disabled, the expected overall prefix depends on whether or not a scope prefix is defined for a variable. ◦If scope prefix is defined (case 1): The variable must only have the scope prefix . The data type prefix is not expected after the scope prefix. This results for both variables in "_local_" as the expected overall prefix.
◦If scope prefix is not defined (case 2): The variable must only have the data type prefix. This results in "p" or "a" as the expected overall prefix. Further information/examples: For POUs with an access modifier (methods or properties), the combination of the prefix for the scope (NC0121-NC0124: PRIVATE/PROTECTED/INTERNAL/PUBLIC) and the prefix for the POU type (NC0105 for method, NC0107 for property) is expected as the overall prefix . Samples: If the prefix "priv_" has been configured for PRIVATE (121) and the prefix "M_" for METHOD (105), the overall prefix "priv_M_" is expected for a PRIVATE method.
If the prefix "M_" is still configured for METHOD (105), but no prefix has been configured for PRIVATE (121), that is, if the field is empty in the naming conventions, the overall prefix "M_" is expected for a PRIVATE method. 4.3.3 Placeholder {datatype} | Placeholder {datatype} For variables of type Alias and for properties, the placeholder "{datatype}" can be defined as a prefix in the "Naming Conventions" tab. The placeholder {datatype} is thereby replaced by the prefix that is defined for the data type of the alias or for the data type of the property.
The static analysis thus reports errors for all alias variables that do not possess the prefix for the data type of the alias or for all properties that do not possess the prefix for the data type of the property. The placeholder "{datatype}" can also be combined with further prefixes in the prefix definition, e.g. to "P_{datatype}_". Example 1 for an alias variable: In the project there is an alias "TYPE MyMessageType : STRING; END_TYPE" as well as a variable of this type (var : MyMessageType;).
Prefix definitions ◦Prefix for the variable data type alias (33) = "{datatype}" ◦Prefix for the variable data type STRING (19) = "s" In the prefix definitions mentioned the data type prefix "s" is expected for a variable of the alias type "MyMessageType" (e.g. for the variable "var"). Example 2 for an alias variable: Same situation as in example 1 for an alias variable, the only difference being: ◦Prefix for the variable data type alias (33) = "al_{datatype}" In this case the data type prefix "al_s" is expected for a variable of the alias type "MyMessageType". TE1200 92 Version:
2.11.1 Option State Expected overall prefix for case 1 (NC0054 = " local ") _ _ Expected overall prefix for case 2 (NC0054 = empty) Recursive prefixes for combinable data types Disabled For var1: ' local ' _ _ For var2: ' local ' _ _ For var1: 'p' For var2: 'a' Combine scope prefix with data type prefix Disabled