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

Fix Keithley 3706A driver to refer to the new interlock status string #5147

Merged
merged 3 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
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
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