aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware/scope
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-23 13:31:22 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-23 13:31:22 -0400
commitfbd5d3b71cdc120c75c0f60737c4faf8d10ac4f2 (patch)
tree8fb05192f760bb89f96285fbc27ff41e120da736 /qolab/hardware/scope
parent62464241c829f4e167711482e53e20f5520cf81e (diff)
downloadqolab-fbd5d3b71cdc120c75c0f60737c4faf8d10ac4f2.tar.gz
qolab-fbd5d3b71cdc120c75c0f60737c4faf8d10ac4f2.zip
added sleep time to let scope settle after settings change
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: