I am having a problem with query_binary_values() and read_raw() when downloading waveform or csv data from my Rigol DS1054Z. These commands run just fine on my RPi3, RPi2 and PC, but with the latest RPi4 (and the VL805) I am seeing errors.
Here is what I see from query_binary_values():
File "test_print_screen.py", line 6, in <module>
scope.write_screen_capture()
File "/home/pi/python_code/rigol/rigol_ds1054z.py", line 120, in write_screen_capture
raw_data_list = self.oscilloscope.query_binary_values(':DISP:DATA? ON,OFF,PNG')
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa/resources/messagebased.py", line 703, in query_binary_values
data_points, chunk_size)
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa/resources/messagebased.py", line 481, in read_binary_values
block = self._read_raw(chunk_size)
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa/resources/messagebased.py", line 387, in _read_raw
chunk, status = self.visalib.read(self.session, size)
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa-py/highlevel.py", line 345, in read
ret = self.sessions[session].read(count)
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa-py/usb.py", line 111, in read
usb.USBError)
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa-py/sessions.py", line 477, in _read
current = reader()
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa-py/usb.py", line 105, in <lambda>
return self._read(lambda: self.interface.read(count),
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa-py/protocols/usbtmc.py", line 338, in read
response = BulkInMessage.from_bytes(resp)
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa-py/protocols/usbtmc.py", line 108, in from_bytes
assert msgid == MsgID.dev_dep_msg_in
AssertionError
Here is what I see from read_raw():
Traceback (most recent call last):
File "test_print_screen.py", line 6, in <module>
scope.write_screen_capture()
File "/home/pi/python_code/rigol/rigol_ds1054z.py", line 124, in write_screen_capture
raw_data = self.oscilloscope.read_raw()[11:] # strip off first 11 bytes
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa/resources/messagebased.py", line 364, in read_raw
return bytes(self._read_raw(size))
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa/resources/messagebased.py", line 387, in _read_raw
chunk, status = self.visalib.read(self.session, size)
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa-py/highlevel.py", line 345, in read
ret = self.sessions[session].read(count)
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa-py/usb.py", line 111, in read
usb.USBError)
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa-py/sessions.py", line 477, in _read
current = reader()
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa-py/usb.py", line 105, in <lambda>
return self._read(lambda: self.interface.read(count),
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa-py/protocols/usbtmc.py", line 338, in read
response = BulkInMessage.from_bytes(resp)
File "/home/pi/.local/lib/python2.7/site-packages/pyvisa-py/protocols/usbtmc.py", line 108, in from_bytes
assert msgid == MsgID.dev_dep_msg_in
AssertionError
If I wait one second after sending my write(':DISP:DATA? ON,OFF,PNG') command, I don't get any errors, but I only download 41bytes of data (when expecting 30KB).
Is this an issue with the VL805?
I suspect this is not a pyvisa issue, but a problem with bulk transfers with the VL805.
I am having a problem with query_binary_values() and read_raw() when downloading waveform or csv data from my Rigol DS1054Z. These commands run just fine on my RPi3, RPi2 and PC, but with the latest RPi4 (and the VL805) I am seeing errors.
Here is what I see from query_binary_values():
Here is what I see from read_raw():
If I wait one second after sending my write(':DISP:DATA? ON,OFF,PNG') command, I don't get any errors, but I only download 41bytes of data (when expecting 30KB).
Is this an issue with the VL805?
I suspect this is not a pyvisa issue, but a problem with bulk transfers with the VL805.