LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I switch to a subVI's front panel during execution of a standalone application built with Application Builder?

I have a parent VI called Home, where the front panel consists of a set of buttons.  When I press on one of those buttons, I would like to switch what I see to the front panel of a sub-VI.

 

I have found this article on loading sub-VI front panels during execution, and when I am running my Home VI, it does load the front panel of the sub-VI.  However, when I build it as a standalone application, I get the error:

 

"LabView: Null window.  The top-level VI "Home.vi" was stopped at unknown
on the block diagram of "MySubVI.vi"."

How can I actually switch the active front panel from Home.vi to some other sub-VI in a standalone application in Application Builder?

0 Kudos
Message 1 of 12
(2,031 Views)

I suggest to zip your project and attach it...

0 Kudos
Message 2 of 12
(2,021 Views)

I've attached a test project as requested.  I'm not sure if what I did was the right approach, but as I mentioned in my first post, I would like to basically load the front panel of the sub-VI and run its block diagram.

0 Kudos
Message 3 of 12
(2,002 Views)

I suggest to go through the basic LV tutorials. You even did not put while loop around the Event structure...Do not start LV learning with Events and subVIs, first learn the basics. Events are advanced topic.

0 Kudos
Message 4 of 12
(1,993 Views)

I have used events in the past (with loops), and I have a beginner's understanding how they work.  I just created the attached project as a test project.  Is the fact that I didn't use a loop the problem here?  You can try the executable file in the builds folder to get the error I was describing earlier.

0 Kudos
Message 5 of 12
(1,988 Views)

@airoll wrote:

I have used events in the past (with loops), and I have a beginner's understanding how they work.  I just created the attached project as a test project.  Is the fact that I didn't use a loop the problem here?  You can try the executable file in the builds folder to get the error I was describing earlier.


An Event structure without a while loop is just insane. Beside, you should show your project with the built specification part, that was empty, so I cannot see how you specified your built. I do not want to run a downloaded EXE, it is more informative to see your built spec... 🙂

 

edit: you should also use Stop buttons to stop VIs execution, do not use the red "Abort" button for this! Neither use the "Continuouos execution" button!

0 Kudos
Message 6 of 12
(1,982 Views)

I modified your VIs and created a built spec. When I run the Exe, it works as programmed.

 

edit: Instead of a "Stop" button you can also use the top right "X" to close your application, it is more natural for most users. But do not forget to capture and discard this action, and then handle application close or not, depending whether your are in development environment, or Runtime (see my solution in the VI).

0 Kudos
Message 7 of 12
(1,969 Views)

What exactly did you modify / what was your build spec?  The zip file you attached looks the same as the project I uploaded?  I also tried running the .exe on my computer, and I ran into the same error.  Could it be something run-time related on my machine?

0 Kudos
Message 8 of 12
(1,964 Views)

So did you built an exe using my project? Did you try to run it? It works for me. If it does not run for you, then the problem is with your PC/RTE installation i guess...

 

edit: why do you ask me what i modified and what is the built spec? Just unzip my project, and load it. You can see any details...

0 Kudos
Message 9 of 12
(1,960 Views)

I asked you what you changed because the project you attached looks exactly the same as the one I uploaded?  In any case, I figured it out - I needed to add the other source file (e.g. "SubVI.vi") to the build manually.  However, this doesn't do quite what I want, which is to switch the front panel to a new VI.  Is there any way to do that, or is that not possible with LabVIEW?

0 Kudos
Message 10 of 12
(1,926 Views)