LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I close all open subVI front panels, without closing my top level VI front panel when all VIs are built into executables?

I'm using the code shown in the sample VI discussed here: http://digital.ni.com/public.nsf/allkb/353A696A3F393D9B86256E8B007A2912

to close all open VIs except my top level VI.  My top level VI is actually a separate executable and the sub-VIs are their own executables.  All reside under the same project.  It works very well if I'm running in LabView but will not work when I build them.  I added all the sub-VIs to the Always Include box in my top level VIs properties which did nothing.  I also tried adding them to the Startup VIs box.  This allowed me to close them all programmatically from the top level VI but it also open all the VIs at once (which was expected and not desired).  I think the problem is the executables are not able to see outside their own memory space so the top-level VI never finds any other open front panels to close.  Is this correct?  Is there another way to go about doing this? 

 

Thanks!

0 Kudos
Message 1 of 6
(2,875 Views)
Why do you need your sub-vis to be built into separate executables?
>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 2 of 6
(2,868 Views)
Not sure if he actually does, but I would be interested in this too. Interchangeable parts and whatnot.
0 Kudos
Message 3 of 6
(2,862 Views)

If you need them as separate .exes you could pass shared variables between them.  I am doing this with a watchdog app that runs by itself and if the main LV.exe application crashes, will reboot the computer.  This technique both over a network only on a standalone machine.  I beleive this requires LV8.5 though.

If you decide to use one vi I would recommend make parallel while or event cases to run the subpanels - build as one '.exe' application.

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

Where do I begin…..

I’m using a “server” to control 4 “client” PCs.  My server opens references to 4 VIs on each client then executes them sequentially.  So on a normal day, the server will run everything itself and I will have no contact with the clients.  But on a several occasions, I’ve needed the ability to walk up to one of the clients and run just one of the 4 VIs. 

 

We are updating from LabView 6.1 to 8.5 and we want to run executables rather than VIs for various reasons.  I have a new VI running on the client PCs who’s only function is to initialize the shared variables and open/close the VIs.  I initially thought of making the remaining 4 VIs sub-VIs but I will loose the ability to run them individually.  I think I would also have to rewrite the VI running on the server since the 4 references it originally opened do not exist.  I don’t think you can open a reference to a sub-VI on another PC.  Can you???

 

 

As you can see, this is a huge mess.  I’m still pretty new with LabView so any help you can provide would be great. 

0 Kudos
Message 5 of 6
(2,840 Views)
Why do you lose the ability to run your sub VI's individually? Why can't you just open the main VI and ignore all the stuff you're not currently using? Do you mean that the main VI needs to open the other VI's remotely, but the other VI's need to be self-contained for local use? If so, why can't you just Open Remote Front Panel to each of the four individually, ignoring the need for a special main VI entirely?
0 Kudos
Message 6 of 6
(2,821 Views)