LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graph does not autoscale when it's value is updated in a subvi and Defer Panel Updates is on

Hello,

I have a main VI containing several xy grpahs, which I update from a sub vi. In order to cut down on front panel redraws I defer panel updates while the graph values are updated and then redraw the FP after this has been done. However when I do this the graphs do not autoscale properly. I've attached two vi's as an example. Run the Main vi, if the Defer Panel Updates boolean is false then everything works fine, if it is true then the graph does not autoscale.

I have found a previous post that mentions something similar (here). Has this been fixed or is there a work around.

I'm using LV 8.5

Thanks
David
Download All
0 Kudos
Message 1 of 7
(3,857 Views)
It does appear that if you wire directly to the indicator, you do not have the problem.  The fact you are updating the value via Property Node casues a problem, which does sound similar to the issue you linked to.

If you need to do via property node as your example does, when you turn off defer panel updates, add a property node for the graph and tell it to autoscale once (1).



You can also do this in your subVI if it is more convenient.




Message Edited by Matthew Kelton on 04-25-2008 12:14 PM
Download All
0 Kudos
Message 2 of 7
(3,841 Views)
Hi Matthew,

Thanks for your reply, it fixed the problem. However it has thrown up a different but related issue.

In my application the user can select how many graphs to display and I programmatically calculate the size and position of each graph. If any of the graphs overlap, even slightly, and defer panel updates is on then only the topmost graph autoscales correctly, the others don't at all, although the data they display gets updated. Turning autoscale off and on again for a particular graph rescales that graph, presumably because it has been forced to.

I have attached a test case with 4 graphs. The size and position of the graphs are set by the 'Offsets' cluster. Click 'Rearrange' to get it to recalcute the positions. If you change the Vertical Gap or Horizontal Gap values to 0 or negative then the graphs will overlap. With Defer Panel Updates off there is no problem. With it on only the topmost graph updates properly.

My current workaround is to ensure the graphs don't overlap, but I'm guessing they shouldn't be doing this anyway.

David
Download All
0 Kudos
Message 3 of 7
(3,805 Views)
In this case, it works if you do the scale fits after you turn off defer panel updates, instead of when you plot the data.  My guess is it probably has to do with the fact that if a plot is under another control, the "redraw rules" prevent it from being updated under the Defer Front Panel Updates setting.  I can drop any control on top of the plots in your VI and get them to stop updating.
0 Kudos
Message 4 of 7
(3,803 Views)
Fair enough, I'll just work around it. Do you know if this is a bug or supposed to be like this?
0 Kudos
Message 5 of 7
(3,777 Views)
I would say it's a bug since the other thread seems to indicate it is improper behavior and it works when you wire data directly to the terminal.  I don't see it on the Known issues list, so will list it in the bugs section and someone from NI will hopefully pickup on it.
0 Kudos
Message 6 of 7
(3,766 Views)

I am suprised to read that you are having trouble with LV 8.5, updates and defer since LV 8.5 was the fix for similar issues I saw in LV 8.2.1.

Another aproachs that often works for getting LV to update images are;

1) Hide then show the object (visable false then visable true in same property node)

2) Invoke node "Get Image"

These techniques cna help if you want to let the user decide if auto-scale is on/off.

Trying to help,

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 7
(3,748 Views)