LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Detemine if data wired into subvi input

I have a sibvi with an input that is not required. I'm looking for a way to determine if the input was wired with data from within the subvi

Bill F
0 Kudos
Message 1 of 4
(2,870 Views)
> I have a sibvi with an input that is not required. I'm looking for a
> way to determine if the input was wired with data from within the
> subvi
>

The typical approach is to use a value that is nonsensical or uncommon.
You can also popup on the connector and make the input be required.
This means that any caller will be broken until the required inputs are
provided.

Greg McKaskle
0 Kudos
Message 2 of 4
(2,870 Views)
Hi Bill,

Sounds like you may want to execute different segements of code depending on what inputs are being wired ot it. The best way to go about this is to use a control input that will represent the mode with which you can determine what case structure to execute.

If for some reason this does not work for you, another way to find out if an optional input has been wired is by comparing its current value to the default value of the control. However, you will have to set the default value to a value that you know the input will never have. I have attached a VI that shows you how to go about this.

Sincerely,

Feroz
0 Kudos
Message 3 of 4
(2,870 Views)
Thanks to all. The never-have-value had occurred to me, but I was hoping there was a more elegant solution.

Bill F
0 Kudos
Message 4 of 4
(2,870 Views)