Date: Thu, 28 Mar 2024 10:38:01 -0500 (CDT) Message-ID: <1089300497.10043.1711640281466@localhost.localdomain> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_10042_478425200.1711640281466" ------=_Part_10042_478425200.1711640281466 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This document has information on the advanced Demo Project (Solar Panel) developed for FrameWork= X FactoryStudio=E2=80=99s version 9.2 Release. Do= wnload here.
The Demo architecture is illustrated in the image below.
The MQTTspB Simulators are responsible for generating data for var= ious Solar Panel structures and publishing them to a Broker.
An Edge Project will connect to that Broker and read all data publ= ished by the Solar Panels (simulators) using the TagProvider for MQTTspB Pr= otocol. This data will then be transferred to a Historian Database using th= e TagProvider for CanaryHistorian in Historian Mode.
Finally, there are User Interface Projects that connects to the Hi= storian Database through the TagProvider for CanaryHistorian (in read mode)= and display the data in dynamically.
The Project fxEdgeCollector, will act as a Gateway for th= e data generated by an MQTTspB Simulator to the CanaryHistorian through an = MQTTspB Broker.
The configuration is done without any FactoryStudio Tags, using on= ly the TagProvider Unified Namespace (see more information on this topic on= its documentation).
In order to ensure you have the correct behavior, check if = the following settings are correct:
At Edit =E2=86=92 Tags Providers =E2=86=92 MQTTspB, change the connection parameters according to your Broker. You can = use Tatsoft=E2=80=99s default one (TMQTTBroker).
For more information on the MQTTspB Protocol and TMQTTBroker, plea= se refer to their documentation. MQTTspB and TMQTTBroker.
At Edit =E2=86=92 Tags Providers =E2=86=92 CanaryHist= orian, map the Server Name and View&n= bsp;to the Historian Server that will be used.
The Dataset mapped don=E2=80=99t need to pre-exis= t on your Server, as it can be auto-created by this application. For more i= nformation on the CanaryHistorian Protocol, please refer to its documentati= on (CanaryHistorian).
At Edit =E2=86=92 Tags =E2=86=92 Historian, you w= ill see an entry from the MQTTspB Provider, mapping a Dynamic Tag to be By = mapping the GroupID with the syntax MQTTspB.(=E2=80=9DGroupID=E2=80=9D) all= child elements (NodeIds, DeviceIds and attributes) will be automatically h= istorized as well.
There is a setting that determines how quickly the CanaryHistorian= service rebuild their views cache when new tags or metadata arrive. That s= etting is in the CanaryViews.exe.admin file located in the installat= ion location under the Views subfolder.
The parameter is called lockoutTimeForRecaching and the default is 5 minutes. The Views service only reads this setti= ng when the service is starting. So, any manipulation to the value would re= quire a restart of the Views service. The installation will try to modify t= his configuration to 0.
This section details the necessary configuration regarding the MQT= TspB Simulator and configuration files. Make sure you you have a file calle= d MQTTspBSimulator-Demo9.2.exe.config inside the same directory as= the sample projects. This file contains the information required for custo= mizing the simulator to create Tags in a specific format.
Important
The syntax for the configuration file is described below:= p>
<?xm= l version=3D"1.0" encoding=3D"utf-8" ?> <configuration> <configSections> <section name=3D"Barcelona" type=3D"System.Configuration.AppSettingsSect= ion" /> <section name=3D"Bilbao" type=3D"System.Configuration.AppSettingsSection= " /> <section name=3D"Madrid" type=3D"System.Configuration.AppSettingsSection= " /> <section name=3D"Sevilha" type=3D"System.Configuration.AppSettingsSectio= n" /> </configSections> <Bilbao> <add key=3D"NumberOfDevices" value=3D"2" /> <add key=3D"Name" value=3D"Type=3Dstring;Sampling=3Dconstant;range=3D;de= faultValue=3DBilbao" /> <add key=3D"State" value=3D"Type=3Dint;Sampling=3Dvariable;range=3D0,10;= defaultValue=3D" /> <add key=3D"Longitude" value=3D"Type=3Ddouble;Sampling=3Dconstant;range= =3D-3.23,-2.456;defaultValue=3D" /> <add key=3D"Latitude" value=3D"Type=3Ddouble;Sampling=3Dconstant;range= =3D43.30, 43.341;defaultValue=3D" /> <add key=3D"PanelPower" value=3D"Type=3Ddouble;Sampling=3Dvariable;range= =3D200,500;defaultValue=3D" /> <add key=3D"PanelVoltage" value=3D"Type=3Ddouble;Sampling=3Dvariable;ran= ge=3D-220,220;defaultValue=3D" /> <add key=3D"PanelCurrent" value=3D"Type=3Ddouble;Sampling=3Dvariable;ran= ge=3D-10,10;defaultValue=3D" /> <add key=3D"TemperaturePort" value=3D"Type=3Ddouble;Sampling=3Dvariable;= range=3D15,35;defaultValue=3D" /> </Bilbao> <Barcelona> ... </Barcelona> <Madrid> ... </Madrid> <Sevilha> ... </Sevilha> </configuration>
Each section defined in configS= ections will be a NodeId that is created in t= he 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 exe= cutable file with the path for the config file as a parameter.=
The Simulator can easily be executed, through the ProjectAdmin Pag= e 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 Node= Ids from the Broker by forcing a Connection/Disconnection.
The User Interface and Data Visualization portion of this demo con= sists in a Project, fxAssetsMonit= or, with a .Net Display to administrate the project applications a= nd a HTML5 and WPF Displays for the SolarPanel assets, loaded from CanaryHi= storian, in the AssetsControl and Map component.
In this Display, you can monitor the status of your applications (= Visualizer and Collector Projects, TMQTTBroker, MQTTspBSimulator and TWebSe= rver) and Start/Stop them.
There is also a button to launch the HTML5 WebClient in MsEdge<= /u> Browser.
The visualization portion of this project is available both in WPF and H= TML5 clients. Despite using different technologies (.Net Framework an= d Javascript), their behaviors and components are quite similar. Below you = will find some images showing both clients.
If your fxEdgeCollector configuration was done correctly = and you have all necessary applications running, you should see some marker= s added to the Map components. They are loaded from the CanaryHistorian Dat= aset (Latitude and Longitude coordinates defined in the MQTTspBSimulator).<= /span>
You can expand the AssetControl Tree to see the inner elements and= Click on the Marker to reveal some detailed information on that specific S= olarPanel, as illustrated below.
Navigating further down the AssetControl Tree under the Cities<= /u> node, you will see the Cities that were created (Barcelona, Bilbao, Mad= rid and Sevilha, by default). Select one of the Cities and click on the Tre= nd Icon (1) to open a Dynamic Window containing informatio= n on all Panels from that specific location.
The image above is showing all 5 (five) panels from Madrid.= The same Dynamic Display is automatically adjusted for a different quantit= y when Sevilha is selected, for example.
Going one level down, inside the Panels from a City, we can monito= r the attribute values from that specific SolarPanel.
The TWebServer, our built-in WebServer application, not only is responsi= ble for allowing Client connections through HTPP requests but also en= abling your CanaryHistorian to forward Data into a different server.=
When using this feature, if the connection to the Server you are p= ointing to is down, the application can store the data locally to be synchr= onized once the connection is established again.
At the fxEdgeCollector Project, under Edit =E2=86= =92 Tags =E2=86=92 Providers, you will find a column named ServerIP. In this field you can enter an IP Address pointi= ng to a server that contains a CanaryHistorian running. This Server must have a TWebServer running in order to be accessible.<= /span>
In this demo, you can test this feature by entering the local loop=
back IP Address 127.0.0.1. You can force
On fxEdgeCollector project:&n= bsp;
On fxAssetsMonitor project: