Fixed a bug in tnmr interface, added functionality to load calibration files in ZVL net analyser

This commit is contained in:
2025-07-21 15:38:39 +02:00
parent 730aa61789
commit d7b45cd163
3 changed files with 12 additions and 1 deletions

View File

@@ -41,6 +41,10 @@ class ZVLNetAnalyzer():
#self.instrument.write('INIT:SCOP OFF')
#self.instrument.write('DISPlay:WINDow2:STATe ON')
def load_calibration(self, f):
self.instrument.write(f":MMEMORY:STORE:CORR 1, 'OSM1 {f}'") # put calibration in pool
self.instrument.write(f":MMEMORY:LOAD:CORR 1, 'OSM1 {f}'") # load from pool
def set_freq_range(self, start, stop):
'''In Hz'''
self.instrument.write(f'SENS1:FREQ:STAR {start}')

View File

@@ -26,6 +26,7 @@ class ZVLNode(fc.Readable):
pollinterval = fc.Parameter(default=1)
central_freq = fc.Parameter('central_freq', fc.FloatRange(min=9_000, max=13_600_000_000, unit='Hz'), default=10_000_000, readonly=False)
freq_span = fc.Parameter('freq_span', fc.FloatRange(unit='Hz'), default=1_000_000, readonly=False)
calibration = fc.Parameter('calibration filename', fc.StringType(), default='None', readonly=False)
analyser_ip = fc.Parameter('analyser_ip', fc.StringType())
@@ -42,7 +43,12 @@ class ZVLNode(fc.Readable):
self.NA.set_freq_span(self.central_freq, self.freq_span)
self.value = self.NA.get_data()[1]
self.status = ('IDLE', 'idle')
def write_calibration(self, f):
self.calibration = f
self.NA.load_calibration(self.calibration)
return self.read_calibration()
def write_central_freq(self, f):
self.central_freq = (f)
self.acq()

View File

@@ -178,6 +178,7 @@ class TNMR:
print('ZG completed')
else:
print('An acquisition is already running')
return
if(CHECK_MODE == 'data'):
elapsed = 0