LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Close SubVI Front Panel

I have an interesting little problem, that is likely related to me not knowing how to "Properly" do things in Labview.   I have created a simple Main VI and SubVI (greatly simplified from my current version).  

 

Basically, I have incoming data (from the Dial on the Main VI), that the end user needs to click the "TEST" button to view.     Once the End user has viewed the Data in the SubVI, I would like a button within the SubVI that they can press which would toggle-off the "TEST" button on the Main VI, and close the SubVI front panel.

 

As this currently stands, you have to manually click-off the "TEST" button on the Main VI (which disables the SubVI), then close the SubVI with the top-right "X".    This is not practical in my end application, because the SubVI front panel consumes nearly the entire PC display when activated.

 

Any thoughts? 

Download All
0 Kudos
Message 1 of 32
(4,518 Views)

Since the VI in the subpanel is running as a separate process from the GUI, you will need to utilize some sort of signalling to pass data back and forth between the two. Given a simplicity of what you need to do, I would simply pass a reference to the "TEST" button on the Main VI to the subpanel VI when you launch it. Then the subpanel VI will be able to control the state of the button as needed. In addition, if you also pass the VI a reference to the subpanel that it is in, it will be able to remove itself also.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 32
(4,497 Views)

Use an event structure to launch your SubVI and set the "TEST" control to latch when released. Set the the SubVI to open when called.

0 Kudos
Message 3 of 32
(4,492 Views)

Ok, I added a reference from the SubVI, and added a button....but the new button does not appear to be responding on the SubVI.

 

Modified files attached:

Download All
0 Kudos
Message 4 of 32
(4,468 Views)

No you didn't, you added an input. To create a reference you have to Right Click >> Create >> Reference, and then you can create a property node from that reference.

0 Kudos
Message 5 of 32
(4,438 Views)

test this I think this is what you want

Download All
0 Kudos
Message 6 of 32
(4,425 Views)

You don't need a while loop to take up the CPU just to keep a SubVI running, use an event structure instead.

 

Do you want the SubVI to keep updating the data or just to show a snapshot of it?

0 Kudos
Message 7 of 32
(4,418 Views)

yes you are right test this subvi instead 

0 Kudos
Message 8 of 32
(4,408 Views)

The timeout is unwired, so the timeout case will not run.

0 Kudos
Message 9 of 32
(4,397 Views)

Smiley Wink thank you agian for point this time i think It is end and subvi will work well

0 Kudos
Message 10 of 32
(4,390 Views)