Jump to content

Custom dialogs


nusimar

Recommended Posts

Hi all,

I'm quite new in labview, and perhaps this is very easy isue for you... anyway, I would like to write a custom dialog, because the standard "One Button Dialog" and "Two Button Dialog" block the user interface thread, thereby potentially postponing operations involving VI running.

Only one thing: I work with labview version 6.0.2! :oops:

Thanks!

Link to comment

Hi. Blocks the user interface thread? Not sure what you mean. But anyway if you call the One Button or Two Button Dialog in parallel with the rest of your Labview code, then your code should continue to execute and update visible VI panels. You can make a little pop-up manager with a parallel while loop, and use local or global variables, events, or synchronization functions to command the pop-ups from your main code.

Were you asking how to make your own custom pop-up? You know that one VI can call another VI like a subroutine, with inputs and outputs, right? Just make a separate subVI whose panel is just what you want the user to see. Put the controls and indicators you don't want seen, particularly those wired to the connector pane, out of view off to the side. Configure this subVI to "Show front panel when called" and "Close afterwards if originally closed." You can also configure centering on the screen, displaying menu bar and scroll bars, etc. Have fun experimenting. Good luck. :)

Link to comment
Hi. Blocks the user interface thread? Not sure what you mean.

I meant: if I use e.g. the One Button Dialog in a sequence, the sequence stops until you click the button.

Or if you use it in a while loop, labview waits until you 'acknowledge' clicking 'ok'.

I want to keep two options: user click on the button or, after few seconds/minuts, if nobody clicked, I want the pop-up to be closed automatically.

Were you asking how to make your own custom pop-up? You know that one VI can call another VI like a subroutine, with inputs and outputs, right?

Yes, this I know.

Thanks for the fast answer!

Link to comment
I meant: if I use e.g. the One Button Dialog in a sequence, the sequence stops until you click the button.

Or if you use it in a while loop, labview waits until you 'acknowledge' clicking 'ok'.

I want to keep two options: user click on the button or, after few seconds/minuts, if nobody clicked, I want the pop-up to be closed automatically.

Ah, well you need to create a custom pop-up VI. Put a timer inside of it and have it close after a certain timeout.

Link to comment

A couple notes just in case: By calling your custom dialog VI in parallel with your other code, as opposed to in series (sequence structure or wired), your other code can continue to execute and update displays while your dialog is popped up and showing. Also note that if your dialog waits using a polling loop, then you must place a Wait in the loop to allow your other code to share the CPU time. But better to use a non-hogging architecture in your dialog such as an Event structure (in which you could wire your dialog-go-away time to the structure's Timeout terminal (hourglass) and possibly not need a loop).

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.