Results 1 to 3 of 3

Thread: Real time plot with high sample/refresh rate.

  1. #1
    Join Date
    Oct 2012
    Location
    The land of pain (NY)
    Posts
    99
    Thanks
    7
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Windows Android

    Default Real time plot with high sample/refresh rate.

    Using the oscilloscope example as a basis for plotting data in real-time using the QwtSamplingThread, I can't seem to get a trace to display fast enough with high refresh rates. I want to read an ADC to gather 1000 samples every 15 mS. The examples included in the Qwt build all relate to slow plots/refresh rates.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,325
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Real time plot with high sample/refresh rate.

    The refresh rate of the plot in the oscilloscope example depends on a timer with an interval of 10ms ( of course it is not really 10ms as QTimer is not an accurate system timer ). The timer interval checks if the curve has changed and draws new samples only. The sample rate and how to gather samples is completely unrelated to this.

    For 1000 samples every 15ms I would expect a refresh rate of 10ms as being too short - depends on your system. The fastest Qt environment for this type of application should be Qt 4.8 with the X11 graphicssystem ( = native ). With Qt 5 or Qt 4 on Windows ( or Qt 4.8 on X11 not using the native graphicssystem ) you will end up with a pure software renderer.

    Uwe

  3. #3
    Join Date
    Oct 2012
    Location
    The land of pain (NY)
    Posts
    99
    Thanks
    7
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Windows Android

    Default Re: Real time plot with high sample/refresh rate.

    Quote Originally Posted by Uwe View Post
    The refresh rate of the plot in the oscilloscope example depends on a timer with an interval of 10ms ( of course it is not really 10ms as QTimer is not an accurate system timer ). The timer interval checks if the curve has changed and draws new samples only. The sample rate and how to gather samples is completely unrelated to this.

    For 1000 samples every 15ms I would expect a refresh rate of 10ms as being too short - depends on your system. The fastest Qt environment for this type of application should be Qt 4.8 with the X11 graphicssystem ( = native ). With Qt 5 or Qt 4 on Windows ( or Qt 4.8 on X11 not using the native graphicssystem ) you will end up with a pure software renderer.

    Uwe
    With that limitation, it seems that the approach to data acquisition should be to gather a buffer's worth of data (100 points) every tick and then plot every fourth sample - if that makes sense. It looks like the o'scope sample plots every point.

Similar Threads

  1. Replies: 3
    Last Post: 12th April 2013, 06:18
  2. How to plot real time x/y graph in Qtopia
    By desperado_43 in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 18th May 2012, 08:00
  3. real time graph plot
    By robotics in forum Qt Programming
    Replies: 5
    Last Post: 24th May 2011, 05:04
  4. QFileSystemWatcher with a Qwt Real-time plot
    By gen_mass in forum Qt Programming
    Replies: 1
    Last Post: 25th June 2010, 21:28
  5. Best way in Qt to plot curve per real-time reading?
    By Sheng in forum Qt Programming
    Replies: 1
    Last Post: 10th February 2009, 22:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.