LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use subpanel and tab control?

Solved!
Go to solution

I am first time using the subpanel and tab control. I have seen few shipping examples.

The aim of the VI:

1. Process1 on : should be on when the mouse is down on (For VI UNTITLED 4)

2. Process1 Off: mouse is down

Another tab screen should come to show:

3. Process2 on : should be on when the mouse is down on (FOR VI UNTITLED 5)

4Process2 off : should be on when the mouse is down on

If I click Process On1 one screen should arrive of the VI and Process 2 then other screen should arrive.

How can I do that? How can I create VI reference to the main VI i.e Untitled 3.

 

Download All
0 Kudos
Message 1 of 16
(7,784 Views)

Hi,

 

To change the active page of the Tab Control, create an event case for your buttons and then place a Value property node of the tab control inside this event case:

 

Value Prop Node.png

 

 

Then change Value to be to a "Write" (right click >> Change to Write) and then create a constant for the control:

 

Property Node.JPG 

You can then set which page of the Tab will be seen when each button is pressed.

 

Hope this helps.

 

-CC

 

 

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


Message 2 of 16
(7,775 Views)
Something I guess I'm missing is why you are messing with something as clunky as tab controls if you are implementing subpanels. You realize they do largely the same thing right?
It will be much more robust to lose the tabs and concentrate on the subpanel.

Mile...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
0 Kudos
Message 3 of 16
(7,770 Views)

Thanks for the replies. But I also want to know how I can call the VI by pressing the button. Atually, do I need to create a VI reference or some path?

 

0 Kudos
Message 4 of 16
(7,745 Views)

Hi,

 

You can use a case structure with a VI inside it, such that you will only execute a VI inside a case whenever you press the button which is attached to the case structure. (see attached image). In this example the VI is being called statically. If you want to call a VI dynamically by passing a VI reference check out this example.

Case_structure.png

Sev K.
Senior Systems R&D Engineer | Wireless | CLA
National Instruments
Message 5 of 16
(7,741 Views)

Thanks for your reply!

But I wish with the pressing of the boolean the VI opens in the subpanel.

Please see the attached and suggest.

0 Kudos
Message 6 of 16
(7,737 Views)
Solution
Accepted by topic author KRAZE4LV

You are opening the FP of the vi before inserting the vi this will through an error because you will not be able to use sub panel for an already opened vi so you can remove that and pass the vi reference to the sub panel and the run vi method then you need to check the state of the vi to keep it running inside the sub panel.

-----

The best solution is the one you find it by yourself
Message 7 of 16
(7,730 Views)

Hi,

 

I agree with P Anand. Remove the FP.Open Invoke method and you should be able to open the front panel of the subVI in your Sub Panel.

Sev K.
Senior Systems R&D Engineer | Wireless | CLA
National Instruments
0 Kudos
Message 8 of 16
(7,708 Views)
One of the things that can be confusing at first is that a subpanel's front panel is visible but technically not open. Where as a VI that is set to Hidden is technically open but not visible.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
Message 9 of 16
(7,694 Views)

Just remove the FP.Open and it'll work. 

 

Insert VI does just that, it inserts the front panel of another vi into the subpanel. The inserted VI is in the same state it was before, running or stopped. If you want an active subpanel you'll either have to start a sub-vi as you do, or update the indicators from the outside.

 

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 10 of 16
(7,691 Views)