Hi,
Most UPS's have a serial connection that can be read by LabVIEW. By studying
this protocol, LabVIEW can close itself. It's the most decent option.
Another option is to make a vi "Stop All" that is set to auto-run. This VI
stops (and closes) all top level vi's, exept itself. You can start this vi
with a command line ("c:\program.....\LabVIEW.exe "stop all.vi"" or
something), even when LabVIEW is already running. The vi will stop all
running vi's. If you need a gracefull shutdown, you can have the started vi
set a global (or pref. a buffer) that is used by the main program. You can
even let the started vi generate a dynamic event, but that is a bit harder.
To my own supprise, this also works with the executable (I tried it with a
buffer). Just use main
.exe instead of labview.exe.
The last option is to communicate using windows. You can use memory mapped
files, windows messages, or even a normal file.
Regards,
Wiebe.
"Daniel_Chile" wrote in message
news:506500000008000000E4FC0000-1079395200000@exchange.ni.com...
> Hi. I developed a DAQ application in LabView 7.1 which is intended to
> be running 24 hours a day. The PC is protected with an UPS which can
> safely shutdown WinXP in case of power failure.
> Now, before ending windows I would like (I really NEED) to end my
> program safely by means of a windows command or something like that,
> issued by the UPS. I mean, I need to tell my UPS how to end my
> program.
>
> Note: By now I'm running my VI from LabView, but soon I will complile
> it as a stand alone application (with the application builder).
>
> Thanks.