PDA

View Full Version : Point by point plotting in real time



Zuks
3rd December 2009, 08:39
Hi

I am trying to use qwt5 with qt4 on my acer one with ubuntu 9.10 being the OS to plot real time graphs.

I am knew to qwt and to qt as well actually.
However I have been going through the examples and trying to understand what is happening.

Correct me if I'm wrong but I think I have understood that in qwt plotting takes place by first an array being filled with the data being plotted for both the x and y values as in:
double *xData, yData;

Now I am working with a data acquisition card that uses usb to connect to my notebook.
Through the card I am trying to control a motor.

Now I want my program to take in data every x milliseconds and then calculate what the necessary output must be in order to ensure that the motor is running at the set point.

Back to Qt/qwt:

I need to be able to get my plots to show each data as it is being read from the card instead of having to fill in an array and then plot the whole thing at once.

I do hope that my question is clear enough for you to be able to help me.

Uwe
3rd December 2009, 14:23
The realtime example shows how a curve can be painted incrementally. In SVN trunk you find a new example called oscilloscope, what might be closer to your application.

But note, that incremental painting is a platform depending operation, that does work fine on X11, o.k on Windows but not at all on other environments like the Mac.

Uwe