Moxa DA-682A-C7-DPP [18/36] Da 682a dpp windows software customizable sample code

Moxa DA-682A-C7-DPP [18/36] Da 682a dpp windows software customizable sample code
DA-682A-DPP Windows Software Customizable Sample Code
4-3
3. Run the LED.exe program again, but this time, select the option 2 to set the LED value. At the next prompt,
enter the ID number (0 to 7) of the programmable LED that you want to activate, and when prompted enter
either 1 (to turn it on), or 0 (to turn it off).
Watchdog Control
The code for controlling the watchdog/COP timer is the simplest and least-customizable of the sample scripts.
The source code is available on the software DVD under
\examples\Example\C++\WatchDog\ and the
compiled executable
Watchdog.exe is available at \examples\Release.
You can modify this code to integrate the watchdog timer with specific applications. Using this code you can set
up programs where the watchdog timer will provide a last-line failsafe mechanism during application crashes.
For instance, the DA-682A-DPP 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.
The Watchdog Control Code Walkthrough
To test the watchdog executable, do the following:
1. Create the
c:\programs\examples folder on your computer (if you have not already done so) and copy
the
Watchdog.exe file from the software DVD into that folder. Run Watchdog.exe on the computer.
2. To keep the system from rebooting automatically, you need to press Enter at least once every 10 seconds.
3. To stop the watchdog and exit the program, press q.

Содержание

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

Скачать