Numeric 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.
Numeric embedded variables use this format:
/*LN:#
Tag_name Fill_character
DP:#*/
The syntax is:
  • An opening escape sequence ‘/*’
  • Followed by an optional letter L (for Literal) preventing a tag read for the variable, (if the
    Literal number
    option is chosen in the
    Numeric Variable
    dialog box)
  • Followed by the letter 'N'
  • Followed by a colon ':'
  • Followed by a numeric length field
  • Followed by a space character
  • Followed by the tag name, tag placeholder (#1, #2, etc.)
  • Followed by a space character
  • Followed by a word describing the left fill property
  • Followed by a space character
  • Followed by the letters ‘DP:’
  • Followed by the number of decimal places
  • Followed by a closing escape sequence '*/'
For example, to show the current value of an analog tag called Oven_temp, with 3 digits, two decimal places, and no fill character, you would type:
/*N:6 Oven_temp NOFILL DP:2*/
On the display during development, you would see as many # characters as digits, with the decimal place as specified:
###.##
At runtime, you would see the value of the tag displayed in the format specified:
183.00
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal