12-11-2011 09:20 PM
I have a instrument that runs a number of different process control sequences. I have a large number of boolean controls and indicators that are different between sequences. To handle this I used sub-VI that opens a new popup front panel when called. I just hate seeing all the front panels in my taskbar. How can I just redraw or substitute the main VI front panel for the sub-VI front panels? I know it can be done, I just can't figure out where to get started at. I have attached a simple example of what I am currently using.
Thanks for the help.
Danny
12-11-2011 09:39 PM
Look at tab controls.
Look at subpanels.
One of these may do what you want.
Lynn
12-11-2011 11:32 PM
Hi,
using the property of front panel, you can hide or unhide the vi's. hide the vi which is calling the sub vi and after the execution of the sub vi unhide the previous vi..
check out the below example.. probably this will help ur purpose...
12-12-2011 05:55 AM
Lynn,
I have used tab controls and that is not what i'm really looking for. subpanels sounds more like what i'm looking for. I'll do some more reading on the subpanels.
Thanks for the help.
12-12-2011 09:36 AM
Sub panel is what you're looking for, but if you have a decently low number of sub-vi's (<15?) you can use a tab control and paint it transparent. Just place a sub-vi in each and change the tab page to see them. 🙂
/Y
12-12-2011 10:13 AM
The "Docking" code I posted in this thread may be of interest.
Screenshots of it in action can be found in this image albumn.
Ben
01-28-2012 01:46 PM
I am finally able to get back to working on learning about subpanels. After doing a lot of reading and looking at example, subpanels are what i'm looking for. I have been playing around with a very simple example trying to better understand it. What I am hoping to do is move away from using tabs and go to a ring enum to allow the user to select the test they wish to run and then the subpanel will populate with all the controls necessary for that testing proceedure. most everything I do gets deployed onto a real-time compact fieldpoint system to connect to the instrument. This is the reason i'm not using event structures, because I don't believe they will not work when deployed to the target.
Do I have the subpanel configured anywhere close to correct? The VI works but the subVI doens't end correctly. I have to hit the stop button in the subpanel twice to get it to end. I haven't added anymore subVI to the other states for this reason. What is the correct way to stop the subVi so another subVI could be launched? Also I tried to move the subpanel invoke method out of the case structure but didn't know what to wire the VI reference to If I didn't have a subVI in one of the cases. I'm sure there is a more elegant to handle this instead of using a state machine.
Thank you for the help.
Danny