09-02-2009 01:29 PM
For many LabVIEW functions, there are required inputs (bold) and optional inputs (not bold).
If the optional inputs are not wired, the function uses some predetermined default value.
Is there an easy way to do this with subVI's?
Like while you are wiring everything to the connecter from the front panel, is there a way to specify a require/optional input?
Solved! Go to Solution.
09-02-2009 01:32 PM
Right-click on one of your wired terminals (while still connecting controls the icon terminals) and choose
This input is ....
The options are Required Optional , etc.
Ben
09-02-2009 01:34 PM
Thanks Ben.
On my front panel, say have a control, and press "set current value as default".
If this control is an optional input of a subVI, will this default value be used if unwired?
09-02-2009 01:39 PM
Yes, if it is on the icon connector. I use that in one of my vbery old "Event_loggers". For special operations like starting it up, I pass an enum that says "init". Most of teh time it is used to post errors so the default is set to "Post" so that it can be used without passing the enum.
If it is NOT on the icon connector then the answer "depends" on if the VI had previously been called and if anything was writtien to the non-icon connector control.
Ben