Moxa DA-685-W7E [21/38] The led control walkthrough

Moxa DA-685-W7E [21/38] The led control walkthrough
DA-685 / W7E Customizable Sample Code
5-3
The LED Control Walkthrough
The DA-685 is designed with 8 programmable LEDs that integrators and system administrators may customize
for system notification needs. The source code for controlling LED behavior is located in the folder <Software
DVD>\examples\Example\C++\LED\, while the compiled executable LED.exe is located under <Software
DVD>\examples\Release. You can follow the steps below to test the LED control script, or you may freely
modify the control script to create customized patterns that are associated with specific system events. To
review the LED control code, see The LED Control Script section in Appendix A of this manual.
5. Create the c:\programs\examples folder and copy LED.exe into that folder. Run LED.exe.
6. You will be presented with a menu of three choices; first, select1 to display the LED’s current status.
7. In the screenshot below, the user has selected 1 and is viewing the current status of all LEDs. The value
0shown next to each entry indicates that all of the LEDs are currently turned off. Visually verify this by
examining the DA-685’s front panel.
8. You may now run LED.exe again, but this time select 2. At the next prompt, enter the ID number (0 to 7)
of an LED to activate, and when prompted enter either 1(to turn it on), or 0(to turn it off). The LEDs on the
main DA-685 panel correspond to 0 through 3; 4 and 5 correspond to those on the first module; and 6 and
7 to those on the second.
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

Содержание

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

Скачать