LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI that programmatically decides whether to show front panel

I have a couple of big setup VI's that I would like to run in the following manner:

 

Sometimes the VI runs with its front panel showing and interacting, to let the user establish settings.  Complex output is computed based on these settings, and tested for validity. At other times, the VI runs without interacting, simply doing computations based on the retained state of its controls.

 

I know how to create a VI call node that causes the VI's front panel to appear, and I know how to create one that doesn't. But I wish I could get the VI to decide whether to pop up its own front panel, and then pop it up at the time of its own choosing. For example, only if something goes wrong. Is there any way to do this? I'm guessing there's something with a VI reference, but I can't find it.

 

Ken

0 Kudos
Message 1 of 5
(4,486 Views)

Well, you can use Front panel State property to control appearance of your vi - standard, minimized, hidden, etc. The property node is saved in the attached vi.

 

Regards,

Serge 

Message 2 of 5
(4,479 Views)

Almost, but not quite, I think.  This is what happened when I tried to use your technique on a VI that is intended to show its front panel only when there is an error.

 

Error 1149.jpg

 

I think the property node only works when the panel is already open.  Thoughts?

0 Kudos
Message 3 of 5
(4,414 Views)

Ken Brooks wrote:

Almost, but not quite, I think.  This is what happened when I tried to use your technique on a VI that is intended to show its front panel only when there is an error.

 

I think the property node only works when the panel is already open.  Thoughts? 


 

 

It should work if the vi is open, so from within it should work. Else you'll have to open a vi reference to yourself and open it that way.



/Y
G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 5
(4,400 Views)

Ken,

 

Here's a VI from my user.lib that may be of use.

 

James

LabVIEW 5.0 seems so long ago...
Message 5 of 5
(4,388 Views)