02-28-2012 03:24 AM
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.
Solved! Go to Solution.
02-28-2012 04:14 AM
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:
Then change Value to be to a "Write" (right click >> Change to Write) and then create a constant for the control:
You can then set which page of the Tab will be seen when each button is pressed.
Hope this helps.
-CC
02-28-2012 04:47 AM
02-28-2012 05:18 PM
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?
02-28-2012 06:13 PM
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.
02-28-2012 08:11 PM
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.
02-28-2012 09:30 PM
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.
02-29-2012 01:18 PM
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.
02-29-2012 03:18 PM
02-29-2012 03:24 PM
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