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

Compare with Current View Page History

Version 1 Next »

This document has information on the Demo Projects developed for FrameWorkX FactoryStudio’s version 9.2 Release.

Overview

The Demo architecture is illustrated in the image below.


The MQTTspB Simulators are responsible for generating data for various Solar Panel structures and publishing them to a Broker.

An Edge Project will connect to that Broker and read all data published by the Solar Panels (simulators) using the TagProvider for MQTTspB Protocol. This data will then be transferred to a Historian Database using the TagProvider for CanaryHistorian in Historian Mode.

Finally, there are User Interface Projects that connects to the Historian Database through the TagProvider for CanaryHistorian (in read mode) and display the data in dynamically.




Generating and Historizing Data

Setting Up Project for Data Storage

The Project FsEdge-MQTTspBCollector, available here, will act as a Gateway for the data generated by the MQTTspB Simulators to the CanaryHistorian through an MQTTspB Broker.

The configuration is done without any FactoryStudio Tags, using only the TagProvider Unified Namespace (see more information on this topic on its documentation). To make sure you have the correct behavior, make sure the following settings are correct:

At Edit → Tags Providers → MQTTspB, change the connection parameters according to your Broker. You can use Tatsoft’s default one (TMQTTBroker).

For more information on the MQTTspB Protocol and TMQTTBroker, please refer to their documentation. MQTTspB and TMQTTBroker.

At Edit → Tags Providers → CanaryHistorian, map the Server Name and View to the Historian Server that will be used.

The Dataset mapped don’t need to pre-exist on your Server, as it can be auto-created by this application. For more information on the CanaryHistorian Protocol, please refer to its documentation (CanaryHistorian).


At Edit → Tags → Historian, you will see an entry from the MQTTspB Provider, mapping a Dynamic Tag to be historized. By mapping the GroupID with the syntax (”GroupID”) all child elements (NodeIds, DeviceIds and attributes) will be automatically historized as well.


You can launch the Project and keep it running while we setup the MQTTspB Simulators in the next section.

MQTTspB Simulator for Data Generation

This section details the necessary configuration regarding the MQTTspB Simulator and configuration files. First of all, make sure you have access to the Simulator.zip and MQTTspBSimulator.pdf files.

Inside this file, you will find the Simulator configuration file to be used in this Demo.

MQTTspBSimulator-Demo9.2.exe.config.

Important

Make sure the config file is placed in the same folder as the Demo Projects (Edge and Visualizer), and DO NOT change the configuration file name.

The syntax for the configuration file is described below:


<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="Barcelona" type="System.Configuration.AppSettingsSection" />
<section name="Bilbao" type="System.Configuration.AppSettingsSection" />
<section name="Madrid" type="System.Configuration.AppSettingsSection" />
<section name="Sevilha" type="System.Configuration.AppSettingsSection" />
</configSections>

<Bilbao>
<add key="NumberOfDevices" value="2" />
<add key="Name" value="Type=string;Sampling=constant;range=;defaultValue=Bilbao" />
<add key="State" value="Type=int;Sampling=variable;range=0,10;defaultValue=" />
<add key="Longitude" value="Type=double;Sampling=constant;range=-3.23,-2.456;defaultValue=" />
<add key="Latitude" value="Type=double;Sampling=constant;range=43.30, 43.341;defaultValue=" />
<add key="PanelPower" value="Type=double;Sampling=variable;range=200,500;defaultValue=" />
<add key="PanelVoltage" value="Type=double;Sampling=variable;range=-220,220;defaultValue=" />
<add key="PanelCurrent" value="Type=double;Sampling=variable;range=-10,10;defaultValue=" />
<add key="TemperaturePort" value="Type=double;Sampling=variable;range=15,35;defaultValue=" />
</Bilbao>
<Barcelona>
...
</Barcelona>
<Madrid>
...
</Madrid>
<Sevilha>
...
</Sevilha>
</configuration>



Each section defined in configSections will be a NodeId that is created in the Broker. Their attributes are defined in their own section.

The NumberOfDevices key represents the amount of DeviceIds created for that specific NodeId. You can change that quantity by changing this value.

To launch the simulator with this custom configuration file, run the executable file with the path for the config file as a parameter.

The Simulator can easily be executed, through the ProjectAdmin Page in fxAssetsMonitor Project.


You can now simulate new values, for the Variable sampling Type of Attributes by clicking on the Send buttons. and Add/Remove all NodeIds from the Broker by forcing a Connection/Disconnection.



UI and Data Visualization

The User Interface and Data Visualization portion of this demo consists in a Project, fxAssetsMonitor, with a .Net Display to administrate the project applications and an HTML5 Display for the SolarPanel assets, loaded from CanaryHistorian, in the AssetsControl and Map component.

Project Administrator Display in .Net

In this Display, you can monitor the status of your applications (Visualizer and Collector Projects, TMQTTBroker, MQTTspBSimulator and TWebServer) and Start/Stop them.

There is also a button to launch the HTML5 WebClient in MsEdge Browser.

Data Visualization in HTML5

It is possible to navigate and dynamically create some displays based on the Asset content (amount of Solar Panels and its details).


Important

Make sure you have a WebServer (TWebServer or IIS) running on this machine.



Project Configuration

Before running the Project, you will have to modify the CanaryHistorian connection string parameters in order to connect to your own Server. To do so, navigate to Edit → Tags → Providers → CanaryHistorian and map the the same Server Name, View and Dataset defined in the fxEdgeCollector Project.

You can check if the TagProvider is correctly configured and able to retrieve data by clicking on the Object Selection Button (1) at the top toolbar. Browse through the CanaryHistorian object to see its children elements (2).


Project in Runtime

Run the Project and open the WebClient on your browser of choice. The URL syntax for the WebClient is

http://?IpAddress?:?WebServerPort?/fs-9.2/html5/index.html

The URL information is also available in Info Project Redundancy.


When the WebServer is running on the default port 80 it is now required in the URL, as in the image above.


Once the client has started, you should see an AssetsControl component on the Left and a Map, with some markers, on the right. The markers are loaded from the CanaryHistorian Dataset (Latitude and Longitude coordinates defined in the MQTTspB Simulator).

Expand the Asset Tree to see the inner elements and Click on the Marker to reveal some detailed information on that specific location.


Select a City from the AssetsControl and click on the Trend icon (1) to open a Dynamic Window with information on all Panels that exists in that specific City.



Lastly, select a Panel form the list to open a different Dashboard display with Gauges and Trend displaying the attributes values.


  • No labels