Skip to content

Commit

Permalink
Mercury when aborting a ramp switch the magnet to hold (#792)
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshnielsen authored and WilliamHPNielsen committed Oct 13, 2017
1 parent 139c3a8 commit 9a007d1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions qcodes/instrument_drivers/oxford/mercuryiPS.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,12 @@ def _ramp_to_setpoint(self, ax, cmd, setpoint):
self._set_fld(ax, cmd, setpoint)
self.rtos()
if self.hold_after_set():
while not all(['HOLD' == getattr(self, a.lower() + '_ACTN')() for a in ax]):
time.sleep(0.1)
try:
while not all(['HOLD' == getattr(self, a.lower() + '_ACTN')() for a in ax]):
time.sleep(0.1)
except KeyboardInterrupt:
self.hold()
raise KeyboardInterrupt

def _ramp_to_setpoint_and_wait(self, ax, cmd, setpoint):
error = 0.2e-3
Expand Down

0 comments on commit 9a007d1

Please sign in to comment.