Skip to content
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

Keysight USB PWMs Random timeouts and then total failure #29

Open
garlieb opened this issue Nov 30, 2016 · 1 comment
Open

Keysight USB PWMs Random timeouts and then total failure #29

garlieb opened this issue Nov 30, 2016 · 1 comment

Comments

@garlieb
Copy link

garlieb commented Nov 30, 2016

I have multiple systems each with 2 Keysight USB 2021 power meters. They run fine for days, and then suddenly they will get a timeout and then the only way to get the system back is to power cycle everything. I've made sure we have the latest libusb, and also the latest usbtmc.07, it got better when we updated to the usb core that had multi-processing support, now it fails about every 7 days, previous was every 3.

We are not sure if the Keysight is failing or there is another issue. Any advice is appreciated.

Traceback (most recent call last):
  File "/home/dab2admin/GMV_USBTMC/proxy_USB_TCP_smart.py", line 100, in handle
    instrument = openDevice(dictionary, configuration)
  File "/home/dab2admin/GMV_USBTMC/proxy_USB_TCP_smart.py", line 163, in openDevice
    deviceSerial = configuration.getSerial(instr)
  File "/home/dab2admin/GMV_USBTMC/proxy_USB_TCP_smart.py", line 84, in getSerial
    IDNresponse = instrument.ask("*IDN?").split(",")
  File "/usr/local/lib/python2.7/dist-packages/usbtmc/usbtmc.py", line 584, in ask
    return self.read(num, encoding)
  File "/usr/local/lib/python2.7/dist-packages/usbtmc/usbtmc.py", line 567, in read
    return self.read_raw(num).decode(encoding).rstrip('\r\n')
  File "/usr/local/lib/python2.7/dist-packages/usbtmc/usbtmc.py", line 516, in read_raw
    resp = self.bulk_in_ep.read(read_len+USBTMC_HEADER_SIZE+3, timeout = self.timeout)
  File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 402, in read
    return self.device.read(self, size_or_buffer, timeout)
  File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 988, in read
    self.__get_timeout(timeout))
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 833, in bulk_read
    timeout)
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 936, in __read
    _check(retval)
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 595, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
USBError: [Errno 110] Operation timed out
2016-11-29 16:27:52,556 - DEBUG - Closing socket
^C
@alexforencich
Copy link
Contributor

Have you tried the latest development code from here?

https://github.com/alexforencich/python-usbtmc

If that works, I'll go ahead and release it as v0.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants