12-01-2009 06:11 PM
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
Solved! Go to Solution.
12-01-2009 06:43 PM - edited 12-01-2009 06:45 PM
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.
12-01-2009 07:02 PM