String variable syntax

Embedded variables are case sensitive, and must be in the proper format and syntax to work. If you make a mistake, your variable will be treated as a piece of text. Therefore, do not attempt to edit embedded variables manually. Use the
Insert Variable
and
Edit variable
dialog boxes to avoid problems.
String embedded variables use this format:
/*LS:#
Tag_name
*/
The syntax is:
  • An opening escape sequence ‘/*’
  • Followed by the letter 'L' (for Literal) preventing a tag read for the variable, (if the
    Literal string
    option is chosen in the
    String Variable
    dialog box)
  • Followed by the letter 'S'
  • Followed by a colon ':'
  • Followed by a numeric length field (if the
    Fixed number of characters
    check box is checked in the
    String Variable
    dialog box)
  • Followed by a space character
  • Followed by the tag name, tag placeholder (#1, #2, etc.)
  • Followed by a closing escape sequence '*/'
For example, to display the current value of a string tag called Blower_status, with a fixed length of 20 characters, the correct syntax would be:
/*S:20 Blower_status*/
On the display during development, you would see as many 's' characters as specified in the variable, in this case, 20:
ssssssssssssssssssss
At runtime, you would see the value of the tag shown as a string:
Functioning normally
TIP:
  • If the
    Fixed number of characters
    check box and the
    Right-most characters in string are displayed
    check box are checked in the String Variable dialog box, the numeric length field will be a negative number.
  • If the
    Fixed number of characters
    check box and the
    Show * character if string is longer than field width
    check box are checked in the String Variable dialog box, the keyword SHOWSTAR will be added to the embedded variable string after the tag or parameter field.
    For example, to display the current value of the string tag called Blower_status, with a fixed length of 20 characters, counting from the right, and displaying the * character if the string exceeds the field width, the correct syntax would be:
    /*S:-20 Blower_status SHOWSTAR*/
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal