LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug when using nested container controls such as subpanels - some boolean controls are not polled

I often design LabVIEW systems using subpanels inside a tab control.

At the top level, the user sees a tab control. Each page of the tab control contains a subpanel. When the tab is selected, a VI is run asynchronously in the subpanel. 

This works quite nicely, and I've shipped many stable systems that are designed in this way. 

 

The VI that's run inside that subpanel will itself often contain a tab control, and it is here that I run into an intermittent issue.

 

The bug that I'm encountering is that that buttons inside that tab control are sometimes never polled by the LabVIEW runtime system. That means that they are never recognized as being clicked. The visual appearance never changes to the "true" state when the button is clicked. It doesn't seem to matter what the button mechanical action is set to. Event loops that are configured to handle mouse-down or value changed events for the button never fire.

 

Oddly enough, if the tab contains several buttons, some of them will work properly, and some of them won't. There does not seem to be any rhyme or reason to suggest which ones will be affected. Deleting the button and replacing it with a new button doesn't work. Property nodes or local variables are unable to set the button state.

 

It doesn't matter whether button clicks are handled using an event loop (yes, of course the event case is set to poll the control, just in case anyone is thinking that I'm encountering that very basic error), or if they are handled by polling the button inside a while loop. 

 

If the VI is run outside a subpanel (ie: in a top level window), everything works correctly. 

 

What's really puzzling me is that some buttons are fine, and other buttons that are treated in seemingly identical ways, are not. 

 

If I move one of these buttons outside its tab control, it works properly, so I suspect that the issue is related to the number of nested containers that eventually contain the button. If that number is too large (eg: A VI contains a subpanel that contains a VI that contains a tab control that contains another tab control that contains the button), the LabVIEW runtime simply never polls the button.

 

For what it's worth, this system is only modest-sized: about a thousand VIs. 

 

At this point, it appears that I can work around this LabVIEW bug (I'm using LV 2013 SP1) by reducing the number of nested container controls, but I'd love to hear from anyone who has developed a more elegant workaround.

 

Thanks,

J. Heerema, PhD

LabVIEW specialist

J. Heerema, PhD - LabVIEW specialist
0 Kudos
Message 1 of 3
(2,341 Views)

Update - on further investigation, I've resolved this issue.

J. Heerema, PhD - LabVIEW specialist
0 Kudos
Message 2 of 3
(2,297 Views)

This is where you can help others by not just saying you solved it, but tell what it is you figured out.

 

That way if anyone else has a similar problem, searches for it, and discovers your message,  they'll be able to learn from your experience.

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