From 13892e556d475cf34ae4e2424d45ff93580dca26 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Thu, 9 Dec 2021 21:20:52 -0500 Subject: simplified rf generator --- qolab/hardware/rf_generator/agilent_e8257d.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'qolab/hardware/rf_generator/agilent_e8257d.py') diff --git a/qolab/hardware/rf_generator/agilent_e8257d.py b/qolab/hardware/rf_generator/agilent_e8257d.py index eef3c7a..c98f0f1 100644 --- a/qolab/hardware/rf_generator/agilent_e8257d.py +++ b/qolab/hardware/rf_generator/agilent_e8257d.py @@ -8,15 +8,17 @@ class AgilentE8257D(RFGeneratorSCPI): def __init__(self, resource): super().__init__(resource) self.resource.read_termination='\n' + self.config['Device model'] = 'Agilent E8257D' + self.deviceProperties.extend(['SweepCentralFreq', 'SweepSpan', ]) """ Note: Fixed frequency and Center frequency (of sweep) are different in this model """ - def getFreq(self): + def getFreqFixed(self): qstr = f':FREQuency:Fixed?' rstr = self.query(qstr) return( float(rstr) ) - def setFreq(self, freq): + def setFreqFixed(self, freq): cstr = f':FREQuency:FIXED {freq}Hz' self.write(cstr) @@ -51,7 +53,7 @@ if __name__ == '__main__': print(rm.list_resources()) instr=rm.open_resource('TCPIP::192.168.0.114::INSTR') rfgen = AgilentE8257D(instr) - print(f'Fixed frequency: {rfgen.getFreq()}') - print(f'Sweep Central frequency: {rfgen.getSweepCentralFreq()}') - print(f'Sweep Span: {rfgen.getSweepSpan()}') + print('------ Header start -------------') + print(str.join('\n', rfgen.getHeader())) + print('------ Header ends -------------') -- cgit v1.2.3