aboutsummaryrefslogtreecommitdiff
path: root/qolab
diff options
context:
space:
mode:
Diffstat (limited to 'qolab')
-rw-r--r--qolab/hardware/scope/sds1104x.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/qolab/hardware/scope/sds1104x.py b/qolab/hardware/scope/sds1104x.py
index a812f5f..5c5dfe4 100644
--- a/qolab/hardware/scope/sds1104x.py
+++ b/qolab/hardware/scope/sds1104x.py
@@ -8,6 +8,7 @@ from qolab.hardware.scpi import response2numStr
from qolab.data.trace import Trace, TraceXY
import numpy as np
import scipy.signal
+from pyvisa.constants import InterfaceType
class SDS1104X(ScopeSCPI):
""" Siglent SDS1104x scope """
@@ -115,11 +116,12 @@ class SDS1104X(ScopeSCPI):
# expected full reply: 'C1:WF DAT2,#9000000140.........'
try:
wfRaw=self.query_binary_values(qstr, datatype='b', header_fmt='ieee', container=np.array, chunk_size=(Npnts+100))
- # somehow on windows there is a lingering empty string
- # which we need to flush out
- r=self.read()
- if r != '':
- print(f'UPS. We expected an empty string but got {r=}')
+ if self.resource.interface_type == InterfaceType.usb:
+ # Somehow on windows (at least with USB interface)
+ # there is a lingering empty string which we need to flush out
+ r=self.read()
+ if r != '':
+ print(f'WARNING: We expected an empty string but got {r=}')
trRaw.values = wfRaw.reshape(wfRaw.size,1)
if decimate and sparsing != 1:
numtaps = 3; # not sure it is the best case