LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

show sub-vi front panel when button is pressed

Highlighted

What is the easiest way to display the front panel of a sub vi when a user presses a button?

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 1 of 6
(221 Views)
Highlighted

I've always used an event structure with the sub VI in the case there the button's value changes, right click the sub VI and make sure "Show Front Panel when called" and "Close after calling" are checked from the SubVI node setup. Or in the Sub VI properties -> Window Appearance, click customize and make sure "Show front panel" and "Close afterwards if originally closed"

0 Kudos
Message 2 of 6
(201 Views)
Highlighted

I want the sub-vi to always run and only show its front panel when the button is pressed.

 

Not only run when the button is pressed

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 3 of 6
(193 Views)
Highlighted

Well that's a totally different problem. How are you calling the VI in the first place? You could use reference, queues or a variety of other methods, just depends on what best fits your architecture I would say.

0 Kudos
Message 4 of 6
(184 Views)
Highlighted

This is how I tend to do this.

0 Kudos
Message 5 of 6
(98 Views)
Highlighted

I have a subVI that asynchronously shows results and even fitting progress at a leisurely loop rate. It always runs and exchanges data with the main VI via a multipurpose action engine. It shows on startup but It can be closed at any time with the [X]. OTOH, it can also be shown again by pressing "Show Spectrum" on the main VI.

 

If you show the windows again this way I would recommend to also make it frontmost, else it might pop underneath other windows, never to be seen. (Don't make it modal or floating unless you really want that, I don't!). Note that if I press "show spectrum" while the panel already shows, it will just pop it to the front.

 

Have a look at the image here to see how the main and sub panels typically look.

 

Here's a quick view into the code. configuration, and node setup

 

altenbach_0-1596295249909.png

 

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 6 of 6
(76 Views)