From 68251422d824bccc574cc0263146845f48a03f49 Mon Sep 17 00:00:00 2001 From: Sai Lakhan Ekal <sai.lakhan.ekal@desy.de> Date: Fri, 13 May 2022 16:00:47 +0200 Subject: [PATCH] added functions in VNA *Get current cw frequency, *Get current RF Power, *Set cw frequency, *Set Rf power --- Python script/VNA.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Python script/VNA.py b/Python script/VNA.py index 30a53c6..be86a4e 100644 --- a/Python script/VNA.py +++ b/Python script/VNA.py @@ -84,9 +84,22 @@ class Vna: """ self.vna.write("CALC1:PAR:MEAS '" + trace + "', '" + measurement + "'") + def get_current_cw_frequency(self): + return self.vna.query('SOUR:FREQ:CW?') + + def get_current_power(self): + return self.vna.query('SOUR:POW?') + + def set_cw_frequency(self, freq): + return self.vna.write(f'SOUR:FREQ:CW {freq}') + + def set_power(self, power): + return self.vna.write(f'SOUR:POW {power}') + def set_sweep_points(self, points): return self.vna.query("SENS1:SWE:POIN " + str(points) + ";*OPC?") + def check_error_queue(self): """ Check the error queue. Initially *CLS asserted in beginning of program. -- GitLab