LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I know if an input is wired from a calling VI?

I need to make a decision based on whether the calling VI has wired to the input of the sub vi. Is there a property node reference to do this?

Thanks
0 Kudos
Message 1 of 5
(2,416 Views)
You could make the default value of the control in the subVI something unusual (NaN, -Inf, -1), i.e. select a value that does not occur as input in normal use.

In the subVI, simply check if the value is "unusual". If true, the connector was not wired. 😉

Message Edited by altenbach on 03-30-2005 03:15 PM

0 Kudos
Message 2 of 5
(2,414 Views)
I understand. But what if the control is boolean. True and False are my only options.
0 Kudos
Message 3 of 5
(2,405 Views)
Well, I could not find an obvious solution, which does not mean it is not there. 😉

Basically, you want a 3-state input from a single boolean (true, false, unwired). I personally would not overload a boolean like that. If you want three real states, use e.g. a ring, enum, [-1,0,1], or similar.

If "unwired" would just trigger some error condition, you might want to solve the problem by defining the input as required, forcing you to always connect it.
0 Kudos
Message 4 of 5
(2,396 Views)
Hi

In LV 7.0 exists a property ConPane, which is just writable (see attachment). I don't know if there is any change to this property in LV 7.1.

Anyway - I just can agree with the mighty wizard ;).

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 5 of 5
(2,391 Views)