LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to reset the main front panel?

Hi all,
My program contains many subvis and loops controlled by buttons in my mainVI. Some of the subvis are use as display panel that will show results. My Qn is this: Is there any way that by pressing a button on my mainvi, i reset the FP of my mainvi and close the subvi? thanks.

further info: my mainvi FP contains some output string data, buttons, enum buttons, and all this must be reset to default value.
0 Kudos
Message 1 of 3
(2,651 Views)
Here is a solution in version 7
There are probably better ways to handle your application but this should work. This may show you a few possibilities of what can be done with the application controls pallet. There is an explanation in the diagram of how to turn this into a drop in sub vi.
Good luck
Randall
0 Kudos
Message 2 of 3
(2,651 Views)
Another way to handle this is to have any subVIs that you want to close watch a notifier and close if the notifier tells them to. Then in your main VI code open a reference to the front panel (use the Current VI's Path function and connect it to the VI Path input of Open VI Reference), connect the reference from the Open to an Invoke Node and select the method: Reinitialize All to Default. This will change everything on the front panel to whatever the default was the last time that you saved the VI.

Oh and don't forget to close your reference once you're done with it. Opening references without closing just chews up memory.

Rob
0 Kudos
Message 3 of 3
(2,651 Views)