Moxa DA-683-SP-XPE [20/35] The watchdog control code walkthrough

Moxa DA-683-SP-XPE [20/35] The watchdog control code walkthrough
Watchdog Control Code
The code for controlling the watchdog/COP timer is the simplest and least-customizable of the included sample
scripts. The code itself is provided on the software DVD, under \examples\Example\C++\WatchDog\
,
and the executable file Watchdog.exe is on the software DVD\examples\Release. This sample code may
be modified to integrate the watchdog timer with specific applications
Using this code, any program may be set up so that the watchdog timer will provide a last-line failsafe against
application crashes. For instance, the DA-683 may be set up so that whenever a mission-critical application
fails the watchdog timer will send a message to a system administrator and then initiate an automatic reboot.
To test the watchdog executable, follow the steps below.
The Watchdog Control Code Walkthrough
1. If you haven’t yet, create the folder c:\programs\examples, then copy over Watchdog.exe and run
the script.
2. To keep the system from rebooting, press Enter at least once every 10 seconds, or the system will reboot
automatically.
3. To stop the watchdog, press q to exit the program.

Содержание

Похожие устройства

Скачать