06-21-2018 02:28 PM
I am impementing a test system that needs to run for several weeks on end. The customer wants a plot indicating the last 24 hours of data.
I have my sampling/logging/etc code set up elsewhere, so this is purely a visual thing for the operator to monitor; I'm not storing "real data" in the plot.
A Waveform Chart basically does what I want- I can just feed it data and it handles shifting the array around for the duration I want to be at. I can implement this manually with a Waveform graph, but is there any reason to?
In the past I've avoided Waveform Charts as they're a little too "automated" for me- I tend to need more control over how it handles data. Are there any pitfalls with using a Chart for a few weeks on end? Has anyone seen any memory leaks with the automated waveform shifting when new points come in? I'm used to handling that kind of thing myself and am a little wary of trusting it for such a long time period without being able to see how it works "under the hood".
06-21-2018 02:52 PM
I would tend toward the WF Chart and make sure I have configured the Chart history to something reasonable and set the span of the X-Axis for day and let it di tis thing.
Once the history is full the performance will settle out.
Ben
06-22-2018 12:31 AM
I agree with BEN, Chart will be a better option with the chart length of a dataset equivalent of entire day.
06-22-2018 10:37 AM
Something to consider -- if you want to view the last 24 hours, are you planning on seeing "everything at once", i.e. a plot with midnight on the left and right ends and noon in the middle? Or are you planning to show, say, an hour's worth of data and allow the user to "scroll" back and forth to see earlier and later plots? Note that it is difficult to plot more data points than you have pixels in the X dimension of your screen.
I agree with the other two Posters that Charts make sense (they are, after all, meant for "evolving data"). The answer to my question governs whether or not you need to worry about a "big history" -- if all of your day's data is displayed on the Chart (midnight-noon-midnight model), then the default history of 1024 should be adequate since you won't be scrolling. The only thing you need, now, to consider is how (and how often) you add a point to the Chart -- probably it will be something like every 3600/600 = 6 minutes (assuming a chart width of 600 points, numbers chosen to make the math easy).
Bob Schor
06-22-2018 10:44 AM
Thanks all for the input. A chart is working fine right now, my worry was with a weeks long test. A brief search showed a few people had memory leak issues but I think those issues turned out to be unrelated to the chart itself. Of all the time I've been coding LabVIEW I've never actually used a Chart 🙂
The customer requested "the last 24 hours" and wanted a sample rate of once a minute, so I'm just going to throw all the data on there- it's only 1440 data points. He may want to zoom in and out so I'll just keep all of the data shown instead of trying to decimate it based on resolution. He won't need pixel-perfect data representation, just trends, so it doesn't matter TOO much how it's all displayed. I generally try to avoid having too much data in a plot, but 1440 points is such a small buffer size I'm not going to worry about 600 vs 1440 points.
Most of my testing lasts a few seconds at super high data rates; this low sample rate, ultra long duration test stuff makes me a bit worried about long-term memory leak issues.
Thanks for the help all.
06-22-2018 10:46 AM - edited 06-22-2018 10:51 AM
Is this just to monitor trends or to look for very short glitches over the entire history?
For simple charting of a relatively slowly changing signals (e.g. room temperature, solar output, etc.), you could do a couple of charts, each at different time resolutions:
Or some other suitable interval. The slower charts would just add an averaged point at the given time intervals.
06-22-2018 10:49 AM
He's just looking for trends. The program itself is monitoring for short term errors (which is the failure state for the test).
I may end up adding a 1 hour chart or something similar once I get on-site and talk to him about it. The test is supposed to be hands-off for 2-3 months, so I don't think anyone will be watching the plots more than 3 seconds per day 🙂
06-22-2018 12:26 PM
Ha, ha -- I'm so clever in math that I computed the number of minutes in a day as 60 * 60, instead of 60 * 24. Sigh, we're never as foolish as when we think we are "so smart" ...
Bob Schor