alexm Posted February 16, 2006 Report Share Posted February 16, 2006 Hi, I have a while loop and I from some iterations (depending on a condition) I want to launch a "one button dialog" to notify the user about something. The problem is that I want that the main VI to continue the execution and not to wait until the user presses the button. In case the condition is true once again, a new dialog should appear, and so on. If this is not possible with one button dialogs, is it possible to launch programmatically several instances of the same VI simultaneously? thanks Quote Link to comment
LAVA 1.0 Content Posted February 16, 2006 Report Share Posted February 16, 2006 Hi,I have a while loop and I from some iterations (depending on a condition) I want to launch a "one button dialog" to notify the user about something. The problem is that I want that the main VI to continue the execution and not to wait until the user presses the button. In case the condition is true once again, a new dialog should appear, and so on. If this is not possible with one button dialogs, is it possible to launch programmatically several instances of the same VI simultaneously? thanks Use VI server to open the VI then use the Run VI method (invoke node) wire a false to the wait untill done method then add a property node, select the FP.Open property and wire a true. I would create my own little dialog VI first, just a while loop with a delay in the loop and a boolean to the conditional for your ok button. Put a string control on the front panel, and type your message. This will accomplish what you want, you can even pass a value to the string control to have a different message depending on the situation. Hope this helps, I am on my way out the door or I would send you the code. Here is somthing I already had, does a little morre than you need and wont run for you , but should illustrate the concept. Download File:post-3882-1140123201.vi Quote Link to comment
WMassey Posted February 16, 2006 Report Share Posted February 16, 2006 Well I suppose you could: 1) put together a simple little VI (call it "INTERFACE.vi") which would do little more than provide an interface to the one-button dialog 2) put together another VI (call it "INVOKER.vi") which will: A) make a copy of the "INTERFACE.vi" file to "INTERFACE-001.vi" B) open a reference to "INTERFACE-001.vi" C) use the: i) "open FP" method (state=hidden) followed by ii) the "Set Control Value" method to configure a) whatever text will be used with the one-button dialog and b) possibly establish some sort of named notifier to be shared between the INVOKER vi and the INTERFACE vi iii) use the "Run VI" method to start the "INTERFACE-001.vi" The INTERFACE vi copy would run and take the values loaded into its front panel controls and use them to pop up a one-button dialog. When the dialog was closed, the INTERFACE would use the notifier to inform the INVOKER that it was finished and then the INTERFACE would exit. The INVOKER could then delete or reuse the copy of the VI file. The INVOKER could generate as many copies of the INTERFACE vi as you needed. (sorry about the lack of indents in my outline... I cannot figure how to make this stupid editor indent just the lines I select or else leave in the spaces I manually add the the fronts of the lines) 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.