LabVIEW Idea Exchange

About LabVIEW Idea Exchange

Have a LabVIEW Idea?

  1. Browse by label or search in the LabVIEW Idea Exchange to see if your idea has previously been submitted. If your idea exists be sure to vote for the idea by giving it kudos to indicate your approval!
  2. If your idea has not been submitted click Post New Idea to submit a product idea to the LabVIEW Idea Exchange. Be sure to submit a separate post for each idea.
  3. Watch as the community gives your idea kudos and adds their input.
  4. As NI R&D considers the idea, they will change the idea status.
  5. Give kudos to other ideas that you would like to see in a future version of LabVIEW!
cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos

Auto-indexing Tunnels and Multi-Dimensional Arrays

In their current form, Auto-Indexing tunnels only operate on a single dimension of an array.  For example.  If you input a 2D array, through an auto indexing tunnel into a for loop, and display the resulting 1D array in an indicator inside the for loop as below, you will always get the last row.

 

I'd like to see a feature where you can right-click on the tunnel or something, and set it to auto-index by column, instead of by row, and get the last column instead.20773i86B483107F51CD3820775i651136B201680B64

 

It could be as simple as an option in the context menu for the auto-indexing tunnel to say "Index by rows" or "Index by columns"  It gets more complex with 3D 4D and moreD arrays, but you could do something like a submenu flyout that says "Index By Dimension" > "1", "2", "3" etc

 

9 Comments
Knight of NI
Member

I think if nothing else, I made the idea more clear.

Knight of NI

Try this 'workaround'.

 

20783iAAA7FB95C0B60E67

Member

The only thing with that, is that it creates a memory copy of the 2D array at the transpose array node.  With very large arrays (such as those in the program I ran into this problem in) memory copies are a VERY bad thing.  Also, its not expandable to support 3D, 4D, and moreD arrays. (not that I can think of any reason to need a 5D or 6D array.  Thats just sillyness.)  Even 4D arrays seem like a bit much for most things.

Knight of NI

All valid points and I kudoed the original suugestion. My point was that I expect that the vast majority of users will never use anything greater than a 2D array and the transpose is sufficient.

Trusted Enthusiast

@ASInc wrote:
The only thing with that, is that it creates a memory copy of the 2D array at the transpose array node.

Maybe, maybe not. Check out AQ's comment, and Andrey's benchmark. Intuitively, one might assume a memory copy is made (and Show Buffer Allocations supports the theory a new allocation is made), but perhaps a flag is set on the 2D Array only to transpose the index interpretation? I would love to hear R&D jump in an give a definitive answer for whether Transpose 2D Array requires a new memory allocation.

Wirebird Labs: Expert Toolkits for LabVIEWDeploy, by Wirebird Labs: Expert Toolkits for LabVIEW
Member

I expect that it is as posted in AQ's comment.  The transpose only ACTUALLY transposes the data into a new memory allocation if shoved into certain constructs, or into a subVI.

NI Employee

I am going to decline this idea since there is a duplicate and it has more kudos. Please refer to the other idea to add kudos and raise the idea up the food chain.

NI Employee