aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qolab/hardware/lockin/__init__.py5
-rw-r--r--qolab/hardware/lockin/srs_sr865a.py12
2 files changed, 14 insertions, 3 deletions
diff --git a/qolab/hardware/lockin/__init__.py b/qolab/hardware/lockin/__init__.py
index 7c2f826..1385fcb 100644
--- a/qolab/hardware/lockin/__init__.py
+++ b/qolab/hardware/lockin/__init__.py
@@ -6,7 +6,9 @@ class Lockin(BasicInstrument):
BasicInstrument.__init__(self)
self.config['Device type']='Lockin'
self.config['FnamePrefix'] = 'lockin'
- self.deviceProperties = ['Freq'];
+ self.config['Device model'] = 'Generic Lockin Without Hardware interface'
+ self.config['FnamePrefix'] = 'lockin'
+ self.deviceProperties = ['FreqInt'];
# Minimal set of methods to be implemented.
pass
@@ -21,7 +23,6 @@ class LockinSCPI(SCPIinstr, Lockin):
SCPIinstr.__init__(self, resource)
Lockin.__init__(self)
self.config['DeviceId'] = str.strip(self.idn)
- self.deviceProperties = ['FreqInt'];
from .srs_sr865a import SRS_SR865A
diff --git a/qolab/hardware/lockin/srs_sr865a.py b/qolab/hardware/lockin/srs_sr865a.py
index 91e1978..1bddb6d 100644
--- a/qolab/hardware/lockin/srs_sr865a.py
+++ b/qolab/hardware/lockin/srs_sr865a.py
@@ -11,7 +11,15 @@ class SRS_SR865A(LockinSCPI):
self.config['Device model']='SRS SR865A'
self.resource.read_termination='\n'
- """ Note: Fixed frequency and Center frequency (of sweep) are different in this model """
+ def getFreqInt(self):
+ qstr = f'FreqInt?'
+ rstr = self.query(qstr)
+ return(float(rstr))
+
+ def setFreqInt(self, freq):
+ cstr = f'FreqInt {freq}'
+ rstr = self.write(cstr)
+
if __name__ == '__main__':
import pyvisa
@@ -20,6 +28,8 @@ if __name__ == '__main__':
print(rm.list_resources())
instr=rm.open_resource('TCPIP::192.168.0.51::INSTR')
lockin = SRS_SR865A(instr)
+ print('------ Header start -------------')
print(str.join('\n', lockin.getHeader()))
+ print('------ Header ends -------------')