LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SubVI call control values.

How can I set a subVI so that if not all the control values are given when it is called by another VI, it takes as values the values that are given in the (already) open front panel of that subVI and not the default values? Thank you in advance.
0 Kudos
Message 1 of 2
(2,647 Views)
> How can I set a subVI so that if not all the control values are given
> when it is called by another VI, it takes as values the values that
> are given in the (already) open front panel of that subVI and not the
> default values? Thank you in advance.

Controls connected to the connector pane always get the value wired, and
the default value if unwired. On the other hand, controls not connected
to the connector pane keep their values, allowing for the interactive
user to have settings persist between calls.

For the parameters where you want to do this, you will want to have
multiple controls, one connected to the connector, with a good default
value that indicates whether or not the user has wired to the subVI.
Then you will have one unconnected.
If the panel is open, or you
otherwise care to reuse the unconnected one, check the input param and
decide if you use the unconnected or the connected.

Greg McKaskle
Message 2 of 2
(2,647 Views)