orangefob7 Posted July 28, 2010 Report Share Posted July 28, 2010 Hello! I created a sub-VI to notify the user that a piece of test control software didn't hit a target condition. I would like to call this from the program, and leave this error sub-vi open without holding up the calling VI. In other words, sub-VI (1) sets the condition, and calls sub-VI (2) to notify the user. I would like sub-VI (2) to remain open in the background (it doesn't need to run, just stay open), and allow sub-VI (1) to end so the program can move on to the next condition without the user being present. I tried playing with reentrant execution and that didn't seem to achieve my goal. Any help is greatly appreciated. David Quote Link to comment
Daklu Posted July 28, 2010 Report Share Posted July 28, 2010 Nope, reentrancy won't get you there. What you need to do is dynamically load and execute sub vi 2 at runtime. That makes it execute in a separate thread. Try this... Quote Link to comment
Ton Plomp Posted July 29, 2010 Report Share Posted July 29, 2010 Hello! I would like sub-VI (2) to remain open in the background (it doesn't need to run, just stay open), and allow sub-VI (1) to end so the program can move on to the I tried playing with reentrant execution and that didn't seem to achieve my goal. Daklu is right, you don't need reentrancy. You don't need VI server either: Just set the sub-vi to open the FP when called and don't set it to auto-close. Ton 1 Quote Link to comment
Daklu Posted July 29, 2010 Report Share Posted July 29, 2010 You don't need VI server either Good catch Ton. (I missed the "it doesn't need to run" part.) Quote Link to comment
orangefob7 Posted July 30, 2010 Author Report Share Posted July 30, 2010 All - thank you for your suggestions. I ended up using the suggested method with the window appearance. I had tried this initially and the method didn't work well for me. I neglected to mention in my original posting that I wanted to open multiple instances of this sub-VI as the program went through a list of conditions. This method will just recycle the previously opened window. Never the less, I've modified my program to append information in this sub-VI such that all information is retained when the window is recycled. Thanks again for the assistance! David Quote Link to comment
Ton Plomp Posted July 30, 2010 Report Share Posted July 30, 2010 All - thank you for your suggestions. I ended up using the suggested method with the window appearance. I had tried this initially and the method didn't work well for me. I neglected to mention in my original posting that I wanted to open multiple instances of this sub-VI as the program went through a list of conditions. This method will just recycle the previously opened window. Never the less, I've modified my program to append information in this sub-VI such that all information is retained when the window is recycled. Thanks again for the assistance! David Well, if you are going for multiple windows, you should set the VI to be reeentrant (don't share clones) and set the windows properties to what I suggested earlier. That should work as well. Ton 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.