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