06-18-2013 05:51 AM
Hi all,
I'm working on an HMI "front" for a larger acquisition/analysis system, that includes continuous performance monitoring of a turbine. The results of the measurements are stored arrays of contour lines, that represents turbine efficiency and guide vane openings. This analysis is all performed in the background. In the HMI, the performance data is loaded from file when the specific "report" is requested, and is plotted in an XY graph. I would like to indicate the current operation point of the machine by using a plot that is a single point. Thus, that point's position among the contour lines indicates the current performance of the turbine. This point is updated once every second, while the performance data remains the same for considerable amounts of time between recalculations (days to weeks).
Is there any way of updating the value of a single plot in a multiple plot XY Graph without having to redraw all the plots?
I've tried using the "Active Plot" property, which doesn't work.
My current solution is to keep all the data as input to the executing while loop and replace a subset of the plot array, but that of course requires the entire rewrite every time the operation point plot is updated.
Solved! Go to Solution.
06-18-2013 08:18 AM - edited 06-18-2013 08:19 AM
If your other plots are all static, then you could use two X-Y graphs, one exactly on top of the other, the one with static data plotted before the while loop. Then just update the current (once-per-second) data point on a transparent background directly on top, with the same axes. Just include an exit strategy so you can change your "static" data when needed.
Cameron
06-18-2013 08:47 AM - edited 06-19-2013 09:49 AM
You cannot redraw a single plot. If you want to update a single plot, you need to retain all plots in a shift regsiter and replace the data of the desired plot. However, your problem seems much simpler than that. To show a single point on a nearly static plot you have several options.
None of these ideas require a redraw of any data.
I think the cursor idea is probably the easiest and most appropriate. Just use a property node with the following properties:
06-19-2013 06:26 AM
Thanks altenbach!
The cursor solution is just the sort of smooth solution I was looking for. Most of all for its clean appearance programatically.
As a side note I did some benchmarking with the probable amount of points to redraw and found that even updating all the plots does not take much time on it's own. I'm still happy to have saved that processing power, it might come in handy somewhere else.