LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communicate with LabVIEW RunTime Application

Hi all.
 
I have an application created in LabVIEW, and I built an executable file from it (Let's call it App1.exe).
 
While App1 is running it sometimes generates an exception and is aborted. The problem is that the Run-Time APP1.exe GUI remains open (Which is undesirable). I need a way to close it somehow. I realized that the only way to close it is from another application (Let's call it App2).This solution can be realized in 2 different ways:
 
1) App2 communicates with App1 and closes it if App1 is not alive. The problem is that sometimes App1 is simply working slowly because of system problems and I might shut it down even though It's still running
 
2) To somehow obtain from the Run-Time engine what's the state of App1. I think that this way is preferable but i don't know how to communicate with the Run Time Engine.
 
I'll appreciate any suggestions (Preferably with some kind of example code)
 
Thanks, Nadav 
 
P.S. I'm using LabVIEW 8.2.1.
0 Kudos
Message 1 of 3
(2,714 Views)
Can you get App1.exe to regularly update a global variable on and off like a heart beat. Use App2.exe to monitor the heartbeat global variable from App1.exe and kill it if it stops.
Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 2 of 3
(2,637 Views)
What do you mean that it is "causing an exception"? Typically, an exception is a pretty serious failure that would kill the runtime engine too (thus closing all windows associated with it). What sort of error is stopping your application, but not the runtime engine executing it? It sounds like you possible have an internal error state that you haven't handled adequately. Part of the handling for a non-recoverable error should be orchestrating an orderly shut down of the application.

For what it's worth, if the runtime engine is still alive you can connect to it using VI Server and ask the execution state of the top-level VI. If it comes back "Idle" your code has stopped.

Mike...

Message Edited by mikeporter on 05-21-2007 12:43 AM


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 3
(2,634 Views)