LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem to take date in columns

Hello,

I hope I can descibe it.

I have a while-loop with a sequence in it, where datas read from GPIB and
serial port.
I want to take this datas in to a array.
After the sequence has finished the data is in the array.
But in the next loop the datas from the loop before are replaced.
I want that this data is in the next column.

An example of an array is shown now.

angle -90 -45 -30 0 15 55 90
C1 2,3 2,1 1,9 2 .............
C2 1,8 2,1 1,9 2,3 ............

Can anybody help me?
Is it possible to send me a picture ore a link of the solution.

Thanks

martin
0 Kudos
Message 1 of 3
(2,841 Views)
As I understand it you are creating an array in your sequence and you want the data from each iteration of the loop to be put into columns. What you can do is initialize an empty 2D array with a shift register and then append each of the 1D array from your sequence to the next column of the 2D array. One way to do this is to use the build array (which will put the data in rows) and then transpose the array when you exit the while loop. I have attached an example showing this method with 4 random numbers to simulate the 1D array from your sequence structure.

I hope this helps.

John
0 Kudos
Message 2 of 3
(2,841 Views)
You can work with a 2-D-array. In your sequenz you create a 1-D-array, then
you add it to the 2-D-array with the build array function. The 2-D-array you
save in a shift register of the while loop.

Niko
0 Kudos
Message 3 of 3
(2,841 Views)