Configuration of communication with eWON
This preconfiguration can be activated when creating a new object (e.g. by "New object ..."
in the local object menu or after pressing the Insert
key after selecting the object) and is included in the group: " / Communication / eWON - PLC device"
This preconfiguration can be created in the object: PmaFolder
The preconfiguration creates an object of the PmaFolder
type that contains following objects:
object) provides communication interface for selected devices connected to cloud
object) allows searching for connected devices (eWONs), reading names of variables and their current values, and writing new value(s) into selected variable(s).
object) object prepared for processing data from specified device
object) object prepared for periodical communication
In the "GetAuthentication"
method of the PmaFolder
object there are all login entries requested for cloud service access.
This object has a communication interface consisting of three methods:
RequestEwons - returns a list of devices
RequestGetCsvData - for detecting current status of all variables of selected device
RequestSetCsvData - for writing data into single or multiple 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 by the methods ReplyEwons
of the object that was defined by the oRcv
parameter. The corresponding method must exist in this object.
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 data 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 has interface prepared for processing data received in methods ReplyGetCsvData
. 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
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 names of variables existing in selected eWON
. These variables can be imported into the object on the "Data
" tab by the "
" button 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
Allows periodical refresh of current data by calling the "RequestGetCsvData
" method of the data1
These configurators can be set before the preconfiguration is created:
|The name of created object||Name of the object created in the tree of Pma objects. The maximum name length is 30 characters. This is a system name, so it must contain only alphanumeric and must not contain any diacritics, empty string, spaces and the first character must not be a number.
|Service account identifier||assigned identification code of service account|
|Account name||User account name|
|User||Account login name|
|Password||Account login password|
|Object scripting language||Application object scripting language|
0 - vbscript
|Demonstration of communication||Creates View folder for demonstration and testing of communication|
|Data for reading the values of variables||Creates objects data1 and Timer1 for reading values of variables|