02-19-2010 03:26 PM
I have a general labview development question:
Suppose I have a VI with a nicely designed front panel, for example a VI that takes a waveform input and then simulates an instrument such as an oscilloscope or spectrum analyzer (with a bunch of options on the front panel). I'd like to use this front panel in a larger program which adds some features (for example, preprocessing like averaging or filtering the data, postprocessing, changing the data source, etc.). The new features are conceptually distinct and really deserve their own VIs. Is there a good way to do this?
I've found three options, none of which seem ideal:
1. Use show front panel for the subvis. This works but it is annoying to have separate front panels popup for each new feature.
2. Copy and paste all the front panel controls and indicators of the subVIs into a main VI and wire them up by hand to the subVI. This is a little tedious and also adds a bunch of controls and indicators to the main VI that might be used only by the subVI.
3. Use a subpanel. This is almost what I want but passing data to and from the subVI seems painful. My understanding is that you have to get references for each control or indicator you want to use (in some nontrivial way such as searching for a specific control name) and use the value property.
What I'd really like is to be able to use subVIs in their normal fashion on the block diagram of the main VI (i.e. use the connector pane), but have Labview display the subVI front panel in the same window as the main VI front panel. Is there a way to do this?
Solved! Go to Solution.
02-19-2010 03:58 PM
02-19-2010 04:45 PM
02-19-2010 04:52 PM
02-19-2010 04:59 PM
Phamton wrote:
Thanks, this is exactly what I'm looking for. Is there anything similar to this in Labview 7.1? I'm working on an old project in 7.1 but maybe it's time to bite the bullet and upgrade...
Bite the bullet! Driver support for 7.1 is dissappearingand the new features keep making more and more sense. In-placeness, parallel for loops, VI recursion, Diagram clean-up, projects!... 7.1 was fun (and I still use it) but its getting long in the tooth.