Rigol DS2072A problem

104 views
Skip to first unread message

Bartłomiej Fliszkiewicz

unread,
Sep 19, 2018, 6:28:19 AM9/19/18
to python-ivi
Hello
I have an issue with controlling Rigol DS 2072A oscilloscope via usbtmc. I run simple sudo python3 script like:
import usbtmc
osc=usbtmc.Instrument(6833,1200)
osc.write_raw(':STOP')

And it returns an error like this:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/usbtmc/usbtmc.py", line 475, in write_raw
    self.open()
  File "/usr/local/lib/python3.6/dist-packages/usbtmc/usbtmc.py", line 349, in open
    self.clear()
  File "/usr/local/lib/python3.6/dist-packages/usbtmc/usbtmc.py", line 710, in clear
    timeout=int(self.timeout*1000))
  File "/usr/local/lib/python3.6/dist-packages/usb/core.py", line 1043, in ctrl_transfer
    self.__get_timeout(timeout))
  File "/usr/local/lib/python3.6/dist-packages/usb/backend/libusb1.py", line 883, in ctrl_transfer
    timeout))
  File "/usr/local/lib/python3.6/dist-packages/usb/backend/libusb1.py", line 595, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 110] Operation timed out

When I use script that uses os python module to os.write commands directly to /dev/usbtmc1 it works properly. Unfortunately I would like to use the script on my raspberry pi so I have to rewrite my code to use usbtmc module. Thanks in advance for your reply.

Alex Forencich

unread,
Sep 19, 2018, 1:03:07 PM9/19/18
to pytho...@googlegroups.com

Unfortunately, most Rigol devices do not implement USBTMC correctly.  Different models require different workarounds, and there is no reliable way to determine what workarounds are necessary at run time due to sharing of VID/PID values.  Hence, python-usbtmc does not support Rigol devices.  For instruments that support Ethernet, the VXI-11 implementation seems to be much more robust works for the most part, though there are still a few issues here and there. 

Alex Forencich
--
You received this message because you are subscribed to the Google Groups "python-ivi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-ivi+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages