02-19-2009 05:20 PM
My vi calls an executable (built from a vi but the vi is now lost) using System Exec. While the executable is running, my vi monitors the voltages put out by the executable and modifies them. Therefore the vi and executable need to run together; I wire "False" to "Wait until completion". I would like the vi to know when the executable has completed (run arrow goes white) or if that is not possible, to know if the executable has been closed. Is this possible?
Thanks,
Peg
02-19-2009 06:54 PM
It strikes me that there are several ways of doing this. You could monitor the Windows task list and see when the executable goes away. You could use VI server to try and open a reference to the executable and watch for the reference to go invalid.
Mike...
02-19-2009 07:41 PM
This seems promising. Some searching turned up "Get Task List" but this causes a broken arrow. I have LabView 7.1. Is there a similar vi compatible with 7.1?
Thanks, Peg
02-19-2009 07:49 PM
Why is the arrow broken?
Mike...
02-20-2009 04:19 AM
Because I had not put LVWUtil32.dll in an easily findable place! I think I have it now. The task list shows if the executable is open but not whether it is running. The executable's name disappears from the task list when it is closed. This might be good enough, though it would be nice if there was a way LabView could know if the executable has finished, even though it is still sitting there open. And maybe even close it.
Thanks,
Peg
02-20-2009 06:11 PM
Well, there's my other suggestion - use VI server to connect to the application and use that connection to tell when the program stops or tell it to stop.
Mike...
02-22-2009 06:09 AM