LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Assistance Needed for Creating Timed Popups in LabVIEW

Hello Everyone 😊

I'm looking to implement a few popup scenarios in LabVIEW and would appreciate your guidance:

  1. A simple popup that does not require user interaction and should automatically disappear after a few seconds.

  2. 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!

0 Kudos
Message 1 of 5
(192 Views)

Check this out - Dialog Box with Timeout using LabVIEW - NI Community

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 5
(176 Views)

@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.

0 Kudos
Message 3 of 5
(160 Views)

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".

0 Kudos
Message 4 of 5
(113 Views)

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.

DstartCapturep.PNG

 

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.

 

DstartCapture.PNG

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 5
(78 Views)