LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Tabs, Multiple Producer Consumer Loops, can't click anything.

I am building an application which uses  a tab control to present 3 pages on the front panel, I then wire the tab control to a case selector on the block diagram.  Within each case I have built a producer consumer loop for the buttons displayed on each page.  This approach seems to work fine when there are 2 pages, but when I use 3 pages, the application fails.  I am not able to switch between the pages.  

 

Please help

Download All
0 Kudos
Message 1 of 3
(2,842 Views)
I can't open your code because I am on my phone, but based on your description your code has several architectural problems.

First, your code is going to be too busy. You are trying to do everything on one block diagram.

Second, you didn't say what controls and indicators are on each tab, but tab controls have a long history of causing display update problems.

Third, you need to be modularizing your code. You say you have three producer-consumer patterns on one block diagram.

How different are the three producer-consumer loop patterns? Could they be turned into a single reusable subVI? Like Christian Altenbach's tag line says: do more with less code.

Have you considered subpanels as a way of extending modularity to the GUI?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 3
(2,827 Views)

The symptom you are seeing is due to many copies of events.  In this case, you have multiple event structures looking for the Tab:Value Change event.  When this event is not reachable due to the case structure, the front panel locks.

 

I agree with Mike that subpanels are what you really want to use here.  You just load up the front panel of a VI and that VI contains all of the code necessary for that tab.  Make duplicating the code super simple.  You could even just create multiple clones of the same VI and choose which clone to load up (assuming all3 tabs are exactly the same).

 

As a compromise to keep your general setup, you should have 4 loops here: 1 for handling events and then 1 for each tab.  You will have 3 queues so you can send the command to the right loop.  You do not need a case structure to run different code based on the tab selection.

 

And as an asthetics go, do not color your block diagram.  It makes it nearly unreadable.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 3
(2,815 Views)