onDataSend - event of the PmaCommGroup object

The event is triggered after sending the data to communication.
The event is triggered even if the communication failed (the value was not sent).
For now, the event is always triggered after sending one variable (i.e. in the pEvent.Items parameter there is always only one item).
This is because sending the variable is done immediately after writing the value to the variable and if it is written to two variables, two communication messages are sent and the event is triggered twice.
In the future, however, it is planned to make it possible to send multiple variables in one message and therefore the pEvent.Items parameter of the Array type.
pMe(Object) Reference to the PmaCommGroup object where the event rises.
pEvent(Object) Reference to the object describing detailed information about the specific event.
pEvent.Items - (Array) [for reading] Each item of the array represents the "data extension ExtComm" object of the variable that is defined either in the PmaCommGroup object or in the PmaData object.
There is only one item in this array (for now).
pEvent.ErrorCount - (Long) [for reading] The number of items in the array pEvent.Items that were not sent.
At this momeńt you can see here either the number 0 (the item has been sent) or number 1 (item failed to send).
See also:
JavaScriptVBScriptSelect and copy to clipboard

var aItems = pEvent.Items;
Pm.Debug("PmaCommGroup.onDataSend: Size=" + aItems.GetSize(1) + ", ErrorCount=" + pEvent.ErrorCount);
var oItem = aItems.GetItem(0);
Pm.Debug(" Name=" + oItem.Var.Name);
Pm.Debug(" ItemId=" + oItem.ItemId);
Pm.Debug(" LastSendValue=" + oItem.LastSendValue);
Pm.Debug(" LastSendError=" + oItem.LastSendError);

Pm9.00.21: Created
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

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