QWT oscilloscope - triggering how to implement?
Hi,
I have been reading qwt oscilloscope example. It seems to me that it is given as demo. What I am looking for is the way how signal plotting is implemented.
What basically is missing is triggering. The signal is plotted at time frame I guess that is qwtInterval (MinValue, MaxValue) is used to plot signal.
When, the new interval is instigated, the previous values are deleted, and the signal starts plotting from beginning.
The problem is how to implement a kind of internal triggering which will synchronise plot with all previous plots. I mean the signal plot to be stand still.
Is that possible? How that will reflect on performance, because there will be no for SignalData::clearStaleValues( double limit ), and memory requirements might be higher?
Re: QWT oscilloscope - triggering how to implement?
Quote:
When, the new interval is instigated, the previous values are deleted, and the signal starts plotting from beginning.
This type of implementation allows to draw incrementally as the scales do not change. As this is way more efficient than redrawing the complete plot for each frame it has been taken for the demo - knowing, that this is not what everyone needs. Guess the cpuplot example is more the average use case.
Quote:
The problem is how to implement a kind of internal triggering which will synchronise plot with all previous plots.
You mean you have a growing number of curve points and you always want to display them all ?
If yes there is not much to do beside calling replot, whenever you have new points.
In case you have a huge number of points you will run into performance problems. One possible optimization, that might help is QwtPlotCurve::FilterPointsAggressive, what can be found in all branches >= Qwt 6.2.
Uwe
Re: QWT oscilloscope - triggering how to implement?
Thanks Uwe,
Let say that I have sine waveform. I want to synchronize plot to be displayed let us say as 1 waveform period. Theoretically,
I will have displayed only one waveform, knowing that all waveforms are plotting at the same place and everything looks like only one waveform is there.
In reality, I will have a kind of jittering phase if the timing is not perfectly adjusted.
Now, let say that I want to adjust internal triggering, which means I have to locate maximum of signal (just my idea), and then use it as reference point (with constant x value) and all points around it will have the same value (apart of the jittering). Now, we get to the point to find algorithm to locate maximum value in one period time. The algorithm does not know the frequency of sinewaveform, which makes it more complex).
If we have two channels, we might have two signals, where we could have two signals stands stills. Etc. Not sure, that I want to displayed them all, maybe limited number in a bigger time frame.