LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

make waveform from multiple timestamps and data-Y value

Highlighted

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.

 

0 Kudos
Message 1 of 9
(1,679 Views)
Highlighted

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…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 9
(1,662 Views)
Highlighted

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

0 Kudos
Message 3 of 9
(1,652 Views)
Highlighted

Hi Akshay,

 

there is a palette full of interpolation functions.

You can use them to interpolate your input data to a signal with evenly distributed (on the time scale) samples…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 4 of 9
(1,646 Views)
Highlighted

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.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 5 of 9
(1,634 Views)
Highlighted

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

Niko NR
Systems Engineer, National Instruments
0 Kudos
Message 6 of 9
(1,597 Views)
Highlighted

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.

0 Kudos
Message 7 of 9
(1,594 Views)
Highlighted

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!

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 8 of 9
(1,591 Views)
Highlighted

yes i am doing something similar

 

thanks GerdW

0 Kudos
Message 9 of 9
(1,581 Views)