So, as context, I'm writing some controller software in Python for a RTM3004 oscilloscope for laboratory use. I had it working just fine on my laptop (Win10) and the previous laboratory computer (Linux), but upon changing to a new measurement computer, I can no longer connect to the device using Pyvisa. Here is a console log of the error, which happens whenever I attempt to connect to the device via Pyvisa:
Python 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyvisa as visa
>>> rm= visa.ResourceManager()
>>> rm.list_resources()
('ASRL1::INSTR', 'ASRL3::INSTR', 'USB0::2733::470::103028::0::INSTR')
>>> ID='USB0::2733::470::103028::0::INSTR'
>>> instr=rm.open_resource(ID)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Hbeam\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvisa\highlevel.py", line 3304, in open_resource
res.open(access_mode, open_timeout)
File "C:\Users\Hbeam\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvisa\resources\resource.py", line 297, in open
self.session, status = self._resource_manager.open_bare_resource(
File "C:\Users\Hbeam\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvisa\highlevel.py", line 3232, in open_bare_resource
return self.visalib.open(self.session, resource_name, access_mode, open_timeout)
File "C:\Users\Hbeam\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvisa_py\highlevel.py", line 167, in open
sess = cls(session, resource_name, parsed, open_timeout)
File "C:\Users\Hbeam\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvisa_py\sessions.py", line 323, in __init__
self.after_parsing()
File "C:\Users\Hbeam\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvisa_py\usb.py", line 81, in after_parsing
self.interface = self._intf_cls(
File "C:\Users\Hbeam\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvisa_py\protocols\usbtmc.py", line 293, in __init__
self.usb_dev.set_configuration()
File "C:\Users\Hbeam\AppData\Local\Programs\Python\Python39\lib\site-packages\usb\core.py", line 905, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File "C:\Users\Hbeam\AppData\Local\Programs\Python\Python39\lib\site-packages\usb\core.py", line 113, in wrapper
return f(self, *args, **kwargs)
File "C:\Users\Hbeam\AppData\Local\Programs\Python\Python39\lib\site-packages\usb\core.py", line 159, in managed_set_configuration
self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
File "C:\Users\Hbeam\AppData\Local\Programs\Python\Python39\lib\site-packages\usb\backend\libusb0.py", line 509, in set_configuration
_check(_lib.usb_set_configuration(dev_handle, config_value))
File "C:\Users\Hbeam\AppData\Local\Programs\Python\Python39\lib\site-packages\usb\backend\libusb0.py", line 447, in _check
raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b'libusb0-dll:err [set_configuration] could not set config 1: win error: The parameter is incorrect.\r\n'
As well as the information I get out of pyvisa-info
:
Machine Details:
Platform ID: Windows-10-10.0.18362-SP0
Processor: Intel64 Family 6 Model 158 Stepping 13, GenuineIntel
Python:
Implementation: CPython
Executable: c:\users\hbeam\appdata\local\programs\python\python39\python.exe
Version: 3.9.4
Compiler: MSC v.1928 64 bit (AMD64)
Bits: 64bit
Build: Apr 6 2021 13:40:21 (#tags/v3.9.4:1f2e308)
Unicode: UCS4
PyVISA Version: 1.11.3
Backends:
ivi:
Version: 1.11.3 (bundled with PyVISA)
Binary library: Not found
py:
Version: 0.5.2
ASRL INSTR: Available via PySerial (3.5)
USB INSTR: Available via PyUSB (1.1.1). Backend: libusb0
USB RAW: Available via PyUSB (1.1.1). Backend: libusb0
TCPIP INSTR: Available
TCPIP SOCKET: Available
GPIB INSTR:
Please install linux-gpib (Linux) or gpib-ctypes (Windows, Linux) to use this resource type. Note that installing gpib-ctypes will give you access to a broader range of funcionality.
No module named 'gpib'
I've been racking my brain over this for two workdays now with no solution in sight, so I thought it best to ask for help, since I'm obviously no programming genius. Thank you in advance.