Open mcgdb opened 7 years ago
The USBTMC implementation on that entire scope series is broken and a such is currently not supported until rigol fixes it with a firmware update.
Interestingly I see the same error on Siglent SDG 1032x series function generator. Running:
import usbtmc generator = usbtmc.Instrument(0xf4ed,0xee3a) generator.write("*IDN?") generator.read_raw()
Returns the expected response exactly half of the time. First I usually get an error:
Traceback (most recent call last): File "
", line 1, in File "/home/ffg/Downloads/justincase/python-usbtmc-master/usbtmc/usbtmc.py", line 666, in read_raw msgid, btag, btaginverse, transfer_size, transfer_attributes, data = self.unpack_dev_dep_resp_header(resp) File "/home/ffg/Downloads/justincase/python-usbtmc-master/usbtmc/usbtmc.py", line 591, in unpack_dev_dep_resp_header transfer_size, transfer_attributes = struct.unpack_from('<LBxxx', data, 4) struct.error: unpack_from requires a buffer of at least 8 bytes
But the second time I run (without writing anything else in between)
generator.read_raw()
I get the expected response.
b'Siglent Technologies,SDG1032X,SDG1XCAXXXXXXX,1.01.01'
Even more interestingly, this error does not occur with all commands, only *IDN? as far as I can tell. So I decided to just ignore this issue as it seems to be some bug in the firmeware.
My other devices, Rigol DS1052E and Rigol DM3051 work perfectly.
Hello,
On a fresh install and with running ipython in Arch Linux with sudo, I get the following output with a DS1104Z scope:
Python 3.6.2 (default, Jul 20 2017, 03:52:27) Type "copyright", "credits" or "license" for more information.
I've tried adding a b to the argument to pass it in as a byte data, but this is of no help. Have you seen this issue before? Any help would be greatly appreciated.
Thanks!