From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

popup vi

Im trying to create a simple popup. However, it doesn't work. Meaning when you open up the main vi the popup vi shows automatically. And when you press the 'ok' button in the popup vi, everything freezes. Anyone??? Thanks!

 

 

 

Download All
0 Kudos
Message 1 of 5
(3,129 Views)

You should not use an Event Structure (or in such a manner) within a popup VI.

You should display what you want and then click OK to stop the while loop.

 

Under VI Properties (within File menu), select  Window Appearance and select Customize.

Select "show front panel when called" and "close afterwards if originally closed", which I think you have already done so.

 

Message 2 of 5
(3,101 Views)

Uncheck Lock Front Panel on the Event case editor.

 

Also, if you don't want your calling VI to wait for the subVI to finish, you can't call it statically.  You'll have to open a reference to the VI and use a Run VI invoke node and tell it not to wait until done.  Example here.

Message 3 of 5
(3,095 Views)
Thanks, both methods worked! I have a question about even structures - it almost seems like all we're doing is polling for events because we're in a while loop which we have to have in order to continue to handle events. So, is that all we're doing - polling for events? I was thinking the event structure would act like a callback in more conventional languages, the event is called whenever an event occurs, not if we happen to be in the while loop polling.
0 Kudos
Message 4 of 5
(3,070 Views)

The event structure just sits there waiting for an event to happen.  It is not polling.

 

You need it in a while loop if you want it to wait for a second event (and other later events) to occur after the first one occurred.  Otherwise it just waits for the first event then the program ends after it is done executing.

0 Kudos
Message 5 of 5
(3,068 Views)