From 92f9093220dc089158b091ca3a2f05c4d44c6319 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Thu, 3 Jun 2021 13:55:24 -0400 Subject: tested rfGen with LMX2487 control --- test_rfGenLMX2487.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test_rfGenLMX2487.py (limited to 'test_rfGenLMX2487.py') diff --git a/test_rfGenLMX2487.py b/test_rfGenLMX2487.py new file mode 100644 index 0000000..e87ad79 --- /dev/null +++ b/test_rfGenLMX2487.py @@ -0,0 +1,20 @@ +from rfGen import rfGenLMX2487 +import numpy as np +import platform + +if platform.system() == 'Linux': + rf=rfGenLMX2487(port='/dev/ttyUSB0', speed=115200, timeout=1) +else: + rf=rfGenLMX2487(port='COM5', speed=115200, timeout=1) + +freqStart = 6.830e9 +freqStop = 6.840e9 +Np = 21 +print(f'We will sweep frequency from {freqStart} to {freqStop} in {Np} points') +for freq in np.linspace(freqStart,freqStop, num=Np, endpoint=True): + print(f'Frequency set to {freq:.2f}') + rf.setFreq(freq) + +print("Printing log") +print(rf.log2str()) + -- cgit v1.2.3