11-10-2023 09:39 AM
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?
Solved! Go to Solution.
11-10-2023 10:06 AM
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
11-10-2023 10:10 AM
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.
11-10-2023 11:19 AM
@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.
11-10-2023 11:25 AM
DOH! I had an error handler, but forgot to wire the "no dialog" to it. 😳
11-10-2023 01:03 PM
"Clear Errors" also works. Or, set your VI's to not automatically handle errors (File -> Properties -> Execution, IIRC).