LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Chart Legend Scroll Position bug with large plot count (LV2019 SP1)

Solved!
Go to solution

I've found that when the Plot Legend Scroll Position is set to 256 or larger, that it truncates the Scroll Position to a byte, resulting in changing the Plot Visibility or other plot parameters (line width, color, etc.) being performed on the plot with the index of {Desired Index} MOD 256. For example, if attempting to adjust Plot 1023 with the Scroll Position set to 256 or higher, instead Plot 255 will be adjusted. I've also found that if you set the Scroll Position to 255 or less, then it will work on whatever plots are visible in the legend (255 through however many). Yes, 1024 plots is a lot, but I need 2000+, so hopefully this can be fixed soon (it should be trivial, no?), or I'll have to work around it.

 

I see the issue with Plot Visibility is known, but it's not the only issue, and it wasn't well described.

 

See attached (LV 2019). Also - I posted here so that bug can be confirmed before it gets posted to actual Bug Report site.

 

Regards,

Erik

0 Kudos
Message 1 of 9
(1,822 Views)

I looked and this property is specified as a U32!  I cannot imagine they are really expecting people to have more than 4 billion plots!  I can imagine noone would have more than 255 plots (and could "internally" use a U8, which seems to be what they have done, but didn't document, and didn't "clue the user" by being "honest" with the input type.  I've not used this Property, and am not sure if a "compromise" of a U16 make sense (which allows >65,000 legends, maybe "too many") ...

 

Bob Schor

0 Kudos
Message 2 of 9
(1,777 Views)

I'm not seeing this behavior and I'm looking at LV 2019 SP1 32 bit on Win10

 

What bitness of LabVIEW are you using?  And is it on Windows? 

 

I ask because when I looked at unsaved changes after opening your VI, it said it was recompiled and converted from a different platform.

0 Kudos
Message 3 of 9
(1,773 Views)

Hi RavensFan,

 

It happens in 2019SP1 32-bit and 64-bit on W10x64 Enterprise Version 1809. And it doesn't occur occasionally, but every single time. I'd attach an MP4 video cap but apparently I "do not have permission to upload video" to this forum (even though the MP4 is under 4 MB), and my work computer has Dropbox and similar sites blocked.

 

I was first informed of the issue by a co-worker in a lab that's switching over to using my data acquisition system application. He filed a bug report saying he thought it was index 283 (which struck me as odd) but I found it was actually 256 after trying to reproduce the issue. Needless to say, I did reproduce it, so I built this VI to demo it and made the original post. Labs where my system was used previously didn't work with nearly this many sensors needing to be charted, but this new lab has a number of stations logging 1600+ thermocouples and they want to chart them all (though unsurprisingly they also want further features added to show/hide groups of TCs, etc.). I suspect this bug goes way back.

 

You're saying you used my demo and had no issues? Did you try adjusting plot parameters for Plot 1023 using the legend? I've got the plots as noisy lines with the Y value randomly bouncing around with the Y-Value equal to the Plot Index +/- 0.5 and always starting at the Plot Index.

 

Thanks,

Erik

0 Kudos
Message 4 of 9
(1,724 Views)

Hi Bob,

 

Agreed - 64K plots is excessive. Had I hit a plot limit of 256, I'd have accepted having to work around it by storing data to be plotted outside the chart and having the user pick a subset to plot, but it was happy to plot 4096 plots for me in this demo (I really need ~ 1600) with no issue other than the Legend bug. Somewhere in the internal code, the Legend scroll position is being handled as a byte and the overflow is ignored, resulting in the wrong plot being changed.

 

Thanks,

Erik

0 Kudos
Message 5 of 9
(1,720 Views)

ANOTHER BUG!

 

As I was testing this, I added more features to my Bug Check tool. Specifically, I changed the Scroll Position Indicator to a control and added event handling to it. That exposed this new error: If you set the Scroll Position using the Property, the Legend will not update to the new position. This doesn't matter WHAT you change it to or HOW MANY plots are in the legend. This issue may already be known - I didn't check. I also added the ability to try other Plot Counts than the original tool.

 

I added a work-around that works: If you change the Scroll Position, setting the Position of the Legend to a different position (in my test code, I move it one pixel up then back down to its original location) will make LabVIEW refresh the Legend. I also tested it by just setting the position to the current position, but that didn't result in LabVIEW refreshing the legend.

See the updated tool attached here.

 

ALSO: I tested the chart plot count with a count as high as 100,000. I had also changed the data type from Double to Single just in case memory became an issue. Everything worked except for the bugs noted in this thread. It was horribly slow, but it worked!

Regards,
Erik

0 Kudos
Message 6 of 9
(1,718 Views)

@ErikL68 wrote:

Hi RavensFan,

 

 

You're saying you used my demo and had no issues? Did you try adjusting plot parameters for Plot 1023 using the legend? I've got the plots as noisy lines with the Y value randomly bouncing around with the Y-Value equal to the Plot Index +/- 0.5 and always starting at the Plot Index.

 

Thanks,

Erik


Now I have a better understanding of how to replicate your bug.  It wasn't clear from the description you typed in the VI that your issue was from trying to change the properties via the plot legend itself.  Because you had put all of that code and those controls relating to the properties right below your description, I was using that and they were working just fine.

 

Now I see that the bug is that if the plot legend has plot 255 or less as the first one shown, you can change properties via the plot legend.  If the top plot is 256 or above, then clicks on the legend do not appear to work on that plot.  After scrolling back to the earlier plots, I do see the change was made at the MOD 256 plot.

 

I agree that you have found a bug.

 

 

0 Kudos
Message 7 of 9
(1,689 Views)
Solution
Accepted by ErikL68

Hi RavensFan,

 

Sorry about the confusion - yes, those were there to show that the Chart would let you change plot attributes if you did it programmatically, so that the issue lay solely (from what I can tell) with how the Legend Scroll Position is handled by attempts to change plot attributes.

 

Thanks for ultimately confirming it! Having a Knight confirm it should be more than enough for NI to accept the bug report. I'll submit it referencing this post.

By any chance have you tried the newer tool to confirm the issue with the Legend not being refreshed if the Scroll Position is changed via the Numeric Control? I forgot to mention that while it doesn't refresh the Legend with the Legend Scroll Position being programmatically changed, it does get refreshed plot-by-plot as you move the mouse cursor over each of them. It'd a neat effect if it weren't just revealing the refresh bug.

 

Thanks,

Erik

0 Kudos
Message 8 of 9
(1,677 Views)

I just tried this bug check in LabVIEW 2023 Q3 64-bit. Unfortunately it's still present. I made sure to save changes after loading the old VI so it would be re-compiled as 2023 code. I also replaced the "normal" pallet Waveform Chart with the Silver Waveform Chart to see if that helped but it didn't.

0 Kudos
Message 9 of 9
(226 Views)