diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-21 12:49:26 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-21 12:49:26 -0400 |
commit | 9e481f9c345cc28bca5a70f9aace1760932380eb (patch) | |
tree | 122a90129c9f059a283eeae363260fb2a9245648 /qolab/hardware | |
parent | 559e63c15066cf4d4ca6c18a88d54aefb7d439eb (diff) | |
download | qolab-9e481f9c345cc28bca5a70f9aace1760932380eb.tar.gz qolab-9e481f9c345cc28bca5a70f9aace1760932380eb.zip |
added function to acquire and set memory depth
Diffstat (limited to 'qolab/hardware')
-rw-r--r-- | qolab/hardware/scope/rigolds1054z.py | 38 |
1 files changed, 37 insertions, 1 deletions
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 |