Update cookies preferences
Promotic

GetLastRefresh - method of the PmaPanel object

Description:
It is used for obtaining the time when this panel requested data (locally or on the Web) for the last time.
Syntax:
Date GetLastRefresh()
Note:
This way it is possible to determine whether the panel is currently open (locally or on the Web) and then, for example, modify the communication period.
See also:
Example:
The script in the PmaTimer.onTick event sets the communication period depending on the open/closed "MainPanel".
JavaScriptVBScriptSelect and copy to clipboard

var nGetLastRefresh = pMe.Pm("/MainPanel").GetLastRefresh();
var oCommGroup = pMe.Pm("/Comm/Group");
var nSecRefresh = 3;   // x second
var nTimeOut = Pm.Time - (1 / 24 / 60 / 60) * nSecRefresh;

if (nTimeOut > nGetLastRefresh)
{
Pm.Debug("slow communication");
oCommGroup.UpdateRate = 5000;
}
else
{
Pm.Debug("fast communication");
oCommGroup.UpdateRate = 1000;
}

History:
Pm9.00.11: Created
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

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