LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

at runtime, how can i tell if there is a connection to a terminal on a vi?

The associated control is set for optional connection.  It would be better if I can make the determination from inside the vi.
0 Kudos
Message 1 of 3
(2,640 Views)
Give it a unlikely "special" default value, e.g. NaN for DBL, empty array for arrays, "-1" for I32 that is normally only positive, etc.
 
If the value is different from the default during execution, the input was wired. 🙂
0 Kudos
Message 2 of 3
(2,636 Views)

For a good real-world example of how to do it check out the High-level File IO VIs that ship with LV. They are written such that if you give it a file name they open it, otherwise they open a dialog box to let you select the file.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 3
(2,628 Views)