07-15-2025 11:17 AM
Hello Everyone 😊
I'm looking to implement a few popup scenarios in LabVIEW and would appreciate your guidance:
A simple popup that does not require user interaction and should automatically disappear after a few seconds.
A popup with two inputs, where the window should close automatically if the user does not provide input within a certain time.
I’ve tried achieving this using the standard dialog boxes, but I haven’t been successful so far. Could anyone please help or suggest a better approach to implement these?
Thank you in advance!
07-15-2025 11:49 AM
Check this out - Dialog Box with Timeout using LabVIEW - NI Community
07-15-2025 12:25 PM - edited 07-15-2025 12:29 PM
@santo_13 wrote:
Check this out - Dialog Box with Timeout using LabVIEW - NI Community
I recommend to stay far away from this because the code is overly complicated and highly questionable! For example there is a glaring race condition because dataflow does not guarantee that the "stopped" local variable gets reset to false before it is read inside the other structures. Why would you need to call a 1-button dialog if the VI itself could have that functionality.
All you need is a simple VI set to dialog mode with a string indicator and OK button and an event structure with a timeout, an event for the OK button, and an event for <esc>:key down or whatever other interaction you need. The VI will complete after the timeout, is escaped, or if the OK button (tied to the enter key) is pressed. It can return any useful information you like (timed out, OK pressed, escaped, etc.) if that is useful to the caller. The front panel could even show a countdown clock using a bit more code.
If the dialog should not stall dataflow while open, you need to call it asynchronously. You could even have it reserved permanently and just programmatically show/hide the front panel from within the caller.
07-16-2025 01:37 AM
I use a modified version of the three-button dialog that has a timeout (and can be asynchronous). It is part of Messenger Library, if you want to have a look. See the example named "Async Dialog".
07-17-2025 10:40 AM - edited 07-17-2025 10:48 AM
Make a VI with a timer and set the properties to make it look just like a Windows Dialog.
Here's one I made to mimic the popup on our thermal chambers. When the end user presses "Start" this pops up.
The start step is a control so the end user can select another step to start at. This allows them to restart a test where they left off if the previous run had to be aborted. My VI has a 60 second timeout.