aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-25 13:44:05 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-25 13:44:05 -0400
commit1037354e8b4c7b0f267c66b1be54478195b964c6 (patch)
treef92eda7bd13adf19b1b0daf54be2a659827d6410 /qolab/hardware
parentbe11fa089bd47e7df06f6e54fa73b1a4bbf213a0 (diff)
downloadqolab-1037354e8b4c7b0f267c66b1be54478195b964c6.tar.gz
qolab-1037354e8b4c7b0f267c66b1be54478195b964c6.zip
bug fix: memory depth changes only if Rigol scope in not STOP state
Diffstat (limited to 'qolab/hardware')
-rw-r--r--qolab/hardware/scope/rigolds1054z.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/qolab/hardware/scope/rigolds1054z.py b/qolab/hardware/scope/rigolds1054z.py
index 53b23e1..1bfe117 100644
--- a/qolab/hardware/scope/rigolds1054z.py
+++ b/qolab/hardware/scope/rigolds1054z.py
@@ -187,7 +187,14 @@ class RigolDS1054z(ScopeSCPI):
{AUTO|6000|60000| 600000|6000000|12000000}.
Wherein, 12000000 (pts) is an optional memory depth.
"""
+
+ # memory depth can be changed only when scope is not in STOP state
+ running = self.getRun()
+ if not running:
+ self.setRun(True)
self.write(f":ACQuire:MDEPth {val}")
+ if not running: # restore STOP/RUN state
+ self.setRun(False)
@BasicInstrument.tsdb_append
def getSampleRate(self):