Versions Compared

Key

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

Overview 

This Tutorial will introduce the concept of TagProvider, which allows tagless connections with external and

dynamics data

dynamic data sources. 

In this application, we will connect to

a

an MQTT

Broker and create an example of Seft-Aware-SCADA, or DynamicDisplays, which are adaptive the the data source, meaning the exactly same display will show data from different assets based on the selected asset from the remote source. 

broker and a generic display that will show information about the selected element. This solution won't create any local tags; everything will be executed with dynamic connections.

On this page:

Table of Contents
maxLevel2
stylenone


Requirements

This tutorial assumes that the basic Solution Configuration tutorial has already been executed. 

Therefore, the detailed description of some operations, like creating new solutions, won't be included in this tutorial.


Configuration Outline

  1. Create a New Solution.
  2. Start The Broker and the MQTT Simulator, at Data Explorer.
  3. At AssetsTree, create a MQTT TagProvider.
  4. Add the MQTT data to to an AssetNode.

Configuration Outline

Basic Outline:

  • Create a New Solution using the HeaderLayout template.
  • Start MQTT Simulator, at DatatExplorer
  • Connect to MQTT Simulator, at DataExplorer
  • Map tags from  automatically for a dynamic reference, at TagProviders
    1. Create a screen with:
      Asset Tree
        1. AssetTree
        2. Trend Chart
    2. Some Smart Symbols with #'s and visuals to see quantity and state
    3. Bonus - Advanced Steps:

        1. DataGrid
        2. UI Controls

      1. Add a space for Smart Symbols (Depending on what's found in the asset tree)
      2. Add code to auto-create Smart Symbol layout
      3. Enjoy a Smart Solution with a Dynamic Display!

      On this page:

      Table of Contents
      maxLevel2

      Configuration Steps

      Create a new Solution

      At the Solutions Manager tool, create a new solution, using HeaderLayout.

      Using the Data Explorer MQTT Tools

      Go to Data Explorer / MQTT Tools to start. You can connect to your own broker, if you wish, but our system has a native SpartkplugB MQTT Built-In Broker that you can use.Out platform also offers a MQTT Publisher Simulator, that has customizable data being published. Simply click both of the green "start" buttons to start the Broker and . Start the MQTT and the MQTT Simulator.

      Once you've done so, click Connect to see and browse the generated data.

       


      TagProvider connection with MQTT Broker

      1. Go to Unified Namespace > Asset Tree
      2. Create a new TagProvider. Either  by the Toolbar Icon, or via menu File-New-TagProvider. Keep the provider MQTT and all default settings.
      3. Right click at the RootTags Folder. At the context menu, execute New AssetFolder.
      4. Right click at the folder just created and execute 'Insert Asset from TagProvider'. Select GroupID as the initial node to insert.

      At this point, you already have the data from the broker integrated with your AssetTree.


      Display With AssetTree and UI Controls

      1. Go to Draw and select the MainPage.
      2. Insert a TAssetsTree component (Located under the Modules section of the list of components). No configuration required, the default settings are what we need.
      3. Add a TextBox (icon) using the vertical toolbar. Add the value Client.SelectedAsset to the LinkedValue property, and the Label text to AssetPath.
      4. Add a TextBox (icon) using the vertical toolbar. Add the value Asset(Client.SelectedAsset) to the linked value to AssetValue, and modify the Label text to Value.
      5. Add a DataGrid and configure the DataSource to  Client.SelectedAsset.
      6. Add a TrendChat, and map the first pen, using Client.SelectAsset for the TagName.

      Running the Solution

      Go to Runtime / Startup and press the START button, or use the top menu to execution, by going to Action / Startup.

      The RichClient will execute and will show the AssetTree. As you navigate on the tree, some fields will have a new value, the ones mapped to Client.SelectedAsset.


      In this section:

      Page Tree
      root@parent
      spacesV10