03-17-2011 07:06 PM
I am receiveing data from a piece of software outside of my control via a data socket. That software gets data from a piece of data acqusition hardware over a serial bus. It is known to drop packets, but every packet sent (2/second) has a time stamp. If I lose a packet of data, there seems to be no way of adjusting T0 in the waveform data so that the missing data is skipped rather than simply appended to the next good data. How do I keep track of or fill with zeros missing time in waveform data? Here is a VI showing the problem.
Solved! Go to Solution.
03-17-2011 10:43 PM
Changing T0 is just saying that the data started later than it actually did, it doesn't fill in the missing data.
What you need to do is when you detect you've missed data, create an array of zeroes that is equal to the number of missing samples and build that into the waveform array.
03-21-2011 08:54 AM - edited 03-21-2011 08:54 AM
Hi manjagu,
What Ravens Fan stated is correct, T0 in waveform data is the time of the first data point. This means that you wouldn't want to change this value but rather your data to all zeros as mentioned.
03-21-2011 02:27 PM
I was afraid of that. It might be nice if the waveform data type were a bit smarter and incorporated handlers for such situations. But then again, maybe most people don't deal with this problem. Thanks.
03-21-2011 02:36 PM
@manjagu wrote:
I was afraid of that. It might be nice if the waveform data type were a bit smarter and incorporated handlers for such situations. But then again, maybe most people don't deal with this problem. Thanks.
Have no fear the WF chart is here (to do what you want).
As shown below
you can use the WF data to specify when in thime the value is plotted.
If you want to force a break in the line, throw in some "NaN" so the chart "lifts the pen" while drawing.
Ben