LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can LabView know when executable has finished?

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

0 Kudos
Message 1 of 7
(3,003 Views)

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...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
Message 2 of 7
(2,992 Views)

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

0 Kudos
Message 3 of 7
(2,985 Views)

Why is the arrow broken?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
Message 4 of 7
(2,983 Views)

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

0 Kudos
Message 5 of 7
(2,958 Views)

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...


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 6 of 7
(2,930 Views)

Hi Peg,

 

You can use .net function in Labview to execute/call the exe and know the status of the executables.whether it is still running or finished executing.

 

 

Rgds,

Venky

0 Kudos
Message 7 of 7
(2,907 Views)