Mike Le Posted October 10, 2014 Report Share Posted October 10, 2014 Kind of a strange situation. There are two parts: the streaming data and displaying the data. The streaming data is picked up from multiple sources. Some "black box" software outputs the data as a waveform array, with absolute timestamp data. The absolute timestamp data is important, because the multiple sources produce data at different times, and the timestamp tells us how the data is aligned. If you throw the timestamped data on a Waveform Chart, it plots perfectly and everything lines up. Now, the enduser has a request. He wants to be able to pause and resume streaming. But he wants different runs to be right next to each other, with no gaps. This is a quick, handy way to do an instant side-by-side comparison of two short data runs. If you just throw the timestamped data onto the chart, then gaps show up whenever you pause. If you paused streaming for 10 seconds, then the gap is 10 seconds long. The pause could be several minutes. So I need to get rid of these gaps in acquisition. I'm struggling with a good way to do that, because the timestamp data is critical in aligning the disparate hardware sources, so I can't just discard it. All the ideas I have are elaborate and involved, requiring shifting all the timestamp data by the length of the pause... but even that's not perfect, because sometimes the data sources will start up several seconds apart. So I think I'd have to look at the trigger time of each signal and check for a >1sec (approx.) delta, then shift that signal back by that amount every time. But then all the subsequent streaming data would also have to be shifted by that same delta... Has anyone had to do anything like this before, or have suggestions for a plan of attack? Thanks guys. Quote Link to comment
drjdpowell Posted October 11, 2014 Report Share Posted October 11, 2014 If the User is comparing “runs†then how about an overlay feature. Display all plots twice (with the second plot having the same colour but being dashed to distinguish it) and provide a single deltaT time shift to the second plot. This delta can be based on something that defines the start of a “run†or can be User adjustable. Quote Link to comment
ShaunR Posted October 11, 2014 Report Share Posted October 11, 2014 You could use the "Picture Plot" to draw it. If you are heavily dependent on cursors and annotations, then you'd have to handle all that yourself so that may put you off. Another alternative is to have two graph controls side-by-side with their scales hidden and use a Picture Plot function to draw the scale. You won't have to worry about alignment but cursors wont cross the boundaries so you'd have to "fake" it. In a similar vein, you could have two controls, one on top of the other and manipulate the start and maximum scales so that they appear to be contiguous. You may get flicker with this though. With the exception of the first, these are all variations on "don't put them all in one graph", so I expect there are others. We've all gotten used to the in-built features of the graphs so generally we balk at having to write the code to get the features back. This puts many people off the first option but you can do some fantastic graphs with the Picture Plots (gradient shaded limit areas behind the data, anyone?). Quote Link to comment
AlexA Posted October 12, 2014 Report Share Posted October 12, 2014 I'd do it by intercepting the pause request and storing your own time stamp. Subtract your time stamp from another time stamp you store on resume event. Or something like that. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.