LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2d array to multiple 1d arrays

I have a problem where i want to extract a column or row from 2D array into a 1D array. I know i can use Index Array, but i'd like it in a loop or made somehow better than i have it now. The View1-10 are columns where i want the data to be shown. The data in the foor loop is controlled by 2 combo boxes which each control one of the views. Earlier i had the subvi populete_view.vi as many times as i have View columns, but then i thought of making the whole flow better.

So any suggestions on how i should go forward.
0 Kudos
Message 1 of 6
(3,967 Views)
It's not completely clear what it is that you're trying to do since we have nothing to look at. You're referring to things that are specific to your application, and "views" are meaningless to us. However, it sounds like you need to auto-index a for-loop from your 2D array. Please post a picture or the VI to make this a bit more clear.
0 Kudos
Message 2 of 6
(3,951 Views)
Can't find the attach button for the attachment....
0 Kudos
Message 3 of 6
(3,940 Views)
Looking at the picture, it is still not clear what you want. Where do you want to substitute a loop?
 
"Index array" seems to be the right tool. Just resize it to get several rows/columns at once.
Message 4 of 6
(3,935 Views)
Hei Englund,
 
since you want to have an indicator for every 1D array extracted, there is no easy programatical way to add "on the spot" indicators. ( veterans please teach me! i have in mind to use template vi's wich would get opened if the array is not empty).
 
Anyway your best bet is to set in advance a number of indicators, and after that see which one are empty en hide them (easily done via a property node on the indicator).
what i dont understand is why would you want to actually show the arrays and not just use the 2D array as is for futur operations...
 
Dont forget to rate!
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 5 of 6
(3,928 Views)
Thanks,
I've wondered about the same problem earlier, but didn't realize that i can resize the index array. Resizing the index array solved the problem.
0 Kudos
Message 6 of 6
(3,910 Views)