LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save array to column

Solved!
Go to solution

Hello, 

 

I have attached a simplified VI that saves data after taking measurements from my measurment instrument.  Each iteration in the while loop represents a measurement.  The data is currently saved in just two columns.  Can you assist me in saving the data after each while loop iteration in different columns.  

 

For the attached VI, I would like to get the data spread over 8 columns:

 

x0data y0data x1data y1data x2data y2data x3data y3data

 

Thanks,

hiNi

0 Kudos
Message 1 of 9
(3,808 Views)

You won't be able to save your data in your inner loop.  Instead, you need to build the array using autoindexing tunnels.  Do the same for the While loop and then save the data after the while loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 9
(3,796 Views)

Easiest is gathering the data and writing it all at once, as mentioned. I made a change to your VI doing that. You might need a Transpose array or 2 to get the look you want. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 9
(3,772 Views)

OK, I have managed to manulipate the data and get it in a text format using the sugestion of indexing the interations out of the while loop.  How do I go about now getting each iteration in seperate columns?

 

Thanks,

hiNi

0 Kudos
Message 4 of 9
(3,739 Views)

How many times do yuo want to format the data into a spreadsheet string?

 

 Capture.PNG

 

The trick to remember is arrays are Row, Col


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 9
(3,721 Views)

Hello,

 

It will be variable as the number of iterations in the while loop dictates the number of measurements taken.  The example VI provided just give a sample where 4 sets of data is taken.  There may be instances where I will only read two sets of data for example (i.e the while loop only runs twice).

 

Another way to look at this, if we do a search for "x", can we then split the data up and create another group of x-y data in the adjacent columns to the first x-y data now as I have modified the format of the data set?

 

Thanks for your time and help.

 

hiNi.

0 Kudos
Message 6 of 9
(3,711 Views)

@hiNI wrote:

Hello,

 

It will be variable as the number of iterations in the while loop dictates the number of measurements taken.  The example VI provided just give a sample where 4 sets of data is taken.  There may be instances where I will only read two sets of data for example (i.e the while loop only runs twice).

 

Another way to look at this, if we do a search for "x", can we then split the data up and create another group of x-y data in the adjacent columns to the first x-y data now as I have modified the format of the data set?

 

Thanks for your time and help.

 

hiNi.


it scales for that I had anticipated that 3 constant would become a control


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 9
(3,706 Views)

 

Hello,

 

THANK YOU Jeff for your help and time.  I am not quite there yet though.  The image below represents exactly how I wanted to data to be saved.  I am still getting stuck on saving the data like that below.

 

desired array.PNG

 

 

Any help will be greatly appreciated.

 

Thanks,

hiNi.

0 Kudos
Message 8 of 9
(3,694 Views)
Solution
Accepted by topic author hiNI

just put a transpose 2 d array between the while loop and array to spreadsheet string


"Should be" isn't "Is" -Jay
Message 9 of 9
(3,684 Views)