LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

find hardware lists devices not connected

Solved!
Go to solution

When using the Find Hardware VI, it reports devices that are no longer connected (as does Max).  Even using the IsPresent property, the response is yes.  If I try to open a VISA connection to query it for confirmation of its presence I get an error dialog.  Is there a way to find out which devices are actually connected without generating an error?

0 Kudos
Message 1 of 6
(972 Views)

You realize, don't you, that you answered your own question.  Suppose you have an array of "All Devices".  Put this Array through a For loop (which gives you the devices "one-at-a-time") and try to access the device.  If you get an Error (because the devices really isn't there), wire a False to the Conditional input of the Output Auto-indexed Tunnel (right-click the Tunnel and make sure that "Conditional" is checked).

 

Bob Schor

0 Kudos
Message 2 of 6
(958 Views)

Hi Bob.  I'm trying to make the search for the instrument transparent to the user.  I don't want the error dialog to pop up.

0 Kudos
Message 3 of 6
(949 Views)

@Jim_Marihew wrote:

Hi Bob.  I'm trying to make the search for the instrument transparent to the user.  I don't want the error dialog to pop up.


Then handle the error so the dialog does not pop up.  Even wiring it up to a Not will work.  The result of that Not can then be used with a conditional indexing tunnel to only keep the valid references.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 6
(917 Views)
Solution
Accepted by topic author Jim_Marihew

DOH!  I had an error handler, but forgot to wire the "no dialog" to it. 😳

0 Kudos
Message 5 of 6
(912 Views)

"Clear Errors" also works. Or, set your VI's to not automatically handle errors (File -> Properties -> Execution, IIRC).

0 Kudos
Message 6 of 6
(891 Views)