LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

detection of input wirering

Hello together,

how can i detect (inside a sub-vi), whether an input of it is wired form
outside or not???

--
MfG / best regards
M.Waschk mailto:waschk@mavd.de
0 Kudos
Message 1 of 4
(2,838 Views)
To know if you have wired some inputs of a subVI, you can configure those inputs (right click in the icon, show connection, right click on each connection) as required, recommended or optional. If you select optional, it doesen't matter if you wire it or not, if recommended, LabVIEW will show a warning if unwired, and if you select required, an error will be shown, and you'll have a broken run arrow untill you wire it.
Hope this helps
0 Kudos
Message 2 of 4
(2,838 Views)
Hi

If you want to detect whether an optional input is wired or not, you can
simply define a "nonsense" default value and if the value received is equal
to this "nonsense" value, the"real" default value can be used instead. This
works with some inputs but is quite tricky with booleans..... With numbers,
NaN can be used as a good "nonsense" default to check for. Of course, of
you want to occasionally actually send "NaN" to the VI, this is also
problematic.

Shane

Matthias Waschk schrieb in Nachricht <990605333.33932@mail.mavd.de>...
>Hello together,
>
>how can i detect (inside a sub-vi), whether an input of it is wired form
>outside or not???
>
>--
>MfG / best regards
>M.Waschk mailto:waschk@mavd.de
>
>
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 3 of 4
(2,838 Views)
Hello,
that was helping
Thanx

--
MfG / best regards
M.Waschk mailto:waschk@mavd.de
0 Kudos
Message 4 of 4
(2,838 Views)