11-12-2015 10:24 AM
I have a data source which sends out data at a continuous rate. The rate is not known precisely (+/- 1%) before hand and the samples arrive with a little bit of jitter (+/- a few hundred us).
I record this data as a set of timestamps and values.
I want to also generate a resampled continuous waveform array of the input channels data.
Is there a VI which can pull in single sample data with timestamps and produce multi sample waveforms (resampled) from it?
For example:
The input is approx 100Hz U32 data with +/-100us of jitter
The output should be 50Hz U32 waveforms of 10 samples each
Thanks,
XL600
11-12-2015 11:49 AM
When I have "Jittery Data" I use a running average to smooth it out, simmilar to the linear averaging function many power meters have.
11-12-2015 11:51 AM
The sample times are jittery, not the data.
11-12-2015 12:20 PM
If the time is jittery, the data will be slighthly off the expected value This is the same thing as the data, itself, being jittery.
If that sn't sufficient for you, you can take a look at using the XY graph to draw out your waveform as it doesn't require a constant delta between samples.
11-16-2015 07:41 AM
Look at the Interpolate 1D.vi in the Mathematics >> Interpolation and Extraction palette.
The values will go to y and the timestamps (converted to Double) to x. You will need to create an array of the desired sample times for the unform sampling (Ramp.vi) and wire it to xi.
Lynn
12-20-2015 06:10 PM
What I wound up doing is to create a RT fifo of size 1. The jittery data is written to that whenever it arrives. I then use a RT loop to read that fifo at a selected sample rate. Evey n samples, I capture the RT loop start of time. I then buffer n samples and enqueue the resulting waveform. Seems to work pretty well.