-
Notifications
You must be signed in to change notification settings - Fork 320
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(Keithley3706A): Fix interlock status dictionary #5013
fix(Keithley3706A): Fix interlock status dictionary #5013
Conversation
for more information, see https://pre-commit.ci
…ieri1/Qcodes into keithely_3706a_driver_bug_fix
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## master #5013 +/- ##
==========================================
- Coverage 67.22% 67.19% -0.04%
==========================================
Files 356 356
Lines 29726 29729 +3
==========================================
- Hits 19984 19977 -7
- Misses 9742 9752 +10 |
Thanks @brandonaltieri1 could you add a short message to a file called |
…ieri1/Qcodes into keithely_3706a_driver_bug_fix
for more information, see https://pre-commit.ci
Done, thanks @jenshnielsen! |
When instantiating an object of the class
Keithley3706A
, the interlock status is checked for each card that is installed in the unit. When querying the unit for the interlock status (for a specific slot), the unit can return any of the following values:See page 742 of https://download.tek.com/manual/3700AS-901-01D_Jul_2018_Ref_0.pdf. The interlock state is mapped using a dictionary (
interlock_status
in theget_interlock_state
method), where the returned value is used as the key to find the appropriate status string. However, this dictionary was initially defined using only two keys,0
and1
. When querying the interlock status, the possible return values arenil
,0
,1
,2
, and3
. As some of these return values are not included as keys in theinterlock_status
dictionary, when the unit does not return0
or1
, aKeyError
is raised, and the driver cannot be instantiated. This PR updates thisinterlock_status
dictionary to include all possible return values as keys, and adds the associated status strings (taken directly from the reference manual). The unit test/sim
file are both updated to reflect these changes.