From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Transition between front panels

Hi guys, let me explain what i want to do. Think about a front panel and there are some buttons on it. When i click on a button, a new front panel will be opened. If i click on another button, another front panel will be opened. I hope i can tell properly. How can i do that? Any idea or any link which related to it?

0 Kudos
Message 1 of 11
(4,830 Views)
One very nice solution is to use subpanels. See here to get you started:

http://www.notatamelion.com/2015/02/02/modularization-its-not-just-for-block-diagrams-any-more/

The same site talks a lot about subpanels and good LabVIEW architecture in general.

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 11
(4,813 Views)

@Omnom wrote:

[...]When i click on a button, a new front panel will be opened. If i click on another button, another front panel will be opened. [...]


Will these new Front Panels be the same vi, or different?  Will the first launch a new version of the first or a different vi altogether?  Does "another button" launch the second vi, or a third?

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 3 of 11
(4,811 Views)

I want to learn both same vi and different vi. Do you kow any sources for reading?

0 Kudos
Message 4 of 11
(4,801 Views)

Omnom a écrit :

Hi guys, let me explain what i want to do. Think about a front panel and there are some buttons on it. When i click on a button, a new front panel will be opened. If i click on another button, another front panel will be opened. I hope i can tell properly. How can i do that? Any idea or any link which related to it?


There is not a lot of information in your post. Subpanels, as suggested by Mike, is probably what you want but in this case each front panel is part of a different vi. If you want different interface that are part of the same vi use a tab control. Attached is a simple example. I used an horizontal splitter to separate the front panel. The top pane contain the buttons to switch between the different lower pane display. The tab control is made transparent, the tabs are hidden and the tab control is fitted to pane.

 

The subpanel option is more scalable. The tab control option is usefull when you lack space on the front panel and you want to display a maximized version of a graph (as an example) or more detailed informations on specific things. 

 

Ben64

Message 5 of 11
(4,789 Views)

Here's a thought, too:  call your vi asynchronously.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 6 of 11
(4,782 Views)

Let me tell you a specific case. Let say i am trying to create a special vi that only i want to run it. Therefore, when someone try to run that vi, firstly a login front panel must be appear. If he or she enter the valid user name and password, then special part of the vi will be opened.

 

When i write the valid username and password and click to confirm button (look at the picture). Login front panel must be disappear and special front panel must be appear.

 

Thanks for help.

0 Kudos
Message 7 of 11
(4,775 Views)

Before you try to do sophisticated things in LabVIEW, it would help to master the basics.  Included would be an understanding of what, how, when, where, and why to use subVIs.  Once your typical LabVIEW Project (and, if you are not using LabVIEW Project, you are not ready to do this) consists of at least two dozen VIs, none of which has a Block diagram larger than a typical screen (say 1280 x 1024 or smaller), and most of which contain at least 4-6 sub-VIs, you are not ready.  Plus when you have this much familiarity with sub-VIs, you'll understand how to use their Front Panels as "Front Panels" rather than as "argument Passers".

 

Bob Schor

0 Kudos
Message 8 of 11
(4,731 Views)

Here is a question platform and also there is no notion like not being ready. I am here to learn and i am asking for a source to read that related with my concept. I dont know i can do or not, but i want to try. If you have source for me, i will appreciate for sharing, but if you dont have, please do not make comment under my question.

Have a good day.

0 Kudos
Message 9 of 11
(4,721 Views)

Fair enough.  Create a sub-VI that has the Front Panel you want visible, make it a Modal Dialog Box, have it run Maximized, and call it.  That's one way (and perhaps the easiest).

 

Bob Schor

0 Kudos
Message 10 of 11
(4,690 Views)