Skip to content

Commit 99854a7

Browse files
authored
Add sample heater display mode check in custom_pid task (#729)
1 parent 26bf744 commit 99854a7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

socs/agents/lakeshore372/agent.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,12 @@ def custom_pid(self, session, params):
972972
session.add_message('Changing control to Open Loop mode for sample PID.')
973973
self.module.sample_heater.set_mode("Open Loop")
974974

975+
# Check we're in the correct display mode for servo.
976+
# The custom PID expects that the sample heater is in 'current' mode
977+
if self.module.sample_heater.display != "current":
978+
session.add_message("Changing display mode to \'current\' for sample PID.")
979+
self.module.sample_heater.set_heater_display("current")
980+
975981
if heater == 'still':
976982
# Check we're in correct control mode for servo.
977983
if self.module.still_heater.mode != 'Open Loop':

0 commit comments

Comments
 (0)