Skip to content

Commit

Permalink
Added sample heater display mode check in custom_pid function.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjrand committed Dec 28, 2023
1 parent 06ddfd4 commit 0a7134c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions socs/agents/lakeshore372/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,12 @@ def custom_pid(self, session, params):
session.add_message('Changing control to Open Loop mode for sample PID.')
self.module.sample_heater.set_mode("Open Loop")

# Check we're in the correct display mode for servo.
# The custom PID expects that the sample heater is in 'current' mode
if self.module.sample_heater.display != "current":
session.add_message("Changing display mode to \'current\' for sample PID.")
self.module.sample_heater.set_heater_display("current")

if heater == 'still':
# Check we're in correct control mode for servo.
if self.module.still_heater.mode != 'Open Loop':
Expand Down

0 comments on commit 0a7134c

Please sign in to comment.