LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I write out the time a measurement was taken

Hi everybody.
I have written a VI in labview 6 which samples analogue inputs at a scan rate of about 40kHz. What I want to do is write this data to an excel sheet with the time the data was measured written out next to it?????
I know that time info is contained in the waveform data, I just can't print it out cause it is coming to me in the form of a 1D array of waveform data???
Thanks for any help you can give.
Al
0 Kudos
Message 1 of 3
(2,489 Views)
Generally, for each waveform in 1D array of waveforms you can get its t0 and dt components. You can youself construct time (x) array(s) from this data, you can also use Waveform->Operation on Waveform->Waveform Time Table function, or look at the diagram of Export Waveform To Spreadsheet File.vi as example of dealing with waveform time data.
0 Kudos
Message 2 of 3
(2,489 Views)
See the attached example for a couple of possibilities.

Have you tried Export Waveform to Spreadsheet File.vi? It's name is a bit misleading in that it saves the waveform data to a text file that is easily imported into a spreadsheet, not directly into Excel (or similar), but it saves time and amplitude as you describe.

To save into Excel, you'll have to pick off the time and amplitude arrays, format them as strings, then use ActiveX commands to write to Excel cells. Search this forum for ActiveX Excel for examples.

Tim
0 Kudos
Message 3 of 3
(2,489 Views)