LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure + while loop

Solved!
Go to solution

Hello, I'm trying to figure out for a half a day how to unite two while loops in attached VI

 

The first while loop creates solid state machine that reacts on each button press and executes one of the case structure events. (this part works fine)

 

The second while loop, all the time generates random number, but it stops the generation during the time when one of the case structure events are executed. (this is the ticky part)

 

Any suggestions?

0 Kudos
Message 1 of 5
(3,409 Views)

Are you saying that when you click mesure or save to execute one of the case, the parallel loop that generate random number will take longer than a second to generate a number?  On my PC, it works fine.  What kind of PC do you have?  If timing is critical fo for the random number generation loop, try a timed loop and set it to higher prioity to see does that help.  

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 2 of 5
(3,398 Views)

hello..... no you understood it wrong.... the paralell loop that generates the random number represents one of functions that should be stopped only while Measure, Save cases are executed....

0 Kudos
Message 3 of 5
(3,344 Views)
Solution
Accepted by topic author ku_ku

If you want your random number to stop while the user triggered events are executing you should be able to simplify your design quite a lot.

It can be done with one while loop using the timeout case.

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
Message 4 of 5
(3,329 Views)

Simple and exelent... Thank you!!!

0 Kudos
Message 5 of 5
(3,304 Views)