From 4cbf2374551683829d32e148770e3d90374386c7 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Sun, 26 Dec 2021 18:57:43 -0500 Subject: scope have basic tsdb loggers --- qolab/hardware/scope/sds1104x.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qolab/hardware/scope') 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) -- cgit v1.2.3