LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing Problems in loops. Please Help!

Solved!
Go to solution

In my attachment labview program, I am having trouble with my timing.  To give a background: I have random number generators putting out numbers, and every so often I hit my boolean button and it collects the numbers from the generator and finds the mean of the numbers and sends them to a spreadsheet.  But after the first time I press the button, if I press the button before 5 seconds after the first data is collected, it will only collect data until the 5 seconds after the last set of data is collected.      But, I press the button some time after the 5 seconds since the last set of data was collected, it will collect the numbers like usually, but it also collects the data from right when I press the button and then collects it after 5 seconds.  I do not want those numbers right when i press the button.

 

Is there something wrong with my timing that I get these problems?  Any help would be great!

 

Thanks in advance

0 Kudos
Message 1 of 3
(2,475 Views)
Solution
Accepted by topic author Thoene

Make the mechanical action of the button "latch when released".

 

In the innermost loop, wire a "equal zero" between the iteration terminal and the "reset" input of the elapsed time express VI. This will ensure that the timer resets whenever the loop starts.

 

Place a small wait in the big FALSE case. There is no need to check the button millions of times per second. You cannot click that fast anyway.

Message Edited by altenbach on 12-01-2009 04:45 PM
0 Kudos
Message 2 of 3
(2,464 Views)
It worked!   Thank you so much for your help!
0 Kudos
Message 3 of 3
(2,458 Views)