03-20-2009 12:19 PM
Hi
I am using the 'export waveforms to spreadsheet' vi to record the data from an LVDT in a csv file. However, when I use this vi, my csv contains two columns. One is the timestamp and the other is the:LVDT value.
I would like the first column to contain the time (in seconds elapsed since the start of the data acquisition NOT as a timestamp) and the second column should be the value from the LVDT.
It would also be good to be able to write the date of the data acqusiition to the first line of the spreadsheet. However, I could just write a code which gives the csv a title containing the date.
Can anyone give me any ideas on how to do this?
Many thanks.
John
Solved! Go to Solution.
03-20-2009 01:29 PM - edited 03-20-2009 01:31 PM
You could use the Write to Spreadsheet function after you create the time array. It could be done like shown below.
03-20-2009 02:53 PM
Hi
Thanks for the reply. I have re-created your vi. Since I am away from the hardware I am using a sine wave as an arbitrary signal to test my vi. I can't work out how to combine the time array and the values from the signal into an array so it can be wired to the write to spreadsheet vi. How do I do this?
Thanks again!
J
03-20-2009 02:57 PM
Combine the Y array and the time array with the Build Array function. Just be sure to not select Concantenate Inputs
03-20-2009 03:54 PM
Many thanks for all your help! I had to set 'transpose array' to true to get the spreadsheet to form two columns.
cheers
John