LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

system exec & win98

hi,

I am trying to call a batch file from my labview program under win98 (the strange thing is, that what I want to do worked under win2000, but the machine it is intended for has win98 installed. ).

when I set the "wait until completion" value to false the batchfile is executed correctly, but if I set it to true the system exec hangs up.
I need to put the value true because I want to have something given back from the execution.

does anybody know help about this?

mfg
markus
0 Kudos
Message 1 of 4
(2,713 Views)
Hi Markus,

it kind of depends on what you`re doing with the batch file....

If you let us know what the batch file is doing, then maybe someone can offer some good advice.

Shane
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 2 of 4
(2,713 Views)
well, in a testing batch file, it just inserted
dir c:. that did not work.
but the real aim is to call a dos program that talks to a analog-digital-card and read some data. we tried to compile the source code under visual c to get a DLL that we can use directly in labview. but memory allocation under windows is terrible, so without going through the code there is no possiblity to get to a quick (last days of a 2 week student project) solution. so we tried the workaround with the dos program an the system exec call.

mfg
markus
0 Kudos
Message 3 of 4
(2,713 Views)
A trick to using Wait Until Completion is shown in a note on the front panel of System Exec.vi.
"Note: If wait until completion? is False, standard input, output, and error will be ignored." If wait until completion is TRUE, input is taken from the Standard Input string control instead of the keyboard. So there's more to it than just waiting for completion: it determines where the input comes from and where the output goes. If your program expects some keyboard input and you don't provide it in the Standard Input string control, the program might proceed when you expect it to wait or it might wait forever for input that's not coming.
For some interactions between programs called by System Exec.vi and LabView, I have the called application create a file
when it's done. LabView can be in a loop checking for the existence of the file using File/Directory Info from the File I/O >> Advanced File Functions function palette. If the file doesn't exist, File/Directory Info will generate an Error Out. The loop will check Error Out and stop if no error was generated.
See the attached VI and batch file.
Download All
0 Kudos
Message 4 of 4
(2,713 Views)