diff --git a/qcodes/instrument_drivers/ZI/ZIUHFLI.py b/qcodes/instrument_drivers/ZI/ZIUHFLI.py index b88026d3970..139397d9210 100644 --- a/qcodes/instrument_drivers/ZI/ZIUHFLI.py +++ b/qcodes/instrument_drivers/ZI/ZIUHFLI.py @@ -260,7 +260,8 @@ def add_post_trigger_action(self, action: Callable) -> None: has been armed. The action must be a callable taking zero arguments """ - self._scopeactions.append(action) + if action not in self._scopeactions: + self._scopeactions.append(action) @property def post_trigger_actions(self) -> List[Callable]: @@ -271,7 +272,7 @@ def prepare_scope(self): Prepare the scope for a measurement. Must immediately preceed a measurement. """ - # + log.info('Preparing the scope') # A convenient reference @@ -471,15 +472,18 @@ def get(self): # scope.finish is always called even if the # measurement is interrupted self._instrument.daq.setInt('/{}/scopes/0/single'.format(self._instrument.device), 1) - self._instrument.daq.sync() - scope = self._instrument.scope # There are issues reusing the scope. + + scope = self._instrument.scope scope.set('scopeModule/clearhistory', 1) # Start the scope triggering/acquiring - params['scope_runstop'].set('run') # set /dev/scopes/0/enable to 1 + # set /dev/scopes/0/enable to 1 + params['scope_runstop'].set('run') + + self._instrument.daq.sync() - log.info('[*] Starting ZI scope acquisition.') + log.debug('Starting ZI scope acquisition.') # Start something... hauling data from the scopeModule? scope.execute() @@ -490,7 +494,10 @@ def get(self): starttime = time.time() timedout = False - while scope.progress() < 1: + progress = scope.progress() + while progress < 1: + log.debug('Scope progress is {}'.format(progress)) + progress = scope.progress() time.sleep(0.1) # This while+sleep is how ZI engineers do it if (time.time()-starttime) > 20*meas_time+1: timedout = True