Structured Text Programming
522 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
String Types on page 522
Store ASCII characters in tags that use a string type data type to:
• Use the default STRING data type, which stores up to 82 characters
• Create a new string type that stores less or more characters
To create a new string type, refer to the
Logix 5000 Controllers ASCII Strings
Programming Manual publication 1756-PM013 .
Each string type contains the following members:
Name Data Type Description Notes
LEN DINT number of characters in
the string
The LEN automatically updates to the new count of
characters whenever using:
• The String Browser to enter characters
• Instructions that read, convert, or manipulate a string
The LEN shows the length of the current string. The DATA
member may contain additional, old characters, which are
not included in the LEN count.
DATA SINT array ASCII characters of the
string
To access the characters of the string, address the name of
the tag. For example, to access the characters of the
string_1 tag, enter string_1.
Each element of the DATA array contains one character.
Create new string types that store less or more characters.
See also
Character string literals on page 521