09-01-2016 02:40 AM
I have multiple timestamps at which instance I have data (say a 1 or 0). I want to make a single waveform out of these variable timestamps and the data associated with it.
background: I read Bus- Frame information and generate the timestamp based on the difference between 2 bus Frames.
Issue - the dt value cannot be same as sometimes the frame data can come at a difference of 10 ms or 30ms. Hence Timestamp for each data.
How do I get a waveform out of this data.
09-01-2016 03:23 AM - edited 09-01-2016 03:23 AM
Hi aparab,
calculate the least common multpiple of your dt values. According to your description it should be 10ms.
Then create an Y array with a sample for each 10ms dt step: you need to interpolate in case there is a 30ms gap between samples…
09-01-2016 03:41 AM
thanks GerdW,
Does NI offer any Solution to this as I believe I aint the first with this problem and this should be a common problem for digital Data.
I have the Soln u mentioned on my list of Workarounds but then it requires testing for all unforseen Scenarios as its data-Manipulation
regards
Akshay
09-01-2016 03:43 AM
09-01-2016 06:02 AM - edited 09-01-2016 06:08 AM
Would an XY Scatter plot help? Two arrays of data, x-array of timestamps, y-array of values. You can use any arrangement of timestamps that you please, the dt becomes irrelevant.
My bad - didn 't read the OP question fully. You need a waveform, not a cluster of two arrays.
09-02-2016 02:50 AM - edited 09-02-2016 02:51 AM
Hi aparab,
in essence you have x-y pairs, from what you are describing. So this KB might help you (it is simply one possible implementation of GerdW's idea):
How Do I Convert XY Pairs to a Waveform? - National Instruments
http://digital.ni.com/public.nsf/allkb/53E96C82FF016576862574670052585D
The problem that you are facing here is that the waveform simply consists of these three elements: t0, delta-t and the y-values. That is the big advantage, but it is really not flixible. So either you get your data into that format, or you have to choose a different format, along the line that Thoric was thinking.
There may be better solutions to your specific problem, so if somebody has a diffent idea, I am excited in which way it goes!
Ciao, Niko
09-02-2016 03:20 AM
Hallo,
Well its similar to an X-Y pair but I have a absolue Time Information(timestamp) which cant be easily used with this example VI.
Also I thought there could be a soln from NI like a VI which takes care of this.
09-02-2016 03:32 AM
Hi aparab,
I have a absolue Time Information(timestamp)
So you can easily determine the start time to be used for T0 in a waveform.
And you can easily calculate the time differences between T0 and all other timestamps: the result will be DBL values (time in seconds), which you can use in any interpolation function!
09-02-2016 05:24 AM
yes i am doing something similar
thanks GerdW