diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2022-04-01 11:34:14 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2022-04-01 11:34:14 -0400 |
commit | 070810fa84196c11c5191929839473cf0da0dcb5 (patch) | |
tree | 90b495be392012912fdc1e66b467e17aa3bd9a30 /qolab/hardware/rf_generator | |
parent | 19f0ede75bf4c5eba448edbb1e5fe6145c83bef2 (diff) | |
download | qolab-070810fa84196c11c5191929839473cf0da0dcb5.tar.gz qolab-070810fa84196c11c5191929839473cf0da0dcb5.zip |
added test/example case for qol_lmx2487 RFgen
Diffstat (limited to 'qolab/hardware/rf_generator')
-rw-r--r-- | qolab/hardware/rf_generator/qol_lmx2487.py | 11 |
1 files changed, 11 insertions, 0 deletions
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 -------------') |