Name conventions and limitations
This table lists the naming conventions and limitations for various elements.
Conventions | Limitations |
---|---|
Projects | |
Project names | Project names have a maximum of 32 characters beginning with a letter or single underscore followed by letters, digits, and single underscores. The last character for a project name must be a letter or digit; project names cannot end with an underscore character. Do not use reserved words, defined words, or data types for names. |
Device quantity | Projects contain one device. |
Device names | Device names have a maximum of eight (8) characters beginning with a letter or single underscore followed by letters, digits, and single underscores. Names cannot end with an underscore. Do not use reserved words, defined words, or data types for names. |
Program Organization Units (POUs) (Programs,
Functions, and Function Blocks) | |
POU names | POU names have a maximum of eight (8) characters beginning with a letter or single underscore followed by letters, digits, and single underscores. Do not use reserved words, defined words, or data types for names. Use unique names within a project. |
POUs per project | Projects can contain up to 254 POUs. The maximum number of variables is directly dependent on the Trusted® runtime 16-bit application. |
Hierarchical levels | The maximum hierarchical levels for POUs is 20 |
Operator parameters | The addition (+), multiplication (*), AND (&), CAT, and OR (>=1) operators have a maximum of 32 input parameters. |
Function parameters | Functions have a maximum of 32 parameters (31 inputs and one output). |
Function parameter names | Function parameter names have a maximum of 32 characters and must begin with a letter or single underscore followed by letters, digits, and single underscores. Do not use reserved words, defined words, or data types for names. Use unique names for the parameters of a function. |
Function block parameters | Function blocks have a maximum of 32 parameters (inputs and outputs). |
Function block parameter names | Function block parameter names have a maximum of 32 characters beginning with a letter or single underscore followed by letters, digits, and single underscores. Do not use reserved words, defined words, or data types for names. Use unique names for the parameters of a function block. |
Variables | |
Variable quantity | The maximum number of variables depends directly on the Trusted runtime 16-bit application. |
Variable names | Variable names have a maximum of 32 characters beginning with a letter or single underscore followed by letters, digits, and single underscore characters. Do not use reserved words, defined words, or data types for names. Use unique names. The names of variables having a defined Modbus address, initial value, or retained property are calculated by combining the variable and POU names for a maximum of 32 characters also beginning with a letter or single underscore followed by letters, digits, and single underscores. |
Variable comments | Plain text |
Boolean variables | Boolean variables have the Boolean value TRUE (1) or FALSE (0) and can have
an internal, constant, input, or output attribute. |
DINT variables | DINT variable integer values range from -2147483647 to +2147483647 and can have an internal, constant, input, or output attribute. Integer literals must begin with a prefix identifying the base:
|
Real variables | Real variables have six significant digits. For larger values, the maximum possible value is ![]() ![]() |
Time variables | Time variables can have positive values ranging from 0 to 23h59m59s999ms. The time literal value must begin with the "T#" or "TIME#" prefix. Time variables can have an internal or constant attribute. |
MESSAGE variables | MESSAGE variable string capacity has a maximum of 252 characters excluding the terminating null character (0), a byte for the current length of the string, and a byte for the maximum length of the string. Characters must be preceded and followed by single quote (') characters. When placing single quote (') characters within a message literal, these characters must be preceded by the dollar ($) character. |
Modbus Address | Modbus addresses depend on the data type and extended attributes of a variable. These are the available address ranges for the possible data types:
|
Defined Words | |
Defined Word names | Defined word names have a maximum of 32 characters beginning with a letter or single underscore followed by letters, digits, and single underscore characters. Do not use reserved words, defined words, or data types for names. Use unique names within a project. |
Defined word equivalents | Defined word equivalents have a maximum of 255 characters. |
Defined word quantity | Trusted programs have a maximum of 255 defined words. Trusted projects have a maximum of 3554 defined words. |
Defined word comments | Plain text |
I/O Wiring | |
I/O modules per project | The maximum number of I/O module instances depends directly on the Trusted runtime 16-bit application. |
Hardware racks | A hardware rack has a maximum of 255 I/O boards |
I/O boards per project | A project has a maximum of 255 single I/O boards. |
I/O channels | Each I/O board has a maximum of 128 I/O channels. These channels can be inputs or outputs. |
I/O module order | The I/O module order ranges from 0 to 254 |
Conversion table names | Conversion table names have a maximum of 16 characters beginning with a letter or single underscore followed by letters, digits, and single underscores. Do not use reserved words, defined words, or data types for names. |
Function Block Diagram (FBD) Programs | |
Label elements | Label elements have a maximum of 32 characters beginning with a letter or single underscore followed by letters, digits, and single underscores. |
Ladder Diagram (LD) Programs | |
Label elements | Label elements have a maximum of 455 characters beginning with a letter followed by letters, digits, and single underscores. |
Rung comments | Rich text |
Structured Text (ST) Programs | |
ST statements | ST statements (one line of code) are recommended to have less than 4096 characters. |
Instruction List (IL) Programs | |
Instruction lists | Instruction lists are not supported. |
Flow Chart (FC) Programs | |
Flow charts | Flow charts are not supported. |
Sequential Function Chart (SFC) Programs | |
Sequential function charts | Sequential function charts are not supported. |
Provide Feedback