Promotic

Preconfiguration "eWON - Communication with cloud service Talk2M DataMailbox - Communication set with data and panel"

Configuration of the communication with eWON.

This preconfiguration can be activated when creating a new object (e.g. by "New object ..." in the local object menu or by pressing the Insert key after selecting the object) and is included in the group: "/ Communication / PLC devices and meters / eWON - PLC device".
This preconfiguration can be created in the object: PmaFolder or PmaRoot.

The preconfiguration creates an object of the PmaFolder type containing three subfolders:
View - allows processing data in requested range from individual devices that are stored in cloud service Talk2M DataMailbox
Trend - allows reading and local storage of complete history of selected values from devices registered in the cloud service
Cfg - creates administration screen that can be used in order to create configuration file for trending selected values


In the "GetAuthentication" method of the main eWon folder there are all login entries requested for cloud service access.


View - PmaFolder The "PanelTest" test panel is used for displaying received data. Here it is possible to use the configurators in order to put together requested method and command parameter. The PanelTrend object allows rendering graphic chart of data in defined time-range.
The PmaFolder object has methods RequestEwons, RequestEwon, RequestData and RequestSyncdata that are used to initiate the communication. Each of these methods call the Add method of the PmaSequencer object together with corresponding parameters. It triggers the onStep event of the PmaSequencer object where the HttpRequest object executes the communication with the service. The received data is then processed by methods ReplyEwons, ReplyEwon, ReplyData and ReplySyncdata that must be modified accordingly.

Cfg - PmaFolder Subobjects in this folder can be used to select values that will be read and saved locally into the database table of trends. The CfgTrend panel is used for data selection and configuration. Once the configuration is saved, new file named "EwonCfgTrend.txt" is created in the Cfg folder of the application. The content of such file is necessary for correct functionality of subobjects located in the Trend object. These subobjects are responsible for saving selected values into trends.

Trend - PmaFolder Subobjects in this folder are responsible for communication and saving selected values into trends. The configuration file EwonCfgTrend.txt is necessary for their correct functionality. The file contains JSon data created by the CfgTrend panel. If increasing the number of trended values is needed, it can be done by opening the application in the development environment and copying the TrendVar1 object in the Trend object.
Once the communication is launched for the first time the application starts reading all historical data (stored in the cloud) of variables defined in the configuration file. The order of variables is respected. The data is read and stored continuously from the oldes to the newest. The application reads batches of 200 records every 0.5 seconds (after the previous batch is processed). Once one variable is fully read then another follows. This process may take significant ammount of time based on the total ammount of data to be read. Once all the data is read and saved locally following communication is planned for the time defined in the DataCfg object in the Period variable. This value defines for how many seconds the system waits (after the previous communication ends) before the next reading of data from the cloud is initiated.
These configurators can be set before the preconfiguration is created:
The name of created objectName of the object created in the Pma objects tree. The maximum name length is 30 characters. This is a system name, so it must contain only alphanumeric and must not contain any diacritics (i.e. national dependent characters), empty string, spaces and the first character must not be a number.
Default: "eWon"
Service account identifierassigned identification code of service account
TokenUser account token
Demonstration of the communication and data processingCreates View folder for demonstration and testing of the communication and data processing
Save selected values into trendsCreates folders Trend and Cfg for configuration and trending of selected values
Number of trended valuesPlanned number of trended values
Data reading time periodThe period (in seconds) of repeated data reading
10 min
15 min
30 min
1 hour
2 hour
1 day

History:
Pm8.03.14: Created
Pm9.00.25: Fixed bug: The way of logging into the cloud (talk2m) has changed. Now the dt2mdevid and t2mtoken must be used (6/2023)
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.