Overview and description - (naming conventions)
On the following documentation pages, you will find explanations and examples illustrating where these naming conventions are used (i.e. at which points in the project). The declarations samples illustrate cases for which the corresponding prefix would be expected if a prefix was defined with the corresponding naming convention. It should become clear where and how a type or variable can be declared so that the naming convention NC<xxxx> is checked at this point. However, the samples do not show which concrete prefix is defined for the individual naming conventions and would therefore be expected in the sample declarations. There is therefore no OK/NOK comparison.
For concrete examples with a defined prefix, please refer to the page Options.
Prefixes for variables
Prefixes for types:
- NC0003: BOOL
- NC0004: BIT
- NC0005: BYTE
- NC0006: WORD
- NC0007: DWORD
- NC0008: LWORD
- NC0009: USINT
- NC0010: UINT
- NC0011: UDINT
- NC0012: ULINT
- NC0013: SINT
- NC0014: INT
- NC0015: DINT
- NC0016: LINT
- NC0017: REAL
- NC0018: LREAL
- NC0019: STRING
- NC0020: WSTRING
- NC0021: TIME
- NC0022: LTIME
- NC0023: DATE
- NC0024: DATE_AND_TIME
- NC0025: TIME_OF_DAY
- NC0035: __XWORD
- NC0037: __UXINT
- NC0038: __XINT
- NC0026: POINTER
- NC0027: REFERENCE
- NC0028: SUBRANGE
- NC0029: ENUM
- NC0030: ARRAY
- NC0031: Function block instance
- NC0032: Structure
- NC0033: Alias
- NC0034: Union
- NC0036: Interface
Please note: The description of NC0003: BOOL is transferable to the other basic data types mentioned without their own documentation page.
Prefixes for the scope of variable declarations:
- NC0051: VAR_GLOBAL
- NC0070: VAR_GLOBAL CONSTANT
- NC0071: VAR_GLOBAL RETAIN
- NC0072: VAR_GLOBAL PERSISTENT
- NC0073: VAR_GLOBAL RETAIN PERSISTENT
- VAR
- NC0053: Program variables
- NC0054: Function block variables
- NC0055: Function/method variables
- NC0056: VAR_INPUT
- NC0057: VAR_OUTPUT
- NC0058: VAR_IN_OUT
- NC0059: VAR_STAT
- NC0060: VAR_INST
- NC0061: VAR_TEMP
- NC0062: VAR CONSTANT
- NC0063: VAR PERSISTENT
- NC0064: VAR RETAIN
- NC0065: I/O variables
Please note: The description of NC0051: VAR_GLOBAL is transferable to the other areas of validity mentioned without a separate documentation page.
Prefixes for POUs
Prefixes for POU type:
- NC0102: PROGRAM
- NC0103: FUNCTIONBLOCK
- NC0104: FUNCTION
- NC0105: METHOD
- NC0106: ACTION
- NC0107: PROPERTY
- NC0108: INTERFACE
Please note: The description of NC0102: PROGRAM is transferable to the other POU types mentioned without their own documentation page.
Method/property scope:
- NC0121: PRIVATE
- NC0122: PROTECTED
- NC0123: INTERNAL
- NC0124: PUBLIC
Please note: The description of NC0121: PRIVATE is transferable to the other areas of validity mentioned without a separate documentation page.
Prefixes for DUTs
- NC0151: Structure
- NC0152: Enumeration
- NC0153: Union
- NC0154: Alias
Please note: The description of NC0151: Structure is transferable to the other DUT types mentioned without their own documentation page.