Versions Compared

Key

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

...

Info
iconfalse

This document has information on the advanced Demo Project (Solar Panel) developed for FrameWorkX FactoryStudio’s version 9.2 Release.

Overview

The Demo architecture is illustrated in the image below.

Image Added


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).

Image Added


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.

Image Added


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.

Note
titleImportant

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:


Code Block
<?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.

Image Added


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.

Image Added

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).

Image Added

Image Added


Note
titleImportant

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.

Image Added

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).

Image Added


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.

Image Added


Note

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.


Image Added

Image Added


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

Image Added


Easy Heading Macro
headingIndent40
navigationTitleOn this page
selectorh2,h3
wrapNavigationTexttrue
navigationExpandOptiondisable-expand-collapse


Info
iconfalse

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

Overview

The Demo architecture is illustrated in the image below.

...

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 fxEdgeBCollector, will act as a Gateway for the data generated by an MQTTspB Simulator to the CanaryHistorian through an MQTTspB Broker.

...

The parameter is called lockoutTimeForRecaching and the default is 5 minutes. The Views service only reads this setting when the service is starting. So, any manipulation to the value would require a restart of the Views service. The installation will try to modify this configuration to 0.

MQTTspB Simulator for Data Generation

This section details the necessary configuration regarding the MQTTspB Simulator and configuration files. Make sure you you have a file called MQTTspBSimulator-Demo9.2.exe.config inside the same directory as the sample projects. This file contains the information required for customizing the simulator to create Tags in a specific format.

...

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 a HTML5 and WPF Displays 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

The visualization portion of this project is available both in WPF and HTML5 clients. Despite using different technologies (.Net Framework and Javascript), their behaviors and components are quite similar. Below you will find some images showing both clients.

...

Going one level down, inside the Panels from a City, we can monitor the attribute values from that specific SolarPanel.


Gateway/TbWebServer

The TWebServer, our built-in WebServer application, not only is responsible for allowing Client connections through HTPP requests but also enabling your CanaryHistorian to forward Data into a different server.

...

In this demo, you can test this feature by entering the local loopback IP Address 127.0.0.1. You can force the application to store data to be synchronized by stopping the TWebServer at the Project Admin Display. The data should be forwarded once the TWebServer is running again.

Modifiying between Canary Historian and SQLite Historian

On fxEdgeCollector project: 

...