From a68265544a1d2fd93ed39cb20667a6962533cec2 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Wed, 24 Jul 2024 23:35:50 -0400 Subject: implemented switchToFastGrab and restorePriorToFastGrab for RigolDS1054z --- qolab/hardware/scope/rigolds1054z.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/qolab/hardware/scope/rigolds1054z.py b/qolab/hardware/scope/rigolds1054z.py index c735a01..566ec63 100644 --- a/qolab/hardware/scope/rigolds1054z.py +++ b/qolab/hardware/scope/rigolds1054z.py @@ -207,6 +207,31 @@ class RigolDS1054z(ScopeSCPI): def run(self): self.write(":RUN") + def restorePriorToFastGrab(self, chNum, old_config): + """Restore relevant channel/scope settings prior to fast grab tune up.""" + self.setMemoryDepth(old_config["DeviceConfig"]["MemoryDepth"]) + + def switchToFastGrab(self, chNum): + """Switch scope to the fastest mode for trace delivery. + + To be fast, it should aim to decrease data transfer time, + i.e. reduce number of transferred point. + It also need to be interface dependent. GPIB and USB are known + to be quite slow when compared to network connection. + + FIXME try to be smart about connection interface. + + Return + ------ + old_config : dictionary + old config with settings necessary to restore initial state + """ + + old_config = self.getConfig() + self.setMemoryDepth(3000) + + return old_config + def getRawWaveform( self, chNum, availableNpnts=None, maxRequiredPoints=None, decimate=True ): -- cgit v1.2.3