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: 

Sub-vi front panel does not show upon run as requested

Solved!
Go to solution

I want to launch a vi (runner test.vi) from another vi (Launcher of vi's.vi) and the "runner test.vi" is supposed to show its front panel when called. I cannot just call the vi because I do not want to wait for its termination so use the open vi reference and invoke the "run vi". 

 

When executing "Launcher of vi's.vi" "runner test.vi" runs, but does not show its front panel.

The window appearance of the "runner test.vi" is shown below with what I would expect to be required to have the vi show its front panel when called.

 

The codes are shown below.

What can be the reason for not showing the front panel despite the settings are requesting so?

 

vi launcher.png

The Launcher of vi's.vi

 

vi runner.png

 The "runner test.vi"

 

Download All
0 Kudos
Message 1 of 4
(1,086 Views)
Solution
Accepted by topic author heel

It's because you're not calling the VI. You're running it through the "Run VI Method".

 

From the help file in Run VI:

 

BowenM_0-1618440194008.png

 

Edit: To make the code you posted work the way you expect it to, you need to set the Front Panel Window:State

or the Front Panel:Open method

Message 2 of 4
(1,058 Views)

Thanks BowenM,

That was a great help.

 

But that is subtle: there is a difference between calling and running.

 

Here is what I deduce from your answer and which works

vi launcher-works.png

This runs the vi and opens the FP as I want it to. And for completeness of demonstration, sets different FP states in a sequence using property node.

 

One small thing


@BowenM wrote:

Edit: To make the code you posted work the way you expect it to, you need to set the Front Panel Window:State

or the Front Panel:Open method


You write set the Front Panel Window:State or the Front Panel:Open method

 

I was unable to set the front panel state without _first_ calling the open method.

So I found it is not possible to open the front panel with the "Front Panel Window: State" property. Right? 

Not that it matters here - just for completeness.

Message 3 of 4
(1,037 Views)

You're correct - need to call fp.open first. I worded it poorly, my apologies.

0 Kudos
Message 4 of 4
(1,008 Views)