mje Posted September 17, 2013 Report Share Posted September 17, 2013 I've had a standing defect on one of our products for a few years now where under some situations one of our plots would slowly march off screen on each window resize event. Well I finally tracked this one down. Attached is code to reproduce (LV 2013). Plot area.vi If you open the VI and run it, then proceed to do multiple window resize events you'll notice the left edge of the plot area slowly marches over. My recommendation is to maximize/restore/repeat a few times to see the effect. Take for example this series of images: The offending code is simple, I'm setting the scale increment on a resize event: If the VI is edited such that the property node is removed the behavior vanishes. I wouldn't expect setting this property to cause the issue, I think I smell a bug in here somewhere. Confirmation? Quote Link to comment
shoneill Posted September 18, 2013 Report Share Posted September 18, 2013 Oh ,yeah, I've seen this before. Haven't seen it since a few LV Versions any more but I have DEFINITELY come across it before. I even had it happen in built applications which was nice. Quote Link to comment
mje Posted September 19, 2013 Author Report Share Posted September 19, 2013 I'm just glad we can identify what's causing the issue. Hard to create work-arounds if you don't even know what to work around. I imagine manually setting the scale marker values array may fix the problem (then again it may also trigger it just the same). Rendering grid lines manually via the plot image layers also comes to mind if one doesn't want a grid at each division. Reported to R&D with CAR 427628. Quote Link to comment
drjdpowell Posted September 2, 2015 Report Share Posted September 2, 2015 Bug still present in LabVIEW 2015. I have reports of this issue in an app of mine, though I don’t touch the Yaxis properties at all. Does anyone know of other properties that trigger this issue? — James Quote Link to comment
OlivierL Posted November 3, 2015 Report Share Posted November 3, 2015 Just found this post this morning. We have this erratic behavior also in my code in LV2014. We discovered it last month on our project. I spent some time investigating it this morning and found the following: XScale-Increment appears to have nothing to do wit it The fact that you "Autoscale with Pane" has no effect either has our property node "Width" & "Height" produce the same effect In our case, we do not use the "Increment" property so the problem generally has to do with the Y-Scale in general After a resize to a larger window, LabVIEW appears "resize the graph" (shrink on the left hand side) automatically to fit the scale with higher accuracy (let's say 0.25 increment instead of 1). When you force the increment back to 1, LabVIEW seems to return the graph to where it used to be but in the process, it seems to me that LV alters some reference it uses as to the real "X-origin" of the Scale. When you do the process multiple times, it keeps shifting the scale further left. After some thinking, I thought it might be possible to force the graph to move the other way if the problem was the one I suggested and it actually worked. Look at the attached file. Is there any way to report this to NI to associate it with the right CAR? Did anyone found a real practical solution to the problem? In our case, I plan to change using the VI to loading a clone so if the display gets messed up, we'll have a "reload" button from the unmodified original vi. Plot area_OriginalPost.vi Quote Link to comment
drjdpowell Posted November 3, 2015 Report Share Posted November 3, 2015 In the end I sidestepped the bug by turning off "Advanced>>Auto Adjust Scales†on all my graphs. 1 Quote Link to comment
mje Posted November 3, 2015 Author Report Share Posted November 3, 2015 In the end I sidestepped the bug by turning off "Advanced>>Auto Adjust Scales†on all my graphs. Yes, this works. It does however also mean the graph doesn't behave well as font settings are changed. But LabVIEW in general is pretty pathetic at scaling with font settings so it's not like that behavior is out of place. Quote Link to comment
pbisson Posted December 17, 2015 Report Share Posted December 17, 2015 Oh yah, I definitely see this bug on LV 8.51 on Win7 x64 (development) and WinXP (target). Remarkably, it's the first bug I've run into in LV and I've been coding since LV 6.1. (Perhaps it's because I have basic needs!) Here's my work around: First, I do a "Advanced | Reset scale layout" at design time. Then, with just the single scale on the left due to the reset, I add my second scale. It appears on the left. Then, (with "Advanced | Auto adjust scales" still enabled), I click on the scale I want on the right and select "Swap Sides". (This option is grayed out if "Auto adjust scales" is disabled.) So, now I've got two scales set up on the left and right. At this point, I do another "Advanced | Auto adjust scales" to uncheck this feature. Now, I can turn on or off either, or both scales, change formats, etc. and the plot area does not change. Of course, I'm left with some rather broad margins on the left and right edges (if both scales are turned off). But that's a small price to pay for a work around that doesn't make me write any code. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.