From 0a7134c057f4ec946fc87d29168fdd03157f26d1 Mon Sep 17 00:00:00 2001 From: mjrand Date: Thu, 28 Dec 2023 03:59:07 +0000 Subject: [PATCH] Added sample heater display mode check in custom_pid function. --- socs/agents/lakeshore372/agent.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/socs/agents/lakeshore372/agent.py b/socs/agents/lakeshore372/agent.py index 5ed51aa5d..1b2c0657e 100644 --- a/socs/agents/lakeshore372/agent.py +++ b/socs/agents/lakeshore372/agent.py @@ -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':