LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY dot plot slows down over time

In my VI I am using Express XY graph to plot a continous stream of XY coordinates over a contstant domain and range. I would like to keep the trail of these points.

Initially, plotting is very fast. But it eventually slows down to a crawl as point keep coming in. I have disabled autoscaling and smooth updates, but still the same problem.

Is there any solution to this, other than periodically reseting the graph?
0 Kudos
Message 1 of 3
(2,865 Views)
Hello Amir,

I�m assuming that your data is being streamed into an array, and that you are then plotting that array on the XY graph. If this is the case, the XY graph has to rewrite itself every time, since XY graphs are a one-shot display. They are not set up for streaming. As your data keeps streaming in, the array gets bigger and bigger, causing the XY graph to take longer to refresh, slowing everything down.

One solution is to only plot the last x number of data points (x based on how fast you want it to refresh vs how much data you want to see). I�m including an example of a circular buffer than does just this. You�ll have to modify it for your data and for the XY graph, but the idea is the same.

If none of these suggestions help, please
post the software and versions you are using, the applicable portions of your code, and any other information that may help, and I�ll be happy to look further into it.

Have a nice day!
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,865 Views)
Hello Amir,

Thank you for contacting National Instruments.

I am assuming that you are building X and Y arrays using shift registers within a loop and using these arrays as the inputs to the Express XY graph VI.

If this is the case, during every iteration of the loop, the XY graph essentially redraws all data (new and pervious). As you accumulate more and more data, this process slows down considerably as the XY Graph has more to plot.

You may want to consider using a chart. A chart does not re-plot all of the previous data in the way a graph does. A chart plots one point at a time as it arrives.

I hope this helps! Let me know if you have further questions.

Matthew C
Applications Engineer
National Instruments
0 Kudos
Message 3 of 3
(2,865 Views)