Results 1 to 4 of 4

Thread: Create Real-Time Oscilloscope - Best Practices

  1. #1
    Join Date
    Jul 2012
    Posts
    10
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11
    Thanks
    5

    Default Create Real-Time Oscilloscope - Best Practices

    Hi -

    I have developed a real-time application on Linux using QT4. The software acquires data using an A-to-D and performs some floating point operation on the data before saving it or sending out some signal using a D-to-A.

    I wish to add an oscilloscope module/widget to this application and want to know what are some best practices. I am not completely familiar with or understand all the ways possible for doing this, so I am hoping some useful feedback will be provided by QT experts.

    The things (I think) I know are that I want to have a static refresh rate for the display (250ms) that takes a segment of the acquired data and plots it on the display. The questions I have are - is it better to use a standard Mdi window and then draw a grid on it and then plot on the grid or is it more computationally efficient to use something like QGraphicsScene or QGraphicsView?

    The oscilloscope should be able to plot multiple channels of data at once, too.

    I may be completely wrong, but hopefully someone can provide some useful insight on how I should go about doing this.

    Thanks.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Create Real-Time Oscilloscope - Best Practices

    You should look at Qwt, its oscilloscope example, and possibly cpu plot example.

  3. #3
    Join Date
    Jul 2012
    Posts
    10
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11
    Thanks
    5

    Default Re: Create Real-Time Oscilloscope - Best Practices

    Hi -

    Thanks for the suggestion. One quick question -

    What is the performance difference between using pixmaps and between drawing curves as does the Qwt example?

    I would want to do this with multiple curves at at time - my application is using a data acquisition card to acquire data and plot it as an oscilloscope would.

  4. #4
    Join Date
    Oct 2011
    Posts
    51
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    5
    Thanked 2 Times in 2 Posts

    Default Re: Create Real-Time Oscilloscope - Best Practices

    While displaying a picture even FULLHD with frequency ~20Hz on your place I will use QWT with opengl enabled.
    When I was developing my oscilloscope app (1 curve, fullhd picture ~15Hz refresh) application take ~30% of my cpu without opengl, and ~3% cpu when I enable opengl (my pc: AMD Phenom II 550 and GPU NVIDIA 8400GS). I don't know how pixmap is handling such data, but believe me QWT will be sufficient

  5. The following user says thank you to cszawisza for this useful post:

    yapatel (6th July 2014)

Similar Threads

  1. real time image GUI with Qt
    By sanda199 in forum Newbie
    Replies: 0
    Last Post: 25th January 2013, 06:43
  2. Qwt real time plotting
    By santoshpradeep in forum Qwt
    Replies: 8
    Last Post: 28th June 2012, 09:53
  3. Qwt real time
    By oddytz1989 in forum Qwt
    Replies: 3
    Last Post: 10th February 2012, 04:41
  4. Real time QT application?
    By marc2050 in forum Newbie
    Replies: 1
    Last Post: 8th June 2011, 06:08
  5. Real time rendering
    By kaszewczyk in forum Newbie
    Replies: 1
    Last Post: 7th July 2010, 17:26

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.