LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

question about while loop using Timer?

I am trying to use a while loop to read data from oscilloscope through
GPIB card continously(lasting for a fixed time, for example,1 minute). I
want a Timer, when it expires, the while loop will stop. But I do not
know how to implement it.

Any help would be greatly appriciated!

Thanks in advance.

zhljh



Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 1 of 2
(2,424 Views)
In article <87q5t2$7kh$1@nnrp1.deja.com>, wrote:

>I am trying to use a while loop to read data from oscilloscope through
>GPIB card continously(lasting for a fixed time, for example,1 minute). I
>want a Timer, when it expires, the while loop will stop. But I do not
>know how to implement it.

So, you need it to count down, then I assume? Okay, you need to put a
true/false node within your for loop. Set the true case to i=1 (iteration
of the for loop) so that it will initialize one time (and be true one
time). Then, add whatever time you need for the vi to run to that
indicator (where you send a numeric value on the first iteration). Put a
greater than comparison to the timer and the additoin of the indicator and
your value. Let that be the term
inating thing on your for loop.

Now, this might present a problem with a circular reference. If it does,
you'll need to basically do the same thing, only you'll need to send the
value through a shift register in the for loop.

Harry

--
0 Kudos
Message 2 of 2
(2,424 Views)