Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

viFindRsrc returns 32 non-existing GPIB devices on some systems

A few of our target systems returns absolute rubbish when performing a scan for instruments with viFindRsrs. The VISA version of one of them is 19.5.0f0.

I am using Pyvisa, which uses the search string '?*::INSTR' by default.

 

The returned list from viFindRsrs contains 38 hits, where only the first 6 are existing VISA addresses on the system:

 

('USB0::0x2A8D::0x9001::MY53240120::INSTR', 'ASRL1::INSTR', 'ASRL3::INSTR', 'GPIB0::8::INSTR', 'GPIB0::20::INSTR', 'GPIB0::26::INSTR', 'GPIB0::11::0::INSTR', 'GPIB0::13::0::INSTR', 'GPIB0::13::24::INSTR', 'GPIB0::14::INSTR', 'GPIB0::15::0::INSTR', 'GPIB0::17::0::INSTR', 'GPIB0::17::1::INSTR', 'GPIB0::17::INSTR', 'GPIB0::18::INSTR', 'GPIB0::19::0::INSTR', 'GPIB0::19::13::INSTR', 'GPIB0::19::23::INSTR', 'GPIB0::19::26::INSTR', 'GPIB0::1::0::INSTR', 'GPIB0::1::13::INSTR', 'GPIB0::1::17::INSTR', 'GPIB0::21::INSTR', 'GPIB0::25::0::INSTR', 'GPIB0::25::27::INSTR', 'GPIB0::25::30::INSTR', 'GPIB0::27::INSTR', 'GPIB0::2::26::INSTR', 'GPIB0::2::29::INSTR', 'GPIB0::2::30::INSTR', 'GPIB0::30::0::INSTR', 'GPIB0::30::13::INSTR', 'GPIB0::30::3::INSTR', 'GPIB0::30::8::INSTR', 'GPIB0::6::INSTR', 'USB0::0x05E6::0x2612::4041581::0::INSTR', 'USB0::0x0957::0x9002::MY50524003::0::INSTR', 'USB0::0x2A8D::0x9201::MY60440251::0::INSTR')

 

Interestingly, an IO-Trace of the scan looks perfectly normal, with only 6 found addresses, as expected.

 

I found a workaround by using the search string '/?*', which solves the issue (IO-Trace looks identical).

 

It seems this is a bug in the VISA drivers.

 

 

 

 

 

 

 

0 Kudos
Message 1 of 8
(1,108 Views)

How many are on the list on NI-MAX?

 

0 Kudos
Message 2 of 8
(1,069 Views)

NI-MAX lists only the 6 expected addresses. I checked the Trace of a NI-MAX scan, and it is using the /?* query, so this is expected. That works for me too.

 

Only the call with ?*::INSTR in the argument causes the observed issue. The returned USB addresses seem to have been connected to the system before, so they are maybe in the cache somehow. But some of the GPIB addresses have secondary addresses which I have never seen before.

0 Kudos
Message 3 of 8
(1,059 Views)

Please try resetting NI-VISA if possible.
NI-MAX: Tools-> Reset Configuration Data

0 Kudos
Message 4 of 8
(1,051 Views)

Thanks for the suggestion, but that is a workaround, not a solution.

NI VISA should not report resources not being present in the system.

 

I will go for using the /?* argument instead. It would be interesting to know why this gives a different result.

0 Kudos
Message 5 of 8
(1,046 Views)

Take a look at the configuration file below.
The visa settings are written here, and resource information is also here.
If the ghost measuring instrument information is here, it could be erased.

 

ini file path

%programdata%\National Instruments\NIvisa\visaconf.ini

e.g.

C:\ProgramData\National Instruments\NIvisa\visaconf.ini


ini.png

 

0 Kudos
Message 6 of 8
(1,040 Views)

visaconf.ini is almost empty. Only some ASRL entries are there.

 

 

 

0 Kudos
Message 7 of 8
(1,030 Views)

almost empty

 

Then I don't know anymore.
If there's anything else you can think of, it's possible that you're having an inconsistency if you have another VISA installed with it, not just NI-VISA.(e.g. Installing Keysight VISA in side-by-side mode, etc.)

0 Kudos
Message 8 of 8
(1,018 Views)