LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loop Control?

Hello all,

An application I have is to record 10 unique X,Y,Z positions from three
digital readouts. The positions change slowly, and then stop, so the
operator could easily input the values using controls on the vi front
panel.

I am attempting to build a 10 x 3 array with three numeric controls. I
can easily build the array if I simply place the controls in a FOR loop
with ten iterations, but the resulting array is rather useless, because
all the rows are identical to the first control values.
What I'd really like to do is change the values of the controls between
loop iterations, then just press a button to "send" the values to the
array being built.

Am I taking a foolhardy approach here?

Any help is appreciated!

Will Slade
Student,
Mech. Engineering
Univ. of Minnesota



Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 1 of 3
(2,937 Views)
You could use a "set" boolean to add the control value, via a case
structure, to the array. If the set is true, add the value.

Hope this helps.
eilerttl@npt.nuwc.navy.mil

slade_w@my-deja.com wrote:

> Hello all,
>
> An application I have is to record 10 unique X,Y,Z positions from three
> digital readouts. The positions change slowly, and then stop, so the
> operator could easily input the values using controls on the vi front
> panel.
>
> I am attempting to build a 10 x 3 array with three numeric controls. I
> can easily build the array if I simply place the controls in a FOR loop
> with ten iterations, but the resulting array is rather useless, because
> all the rows are identical to the first control values.
> What I'd really like to do is change the values of the cont
rols between
> loop iterations, then just press a button to "send" the values to the
> array being built.
>
> Am I taking a foolhardy approach here?
>
> Any help is appreciated!
>
> Will Slade
> Student, Mech. Engineering
> Univ. of Minnesota
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
0 Kudos
Message 2 of 3
(2,937 Views)
Hi,

Now, place a while loop inside of your for loop and surrounding your
input controls. Set up the new loop's condition so that every time you
press the "send" boolean the while loop ends. Now your updated values
will be used to build the your array. Use the "latch when released"
mechanical action for your boolean (or some other method to ensure that
only one set of values are passed per click.

note: Make sure that you place at least a 50 millisecond delay inside
of your inner loop.

eric

In article <8m9blu$r3m$1@nnrp1.deja.com>,
slade_w@my-deja.com wrote:
> Hello all,
>
> An application I have is to record 10 unique X,Y,Z positions from
three
> digital readouts. The positions change slowly, and then stop, so the
> operator could easily input the values using controls
on the vi front
> panel.
>
> I am attempting to build a 10 x 3 array with three numeric controls. I
> can easily build the array if I simply place the controls in a FOR
loop
> with ten iterations, but the resulting array is rather useless,
because
> all the rows are identical to the first control values.
> What I'd really like to do is change the values of the controls
between
> loop iterations, then just press a button to "send" the values to the
> array being built.
>
> Am I taking a foolhardy approach here?
>
> Any help is appreciated!
>
> Will Slade
> Student, Mech. Engineering
> Univ. of Minnesota
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 3 of 3
(2,937 Views)