09-11-2017 10:27 AM - edited 09-11-2017 10:42 AM
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
Solved! Go to Solution.
09-11-2017 11:08 AM
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.
09-11-2017 01:35 PM
how could I solve this? do i need an event structure?
09-11-2017 02:40 PM
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
09-11-2017 02:40 PM
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.
09-12-2017 04:02 AM
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?
09-12-2017 04:26 AM
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
09-12-2017 04:45 AM - edited 09-12-2017 04:46 AM
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.
09-12-2017 04:49 AM
I placed the sub-VI calls outside your main loop and deleted the inner loops.
I saved it again for LV10.
09-12-2017 07:58 AM
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 ?