aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware/rf_generator/agilent_e8257d.py
diff options
context:
space:
mode:
Diffstat (limited to 'qolab/hardware/rf_generator/agilent_e8257d.py')
-rw-r--r--qolab/hardware/rf_generator/agilent_e8257d.py25
1 files changed, 24 insertions, 1 deletions
diff --git a/qolab/hardware/rf_generator/agilent_e8257d.py b/qolab/hardware/rf_generator/agilent_e8257d.py
index c98f0f1..dab2277 100644
--- a/qolab/hardware/rf_generator/agilent_e8257d.py
+++ b/qolab/hardware/rf_generator/agilent_e8257d.py
@@ -9,7 +9,12 @@ class AgilentE8257D(RFGeneratorSCPI):
super().__init__(resource)
self.resource.read_termination='\n'
self.config['Device model'] = 'Agilent E8257D'
- self.deviceProperties.extend(['SweepCentralFreq', 'SweepSpan', ])
+ self.deviceProperties.extend([
+ 'RFPowerState',
+ 'RFAmplitude',
+ 'ModulationState',
+ 'SweepCentralFreq', 'SweepSpan',
+ ])
""" Note: Fixed frequency and Center frequency (of sweep) are different in this model """
@@ -46,6 +51,24 @@ class AgilentE8257D(RFGeneratorSCPI):
if cfreq is not None:
self.setSweepSpan(span)
+ def getModulationState(self):
+ return(int(self.query(f':MODulation:STATe?')))
+
+ def setModulationState(self, val):
+ rstr = self.write(f':MODulation:STATe {val}')
+
+ def getRFPowerState(self):
+ return(int(self.query(f':OUTPut:STATe?')))
+
+ def setRFPowerState(self, val):
+ rstr = self.write(f':OUTPut:STATe {val}')
+
+ def getRFAmplitude(self):
+ return(float(self.query(f':POWer:AMPLitude?')))
+
+ def seRFAmplitude(self, val):
+ rstr = self.write(f':POWer:AMPLitude {val}')
+
if __name__ == '__main__':
import pyvisa
print("testing")