03-03-2013 02:42 PM - edited 03-03-2013 02:42 PM
Hello,
Is there a way I can display only the most recent time interval on a graph? Basically, the most recent value plotted would be at 0s. The graph will plot from the right and scroll left, with a constant 30 second window. I can do this with real time, but the time will keep increasing obviously. I just want the most recent 30 seconds. Is this possible to format in LabView?
Thanks in advance.
Cheers!
**Using LabView 2011**
03-04-2013 01:13 AM
You want a circular buffer. The easiest solution is to use a chart instead of a graph and set the history length for it, but a chart only allowes uniform spacing between points.
If you still want an XY graph, the easiest way to create a circular buffer is to create a queue of a specific size and use the Lossy Enqueue Element function to put data into it. When the queue is full, it will push out the old data. You get the data from the queue using the Get Queue Status function and wire T into the Return Elements input.
As for the direction of the axis, you can simply reverse the scale (either by going into the properties of the graph and checking the Inverted check box on the scale or by typing in 0 where the top value is.