08-27-2009 01:05 AM
Hi Everyone,
My application has to run more than 1000 times for every second. When I commented PlotLine() function and executes my application, it is running more than 1000 times. But as soon as I uncomment the PlotLine(), loop count is dropping to around 300 times/sec.
Can anyone let me know what could be the reason behind this?
Thanks,
Harika
08-27-2009 06:57 AM
PlotLine() probably has a very long execution time. This would be dependant on the library code for PlotLine and the ability of the hardware interface for your PC video system to redraw the screen. 1KHz is far above the update rate supported by PC video systems. You may want to reduce the rate at which you plot your data stream to something around 20Hz. This would lighten the video drawing load for your application but still maintain a virtually realtime data output.
09-02-2009 11:08 AM
Hello Harika,
Mvr is correct, 1 KHz is way too fast a rate for redrawing the graph.
One thing you can do is to use the ATTR_REFRESH_GRAPH attribute to disable graph updates. This will allow you to continue calling PlotLine in each iteration, but it will not redraw the graph. You can then call the RefreshGraph function every 100 iterations or so, which will then display all the lines that you had plotted.
Luis