From b2d885c6a633f142d1a7b4a4ed9d904d77a4a90e Mon Sep 17 00:00:00 2001 From: appel_c Date: Tue, 9 Dec 2025 09:47:21 +0100 Subject: [PATCH] fix(epics-motor-user-vme): remove high/low limit check in wait_for_connection as it's not reliable. Tested at cSAXS --- ophyd_devices/devices/psi_motor.py | 7 ------- tests/test_psi_motors.py | 6 ------ 2 files changed, 13 deletions(-) diff --git a/ophyd_devices/devices/psi_motor.py b/ophyd_devices/devices/psi_motor.py index f641786..85cfdfb 100644 --- a/ophyd_devices/devices/psi_motor.py +++ b/ophyd_devices/devices/psi_motor.py @@ -232,13 +232,6 @@ class EpicsUserMotorVME(PSIDeviceBase, EpicsMotor): """ if self._ioc_enable.get(use_monitor=False) != "Enable": self._ioc_enable.put("Enable") - hl_switch = self.high_limit_switch.get(use_monitor=False) - ll_switch = self.low_limit_switch.get(use_monitor=False) - if hl_switch == 1 and ll_switch == 1: - raise RuntimeError( - f"Both limit switches are active for device {self.name}." - f"This often indicates that the motor is disconnected! Please double-check your hardware!" - ) return super().wait_for_connection(all_signals, timeout) def on_connected(self): diff --git a/tests/test_psi_motors.py b/tests/test_psi_motors.py index 29ab93d..6f6e955 100644 --- a/tests/test_psi_motors.py +++ b/tests/test_psi_motors.py @@ -177,12 +177,6 @@ def test_epics_vme_user_motor(motor: EpicsUserMotorVME): motor.wait_for_connection(all_signals=True) assert motor._ioc_enable.get() == "Enable" - # If high limit and low limit are both active, should raise error - motor.high_limit_switch._read_pv.mock_data = 1 - motor.low_limit_switch._read_pv.mock_data = 1 - with pytest.raises(RuntimeError): - motor.wait_for_connection(all_signals=True) - # Test subscription on _ioc_enable_changes motor.device_manager = mock.MagicMock() device_mock = mock.MagicMock()