Configuration of the communication with
eWON.
This preconfiguration can be activated when creating a new object (e.g. by
"New object ..." in the context menu of the object or by pressing the
Insert key after selecting the object).
This preconfiguration is included in the
"/ Communication / PLC devices and meters / eWON" group.
This preconfiguration can be created in the
PmaFolder,
PmaRoot or
PmaPrototype object.
The preconfiguration creates an object of the
PmaFolder type that contains following objects:
Comm - (
PmaFolder object) provides communication interface for selected devices connected to cloud
View - (
PmaFolder object) allows searching for connected devices (eWONs), reading variable names and their current values, and writing new value(s) into selected variable(s).
data1 - (
PmaData object) object prepared for processing data from specified device
Timer - (
PmaTimer object) object prepared for periodical communication
In the
"GetAuthentication" method of the
PmaFolder object there are all login entries requested for cloud service access.
Comm -
PmaFolder This object has a communication interface consisting of three methods:
RequestEwons - for obtaining a list of devices
RequestGetCsvData - for detecting current status of all variables of selected device
RequestSetCsvData - for writing values into one or more variable(s) of selected device
There is a subobject in this folder of the
PmaSequencer type that provides the communication functionality. The result of successful communication is then processed into the methods
ReplyEwons,
ReplyGetCsvData or
ReplySetCsvData of the object that was defined by the
oRcv parameter. The corresponding method must exist in this object.
View -
PmaFolder The
PmaFolder object has methods that are required by the communication interface of the
Comm object described above. Methods for processing received data
Reply ... write into variables of the
data subobject. These are then used for processing and displaying returned values in the panel. The "
PanelTest" testing 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. It also allows to detect the settings and export a list of variables of selected
eWON for further parametrization and import of variables into the
data1 object.
data1 -
PmaData The
data1 object has interface prepared for processing data received in the method
ReplyGetCsvData and
ReplySetCsvData. The
"RequestGetCsvData" method can be called without parameter but the
"RequestSetCsvData" method is prepared for changing the value only of a single variable (parameters
itemName and
itemVal).
In order to achieve correct functionality of the data1 object, it is necessary to:
- Define the name of specified device (eWON) together with corresponding login name and password in the "eWonAuth" method. These entries are available in the PanelTest panel after successful communication by the getcsvdata method with selected eWON
- Create a list of variables with names that correspond to the variable names existing in selected
eWON. These variables can be imported into the object on the "
Data" tab from the
DataVars.csv file. The file is created after pressing the
"Export Settings" button in the
PanelTest panel after successful communication by the
getcsvdata with selected
eWON.
Timer1 -
PmaTimer Allows periodical refresh of current data by calling the
"RequestGetCsvData" method of the
data1 object.
These configurators can be set before the preconfiguration is created:
The name of created object | Name of the object created in the Pma object 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 first character must not be a number.
Default: "eWonM2Web" |
|
Service account identifier | assigned identification code of service account |
Account name | User account name |
User | Account login name |
Password | Account login password |
|
Demonstration of the communication | Creates View folder for demonstration and testing of the communication |
Data for reading the values of variables | Creates objects data1 and Timer1 for reading the values of variables |
---|