diff options
Diffstat (limited to 'qolab')
-rw-r--r-- | qolab/hardware/lockin/__init__.py | 3 | ||||
-rw-r--r-- | qolab/hardware/lockin/srs_sr865a.py | 40 |
2 files changed, 41 insertions, 2 deletions
diff --git a/qolab/hardware/lockin/__init__.py b/qolab/hardware/lockin/__init__.py index 799da22..04ce96e 100644 --- a/qolab/hardware/lockin/__init__.py +++ b/qolab/hardware/lockin/__init__.py @@ -8,7 +8,8 @@ class Lockin(BasicInstrument): self.config['FnamePrefix'] = 'lockin' self.config['Device model'] = 'Generic Lockin Without Hardware interface' self.config['FnamePrefix'] = 'lockin' - self.deviceProperties = ['FreqInt', 'FreqExt', 'Harm', 'SinAmpl']; + self.deviceProperties = ['FreqInt', 'FreqExt', 'Harm', 'SinAmpl', 'SinOffset', + 'Sensetivity', 'TimeConstan', 'FilterSlope', 'EquivalentFileterBW']; # Minimal set of methods to be implemented. pass diff --git a/qolab/hardware/lockin/srs_sr865a.py b/qolab/hardware/lockin/srs_sr865a.py index b20574b..7fbb575 100644 --- a/qolab/hardware/lockin/srs_sr865a.py +++ b/qolab/hardware/lockin/srs_sr865a.py @@ -6,6 +6,7 @@ class SRS_SR865A(LockinSCPI): super().__init__(resource) self.config['Device model']='SRS SR865A' self.resource.read_termination='\n' + self.deviceProperties.extend(['TimeBaseMode']) def getFreqInt(self): qstr = f'FreqInt?' @@ -16,7 +17,7 @@ class SRS_SR865A(LockinSCPI): cstr = f'FreqInt {freq}' rstr = self.write(cstr) - # this one has no setter + # this one has only getter def getFreqExt(self): qstr = f'FreqExt?' rstr = self.query(qstr) @@ -40,6 +41,43 @@ class SRS_SR865A(LockinSCPI): cstr = f'SLVL {ampl}' rstr = self.write(cstr) + def getSinOffset(self): + qstr = f'SOFF?' + rstr = self.query(qstr) + return(float(rstr)) + + def setSinOffset(self, offset): + cstr = f'SOFF {offset}' + rstr = self.write(cstr) + + def getSensetivity(self): + return(int(self.query(f'SCAL?'))) + + def setSensetivity(self, val): + rstr = self.write(f'SCAL {val}') + + def getTimeConstan(self): + return(int(self.query(f'OFLT?'))) + + def setTimeConstan(self, val): + rstr = self.write(f'OFLT {val}') + + def getFilterSlope(self): + return(int(self.query(f'OFSL?'))) + + def setFilterSlope(self, val): + rstr = self.write(f'OFSL {val}') + + # this one has only getter + def getEquivalentFileterBW(self): + return(float(self.query(f'ENBW?'))) + + def getTimeBaseMode(self): + return(int(self.query(f'TBMODE?'))) + + def setTimeBaseMode(self, val): + rstr = self.write(f'TBMODE {val}') + if __name__ == '__main__': import pyvisa |