Moxa TC-6110-LX [48/74] T sensor control code

Moxa TC-6110-W7E [48/74] T sensor control code
TC-6110 / Windows 7 Customizable Sample Code
5-4
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\project\WatchDog\, and the
executable file Watchdog.exe is on the software DVD
\examples\TC6000Release. 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 TC-6110 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. The program will return
*pdwPortVal = 0x80; this means the watchdog function is enabled and counting
down. To keep the system from rebooting, the user will need to press Enter at least once every 10 seconds,
otherwise the system will automatically reboot.
3. To stop the watchdog, press q to exit the program. The watchdog timer control will return
*pdwPortVal
= 0xc0
, indicating that the watchdog timer is now disabled.
T-Sensor Control Code
The TC-6110 computer comes with built-in, independent temperature sensors that may be customized for
automated responses. The temperature sensor sample code may be found on the software DVD under
\examples\project\TempSensor\, and the executable file TempSensor.exe will be under
\examples\TC6000Release.
Follow the steps below for a walkthrough on using TempSensor.exe to return thermometer values.
The sample code for reading temperatures is included in Appendix B of this manual, under
The Temperature
Sensor Control Script.
Walkthrough for Reading Temperature Values
1. If you haven’t yet done so, create the folder c:\programs\examples then copy over
TempSensor.exe.
2. Insert the TC-6110 SATA expansion module into slot 1. Leave slot 2 empty.

Содержание

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

Скачать