LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling the front panel of a sub.vi

Solved!
Go to solution

Is there a way to call the front panel of a sub.vi so that as soon as the sub.vi begins to execute, its front panel is displayed?

0 Kudos
Message 1 of 6
(2,991 Views)

http://zone.ni.com/reference/en-XX/help/371361H-01/lvprop/vi_open_front_panel/

 

Or, you can configure the VI to open its front panel when called via the VI Properties.

 

 

All explained in the LabVIEW Help.

Message 2 of 6
(2,983 Views)

That link you posted... is that a function I can find from the block diagram somewhere?  I'm looking for it but can't seem to find it (also I am running a pretty old labVIEW 8.5) and I have no clue what the "VI methods" class is.  The settings in VI properties will probably be fine, but I can't find it either, (there are 12 menu tabs, after all) and it probably isn't labeled as obviously as "open front panel when run."  My guess is under "execution," maybe the run when opened selection?

0 Kudos
Message 3 of 6
(2,979 Views)
Solution
Accepted by topic author LarsUlrich

So I found my own way to call the front panel by accident.

 

Right click on the sub.vi's icon on the block diagram

Click SubVI Node Setup

Check the box that says "Show front panel when called"

(and also the box saying close afterwards if originally closed if you so choose)

0 Kudos
Message 4 of 6
(2,975 Views)

@LarsUlrich wrote:

That link you posted... is that a function I can find from the block diagram somewhere?  I'm looking for it but can't seem to find it (also I am running a pretty old labVIEW 8.5) and I have no clue what the "VI methods" class is. 


It's a method for a VI reference. You create a reference to a VI (for example, by using the Open VI Reference function), and then connect it to an invoke node. Select the method from the popup list.

 


The settings in VI properties will probably be fine, but I can't find it either, (there are 12 menu tabs, after all) and it probably isn't labeled as obviously as "open front panel when run."  My guess is under "execution," maybe the run when opened selection?

VI Properties -> Window Appearance -> Customize.

 

 

EDIT: The method you used applies only to that instance of the subVI. If you have the subVI in several places on your block diagram, then the other instances are not affected. This would be applicable if your subVI is an information dialog or something.

Message 5 of 6
(2,972 Views)

Awesome, thanks for the tips.  My sub.vis are only called once in the main .vi so in that case it won't matter, but that is good to know.

0 Kudos
Message 6 of 6
(2,968 Views)