12-12-2016 11:16 PM
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?
12-12-2016 11:25 PM
I suggest to zip your project and attach it...
12-12-2016 11:56 PM
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.
12-13-2016 12:25 AM
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.
12-13-2016 12:30 AM
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.
12-13-2016 12:35 AM - edited 12-13-2016 12:37 AM
@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!
12-13-2016 01:03 AM - edited 12-13-2016 01:05 AM
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).
12-13-2016 01:09 AM
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?
12-13-2016 01:12 AM - edited 12-13-2016 01:14 AM
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...
12-13-2016 02:42 AM
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?