diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-09 23:05:40 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-09 23:05:40 -0500 |
commit | 16b9771d4f4308bd8e68d56e071e8b8134a1cc69 (patch) | |
tree | 788ab0cf04258fb46992d7d2b4657d8fc8dc0a0a /qolab/hardware | |
parent | b0d8504e354f1c7eace1bb1049dbb28acbd50138 (diff) | |
download | qolab-16b9771d4f4308bd8e68d56e071e8b8134a1cc69.tar.gz qolab-16b9771d4f4308bd8e68d56e071e8b8134a1cc69.zip |
more locking functions
Diffstat (limited to 'qolab/hardware')
-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 |