LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Active Plot Error 1077 - solved?

I've seen a number of posts related to this, but none match my situation (and I can re-produce mine with the attached project), so here goes.

 

I've got a VI with two plots in different pages of a Tab Control. I'm trying to load the Plot Names, Plot Colors, etc., and I will get Error 1077 on trying to set the Active Plot to a number above the number of legend rows I have visible. I limit the number of visible rows to prevent them from causing the tab control to resize.

 

I've tried a handful of things to get around the issue:

  1. Pre-load Chart with a 2D array with dimensions 1xN, with N being the number of plots I want
  2. Adjust Y-Scale (saw this on LAVAG forums)
  3. Set the Legend Plot Minimum to the # of plots.
  4. Make sure "Active Plot" is visible in the Legend by setting the "LegScrollPos" parameter.
  5. Attempt to do plot assignment MULTIPLE TIMES if Error 1077 occurs

 

I've attached a project in LV2016 that shows the issue, and the workaround I found to work 100% of the time (though I admit I didn't test it for very long). The project includes all the methods I attempted and a way to use them in combination. Many of them work SOME of the time, but only one worked EVERY TIME, and that was setting the Chart parameter "LegPlotMin" to the number of plots you want in the chart. Per the Help, this parameter sets a hard minimum on the number of plots the chart will handle, but apparently it also gets around whatever internal method sets the plot count, which presumably is the source of Error 1077.

 

This project is in LV2016, but if anyone wants it compiled for an earlier version, let me know.

 

Hope this helps!

 

p.s. While testing this, I found another bug:  If you change a Tab Control's value while Defer Panel Updates is enabled, when you disable Defer Panel Updates, the correct page will be loaded, but the Tab shown as "in front" will be incorrect (assuming it changed). A quick check of the forums shows this problem goes way back, unfortunately.  This code easily reproduces it though - hopefully that will prove helpful.

Message 1 of 2
(3,071 Views)

Yes, TAB controls can give lots of headaches, you will find hundreds of such posts. Even they are easy to use and seem to be a good solution, this is just a trap! Here you find some better explanations why we should avoid using TAB controls in more complex scenarios/projects (I think this week this is the second time I post this link from mikeporter's blog 🙂 )

http://www.notatamelion.com/tag/tab-controls/

 

Another thought:

I limit the number of visible rows to prevent them from causing the tab control to resize.

Why do you let the TAB control to be resizeable? Just disable resizing, problem is solved.

0 Kudos
Message 2 of 2
(3,014 Views)