LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to add multiple sets of data to 2D array

Solved!
Go to solution
I have 10 furnaces that can be selected. Depending on which furnace(s) are selected/indexed, the following should occur. Each furnace will have its own row so that the initial array would be 1 column and 10 rows. Each time the temperature is checked afterwards, it should be written to the row for the respective furnace, based on the index. I want to hold onto all data, as well, without overwriting. I attempted to use auto-indexing and a For Loop, but the output array seems to only write to 1 column. Any help is appreciated. If I left something out, please ask.
0 Kudos
Message 1 of 4
(3,198 Views)
Solution
Accepted by topic author csmrunman
One thing that will bite you in the butt is that a 2D matrix will have to be rectangular, what that means is that when you read the first sensor, all other furnaces will get zero written to their row in the same column.  A few common ways to circumvent this.  First, use an array of cluster of an array (see the example).  You can also use a cluster of a 1D array and a 2D array.  Use the 1D array to store the number of values in a given row (counter) and let the 2D array do its autofilling thing.  When you go to get the values in a row, use the counter to specify the subset to take.  Many times I wrap this up in a functional global, aka action engine.  If you do this a lot, we can help you implement one.  If you need something to get started here is an example using an array of cluster of array.  What I find interesting is that when you index one array, all of the others follow suit.
Message 2 of 4
(3,190 Views)

Darin,

 

I have version 8.6, so would you please re-send your modVI so I can view it?

Thanks for the quick replies.

 

0 Kudos
Message 3 of 4
(3,187 Views)

Here you go in 8.6

 

 

0 Kudos
Message 4 of 4
(3,181 Views)