LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview System Exec.vi execution problem

Any one knows how to get around with this problem?:
When System Exec.vi is called/executed, all other .vi executions are halted.

In general, two .vi files can be run or multi labview functions in same vi can be executed at the "same time". But when a vi uses System Exec.vi (such as executing a shellscript), all others labview activities would be halted until all the shell executions are finished. I need help on get around with this problem. Thanks in advance for any input.

....Julia
0 Kudos
Message 1 of 13
(4,950 Views)
Have you tried wiring the Wait Until Completion input of System Exec.vi False?
Message 2 of 13
(4,950 Views)
This could also be a multitasking issue. If the program being run doesn't allow multitasking everything could stop until it finishes.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
Message 3 of 13
(4,950 Views)
Thanks for responding! ....Yes, I have tried. The result from wiring the Wait Until Completion Input to False is THE Shell execution would be terminated. Which means if I ask the shellscript write some data into a file, it would NOT do it. BTW, I am using Linux version of LV.
0 Kudos
Message 4 of 13
(4,950 Views)
If it is a multitasking issue, I need to find a way arround. What I cannot explain is if I had two indepent VIs (with while loop to produce simple tasks) running, I don't see any of them been halted. If one of them called System Exec.vi, the other one would be until System Exec.vi frees. .....I am a new LV user.
0 Kudos
Message 5 of 13
(4,950 Views)
Not sure if I got this right(?). But, sometimes when using system exec.vi, I have put it into a sequence together with a wait(ms). Then the program called will have time enough to startup before continuing.

-R
0 Kudos
Message 6 of 13
(4,950 Views)
Wait Until Completion = FALSE should not stop the shell script from being executed. But it might cause a problem in your loop if you try to start the script again before the previous run was complete. You could try putting a breakpoint on the loop itself, executing one iteration then pausing and checking if the script executed.
Why do you need to run a shell script? Are there functions in the script that you can't do in LabView? You mentioned writing data to a file. LabView can certainly do that. Where does the data come from that gets written to the file?
I'm sorry I don't know anything about Linux and its scripts, its multi-tasking, or the version of LabView for it.
0 Kudos
Message 7 of 13
(4,950 Views)
I got my issue solved. ... It is true that the "wait until completion" must be wired and set to false. However, the shell script (I use Perl) shall not call another script. I let one script involke another one. That is the problem!

Thanks for all the responses! and hope this will help others in future

...julia
0 Kudos
Message 8 of 13
(4,478 Views)
You are seems very knowledgeable about LV. Thank you for all the inputs!!!! ...... Answer to your Q: there is another computer which collects real data and put them into a file. I use script to start/interface another PC, and we need to monitor/display the live data. Shell script is the only way I could think about now to interface the other PC.
0 Kudos
Message 9 of 13
(4,950 Views)
With LabView, you really have a lot of options. You could have LabView (or an executable built by LabView) running on both PCs. You could use remote panels to control the remote application. You can use globals or datasocket to exchange data. You can use shared directories to exchange files.
Search this site for "datasocket" or "remote panel" and you'll find a lot of discussion about these topics.
If the data collection app is already built and you don't have the time to rewrite it in LabView, can you modify it? If the compiler for the remote app supports datasocket, you could use datasocket to tell the remote app what to do. Or, if your response can be slower, you could pass commands and data back and forth in files in shared
directories.
0 Kudos
Message 10 of 13
(4,950 Views)