Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mercury when aborting a ramp switch the magnet to hold #792

Merged
merged 1 commit into from
Oct 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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