Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Download the Solution Example here: GetDataFromAsset.dbsln

  • Solution Name: Get Data From Asset
  • Software Version:
  10.1
  • v10
  • Keywords: Data, Asset, Tree

Summary

This example demonstrates how to use a MQTT Broker as a connector between a Tag provider and the solution. 


Technical Information

The MQTT Broker in this solution acts as a communicator between a Tag Provider (in this example the MQTT Publisher Simulator) and the solution, by creating a new Asset Tree inside the UNS. The Tags within this Asset Tree can be accessed by the system and displayed to the user via the path used in the text boxes shown below.  

Users can also dynamically access Tags through user input by utilizing the Client.Context.AssetName client tag in the SelectedAsset configuration within the Asset Tree component. This client tag stores the value of the selected asset, which can be accessed and used via Asset(Client.Context.AssetName).

The information in the new Asset Tree can be moved or copied to other parts of the solution for easier manipulation. For example, to associate a DataTable called DT with the Tags from the Tag Provider, a script class named ChildrenHandler (accessible under Script > Classes) was created. Within this class, a function called GetAssetTable is defined. This function is invoked in the code-behind section of the main display to link the DT DataTable with the Tags in the new Asset Tree.


Reference Information

→ See UNS TagProvider Connections for more information.


In this section:

Page Tree
rootSolution Examples
spacesV10