LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

elements from two FOR loop

Hello

 

I am having 2 FOR Loops. Both loops run for a particular number of times. Inside the inner loop, i am getiing a 2D array of 4  complex numbers each time when the loop runs. I need to get every element from this for the whole number of times the FOR loop is running. How is this possible? See attachment.

 

Thanks

 

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 1 of 16
(2,964 Views)

Right click on the tunnel and select "Disable Indexing".

 

Post if this is what you want.

 

Thanks,

Mathan

0 Kudos
Message 2 of 16
(2,960 Views)

Hello Mathan

 

I tried to "Disable Indexing" in both the loops and tried to get the output. But still am getting only the final 4 values. When running the VI i can see all the elements  but th efinal result is only the last 4 values.

 

Thanks

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 16
(2,953 Views)
See Attached VI...
Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 4 of 16
(2,934 Views)

Hm, i am unable to read what the vi should accomplish......maybe you can describe the purpose of that algorithm?

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 16
(2,924 Views)

Hello Norbert 

 

From the 2D array it takes values based on  x+y array indices. For each time the loop runs, 4 values from the 2D array is taken . I need to get all these values as one single 2D array.

Thanks

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 6 of 16
(2,912 Views)

Still, i am not certain if i understand your request. But i think that you should look into using shift registers.

 

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 7 of 16
(2,891 Views)

Hello  Norbert

 

I have also tried with shift registers. but didnt work. The actual situation is like this:

1) am having a set of calculations that gives 4 elements in a 2 D array based on some values. This is inside TWO for loop. Each time the loop is performed, 4 values are given out as output and this out put is interpolated to get a single value. What i need is to get all these set of 4 elements as a single 2D array.

 

 

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 8 of 16
(2,884 Views)

The problem is that your array handling is incorrect. You always extract a part from your original array and place it in the outputtunnel. Next iteration, the previous part is gone.... So either you place your interpolation into the array as well, or you can introduce a third dimension to "stack" those 2x2-arrays.

Like i said, i don't understand what you are up to in your VI, so i don't know if my suggestions fit to your task.

 

If you decide to explain what your application should do, step a little back and describe it without using any expression like "for loop"....

 

hope this helps,

Norbert 

 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 9 of 16
(2,880 Views)

Hello Nobert

 

Yes.. that is the problem.I always extract a part from your original array and place it in the outputtunnel. Next iteration, the previous part is gone.... So what do you mean by  introducng a third dimension to "stack" those 2x2-arrays???

 

 

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 10 of 16
(2,862 Views)