LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Transposing Array Problem

I need to get the information from a table which has been populated at an earlier point in the program, and convert it to numbers, and then break it up into its individual elements. Both ways of doing this in my attached vi work, but the one method throws three 0's in between columns, when I resize the 2D array to 1D. Any idea why? Is there an easier way to go about this?

Thanks, Geoff
0 Kudos
Message 1 of 4
(2,685 Views)
A workaround I can think of is to creat a Property Node of the table and wire the NumRows and NumCols to Array Subset vi's Row's length and Column's length respectively that is used with the array after being transposed. This will trim off the extra 0's you get after using the Transpose 2D Array.vi.
Message 2 of 4
(2,673 Views)
Your original table contains 3 extra row which generate 3 rows of zeroes. Your 2D array actually contains 35 elements. the reshape function truncates to 20 elements. After transposing, you throw away nonzero elements while before rehshaping all zeroes are in the tail giving the false apperance of correct behavior.

The attached modification gives you a button to fix the table size so it works correctly.
Message 3 of 4
(2,663 Views)
Thanks for the help guys.
0 Kudos
Message 4 of 4
(2,659 Views)