LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

wafeform to spreadsheet with elapsed time

Hi, 

I read out an osciloscope resulting in a wafeform file and I would like to safe this wafeform with the elapsed time since the begining of the measurement not the timestamp. 

Does anybody know an easy option , without taking the wafeform apart and making a sum over the dt - values and recombining it with the y-value? 

0 Kudos
Message 1 of 5
(3,363 Views)

It always helps to include your code (= attach your VI, please don't attach a picture).

 

A LabVIEW Waveform is defined as a Cluster of three elements -- t0, a TimeStamp when the Waveform was created, dt, a Dbl representing the time between points, and Y, an Array of equally-spaced samples (with time interval dt).

 

What form do you want to use for the data?  Do you want a pair of "Elapsed Time" and "Sample"?  Do you want "Elapsed Time" and "Array of Samples"?

 

If you leave data in the LabVIEW Waveform format, you can always compute the Elapsed Time by taking t0 from the first Waveform and subtracting it from the t0 value of each of the other Waveforms.  You need to be careful how you then interpret this, as a TimeStamp of 0 represents a Date/Time near the beginning of the 20th Century, but if you convert it to a Dbl, it will give you seconds.

 

Bob Schor

0 Kudos
Message 2 of 5
(3,352 Views)

All you need is generate a ramp based on t0 and dt and save it together with the data as 2D array in e.g. as a 2 column delimited formatted text file. This is a trivially simple operation and you could just wrap it into a subVI. This IS an "easy option" and would probably take 30 seconds to code. In the time it took you to write your question, you could have done it already. 😄

 

Of course there are tools such as this, but I have never used them. If you look inside, there is definitely much more code than you possibly need. :D)

0 Kudos
Message 3 of 5
(3,341 Views)

Just use the Export Waveforms To Spreadsheet File.vi.  It does everything for you.



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 4 of 5
(3,334 Views)

@crossrulz wrote:

Just use the Export Waveforms To Spreadsheet File.vi.  It does everything for you.


Yes, that's the one I quoted. Did you ever look inside? This thing is ugly with dead code everywhere 😮

 

In any case, here's what I would do (Wrapped into a subVI, of course. If t0 !=0, you would initialize the SR accordingly with t0 as DBL)

 

TimeColumn.png

0 Kudos
Message 5 of 5
(3,321 Views)