03-20-2006 03:39 PM
03-21-2006 01:38 PM
Hello Andrew,
Not too sure about your code, but is there any reason that you are trying to
use a graph and not a chart? A chart is specifically designed to be
scrolling, and update with the last X points of data. If you wish to use
a graph to display the data, I think the best way to proceed would be to use an
array of only the last 2 minutes of data and just plot that array shifting in
elements as they become available. I don't think you would need to use
any of the graph property nodes for that.
Please let me know if you have any questions on any of this-
03-21-2006 02:13 PM
03-22-2006 02:30 PM - edited 03-22-2006 02:30 PM
You might find the attached VI
useful. The top example
implements a buffer with an array and just plots that array to the
graph each
iteration of the loop. The bottom example uses the "rotate array"
function to shift in new values to the front of your array of data
points.
The first thing the VI does is set up the size of the array dependant
on the
time between loop iterations. The top example is for sure
efficient since
no new array is ever needed, but the bottom one seems intuitively slow
since
you are shifting elements in and out of an array by moving all the
other
elements. The memory profiler does NOT show any need for buffer
allocations on that "rotate array" VI. Rest assured though, each
element is copied to the previous space so its pretty close in speed to
allocating new arrays each time (O(n) operation).
Hopefully this helps too-
Message Edited by Travis M. on 03-22-2006 02:41 PM
03-23-2006 09:55 AM
Travis,
Hi, I really like your example using scrolling bars and now I would like to read and display a spreadsheet. My file will only have a single column. I'm having a little difficulty getting it to work. Could I trouble you by giving me some pointers or by modifying the example? I would really appreciate it.
thanks,
joe
03-23-2006 11:25 AM
Hey Travis,
Thanks for the insight. I did end up getting what I wanted. I attached the example VI I will be using:
Cheers!
Andrew
03-23-2006 01:54 PM
Andrew,
Hi, how much trouble would it be to do scrolling in ver 7.1?
thanks,
joe
03-23-2006 02:35 PM
Joe,
Unfortunately, I only have LabVIEW 8.0, but it should still be doable in 7.1. I've attached a few screen shots of the block diagram I used so you can replicate it in 7.1. The only difference between the two is that the each shows the a different frame of the stacked sequence structure. Hope this helps.
Andrew