Overview of Structured Text Programming
646 Rockwell Automation Publication MOTION-RM002H-EN-P-February 2018
Some Key Words are Reserved
These constructs are not available:
• GOTO
• REPEAT
Logix Designer application will not let you use them as tag names or constructs.
See also
IF_THEN on page 648
CASE_OF on page 651
FOR_DO on page 653
WHILE_DO on page 655
REPEAT_UNTIL on page 658
Character string literals include single byte or double byte encoded characters. A
single-byte string literal is a sequence of zero or more characters that are prefixed
and terminated by the single quote character ('). In single byte character strings,
the three-character combination of the dollar sign ($) followed by two
hexadecimal digits is interpreted as the hexadecimal representation of the eight-bit
character code as shown in the following table.
Tips:
• Character string literals are only applicable to the CompactLogix 5380,
CompactLogix 5480, ControlLogix 5580, Compact GuardLogix 5380, and
GuardLogix 5580 controllers.
• Studio 5000 only supports single byte characters.
Character string literals
No. Description Example
1a Empty string (length zero) ''
1b String of length one or character CHAR containing a single character 'A'
1c String of length one or character CHAR containing the “space” character ' '
1d String of length one or character CHAR containing the “single quote”
character
'$''
1e String of length one or character CHAR containing the “double quote”
character
'"'
1f Support of two character combinations '$R$L'
1g Support of a character representation with ‘$’ and two hexadecimal
characters
'$0A'
Character string literals