LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sluggish Waveform Graphs

I created a spectrum analyzer VI. The input data is processed and displayed
on 3 waveform graphs. I have the waveform graphs set to autoscale which
causes the VI to operate sluggishly. Both the DAQ and the plots are in the
same while loop.

How can I improve the performance of the VI without turning the autoscale
option off? Will more RAM in the computer help? I will e-mail the file to
anyone who wants to take a quick look at it.
0 Kudos
Message 1 of 3
(2,785 Views)
Why don't you try separating the DAQ and the code that updates the plots
into two loops and use a queue to pass data from the DAQ to the graphs. You
can convert a finite number of samples into a string and send it via a queue
to the loop that updates the graph where it will be converted back into
samples and redisplayed.

Matt


"Gary Delserro, PE NSPE" wrote in message
news:Jd3f9.1661$Se4.1285936@monger.newsread.com...
> I created a spectrum analyzer VI. The input data is processed and
displayed
> on 3 waveform graphs. I have the waveform graphs set to autoscale which
> causes the VI to operate sluggishly. Both the DAQ and the plots are in
the
> same while loop.
>
> How can I improve the performance of the VI without turning the a
utoscale
> option off? Will more RAM in the computer help? I will e-mail the file
to
> anyone who wants to take a quick look at it.
>
>
>
>
0 Kudos
Message 2 of 3
(2,785 Views)
> I created a spectrum analyzer VI. The input data is processed and displayed
> on 3 waveform graphs. I have the waveform graphs set to autoscale which
> causes the VI to operate sluggishly. Both the DAQ and the plots are in the
> same while loop.
>
> How can I improve the performance of the VI without turning the autoscale
> option off? Will more RAM in the computer help? I will e-mail the file to
> anyone who wants to take a quick look at it.
>

My suggestion would be to measure the two pieces independently and see
how each of them contributes. The graph is usually the easiest as you
can just unwire it. Now run the VI and use the CPU meter, the profiler,
or some sort of timer in the loop to show how things are running.

My suspicion is that the DA
Q is taking lots of the time since you are
calling the DAQ function and waiting in the driver until the data is
available. Changing the DAQ to read from the newest data and spending
less time in the driver's spin-loop is often a good way to improve the
performance of this sort of app.

Another option, if the graph is time consuming, is to decimate the data
before sending it to the graph. This is useful when you have many
megabytes of data being sent to a graph, but since the graph already
does internal decimation, this is not normally necessary.

Splitting the application into multiple loops which communicate through
globals or queues will likely have even more overhead as the data is now
being copied one or two more times.

Greg McKaskle
0 Kudos
Message 3 of 3
(2,785 Views)