You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Download the Solution Example here: GetDataFromAsset.dbsln

Software Version:  10.1


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:

  • No labels