08-25-2017 10:48 AM
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?
08-25-2017 11:01 AM
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
08-25-2017
11:25 AM
- last edited on
11-07-2024
03:40 PM
by
Content Cleaner
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)
08-25-2017
11:38 AM
- last edited on
11-07-2024
03:40 PM
by
Content Cleaner
Just use the Export Waveforms To Spreadsheet File.vi. It does everything for you.
08-25-2017
11:52 AM
- last edited on
11-07-2024
03:41 PM
by
Content Cleaner
@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)