Skip to content

Commit

Permalink
Merge pull request #11 from jenshnielsen/zi-hacks
Browse files Browse the repository at this point in the history
Zi hacks
  • Loading branch information
jenshnielsen committed Mar 24, 2017
2 parents ad05a69 + cb977ca commit bf57109
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions qcodes/instrument_drivers/ZI/ZIUHFLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,24 +379,28 @@ 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()

# 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))

# Start the scope triggering/acquiring
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()

Expand Down

0 comments on commit bf57109

Please sign in to comment.