aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware/scope
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-06-17 16:50:35 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-06-17 16:52:05 -0400
commit3caa835b22b6ba07481b272a32cab8daeb6b3f02 (patch)
tree483141657b11a759c6cd6898209ffd061cf34810 /qolab/hardware/scope
parentc6058bf229e993bb60e090587bc95bfff766bc11 (diff)
downloadqolab-3caa835b22b6ba07481b272a32cab8daeb6b3f02.tar.gz
qolab-3caa835b22b6ba07481b272a32cab8daeb6b3f02.zip
added modifications to include Siglent SDS2304X modelv0.10
Diffstat (limited to 'qolab/hardware/scope')
-rw-r--r--qolab/hardware/scope/__init__.py1
-rw-r--r--qolab/hardware/scope/sds2304x.py33
2 files changed, 34 insertions, 0 deletions
diff --git a/qolab/hardware/scope/__init__.py b/qolab/hardware/scope/__init__.py
index 3bca8f0..b4bdd0e 100644
--- a/qolab/hardware/scope/__init__.py
+++ b/qolab/hardware/scope/__init__.py
@@ -81,4 +81,5 @@ class ScopeSCPI(SCPIinstr, Scope):
self.config['DeviceId'] = str.strip(self.idn)
from .sds1104x import SDS1104X
+from .sds2304x import SDS2304X
diff --git a/qolab/hardware/scope/sds2304x.py b/qolab/hardware/scope/sds2304x.py
new file mode 100644
index 0000000..fc9b129
--- /dev/null
+++ b/qolab/hardware/scope/sds2304x.py
@@ -0,0 +1,33 @@
+"""
+by Rob Behary and Eugeniy Mikhailov 2024/06/17
+"""
+
+from qolab.hardware.scope import SDS1104X
+from qolab.hardware.basic import BasicInstrument
+
+import re
+
+class SDS2304X(SDS1104X):
+ """ Siglent SDS2354x scope """
+ vertDivOnScreen = 8 # unlike SDS1104X, number of divisions matches what is seen on the screen
+ horizDivOnScreen = 10
+ def __init__(self, resource, *args, **kwds):
+ super().__init__(resource, *args, **kwds)
+ self.config['Device model'] = 'SDS2304X'
+ self.resource.read_termination='\n'
+ self.numberOfChannels = 4
+ self.maxRequiredPoints = 1000; # desired number of points per channel, can return twice more
+
+
+ @BasicInstrument.tsdb_append
+ def getTimePerDiv(self):
+ qstr = 'TDIV?'
+ rstr = self.query(qstr)
+ # Siglent claims that this model should have same commands as SDS1104X
+ # however response is different, for example we got '2.00E-08S' instead 'TDIV 2.00E-08S'
+ # expected reply to query: '2.00E-08S'
+ spltStr=re.split('S', rstr)
+ numberString = spltStr[0]
+ #prefix, numberString, unit = response2numStr(rstr, firstSeparator=None, unit='S')
+ return(float(numberString))
+