Table Of Contents

Binding Virtual Tags to Widgets

Last Modified: August 15, 2019

Add a virtual tag script to your free-form dashboard to generate virtual tags to bind to a widget. Virtual tags enable you to visualize and analyze your tag data in a customized way.

A virtual tag uses real tags from your SystemLink Server as parameters. When these parameters, or real tags, pass values to the main function of your script, the value of the virtual tag updates. As a result, you can only see values of virtual tags on your dashboard.
  1. In Dashboard Builder, open the dashboard to which you added an event script to a widget.
  2. Click »Edit.
  3. In the configuration pane, under Scripts, click + to add a virtual tag. The Script window opens.
  4. Enter the main function name of the event script you previously added to a widget in the dashboard.
  5. Add input tags to your script.
    1. Click +.
    2. Specify the tag's path that exists on your SystemLink Server.
    The tags you specify automatically become parameters passed to the script.
  6. Add output tags you want the script to create.
    1. Click +.
    2. Specify the path of the virtual tag you want to create.
  7. In the Script window, enter def and press Ctrl+Space to autogenerate the function definition and return statement.
  8. Add your Python code that performs the logic of the script.
  9. When you finish adding your Python code, click OK. Dashboard Builder lists the script in the configuration pane.
  10. Click Save and Play to view your dashboard.
  11. To make changes to your virtual tag script, double-click the script in the configuration pane.

Recently Viewed Topics