LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Graph slow in response

Solved!
Go to solution

Hi All,

 

I have 2 XY graphs in my VI and for some reason 1 XY is super slow in response. I have attached my vi here which demonstrates the behavior.

 

There are 2 XY graphs. The one on the top is super slow in response and the one below behaves normally.

 

Could anyone please look at the vi and let me know whats the problem with the slow graph?

 

Thanks,

Ritesh

0 Kudos
Message 1 of 6
(4,489 Views)
Solution
Accepted by topic author LVCoder

Ritesh,

 

I think the data is being written to the graphs before the Visible property is changed to false. I ran the Profiler and saw indications in the amount of memory used that looked like a copy was made for the slow graph even when it was invisible.

 

When I put  a sequence structure around the property nodes and wired the graph data through, I do not see the slow down or the extra data copies. 

 

Consider that your graph has only 800+ pixels of width and you are feeding it 200000 data points. The internal code of the graph needs to reduce that data to the number of pixels in the display. Your X-axis data is linear. If you reduced the data, especially at the high frequency end, it would probably speed things up. Also because the X-axis data is linear, you could use a Waveform graph rather than the XY Graph. I did not test extensively, but with one waveform graph it seemed much faster.

 

### I just noticed that you have Anti-Aliased checked on the slow graph and not on the fast graph.  Turning that on on the other graphs slows them down, too!

 

Lynn

0 Kudos
Message 2 of 6
(4,477 Views)

@johnsold wrote:

### I just noticed that you have Anti-Aliased checked on the slow graph and not on the fast graph.  Turning that on on the other graphs slows them down, too!


That's the first thing I noticed too. This involves singificant overhead!

0 Kudos
Message 3 of 6
(4,465 Views)

Thanks for your replies! Checking off anti aliasing in slow graph solved the problem.

 

 

0 Kudos
Message 4 of 6
(4,409 Views)

@johnsold wrote:

Also because the X-axis data is linear, you could use a Waveform graph rather than the XY Graph.


That is definitely a valid suggestion, because ot drops the graph data by 50%. Here's a quick draft.

 

 

Message 5 of 6
(4,400 Views)

Sorry to reheat this topic - I am looking for a solution to a chart that is slow to display.

 

I am profoundly confused by this example: When I open the OPs VI (in LV 2016), both XY Graphs have anti-aliasing turned on and changing the setting (apart from taking some considerable time), does nothing to speed up the slow graph.

 

As it turns out however, the "Fast Graph" contains only one Plot, where the "Slow Graph" contains just a bit over 700 disctinct plots. I have a strong suspicion that the problem may be connected to this number. Even gathering the list of plots in the properties dialog or displaying the legend takes considerable time.

 

I wanted to try to reduce the number of plots, but as I have gathered from this Idea https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Provide-method-to-delete-plot-names-from-all-graphs-c...

this may not be possible to do so without deleting the whole control and adding a new one. Is this correct?

 

Best Regards,

Leopold

0 Kudos
Message 6 of 6
(2,787 Views)