LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout of system exec vi

I'm using the system_exec vi to to send commands to the unix shell. There is the possibility that the shell command may idle for a long time, and i'd like to abort the subvi that calls system_exec (i.e. return to the main calling vi with a timeout error) if the time exceeds a certain value. How can i do this?
0 Kudos
Message 1 of 4
(4,155 Views)
XopWat,
I've just kinda brain stormed something that may help out. Have your system_exec.vi in parallel with a while loop that is keeping time. If a certain time is met, then a timeout has occured and then execute a second system_exec.vi that shuts down the unix shell. Now I'm no unix guru by any means, but I believe there is a command called "killall" that can shut down whatever was going on in your shell. Post to let us know if that helps!
 
Best Regards,
 
Chris C
Applications Engineering
National Instruments
0 Kudos
Message 2 of 4
(4,131 Views)


@Chris_C. wrote:
XopWat,
I've just kinda brain stormed something that may help out. Have your system_exec.vi in parallel with a while loop that is keeping time. If a certain time is met, then a timeout has occured and then execute a second system_exec.vi that shuts down the unix shell. Now I'm no unix guru by any means, but I believe there is a command called "killall" that can shut down whatever was going on in your shell. Post to let us know if that helps!
 
Best Regards,
 
Chris C
Applications Engineering
National Instruments




Thanks for the advice, but this doesn't seem to work. The problem is, the whole vi hangs waiting for the first system_exec to complete. But, thanks for the idea.
0 Kudos
Message 3 of 4
(4,123 Views)
XopWat,
I'm sorry my suggestion didn't seem to work out. I did however find another discussion forum that I think could definitely help out titled "Is it possible to time out the 'System Exec.vi'? ". Check it out and let us know what you think.
 
Best Regards,
 
Chris C
Applications engineering
National Instruments
0 Kudos
Message 4 of 4
(4,111 Views)