LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call a subVI from the front panel

 

Hello! I've made part of my diagram into a sub VI. I also want to be able to open the parameter settings of the sub VI when I'm running the program. For example, if I click a button then the panel of the sub VI will open. The labview HELP talks things about pereference or property node but isn't clear about how to do it. Thanks so much!

0 Kudos
Message 1 of 12
(3,199 Views)
I'd look into Event Structures if you want it to happen on a button click.  Next, to make the front panel show, just drop your subvi like normal, right click on it, and select "SubVI Node Setup..." then check "Show Front Panel When Called" and "Close Afterwards if Originally Closed"
Message 2 of 12
(3,186 Views)
Open up the Example Finder (Help -> Find Examples), change to the "Search" tab and enter "event" in the search box. Open the example "New Event Handler". It should give you a good idea of how to do this. The individual subVIs that get opened are set up via their properties. In other words if you open the subVI and select File -> VI Properties, and change to the "Window Appearance" item you will see how it's set up to act as a popup.
Message 3 of 12
(3,171 Views)
Go to vi properties--->window appearence--> customize


Message Edited by muks on 08-18-2008 05:35 AM
0 Kudos
Message 4 of 12
(3,124 Views)
Muks, that will make it show up every time it's called, not necessarily just this one specific time.
Message 5 of 12
(3,109 Views)

Hi jeff,

           You can control that in your main program. Like check a condition that inturn has to be programmed and then putting the subvi inside a case structure will do. 

0 Kudos
Message 6 of 12
(3,105 Views)
Yes, but I'm saying if you change the settings in VI Properties, and you ever want to call that subvi without showing its front panel, you will have to get into property nodes that may or may not still flicker the front panel.
0 Kudos
Message 7 of 12
(3,099 Views)

 


Yes, but I'm saying if you change the settings in VI Properties, and you ever want to call that subvi without showing its front panel, you will have to get into property nodes that may or may not still flicker the front panel.

 

HI Jeff,

            I am not getting your point. 

0 Kudos
Message 8 of 12
(3,097 Views)
Which option in the property node do you mean?
0 Kudos
Message 9 of 12
(3,096 Views)

If you go into the VI properties and set it up to show front panel, it will do that every time the SubVI is called.  Then, if you don't want the front panel to show, you have to use a Run Front Panel Transparently or Hide VI property node to not show it.

 

If you just right click on the VI on the block diagram, you can choose to show just that specific instance of the subvi.

Message Edited by JeffOverton on 08-18-2008 08:58 AM
0 Kudos
Message 10 of 12
(3,081 Views)