-
-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[COM] Communication issue with OWON DGE2000 using USB #482
Comments
I assume you are constructing the connection string manually because The reason for that might be that, according to output presented, currently device enumerates as a HID device, not USBTMC. Manual suggests that you can change USB device mode in device settings — have you tried that? |
WinUSB Zadig driver doesn't work. Using the Zadig driver libusb-win32 (v1.4.0.0) DEBUG:pyvisa:SerialSession was correctly imported.
DEBUG:pyvisa:USBSession and USBRawSession were correctly imported.
DEBUG:pyvisa:TCPIPSession was correctly imported.
DEBUG:pyvisa:GPIBSession was not imported No module named 'gpib'.
DEBUG:pyvisa:Created library wrapper for py
DEBUG:pyvisa:Created ResourceManager with session 2967742
DEBUG:asyncio:Using proactor: IocpProactor
Available instruments: ('USB0::21317::4661::XXXXXXXX::0::INSTR',)
Using instrument: USB0::21317::4661::XXXXXXXX::0::INSTR
DEBUG:pyvisa:USB0::21317::4661::XXXXXXXX::0::INSTR - opening ...
Traceback (most recent call last):
File "w:\Python\dge2070\main.py", line 55, in <module>
DGE2070 = rm.open_resource(DGE)
File "W:\Python\dge2070\.venv\Lib\site-packages\pyvisa\highlevel.py", line 3292, in open_resource
res.open(access_mode, open_timeout)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "W:\Python\dge2070\.venv\Lib\site-packages\pyvisa\resources\resource.py", line 281, in open
self.session, status = self._resource_manager.open_bare_resource(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
self._resource_name, access_mode, open_timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "W:\Python\dge2070\.venv\Lib\site-packages\pyvisa\highlevel.py", line 3217, in open_bare_resource
return self.visalib.open(self.session, resource_name, access_mode, open_timeout)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "W:\Python\dge2070\.venv\Lib\site-packages\pyvisa_py\highlevel.py", line 169, in open
sess = cls(session, resource_name, parsed, open_timeout)
File "W:\Python\dge2070\.venv\Lib\site-packages\pyvisa_py\sessions.py", line 329, in __init__
self.after_parsing()
~~~~~~~~~~~~~~~~~~^^
File "W:\Python\dge2070\.venv\Lib\site-packages\pyvisa_py\usb.py", line 82, in after_parsing
self.interface = self._intf_cls(
~~~~~~~~~~~~~~^
int(self.parsed.manufacturer_id, 0),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
int(self.parsed.model_code, 0),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
self.parsed.serial_number,
^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "W:\Python\dge2070\.venv\Lib\site-packages\pyvisa_py\protocols\usbtmc.py", line 308, in __init__
super(USBTMC, self).__init__(vendor, product, serial_number, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "W:\Python\dge2070\.venv\Lib\site-packages\pyvisa_py\protocols\usbtmc.py", line 220, in __init__
cfg = self.usb_dev.get_active_configuration()
File "W:\Python\dge2070\.venv\Lib\site-packages\usb\core.py", line 935, in get_active_configuration
return self._ctx.get_active_configuration(self)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "W:\Python\dge2070\.venv\Lib\site-packages\usb\core.py", line 113, in wrapper
return f(self, *args, **kwargs)
File "W:\Python\dge2070\.venv\Lib\site-packages\usb\core.py", line 259, in get_active_configuration
bConfigurationValue=self.backend.get_configuration(self.handle)
File "W:\Python\dge2070\.venv\Lib\site-packages\usb\backend\libusb0.py", line 528, in get_configuration
assert ret == 1
^^^^^^^^
AssertionError
DEBUG:pyvisa:Closing ResourceManager (session: 2967742) |
If I use the app > .\WinUsbTmc.exe /R 0 "*IDN?"
OWON,DGE2070,XXXXXXXX,SCPI:99.0 FV:V1.0.3.3.100
> .\WinUsbTmc.exe /R 0 "OUTPut1:STATe ON" The last line turns on the channel 1 correctly So, I could assume that the libusbK (v3.1.0.0) driver from the Zadig application is correct. |
Any idea how to solve it? |
Instrument details
Output of
pyvisa-info
Using this python script to look for devices:
Gives this: (Serial number replaced by XXXXXXXX)
Now using
usb
module to get information about the specific device:Gives this result: (Serial number replaced by XXXXXXXX)
Using pyvisa to gain access to the device using the previously constructed resource chain:
Gives this error:
Note
"ASRL1" is an Intel mainboard serial port.
The same response with USB1, RAW, and ::1::INSTR
The text was updated successfully, but these errors were encountered: