LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

When calling command.com from System Exec.vi LabView hangs

I am using labView 6.0.2 with Vectra VL6 and Windows98. I can use System Exec.vi to launch any WINDOWS application. When used with DOS, even with very simple batch file, like: dir, pause - system hangs. The same when calling command.com.
0 Kudos
Message 1 of 5
(3,846 Views)
This type of hang is often a result of running the System Exec.VI with the "Wait Until Completion" input set to True, which is the default value. Windows applications return a system event that LabVIEW recognizes when they are terminated, so when they close the vi can finish. Most DOS executables will not create this event when they terminate, so LabVIEW has no way of knowing that it can proceed. The easy way around it is just to set the "wait until completion" input to false. If you wan't your DOS executable to finish before LabVIEW continues, you will have to insert a delay into your LabVIEW program or find some other way of detecting that the executable has finished.
0 Kudos
Message 2 of 5
(3,846 Views)
You might try using the VI's that are available in: lvwutil32.zip. You can get this file from the NI site. It gives you a lot more Windows control functions and another version of System Exec. Try the "Run Application.vi" for your DOS programs. We had to go with this one on our NT machines.
Message 3 of 5
(3,846 Views)
I can't find this lvwutil32.zip file at NI site. Please help.
0 Kudos
Message 4 of 5
(3,846 Views)
Okay, I have attached the labview Win utils file below. I hope that this helps.

Rob
Message 5 of 5
(3,846 Views)