From 16bc8f5f85f71f500e0aa7e041bd6b6c7af42652 Mon Sep 17 00:00:00 2001 From: jana-d Date: Fri, 24 Mar 2017 17:05:55 +0100 Subject: [PATCH 1/2] fix move trigger mode setting to where it belongs --- qcodes/instrument_drivers/ZI/ZIUHFLI.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qcodes/instrument_drivers/ZI/ZIUHFLI.py b/qcodes/instrument_drivers/ZI/ZIUHFLI.py index 41d04faea96..40f9d61fd25 100644 --- a/qcodes/instrument_drivers/ZI/ZIUHFLI.py +++ b/qcodes/instrument_drivers/ZI/ZIUHFLI.py @@ -379,7 +379,13 @@ def get(self): # We add one second to account for latencies and random delays meas_time = segs*(params['scope_duration'].get()+deadtime)+1 npts = params['scope_length'].get() - + # one shot per trigger. This needs to be set every time + # a the scope is enabled as below using scope_runstop + # We should also test if scopeModule/mode and scopeModule/averager/weight + # needs to be set every time since we are creating a new scopemodule + # here + self._instrument.daq.setInt('/{}/scopes/0/single'.format(self._instrument.device), 1) + self._instrument.daq.sync() # Create a new scopeModule instance (TODO: Why a new instance?) scope = self._instrument.daq.scopeModule() @@ -390,13 +396,7 @@ def get(self): params['scope_runstop'].set('run') log.info('[*] Starting ZI scope acquisition.') - # one shot per trigger. This needs to be set every time - # a the scope is enabled as below using scope_runstop - # We should also test if scopeModule/mode and scopeModule/averager/weight - # needs to be set every time since we are creating a new scopemodule - # here - self._instrument.daq.setInt('/{}/scopes/0/single'.format(self._instrument.device), 1) - self._instrument.daq.sync() + # Start something... hauling data from the scopeModule? scope.execute() From cb977ca0ac8aaef88eea6a457ed8148573957440 Mon Sep 17 00:00:00 2001 From: jana-d Date: Fri, 24 Mar 2017 17:07:01 +0100 Subject: [PATCH 2/2] HACK: hardcode scope settings because setting them in the main driver does not work This breaks all other scope fucs for now --- qcodes/instrument_drivers/ZI/ZIUHFLI.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qcodes/instrument_drivers/ZI/ZIUHFLI.py b/qcodes/instrument_drivers/ZI/ZIUHFLI.py index 40f9d61fd25..6abd0186f38 100644 --- a/qcodes/instrument_drivers/ZI/ZIUHFLI.py +++ b/qcodes/instrument_drivers/ZI/ZIUHFLI.py @@ -388,7 +388,11 @@ def get(self): self._instrument.daq.sync() # Create a new scopeModule instance (TODO: Why a new instance?) scope = self._instrument.daq.scopeModule() - + # TODO We are hard coding scope mode and avg weight here because the setting + # in the main driver references a different scope which will fail and give garbage data + # YOU cannot set other scope modes or weights at the moment + scope.set('scopeModule/mode', 1) + scope.set('scopeModule/averager/weight', 1) # Subscribe to the relevant... publisher? scope.subscribe('/{}/scopes/0/wave'.format(self._instrument.device))