nusimar Posted October 25, 2005 Report Share Posted October 25, 2005 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! Thanks! Quote Link to comment
AutoMeasure Posted October 25, 2005 Report Share Posted October 25, 2005 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. Quote Link to comment
nusimar Posted October 25, 2005 Author Report Share Posted October 25, 2005 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! Quote Link to comment
Michael Aivaliotis Posted October 25, 2005 Report Share Posted October 25, 2005 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. Quote Link to comment
nusimar Posted October 25, 2005 Author Report Share Posted October 25, 2005 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. ok. thanks. Quote Link to comment
AutoMeasure Posted October 25, 2005 Report Share Posted October 25, 2005 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). Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.