LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Subpanel in tab control not responding

Solved!
Go to solution

Hi,

 

here's what I want to do:

There are 2 (very simple) VIs which I want to call with a subpanel in a tab control of a main VI.

 

The first VI has a slide going up, the other one going down. When I run the main VI only one (the initial one) of the tabs responds according to the subpanel with the respective sub-VI.

 

What is the problem?

 

Regards

Download All
0 Kudos
Message 1 of 21
(3,060 Views)

Only the code for the current tab ever executes, then it gets trapped in the inner while loop of the caller and nothing else can happen after that.

0 Kudos
Message 2 of 21
(3,033 Views)

how could I solve this? do i need an event structure?

0 Kudos
Message 3 of 21
(3,006 Views)

I remember learning that Tab Controls were "problematic", and that a Good Idea was to replace them with sub-Panels.  This makes a lot of sense to me, and definitely simplifies the underlying Block Diagram by isolating the various "tab routines" as separate VIs.

 

Bob Schor

0 Kudos
Message 4 of 21
(2,992 Views)

What you are being told is that you have loops at both levels without exit conditions.  Create some criteria to release it from the loops at the slide levels and also the loops within your case statement or find another way without the loops to achieve your desired functionality.  STOP IF TRUE is always fed a FALSE entry and will never leave any loop the flow enters.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 5 of 21
(2,992 Views)

How can I make the tab control working, such that either of the slides moves when I change tabs?

 

Is it possible to implement a user Event (changing Tabs) which stops the loop on the previous tab and starts the one on the new tab? How would this look like? Or is there a simpler method?

0 Kudos
Message 6 of 21
(2,963 Views)

Is it necessary to restart your sub-VIs on every tab change?

If not check the attached VI. It may show the behaviour you want.

 

Best regards

ʍolɟɐʇɐp ʞuıɥʇ
0 Kudos
Message 7 of 21
(2,955 Views)

I cannot open your vi, since I have the 2012 Version. Could you explain what you did?

Yes its not necessary to start the vi every time.

0 Kudos
Message 8 of 21
(2,950 Views)
Solution
Accepted by topic author volfi

I placed the sub-VI calls outside your main loop and deleted the inner loops.

 

I saved it again for LV10.

ʍolɟɐʇɐp ʞuıɥʇ
Message 9 of 21
(2,947 Views)

thanks that does the Job! Is it also possible to have only on subpanel (placed outside the tab control) and depending on which tab is activated change the subvi which is loaded to the subpanel ?

0 Kudos
Message 10 of 21
(2,926 Views)