aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware/scope/rigolds1054z.py
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-19 00:14:56 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-19 00:14:56 -0400
commit146852c85b46b3dc9b94ea0fb4f8b5b02e1c953d (patch)
tree7588a70992db300cf01f2cf4b18938d40aeddda8 /qolab/hardware/scope/rigolds1054z.py
parent2c5f93e689195edbb7fbaa4c4beb8587f84281f2 (diff)
downloadqolab-146852c85b46b3dc9b94ea0fb4f8b5b02e1c953d.tar.gz
qolab-146852c85b46b3dc9b94ea0fb4f8b5b02e1c953d.zip
better doc string
Diffstat (limited to 'qolab/hardware/scope/rigolds1054z.py')
-rw-r--r--qolab/hardware/scope/rigolds1054z.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/qolab/hardware/scope/rigolds1054z.py b/qolab/hardware/scope/rigolds1054z.py
index a97db67..8a7d9a5 100644
--- a/qolab/hardware/scope/rigolds1054z.py
+++ b/qolab/hardware/scope/rigolds1054z.py
@@ -171,7 +171,7 @@ class RigolDS1054z(ScopeSCPI):
chunk_size = 70_000 # unfortunately large chunk size prone to read errors
errCnt = 0
strt = 1
- stp = min(maxreadable, Npnts)
+ stp = min(chunk_size, Npnts)
errorFreeChunkSize = []
errorProneChunkSize = []
while strt <= Npnts:
@@ -182,6 +182,17 @@ class RigolDS1054z(ScopeSCPI):
self.write(f":WAVeform:STOP {stp}")
qstr = ":WAVeform:DATA?"
try:
+ """
+ All this caraziness with tuning chunk_size
+ is because Rigol usbtmc connection is bugy.
+ It present itself as high speed device over USB,
+ but set incompatible packet size of 64
+ while the USB standard dictates 512.
+ In linux dmesg complains:
+ kernel: ... bulk endpoint 0x3 has invalid maxpacket 64
+
+ Seel
+
wfRawChunk = self.query_binary_values(
qstr,
datatype="b",
@@ -192,6 +203,16 @@ class RigolDS1054z(ScopeSCPI):
if len(wfRawChunk) == 0:
continue # we need to repeat chunk read
wfRaw[strt - 1 : stp] = wfRawChunk
+ """
+ All this craziness with tuning chunk_size
+ and catching VisaIOError
+ is because Rigol usbtmc connection is bugy.
+ It present itself as high speed device over USB,
+ but set incompatible packet size of 64
+ while the USB standard dictates 512.
+ In linux dmesg complains:
+ 'bulk endpoint 0x3 has invalid maxpacket 64'
+ """
errorFreeChunkSize.append(chunk_size)
chunk_size = min(maxreadable, int(chunk_size * 1.1))
strt += chunk_size