Skip to content

Fix bug which prevents Lakeshore blocking_t from exiting - #7796

Merged
Jens Hedegaard Nielsen (jenshnielsen) merged 7 commits into
microsoft:mainfrom
trlemon:trlemon/fix_lakeshore_blocking_t_bug
Jan 23, 2026
Merged

Fix bug which prevents Lakeshore blocking_t from exiting#7796
Jens Hedegaard Nielsen (jenshnielsen) merged 7 commits into
microsoft:mainfrom
trlemon:trlemon/fix_lakeshore_blocking_t_bug

Conversation

@trlemon

@trlemon Thomas (trlemon) commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

Issue

When setting blocking_t(), in the function wait_until_setpoint_reached(), the setpoint parameter is called to get the latest setpoint. However, this can be problematic since it doesn't always fetch the last set setpoint, likely due to the setpoint parameter being called before the instrument has time to update properly. If the wrong setpoint is returned, then the while loop inside of wait_until_setpoint_reached() will never exit because the temperature will never be in tolerance.

Solution (changes)

Call self.setpoint.get_latest() instead of self.setpoint() to ensure the last set value is used instead.
Add post_delay to setpoint parameter.

@trlemon Thomas (trlemon) changed the title Fix bug which prevents Lakeshore336 blocking_t from exiting Fix bug which prevents Lakeshore blocking_t from exiting Jan 21, 2026
@codecov

codecov Bot commented Jan 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.88%. Comparing base (372b8e4) to head (dd8b447).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7796   +/-   ##
=======================================
  Coverage   59.88%   59.88%           
=======================================
  Files         352      352           
  Lines       31818    31818           
=======================================
  Hits        19055    19055           
  Misses      12763    12763           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/qcodes/instrument_drivers/Lakeshore/lakeshore_base.py Outdated
Comment thread src/qcodes/instrument_drivers/Lakeshore/lakeshore_base.py Outdated
Comment thread docs/changes/newsfragments/7796.improved_driver Outdated
Thomas (trlemon) and others added 2 commits January 22, 2026 10:56
Co-authored-by: Mikhail Astafev <astafan8@gmail.com>
Co-authored-by: Mikhail Astafev <astafan8@gmail.com>
@trlemon
Thomas (trlemon) marked this pull request as ready for review January 22, 2026 23:17
@trlemon
Thomas (trlemon) requested a review from a team as a code owner January 22, 2026 23:17
Merged via the queue into microsoft:main with commit 8f4aee3 Jan 23, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants