03-30-2010 07:47 AM
Solved! Go to Solution.
03-30-2010 09:14 AM - edited 03-30-2010 09:16 AM
You would need to place the graph inside the loop and use shift registers to accumulate the X and Y as arrays. I don't have 6.1 running right now, but it would basically look something like this:
Note that the above is for demonstration (code is actually a Greedy Loop). You may want to consider putting the writing to file inside the loop. This way, if the program crashes you won't lose your data.
Warning: Using Build Array as shown above will cause continuous memory growth. If your program will be running for a long time this may become an issue. One thing you may need to look at is to have a limit on the size of the array. I know there's an "XY Chart" example that ships with LabVIEW, and I'm pretty sure it was there with 6.1. You should take a look at that example, as it implements a fixed buffer size for the chart data. You should be able to use the "XY Chart Buffer" VI directly in your code.