07-24-2012 09:59 AM
Hi Gang,
I need to run a third party application from within LabVIEW. It works fine when called with the system exec.vi as long as the user enters the correct data. However in certain (very difficult to determine) conditions, the application hangs up.
I want to be able to programmatically force the application to terminate and return to LV. I supposed there is a way to do this using the Windows API, but I don't know how to do that, and I would need a way to get the Windows handle of the offending application.
Short of re-implementing the app in LV, I'm out of ideas. I'll appreciate all help.
Thanks,
Roger
Solved! Go to Solution.
07-24-2012 10:17 AM
if you could post a pic of the offending code it would be great. but two things come to mind, if you want the code to carry on (for example go into a wait for a period then kill a task) wire wait for completion to false.
next is another command prompt call, look into taskkill /f
you can kill a process
hope it helps
07-24-2012 10:47 AM
Hello Akiel,
Thanks for your prompt reply!
The Windows command Taskkill seems promising. I'm going to experiment with that.
I'll advise as to how it works out.
Thanks!
Roger
07-26-2012 02:49 PM
I built a monitor vi that calls "TaskKill" and it works fine!
07-25-2024 03:19 PM - edited 07-25-2024 03:21 PM
I'd like to expand this, I'm calling an multiple SSH terminals that sometimes time out.
I'd like to:
How can I change the title of the System exec window so that I can distinguish it from other windows that have not timed out yet?
PS: I know about LabVIEW SSH library with a built in Timeout, but the behavior is different from System exec.