-1

I want plot a very fast signal that came from USB3.0 port (it is actually signal of a sensor that transferred to my computer via FTDI:FT601 with 50MHz data rate) in a C# program. the program should be able to show real time data. the bandwidth of signal that is important for me is about 4kHz-200kHz.

I have tried several libraries for plotting real time data such as: OpenGL, C# MSChart, ZedGraph library. but the highest speed I've got so far from these different method is something about 100Hz for plot and THIS IS NOT ENOUGH to show the impulse responses that my sensor detects.

Is there any method that helps me to show my signal faster?

genpfault
  • 51,148
  • 11
  • 85
  • 139
  • 4
    And your eyes are fast enough for 100Hz and above? FYI "standard" human eyes are working at around 24Hz. So you must be Super- or Spiderman, are you? – Sir Rufo Sep 16 '18 at 06:42
  • 2
    You _think_ you need all this speed but you really don't... Do a little research about current monitor refresh rates and then think again about what you're asking. And after all that, look into [SciChart](https://www.scichart.com/) if you really need performance, but it's going to cost you MONEY... No one is going to do your job for you for free...:O) What you really need to do is to buffer your data and then show it "realtime" in "slow-mo". – jsanalytics Sep 16 '18 at 07:45
  • the duration of one impulse response is something about 250us. so the plot program should not be slow because the program misses the pulse. I want a c# plotting program that is be able to show the pulse (with its ripples and details) similar to the pulses I can see in my oscilloscope :) but in computer:) – fatemeh.rastegar Sep 16 '18 at 10:17
  • to boost my program performance I defined two threads for reading the data (from FTD) and plotting in the chart. but still slow, and the plotter misses the impulses – fatemeh.rastegar Sep 16 '18 at 10:21
  • I forgot to mention that I subsample the received data (to 200kHz) for plotting – fatemeh.rastegar Sep 16 '18 at 10:24
  • 1
    @fatemeh.rastegar You think that oscilloscopes has 100MHz fps ??? Of coarse they do not you have to render with low fps but show the fast signal ... that what is the Time Base for. see [plotting real time Data on (qwt )Oscillocope](https://stackoverflow.com/a/21658139/2521214) there are also another options like buffer some time duration and show it slowly in detail ... – Spektre Sep 17 '18 at 06:07

1 Answers1

4

Let's pretend for a moment that you have an infinitely fast computer. The fastest you can get an update will now be determined by the refresh rate of the display device.

The average monitor out there has a refresh rate of 60Hz. On such a device, you will never be able to display more than 60 updates per second. Better monitors can do 120Hz. But you're not going to find much better than that.

Also, most LCDs have a latency (the time between when the computer sends the image and when it actually appears on the screen) on the order of 20+ms. So that will confound you as well.

If you want to show data that comes in at a higher frequency than your display device can actually display, the best you can do is to simply display multiple sets of data with each frame you send to the display. So rather than trying to send 100kHz of data to the monitor one sample at a time, divide the 200kHz up into groups of 60Hz. So you should be showing 3'333 samples in a single 60Hz frame. Or take an average of those samples and present that. Or perform some other statistical analysis of them and present that as an aggregation.

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982