diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-26 18:57:43 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-26 18:57:43 -0500 |
commit | 4cbf2374551683829d32e148770e3d90374386c7 (patch) | |
tree | a2a2d1d6f6bf870a73f39543b59710d946104ce4 /qolab | |
parent | 3af263e503dea0c7f5a257edf5096af09ea54263 (diff) | |
download | qolab-4cbf2374551683829d32e148770e3d90374386c7.tar.gz qolab-4cbf2374551683829d32e148770e3d90374386c7.zip |
scope have basic tsdb loggers
Diffstat (limited to 'qolab')
-rw-r--r-- | qolab/hardware/scope/sds1104x.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qolab/hardware/scope/sds1104x.py b/qolab/hardware/scope/sds1104x.py index c41c53a..540e800 100644 --- a/qolab/hardware/scope/sds1104x.py +++ b/qolab/hardware/scope/sds1104x.py @@ -2,6 +2,7 @@ Created by Eugeniy E. Mikhailov 2021/11/29 """ +from qolab.hardware.basic import BasicInstrument from qolab.hardware.scope import ScopeSCPI from qolab.hardware.scpi import response2numStr from qolab.data.trace import Trace, TraceXY @@ -38,6 +39,7 @@ class SDS1104X(ScopeSCPI): prefix, numberString, unit = response2numStr(rstr, firstSeparator=' ', unit='pts') return(int(float(numberString))) + @BasicInstrument.tsdb_append def getSampleRate(self): rstr = self.query('SAMPLE_RATE?'); # expected reply is like 'SARA 1.00E+09Sa/s' @@ -128,6 +130,7 @@ class SDS1104X(ScopeSCPI): prefix, numberString, unit = response2numStr(rstr, firstSeparator=' ', unit='V') return(float(numberString)) + @BasicInstrument.tsdb_append def getTimePerDiv(self): qstr = f'TDIV?' rstr = self.query(qstr) @@ -135,11 +138,13 @@ class SDS1104X(ScopeSCPI): prefix, numberString, unit = response2numStr(rstr, firstSeparator=' ', unit='S') return(float(numberString)) + @BasicInstrument.tsdb_append def setTimePerDiv(self, timePerDiv): cstr = f'TDIV {timePerDiv}' self.write(cstr) # if out of range, the VAB bit (bit 2) in the STB register to be set + @BasicInstrument.tsdb_append def getTrigDelay(self): qstr = f'TRIG_DELAY?' rstr = self.query(qstr) |