LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically determine terminal connection

Is it possible to determine whether a subVI terminal is wired or not from within that subVI?
0 Kudos
Message 1 of 3
(2,559 Views)
I believe this is possible using the unsupported and undocumented LabVIEW scripting features.

There's an entire forum dedicated to LabVIEW scripting over on the LAVA site.
http://forums.lavag.org/index.php?s=daefc9240b02b126605942e1cbc8be66&showforum=29

Good luck

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 3
(2,553 Views)

What exactly are you trying to do?

In a typical scenario, you would leave some of the connectors unwired in the calling program and then you want to detect during running which terminals did not receive data from the calling program. Easiest would be to set a unique default value for each control, then test for the presence of this value in the subVI code and e.g. switch a case structure or similar.

Just pick something that usually does not appear in your input data::

numeric DBL: set the default value to NaN, -Inf, Inf, etc.
Numeric I32: set the default value to -1 if the number is typically always positive.
Arrays: Set default to empty array.

etc.

0 Kudos
Message 3 of 3
(2,549 Views)