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.
Excluding , % “ and without leading and trailing spaces.
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:
  • DECIMAL values have no prefix
  • HEXADECIMAL values have the prefix "16#"
  • OCTAL values have the prefix "8#"
  • BINARY values have the prefix "2#"
Real variables
Real variables have six significant digits. For larger values, the maximum possible value is Plus or minus symbol3.402823466E+38 while for smaller values, the minimum possible value is Plus or minus symbol1.175494351E-38. Real literal values can be written with either decimal or scientific representation. The exponent part of a real scientific expression must be a signed integer value ranging from -37 to +37. The scientific representation uses the 'E' or 'F' letter to separate the mantissa part and the exponent. Real variables can have an internal, constant, input, or output attribute.
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:
  • Coil (BOOL) from 1 to 10000
  • Discrete input (BOOL) from 10001 to 20000
  • Input register (DINT or REAL) from 30001 to 39999
  • Holding register (DINT or REAL) from 40001 to 49999
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
Have questions or feedback about this documentation? Please submit your feedback here.
Normal