LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GUI inactive problem with my little program

I have a little program is attached. What I am trying to do is when Go button is clicked, subvi is fired and press stop button to stop subvi. Stop button value is passed to subvi by referece. But now the issue is when go button is clicked, the GUI is inactive, all button on interface is disabled.

I would appreciate you very much if anyone could find the reason.

Thanks.
Download All
0 Kudos
Message 1 of 3
(2,530 Views)
There were several problems.

Since you read the value of the Stop SubVI button at the beginning of the sub vi you won't get this to stop unless stop subvi is pressed before you start the subvi.

Since the subvi won't exit now, the event structure will not complete. In fact, if you look at the event structure's properties, you will see that the panel is "locked" while you wait on this event to finish. This means the LabVIEW will not process any more events until the structure completes. Since it never will, you will not recieve any other mouse clicks.

Speaking of the subvi not completing, it is generally not a good idea to call a subvi synchronously that runs indefinately inside the event structure. Instead, you should call the VI by invoke no
de and not wait for it to complete.

I have included a set of changes that I think makes the VI run a little better. A text file lists my changes, and the llb has the modified VI's. This is only one solution to this problem, and there might be better ways.
Download All
0 Kudos
Message 2 of 3
(2,530 Views)
Thank you so much for your very very valuable points. That makes my program more effective.

Thanks.
0 Kudos
Message 3 of 3
(2,530 Views)