- Solution Name: Get Data From Asset
- Software Version
- : v10
- Keywords: Unified Namespace. AssetTree. TagProvider. MQTT. Data Explorer Tools.
Summary
This example demonstrates how to use a MQTT Broker as a connector between a
Tag providerTagProvider and the solution.
Technical Information
The MQTT Broker in this solution acts as a communicator between a Tag Provider TagProvider (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
TagProvider, 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 | ||||
---|---|---|---|---|
|