From 9e481f9c345cc28bca5a70f9aace1760932380eb Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Sun, 21 Jul 2024 12:49:26 -0400 Subject: added function to acquire and set memory depth --- qolab/hardware/scope/rigolds1054z.py | 38 +++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/qolab/hardware/scope/rigolds1054z.py b/qolab/hardware/scope/rigolds1054z.py index 802a273..a78a978 100644 --- a/qolab/hardware/scope/rigolds1054z.py +++ b/qolab/hardware/scope/rigolds1054z.py @@ -108,6 +108,42 @@ class RigolDS1054z(ScopeSCPI): """ self.write(f"TRIGger:SWEep {val}") + @BasicInstrument.tsdb_append + def getMemoryDepth(self): + """Memory depth per channel. + + Returns + ------- + Number corresponding to memory depth or AUTO + """ + + res = self.query(":ACQuire:MDEPth?") + return res + + @BasicInstrument.tsdb_append + def setMemoryDepth(self, val): + """Set memory depth per channel. + + For 1 channel regime valid settings are + {AUTO|12000|120000|1200000|12000000|24000000} + Wherein, 24000000 (pts) is an optional memory depth. + + For 2 channel regime divide numbers by 2, i.e. + {AUTO|6000|60000|600000|6000000|12000000} + + For 4 channel regime divide numbers by 4, i.e. + {AUTO|3000|30000|300000|3000000|6000000} + + For 8 channel regime valid settings are + {AUTO|12000|120000|1200000|12000000|24000000}. + Wherein, 24000000 (pts) is an optional memory depth. + + For 16 channel regime valid settings are + {AUTO|6000|60000| 600000|6000000|12000000}. + Wherein, 12000000 (pts) is an optional memory depth. + """ + self.write(f":ACQuire:MDEPth {val}") + def stop(self): self.write(":STOP") @@ -296,7 +332,7 @@ class RigolDS1054z(ScopeSCPI): t.config["unit"] = "S" t.config["tags"]["TimePerDiv"] = timePerDiv t.config["tags"]["TrigDelay"] = trigDelay - t.config["tags"]["SampleRate"] = int(1/dx) + t.config["tags"]["SampleRate"] = int(1 / dx) t.config["tags"]["AvailableNPnts"] = availableNpnts t.config["tags"]["Npnts"] = Npnts t.config["tags"]["Sparsing"] = sparsing -- cgit v1.2.3