LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

user interface

Hi,
 
I had some problems with my user interface.While the programme is running i cant seem to be able to halt my programme from the user interface. Hope u guys could help me with it.
 
Thanks.Smiley Happy
 
 
0 Kudos
Message 1 of 5
(2,823 Views)

Your stop is not wired to anything but since your VI only runs once, there is nothing to stop.Smiley Wink

The only way your VI will run continuously is by using the Run Continuous button on the toolbar and that is not the correct way to run a VI. That button is just for special debug purposes. Put a while loop around your code and wire the stop button to the conditional terminal of the while loop. You could also use an event structure where you have a value change event for the start button and a value change event for the stop.

Message 2 of 5
(2,810 Views)
Hi ou,

I have modified (added a while loop which connects to your stop button) your code so now you should be able to halt from user interface. What you had before was not a loop, hence your code just ran once. Hope you find the attachment of some help.
EDIT : Just as Dennis suggested!
Regards,

Message Edited by Kabul on 09-13-2007 09:33 AM

0 Kudos
Message 3 of 5
(2,784 Views)
hi, Kabul
I have seen the TRY!.vi, I found some problem that while loop can not stop unless for loop finish its loop.
 
I once meet the problem when I what to stop a loop. its occur often at Multi-thread. How can u deal this problem
thank u
 
fay
0 Kudos
Message 4 of 5
(2,771 Views)
Hey fay,
What you can do is replace the for loop with the while loop. You cannot terminate a for loop before the iterations are done unless you use LabVIEW 8.5.
Here is an example using event case. You can exit from the program when you press the stop button.
Regards,
0 Kudos
Message 5 of 5
(2,759 Views)