LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

System Exec Hang

Hi.

Im programming a application for a analyser. I sample data and stores them via a system exec call to a databaseclient. The thing is that every time I get to the system exec the whole gui stops working until system exec is finnished. This is what I would expect. However when I then moved the system exec to another while loop and sent the data over to the new while loop even this caused the whole gui to hand.

I then did some research here in the forum and found out that others had the same problem as I. It was in thouse threads suggested that a solution would be to create a second program that would take care of the system exec vi and then communicate with that program thru TCP-vi:s.

Said and done. I made another program just for the system exec vi and set up a tcp between the two. To my dissmay I found that program #1 still hanged when program #2 executed system exec vi.

How is this possible? Is there a way around this problem? Im getting desperate. 😞

(The application is running on a linux system)


Best regards

Andreas Beckman
0 Kudos
Message 1 of 5
(3,672 Views)
Are you set Wait until completion to true ? Try set it to false.


George Zou
http://gtoolbox.yeah.net
George Zou
0 Kudos
Message 2 of 5
(3,658 Views)
What sort of "databaseclient" are you sending the data to? Perhaps you could bypass the whole System Exec thing.

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 3 of 5
(3,651 Views)
Hi.

Zou: I must have some confirmation that the data has been sent. If I wire it false the standard error and standard output will be lost. I have however tried this and it does work if you have a very very smal command line input. But it seemed unstable and sometimes crashed the whole gui.

Mike: Im using postgresql:s client called psql. If you know anything you can use for linux to hook up to a database let me know. Im quite satisfied with the psql & system exec vi combination just now. Reading data is ok because the user will anticipates a smal load time. But when I sample data in the background of the GUI and it hangs the user thinks the code is crap or the computer running it is too slow. And neither is the case.

I have looked at the cpu consumption of booth the main GUI and the second program I wrote as well as the system exec vi and they dont use up more than maybe 1.3 % of the total cpu usage.

All help apprciated.


Best regards

Andreas Beckman
0 Kudos
Message 4 of 5
(3,642 Views)
>I must have some confirmation that the data has been sent. If I wire it false the standard error and standard output
>will be lost. I have however tried this and it does work if you have a very very smal command line input. But it seemed
>unstable and sometimes crashed the whole gui.


Standard output can be redirect to a text file.

Wait or not wait on completion should not effect command line length, and stable of gui. Try to put a big delay there
before continue run your program.

There are other way to wait for the DOS close without causing LabVIEW hang, if it'll close itself.

George Zou
http://gtoolbox.yeah.net
George Zou
Message 5 of 5
(3,627 Views)