GetCount - method of the PmaComm 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.
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
2 - The number of all failed transfers since the application launch
3 - The number of latest failed transfers. This number is set to 0 after every successful transmission. |
---|
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 oComm = pMe.Pm("/Comm");
if (oComm.GetCount(3) > 5)
{
// The action for warning the non-functional communication
}
Dim oComm
Set oComm = pMe.Pm("/Comm")
If oComm.GetCount(3) > 5 Then
' The action for warning the non-functional communication
End If