From 1037354e8b4c7b0f267c66b1be54478195b964c6 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Thu, 25 Jul 2024 13:44:05 -0400 Subject: bug fix: memory depth changes only if Rigol scope in not STOP state --- qolab/hardware/scope/rigolds1054z.py | 7 +++++++ 1 file changed, 7 insertions(+) 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): -- cgit v1.2.3