From f9a405627715020c14bcfa58239b8afd8cd2e8c9 Mon Sep 17 00:00:00 2001 From: Xiaoqiang Wang Date: Wed, 9 Jul 2025 16:04:13 +0200 Subject: [PATCH] turn exception to warning The next move command will try to clear the error. Here it should not prevent that, --- ophyd_devices/devices/psi_motor.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ophyd_devices/devices/psi_motor.py b/ophyd_devices/devices/psi_motor.py index 47d4678..73ef46e 100644 --- a/ophyd_devices/devices/psi_motor.py +++ b/ophyd_devices/devices/psi_motor.py @@ -133,15 +133,13 @@ class EpicsMotorEC(EpicsMotor): def move(self, position, wait=True, **kwargs) -> MoveStatus: """Extended move function with a few sanity checks - Note that the default EpicsMotor only supports the 'GO' movement mode. - This could get it deadlock if it was previously explicitly stopped. - In addition to parent method, this also checks the ECMC error status - before moving. + Check ECMC error and interlocks. They may get cleared by the move command. If not, exception + will be raised. """ # Check ECMC error status before move error = self.error.get() if error: - raise RuntimeError(f"Motor is in error state with message: '{self.error_msg.get()}'") + self.log.warning(f"Motor is in error state with message: '{self.error_msg.get()}'") # Warn if trying to move beyond an active limit if self.high_interlock.get(use_monitor=False) and position > self.position: