LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display only most recent time on XY graph

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**

0 Kudos
Message 1 of 2
(2,444 Views)

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.


___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(2,405 Views)