LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform creation

Hi,

 

I have a file containing sampled data with a timestamp. I would like to do some spectral measurements on this data. Therefore I want to convert it to a waveform.

 

I have split the 2D array in an array containing the amplitude (data sample)  and one containing the time data.

 

The problem is that the time interval (delta t) is not constant, so I cant use the build waveform function.

 

Does someone have a clue on how to build a waveform file so I can use the spectral measurement function?

 

Thanks in advance

Message 1 of 3
(2,689 Views)
How inconstant is your dt?  Does it change a lot form point to point?  Or does it stay constant for a while before chaning to a different value?  Or does the dt stay the same and just have gaps in the data?

If the dt varies in a (somewhat) predictable manner, you might be able to interpolate missing values.  If it is in descrete chunks, you could break it up and do the spectral analysis on each peice.

The easiest solution may be change the original sampling method to give you a constant dt.
0 Kudos
Message 2 of 3
(2,678 Views)
If you have LabVIEW 7.0 or later you can use the "Resample Waveforms (single shot).vi" to resample the arbitrarily sampled data you have to a constant dt.  This is a polymorphic VI with several instances, one of which is "Resample Pair of Arrays (single shot).vi".  This takes in an array of data and a separate array of sample times, and allows you to specify a dt of your choice.  Since you are going to look at the spectrum afterwards the interpolation method of choice would be cubic spline (the FIR filter interpolation mode is not enabled for this VI).  Take a look at "...\labview\examples\measure\resample_align_xmpl.llb\Resampling a Waveform (single-shot).vi" for a starting point.  This example resamples a waveform, but you can easily modify to use the "pair of arrays" instance.

-Jim
Message 3 of 3
(2,673 Views)