LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to see if a subvi has something connected to a terminal?

Solved!
Go to solution
If I have a sub vi inside a main program and the terminal is not required. Is there a way to know if something is connected to the terminal?
Tim
GHSP
0 Kudos
Message 1 of 15
(3,893 Views)

to test at runtime, you can set the default to some bogus value like 'nan' or -1 or empty string.  If this is still the value in the subvi you can tell if the value is still the default value and most likely not wired.  At edit time, scripting can accomplish this (not for the novice).

 

What are you trying to do?  The answer might debend on this.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 15
(3,888 Views)
I am looking to see if something is connected and if nothing is connect I would like to have the program do something totally different than if something is connected.
Tim
GHSP
0 Kudos
Message 3 of 15
(3,882 Views)
How would you acvcomplish this with scripting?
Tim
GHSP
0 Kudos
Message 4 of 15
(3,878 Views)

I would probably handle it with the first method, check to see if a valid input is recieved.  You can also try making a polymorphic vi.  This is not a runtime decision branch on the code logic, wiring is done at edit time.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 5 of 15
(3,876 Views)
Solution
Accepted by topic author aeastet

This is very quick and very dirty, but just to give you an idea.

 

 

Message 6 of 15
(3,868 Views)

Nice a little cleaner than my solution subvi->terms->Wire->arraysize(terms[])>0

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 7 of 15
(3,859 Views)
would be nice if the terminal had an iswired? properity so you did not have to look wt the wires attached to the terminals.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 8 of 15
(3,854 Views)

falkpl wrote:
would be nice if the terminal had an iswired? properity so you did not have to look wt the wires attached to the terminals.

 

You mean like this?

___________________
Try to take over the world!
0 Kudos
Message 9 of 15
(3,815 Views)

Darin.K

 

Where did you get these properties from. I do not see them in my version of LabVIEW?

Tim
GHSP
0 Kudos
Message 10 of 15
(3,799 Views)