Binding Virtual Tags to Widgets
- Updated2025-02-19
- 2 minute(s) read
Binding Virtual Tags to Widgets
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.
Note This dashboard type is deprecated.
NI recommends that you use tile dashboards instead of free-form dashboards
for new visualizations you create.
- In Dashboards, open the dashboard to which you added an event script to a widget.
- Click .
-
In the
configuration pane, under
Scripts, click
+ to add a virtual tag.
The Script window opens.
- Enter the main function name of the event script you previously added to a widget in the dashboard.
-
Add input tags to your script.
- Click +.
- Specify the tag's path that exists on your SystemLink Server.
The tags you specify automatically become parameters passed to the script. -
Add output tags you want the script to create.
- Click +.
- Specify the path of the virtual tag you want to create.
- In the Script window, enter def and press Ctrl+Space to autogenerate the function definition and return statement.
- Add your Python code that performs the logic of the script.
-
When you finish adding your Python code, click
OK.
Dashboards lists the script in the configuration pane.
- Click Save and Play to view your dashboard.
- To make changes to your virtual tag script, double-click the script in the configuration pane.