aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware/scope
diff options
context:
space:
mode:
Diffstat (limited to 'qolab/hardware/scope')
-rw-r--r--qolab/hardware/scope/_basic.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/qolab/hardware/scope/_basic.py b/qolab/hardware/scope/_basic.py
index f86c3b3..b9020f1 100644
--- a/qolab/hardware/scope/_basic.py
+++ b/qolab/hardware/scope/_basic.py
@@ -172,6 +172,7 @@ class Scope(BasicInstrument):
starttime = time.time()
deadline = starttime + timeout
+ timespan = self.getTimePerDiv()*self.horizDivOnScreen
scaled_corectly = False
# maximally zoom out to get full signal
self.setChanVoltageOffset(chNum, 0)
@@ -179,6 +180,7 @@ class Scope(BasicInstrument):
self.setRun(True)
while (not scaled_corectly) and (time.time() < deadline):
+ time.sleep(timespan + 0.5) # give enough time to acquire a trace and switch to Run
tr = self.getTrace(chNum)
vPerDiv = self.getChanVoltsPerDiv(chNum)
offset = self.getChanVoltageOffset(chNum)
@@ -197,9 +199,9 @@ class Scope(BasicInstrument):
break
offset = -(tr_max + tr_min) / 2
vPerDiv = (tr_max - tr_min) / (self.vertDivOnScreen * (1 - margin * 1.2))
- logger.info(f"Requesting {offset=} for {chNum=}.")
+ logger.debug(f"Auto Scaler Requesting {offset=} for {chNum=}.")
self.setChanVoltageOffset(chNum, offset)
- logger.info(f"Requesting {vPerDiv=} for {chNum=}.")
+ logger.debug(f"Auto Scaler Requesting {vPerDiv=} for {chNum=}.")
self.setChanVoltsPerDiv(chNum, vPerDiv)
scaled_corectly = False
if time.time() > deadline: