LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How much time PlotLine() function will take to execute?

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

 

 

0 Kudos
Message 1 of 3
(3,353 Views)

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.

0 Kudos
Message 2 of 3
(3,345 Views)

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

0 Kudos
Message 3 of 3
(3,308 Views)