About embedded variables

Embedded variables allow you to show values that change dynamically at runtime. Put placeholders in strings where the embedded variable will be shown. At runtime, the placeholder is updated with the real-time values of the variables.
Embedded variables are of two kinds:
  • A tag is read to provide the runtime value. Use tags, to embed tag values (Numeric or String), date values, and time values. The tag is read at runtime and the current value is shown.
  • A tag is not read. Use this type to embed literal strings and numbers that will be shown at runtime as they were entered.
Use one or more embedded variables in:
  • The text captions on graphic objects
  • The title bar of On Top displays
  • Message text.
For example, you could embed a tag value and the time variable in a local message. At runtime when the local message is shown, it is updated to reflect the tag’s current value as the value changes. The time is also updated as the time changes.
You can also use literal strings and constants in embedded variables, or a combination of both variable and literal strings and numbers.
Embedded variables can consist of:
  • Numeric (analog or digital) tags, including both HMI and data server tags
  • Literal numbers (constants)
  • String tags, including both HMI and data server tags
  • Literal strings (static text)
  • Tag placeholders.
  • The time
  • The date
Use literal strings instead of tag values
To use a character string in an embedded variable instead of a tag value, choose the
Literal string
option in the
String Variable
dialog box. To use a literal number instead of a tag value, choose the
Literal number
option in the
Numeric variable
dialog box.
TIP:
You can include numbers in the
Literal string
option. Use the
Literal number
option if the number you want to display requires decimal places or other special formatting.
Use tag placeholders instead of tag names
The
Graphics
editor accepts tag placeholders instead of tag names. Placeholders allow you to use the same display with different sets of tags.
You can use tag placeholders in:
  • The graphic display that opens when the application is first run.
  • Graphic displays that are opened using a goto display button.
  • Graphic displays that are opened using a display list selector.
  • The graphic display that opens when the logout button is pressed.
  • The graphic display that opens when auto logout is used.
  • Graphic displays that are opened using the Remote Display Number global connection.
  • Parameter lists for parameter passing.
Use parameter files or parameter lists to specify which tags to substitute for which placeholders.
To create a tag placeholder in an embedded variable
  • In the
    Tag
    box, type the cross-hatch character followed by a number (no space in between). For example, #1.
To delete an embedded variable
  • Click the embedded variable to select it, and then press
    Delete
    .
    TIP:
    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.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal