LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display dialog based on boolean

Hi all,
 
I have a SubVI. I want to display its front panel as a dialog box when a boolean goes high and it should vanish when the boolean goes low. Please help me out with this.
0 Kudos
Message 1 of 7
(4,833 Views)
This Boolean, do you want it on the main/ calling VI or on the sub vi itself??
0 Kudos
Message 2 of 7
(4,824 Views)
Devchander,
 
Boolean should be on the main VI
 
Regards,
Giridhar Rajan
0 Kudos
Message 3 of 7
(4,822 Views)

Hi Giridhar,

By "Dialog display", do you mean a message box without a button (ex: "OK")?   And "displayed on the sub-vi Front Panel", do you mean that when the sub-vi is called, you see the Front Panel and if the boolean is true, display the message if false, do not display... Is this what you are trying to do?

If so:  

you can right-click the sub-vi and select "Sub-vi Setup Node", then select "show front panel when called" and also place a checkmark "close afterwards if originally closed".  As for the message display, you can use a "Select" from "Comparison " in the Functions Palette.  Wire the test to display if True and wire an empty string if False.

RayR

Message 4 of 7
(4,815 Views)
Giridhar,

Did you get your question answered?  I'm not quite sure what you meant by "dialog box".  If you just want to programmatically show the front panel you can use VI Server in combination with an event structure to programmatically open and close the front panel of the subVI when the boolean control is toggled.


Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me 🙂
0 Kudos
Message 5 of 7
(4,789 Views)

Giridhar,

Look at attached vi

Hope it helps

 

0 Kudos
Message 6 of 7
(4,775 Views)

Devchander,

Thank for the VI. You are pretty close to what I want. I want the boolean switch on your main VI to be "switch when pressed", such that if I press it and leave, it should remain ON. While its ON, the dialog should popup the way it pops up right now. No stop button is needed in the dialog. If I press the boolean on your main VI again, the boolean will go off and the dialog should vanish. Thank again.

Regards,

Giridhar Rajan

0 Kudos
Message 7 of 7
(4,746 Views)