LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event driven structure

Solved!
Go to solution

hi all

plz have a look at my VI.... 

what i am doing in it is using the even structure to control an event which is that when i press the botton i start gettin random elements from the array that i have bulid. but i cant get to stop the inner while loop in the first event  when i press the stop botton ... what am i doing worng ... and if a remove the while loop it only run the loop once. i want to continously run the event till the time i press the the stop or any other botton .

 

regards

Regards
0 Kudos
Message 1 of 5
(3,250 Views)

1.  Don't put a while loop inside of an event structure.  An event case should only take a short amount of time to run.

2.  You have the the event cases set to lock the front panel until the event is complete.  The main cause of your problem.

3.  Having multiple stop buttons just confuses things.

Message 2 of 5
(3,245 Views)

hi 
thnx now it works.... but is there any way else to do it .. meaning i want to continously run the code under the GO event ..till the time i stop the Vi so thats y i put the code in the while loop is there any way else to do it without the while loop ?

 

regards

Regards
0 Kudos
Message 3 of 5
(3,239 Views)
Solution
Accepted by topic author nolsqn

All you need is one loop: the outer while loop. You can manipulate the timeout to conditionally generate your values.

 

Here's a quick example. See if it makes sense. 🙂

 

 

Message 4 of 5
(3,230 Views)

it perfectly makes sense...

 

thankyou works perfectly

 

regards

Regards
0 Kudos
Message 5 of 5
(3,225 Views)