LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

a question on while loop

i use while loop to realize some analysis, and want to
show the results of each iteration. I just put a digital
indicator outside of the while loop, however, no results
appear, but if I just move the indicator into the loop,
then everything works fine.



--
0 Kudos
Message 1 of 5
(2,932 Views)
If you put the indicator outside, it won't show anything until the loop is complete, and if you put it inside, it will show eah iteration result, deleting the previous one. If you want your data to be shown each iteration mantaining previous ones, you should use a shift register, and wire it across build array, adding inside data to it. This way you'll have a size incrementing array showing all results as they are created. You of course have to wire the shift register inside the loop.
Hope this helps
0 Kudos
Message 2 of 5
(2,932 Views)
If you are using Build Array in this way, you must right click on it and select Concatenate Inputs.
0 Kudos
Message 3 of 5
(2,932 Views)
Why not just enable indexing? Unless he really wants to the values while
he's still in the loop...


Gorka Larrea wrote in message
news:506500000005000000C1420000-1000509150000@exchange.ni.com...
> If you put the indicator outside, it won't show anything until the
> loop is complete, and if you put it inside, it will show eah iteration
> result, deleting the previous one. If you want your data to be shown
> each iteration mantaining previous ones, you should use a shift
> register, and wire it across build array, adding inside data to it.
> This way you'll have a size incrementing array showing all results as
> they are created. You of course have to wire the shift register inside
> the loop.
> Hope this helps
0 Kudos
Message 4 of 5
(2,932 Views)
You can use Control Refnums and Property nodes to view things out side a
while loop, while it is running. This is the new feature(of encapsulation)
of LabView 6i, but I have to tell you that it is somewhat complex and took
me a few days to get to understand all this stuff, especially since I'm
still hands on learning. But I think this is a great feature of 6i.
Khan

"Gh J" wrote in message
news:9oe5tn$6r9$1@charm.magnus.acs.ohio-state.edu...
> i use while loop to realize some analysis, and want to
> show the results of each iteration. I just put a digital
> indicator outside of the while loop, however, no results
> appear, but if I just move the indicator into the loop,
> then everything works fine.
>
>
>
> --
>
>
>
0 Kudos
Message 5 of 5
(2,932 Views)