LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My performance is very slow when I run graphs. How do I increase the speed at which I can do other things while the data is being updated and displayed on the graphs?

I am doing an an aquisition and displaying the data on graphs. When I run the program it is slow. I think because I have the number of scans to read associated with my scan rate. It takes the number of seconds I want to display on the chart times the scan rate and feeds that into the number of samples to read at a time from the AI read. The problem is that it stalls until the data points are aquired and displayed so I cannot click or change values on the front panel until the updates occur on the graph. What can I do to be able to help this?
0 Kudos
Message 1 of 6
(3,221 Views)
Are the controls for your input in the same while loop like the graph ?
Try to place them in another while loop parallel to the loop where you accquire the data.
0 Kudos
Message 2 of 6
(3,221 Views)
Take a look at the continuous double buffered data acquisition example that ships with LV.

You are correct that your app is stalling, waiting for the data.

The example I mentioned will acquire data by starting a continuous acquistion and periodicly checking to see how many samples are waiting in the buffer. Then only the waiting samples are read.

Try this and let us know how it works out.

Ben

PS If this works and you still want more speed, investigate "queues". But that is another story...
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 6
(3,221 Views)
I cannot find the example. I've searched for Multi buffer, double buffer and everyother combo. Could you point me in the right direction?
0 Kudos
Message 4 of 6
(3,221 Views)
I didn't see it in the examples in LabVIEW either, but there are some VIs on NI's website, including this one:

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3E72D56A4E034080020E74861&p_node=DZ52334&p_source=external

Mark
0 Kudos
Message 5 of 6
(3,221 Views)
On Fri, 15 Aug 2003 11:55:03 -0500 (CDT), HAL wrote:

>My performance is very slow when I run graphs. How do I increase the
>speed at which I can do other things while the data is being updated
>and displayed on the graphs?
>
>I am doing an an aquisition and displaying the data on graphs. When I
>run the program it is slow. I think because I have the number of
>scans to read associated with my scan rate. It takes the number of
>seconds I want to display on the chart times the scan rate and feeds
>that into the number of samples to read at a time from the AI read.
>The problem is that it stalls until the data points are aquired and
>displayed so I cannot click or change values on the front panel until
>the updates occur on the graph. What can I do to be a
ble to help
>this?


It may also be your graphics card. LabVIEW can max the CPU and you
screen may not be refreshing very fast.
--Ray

"There are very few problems that cannot be solved by
orders ending with 'or die.' " -Alistair J.R Young
0 Kudos
Message 6 of 6
(3,221 Views)