Re: Need urgent help
From: Mike D Sutton (EDais_at_mvps.org)
Date: 12/15/04
- Previous message: christophe-pasde<>: "Re: Need urgent help"
- In reply to: Rek: "Need urgent help"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 15 Dec 2004 17:51:57 -0000
> I have a hardware connected to my Comm Port. The input I'm recieving
> from it is then plotted in a line graph at real time. Now as far as this
> is concerned, its working fine. But the rate at which the data is coming
> to me is very high and I'm not able to plot that manu pixels on screen.
>
> Like for example the hardware is sending 300 samples per second on COMM
> port, which means plotting 300 pixels in a second. I can plot more
> points on screen if i start plotting in Twips, but that's not solution
> desired because then the plotting of line graph is degraded. Any other
> way i can plot pixels in much better way and smoother lotting??
The simple way to get around this is to only plot a subset of the data, plotting one in every ten samples will give you a smooth 30
fps frame rate which immediately simplifies your work and makes the graph quicker to render (plotting very large datasets with GDI
calls can be quite slow at times.) Also, if you want to display a certain number of seconds of data on the graph at any one time
then setting a custom mapping mode that re-scales the data to the desired size (presumably a window or control width?) would be the
way to go, and an anisotropic scale mode would also handle the second axis scaling for you.
As far as scrolling the graph goes, have a look at the ScrollDC() API call which means you only have to re-draw the new section of
data rather than the entire graph.
Hope this helps,
Mike
- Microsoft Visual Basic MVP -
E-Mail: EDais@mvps.org
WWW: http://EDais.mvps.org/
- Previous message: christophe-pasde<>: "Re: Need urgent help"
- In reply to: Rek: "Need urgent help"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|