Promotic

GetCount - method of the PmaCommGroup object

Description:
The method returns the number of transfers of this object.
Syntax:
Long GetCount(Long nType)
Parameters:
nType(Long) Specifies transmissions in this object whose number we want to get.
 
Number of transfers since data receive and data send:
0 - The number of all transfers (successul and failed) since the application launch (= GetCount(1) + GetCount(2))
1 - The number of all successful transfers since the application launch (= GetCount(11) + GetCount(21)).
2 - The number of all failed transfers since the application launch (= GetCount(12) + GetCount(22)).
3 - The number of latest failed transfers. This number is set to 0 after every successful transmission. (= GetCount(13) + GetCount(23)).
 
Number of transfers since data receive:
10 - similarly to 0 (= GetCount(11) + GetCount(12))
11 - similarly to 1
12 - similarly to 2
13 - similarly to 3
 
Number of transfers since data send:
20 - similarly to 0 (= GetCount(21) + GetCount(22))
21 - similarly to 1
22 - similarly to 2
23 - similarly to 3
Note:
By the term "transmission" is here understood the action that is finally terminated by the onDataReceive event. If the "Number of repeats after unsuccessful transmission" configurator is greater than 1 in the serial link parameters (or in the Ethernet parameters), then the message is repeated more times on error but from the point of this statistics it is just 1 transmission.
See also:
Example:
If communication error occurs 5 times in a row in this object, then notify (e.g. call the alarm, etc.)
JavaScriptVBScriptSelect and copy to clipboard

var oCommGroup = pMe.Pm("/Comm/Group1");
if (oCommGroup.GetCount(3) > 5)
{
// The action for warning the non-functional communication
}

History:
Pm8.03.29: Generalization for new parameter options 10-13 and 20-23
Pm8.00.00: Created
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

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