Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change wait_steps_end function to prevent timeout error
Browse files Browse the repository at this point in the history
thibaudruelle committed Jul 24, 2019

Verified

This commit was signed with the committer’s verified signature.
jordemort Jordan Webb
1 parent ab8db67 commit 2decce7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions qcodes/instrument_drivers/Attocube/Attocube_ANC300.py
Original file line number Diff line number Diff line change
@@ -227,8 +227,13 @@ def ans_parser(name, ans, unit=None, parser=str):
self.add_function('stop',
call_cmd='stop {}'.format(self.aid))

self.add_function('wait_steps_end',
call_cmd='stepw {}'.format(self.aid))
def wait_steps_end(self):
old_timeout = self.root_instrument.visa_handle.timeout
try:
self.root_instrument.visa_handle.timeout = 3600
self.write_raw(f'stepw {self.aid}')
finally:
self.root_instrument.visa_handle.timeout = old_timeout

# TODO(Thibaud Ruelle): test for range before adding param
self.add_parameter('trigger_up_pin',

0 comments on commit 2decce7

Please sign in to comment.