LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

saving a series of data sets

Hi,

 

 

I have a spectrometer that streams data. i am trying to save a series of data sets (in different columns) in one text file, but i have not been unsuccessful. Attached is my working VI code, any help would be greatly appreciated.

 

 

Howie

0 Kudos
Message 1 of 4
(2,804 Views)

Howie,

 

It is not clear exactly what problem you are having.  Please be as specific as possible.

 

Generally, it is not easy to add a column to a file because the file is written by rows.  If the data needs to be arranged by columns and does not need to be read until after the data collection is complete, the best solution is often to write the data to a temporary file by rows.  After completion read back the file, transpose the data, and write the data to a new file.  Of course you could overwrite the original file, but that risks losing the data if something happens during the process.

 

Lynn

0 Kudos
Message 2 of 4
(2,797 Views)

Thanks for your help Lynn. I am still i beginner at labview and i have not yet to learn to write temporary file by rows. Any examples would help me a great deal.

 

The spectrometer i am using outputs a fix number if data points given in wavelenghts and also the associated intensity. I am trying to save a series of intensity reading in one text file as the example.txt file shows below. In column 1 of the example file is the wavelenght, column 2 is an intensity reading, column 3 is a second scan of the intensity reading, and column 4 is the third intensity scan. The labview code i writen (save data.vi) mimics the output spectrum of the spectrometer.

 

thanks,

Howie

 

 

Download All
0 Kudos
Message 3 of 4
(2,789 Views)

Hi Howie,

 

I'm not sure where you're having trouble.  Is there something specific with this data that you aren't able to do?

Jared S.
Applications Engineering
National Instruments
0 Kudos
Message 4 of 4
(2,759 Views)