02-28-2022 05:23 AM
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.
02-28-2022 05:26 PM
How many are on the list on NI-MAX?
03-01-2022 03:42 AM
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.
03-01-2022 04:13 AM
Please try resetting NI-VISA if possible.
NI-MAX: Tools-> Reset Configuration Data
03-01-2022 04:38 AM
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.
03-01-2022 04:58 AM
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
03-01-2022 08:17 AM
visaconf.ini is almost empty. Only some ASRL entries are there.
03-03-2022 04:06 AM
> 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.)