Update cookies preferences
Promotic

WDogRefresh - method of the Pm object

Description:
Refresh of the WatchDog program counter.
Syntax:
Empty WDogRefresh(Long nProgram, Long nCounter)
Parameters:
nProgram(Long) Number of the application (from 1 to 5) in PmWatchDog.ini
nCounter(Long) Value which the WatchDog counter is set to
Note:
WatchDog.exe is a program that watches up to 5 applications. Each application can have set up its own counter in the WatchDog program. WatchDog decreases these counters in regular period (decrements the value by 1). If some counter reaches the value 0, then the WatchDog presumes that the application stops off (the application halted or somebody terminated it, etc.) and restart it over again (or restart the whole Windows OS).
So as the WatchDog wouldn't restart the PROMOTIC application, the application must regularly call the WDogRefresh method. This application sets its counter in the WatchDog program to the nCounter value. The nCounter value must be big enough so as the WatchDog wouldn't zeroized the counter before the application calls the WDogRefresh method over again.

This method is not functional in Web panels.
Example:
In the PmWDog.ini configuration in the [Global] section it is set the key: Period=1000 (i.e. WatchDog will decrement the counters every 1000 ms) and this application is specified in the [Program1] section. Then this application will call every 10 seconds (e.g. in the PmaTimer object) the method:
JavaScriptVBScriptSelect and copy to clipboard

Pm.WDogRefresh(1, 20);
By this the program1 counter is set to 20 every 10 seconds. WatchDog will decrease this value every second. If the application is halted, then the WatchDog would restart it by 20 seconds.
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- LN2
- PI
- Pow
- Sin
- Tan
- WDogRefresh
 
 
© MICROSYS, spol. s r.o.