10-20-2010 12:51 PM
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
10-20-2010 01:01 PM
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
10-20-2010 02:43 PM
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
10-21-2010 09:34 PM
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?