You can programmatically check if an input terminal is wired to the subVI by comparing the current value of the input to its default value. You should set the default value of the input to an improbable value. The boolean statement 'Is the input value equal to its default value?' can be used to control the behavior of the subVI.For example, below is a simple subVI that outputs a string stating whether or not its input is wired. In this example, the subVI Input control is assigned a default value of 999999 because it assumed that the subVI Input will never hold that value. The subVI then compares value of the input with a numeric constant to see if the value of subVI Input is equal to its default value. If the result of this comparison is True, the Output indicator displays a statement saying the input is not wired. If the result of the comparison is False, the Output indicator displays a statement saying the input is wired.True Case: Print "Input is not wired" if subVI Input is not wired (i.e. subVI Input is set to the default value of 999999)False Case: Print "Input is wired" if subVI Input is wired (i.e. subVI Input is not equal to the default value of 999999)Note: To assign the default value to a control, enter the desired value into the control on the front panel then right-click the control and select Data Operations » Make Current Value Default.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.
Thank you for your feedback.
You changed your response to Not Helpful
You changed your response to Helpful