LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I update single plot in multi plot xy graph?

Solved!
Go to solution

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.

Best regards,

Jarle Ekanger, MSc, PhD, CLD
Flow Design Bureau AS

- "The resistance of wires in LabVIEW is not dependent on their length."
0 Kudos
Message 1 of 4
(3,241 Views)

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

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 2 of 4
(3,219 Views)
Solution
Accepted by topic author JarleEkanger

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.

 

  1. You can use a cursor that is controlled programmatically (the style can be a point, don't allow drag).
  2. You can use annotations.
  3. You can use the "plot images" feature that allows you to use image commands to draw anything on top of a graph.

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:

 

  • active cursor
  • cursor position x
  • cursor position y
0 Kudos
Message 3 of 4
(3,213 Views)

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.

Best regards,

Jarle Ekanger, MSc, PhD, CLD
Flow Design Bureau AS

- "The resistance of wires in LabVIEW is not dependent on their length."
0 Kudos
Message 4 of 4
(3,194 Views)