From 070810fa84196c11c5191929839473cf0da0dcb5 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Fri, 1 Apr 2022 11:34:14 -0400 Subject: added test/example case for qol_lmx2487 RFgen --- qolab/hardware/rf_generator/qol_lmx2487.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qolab/hardware/rf_generator/qol_lmx2487.py b/qolab/hardware/rf_generator/qol_lmx2487.py index 1c5d588..e18b4ec 100644 --- a/qolab/hardware/rf_generator/qol_lmx2487.py +++ b/qolab/hardware/rf_generator/qol_lmx2487.py @@ -1,4 +1,5 @@ from qolab.hardware.basic import BasicInstrument +from qolab.hardware.rf_generator import RFGenerator import serial @@ -57,3 +58,13 @@ class QOL_LMX2487(RFGenerator): return self._FreqFixed +if __name__ == '__main__': + import platform + if platform.system() == 'Linux': + rfgen=QOL_LMX2487(port='/dev/ttyUSB0', speed=115200, timeout=1) + else: + rfgen=QOL_LMX2487(port='COM4', speed=115200, timeout=1) + print("testing") + print('------ Header start -------------') + print(str.join('\n', rfgen.getHeader())) + print('------ Header ends -------------') -- cgit v1.2.3