diff options
Diffstat (limited to 'qolab/hardware/rf_generator/agilent_e8257d.py')
-rw-r--r-- | qolab/hardware/rf_generator/agilent_e8257d.py | 12 |
1 files changed, 7 insertions, 5 deletions
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 -------------') |