Skip to content

Commit

Permalink
Merge pull request #5147 from QCoDeS/astafan8/3706-interlock
Browse files Browse the repository at this point in the history
Fix Keithley 3706A driver to refer to the new interlock status string
  • Loading branch information
astafan8 committed May 8, 2023
2 parents 40f9527 + 9f4320a commit 1e8ff5b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 2 additions & 0 deletions docs/changes/newsfragments/5147.improved_driver
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix Keithley 3706A driver to use the updated interlock status strings
(following up on :pr:`5007`)
17 changes: 10 additions & 7 deletions qcodes/instrument_drivers/Keithley/Keithley_3706A.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def close_channel(self, val: str) -> None:
)
if val in forbidden_channels.split(","):
warnings.warn(
"You are attempting to close channels that are " "forbidden to close.",
"You are attempting to close channels that are forbidden to close.",
UserWarning,
2,
)
Expand Down Expand Up @@ -165,10 +165,13 @@ def _warn_on_disengaged_interlocks(self, val: str) -> None:
interlock_state = [
state for state in states if state["slot_no"] == slot
][0]
if interlock_state["state"] == "Interlock is disengaged":
if (
interlock_state["state"]
== "Interlocks 1 and 2 are disengaged on the card"
):
warnings.warn(
f"The hardware interlock in Slot "
f'{interlock_state["slot_no"]} is disengaged. '
f"The hardware interlocks in Slot "
f'{interlock_state["slot_no"]} are disengaged. '
f"The analog backplane relay {channel} "
"cannot be energized.",
UserWarning,
Expand Down Expand Up @@ -395,10 +398,10 @@ def set_backplane(self, val: str, backplane: str) -> None:
plane_specifiers = backplane.split(",")
val_specifiers = val.split(",")
for element in states:
if element["state"] == "Interlock is disengaged":
if element["state"] == "Interlocks 1 and 2 are disengaged on the card":
warnings.warn(
f"The hardware interlock in Slot "
f'{element["slot_no"]} is disengaged. '
f"The hardware interlocks in Slot "
f'{element["slot_no"]} are disengaged. '
"The corresponding analog backplane relays "
"cannot be energized.",
UserWarning,
Expand Down

0 comments on commit 1e8ff5b

Please sign in to comment.