From 035591e03bc27a1590caa160c8c40c6fb98e9dda Mon Sep 17 00:00:00 2001 From: smathis Date: Thu, 24 Jul 2025 14:37:49 +0200 Subject: [PATCH] Upload current state of the test --- .gitignore | 0 common.py | 2 -- config.yaml | 2 +- ioc/motors/turboPmac1.cmd | 2 +- tests/sinqMotor/masterMacs/__init__.py | 0 tests/sinqMotor/masterMacs/common.py | 11 +++++++++++ tests/sinqMotor/masterMacs/lin1/__init__.py | 0 tests/sinqMotor/masterMacs/lin1/conftest.py | 0 tests/sinqMotor/masterMacs/lin1/test_common.py | 2 +- tests/sinqMotor/{ => turboPmac}/common.py | 4 ---- 10 files changed, 14 insertions(+), 9 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 tests/sinqMotor/masterMacs/__init__.py create mode 100755 tests/sinqMotor/masterMacs/common.py mode change 100644 => 100755 tests/sinqMotor/masterMacs/lin1/__init__.py mode change 100644 => 100755 tests/sinqMotor/masterMacs/lin1/conftest.py rename tests/sinqMotor/{ => turboPmac}/common.py (90%) mode change 100644 => 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/common.py b/common.py index 0f3b518..51acd6f 100755 --- a/common.py +++ b/common.py @@ -150,8 +150,6 @@ class Motor: def wait_for_done(self): while not self.read_field('donemoving'): - if self.has_error(): - raise MajorState('Record is in MAJOR state!') time.sleep(0.1) def has_error(self): diff --git a/config.yaml b/config.yaml index e358930..6148ae1 100755 --- a/config.yaml +++ b/config.yaml @@ -1,7 +1,7 @@ pvprefix: DRVTESTS versions: turboPmac: "mathis_s" - masterMacs: 1.2 + masterMacs: "mathis_s" controllers: turboPmac1: ip: "172.28.101.24" diff --git a/ioc/motors/turboPmac1.cmd b/ioc/motors/turboPmac1.cmd index fe641ea..6a2f271 100755 --- a/ioc/motors/turboPmac1.cmd +++ b/ioc/motors/turboPmac1.cmd @@ -30,7 +30,7 @@ pmacAsynIPPortConfigure("$(ASYN_PORT)","$(TURBOPMAC1_IP):$(TURBOPMAC1_PORT)") turboPmacController("$(NAME)","$(ASYN_PORT)",8,$(TURBOPMAC1_BUSYPOLL),$(TURBOPMAC1_IDLEPOLL),1); turboPmacAxis("$(NAME)",1); -#turboPmacAxis("$(NAME)",5); +turboPmacAxis("$(NAME)",5); # Set the number of subsequent timeouts setMaxSubsequentTimeouts("$(NAME)", 20); diff --git a/tests/sinqMotor/masterMacs/__init__.py b/tests/sinqMotor/masterMacs/__init__.py old mode 100644 new mode 100755 diff --git a/tests/sinqMotor/masterMacs/common.py b/tests/sinqMotor/masterMacs/common.py new file mode 100755 index 0000000..078c919 --- /dev/null +++ b/tests/sinqMotor/masterMacs/common.py @@ -0,0 +1,11 @@ +def stop_reset_enable_move_sequence(motor, target): + + motor.write_field('stop', 1) + motor.write_field('reseterrorpv', 1) + motor.write_field('enable', 1) + + # MasterMACS motors need to be homed after an error reset + motor.write_field('homeforward', 1) + motor.move_and_wait(target) + assert motor.at_target(target) + assert not motor.has_error() diff --git a/tests/sinqMotor/masterMacs/lin1/__init__.py b/tests/sinqMotor/masterMacs/lin1/__init__.py old mode 100644 new mode 100755 diff --git a/tests/sinqMotor/masterMacs/lin1/conftest.py b/tests/sinqMotor/masterMacs/lin1/conftest.py old mode 100644 new mode 100755 diff --git a/tests/sinqMotor/masterMacs/lin1/test_common.py b/tests/sinqMotor/masterMacs/lin1/test_common.py index 64a6c96..20b93f3 100755 --- a/tests/sinqMotor/masterMacs/lin1/test_common.py +++ b/tests/sinqMotor/masterMacs/lin1/test_common.py @@ -2,7 +2,7 @@ from tests.move import * from tests.sinqMotor.limits import * -from tests.sinqMotor.common import * +from tests.sinqMotor.masterMacs.common import * from tests.sinqMotor.turboPmac.reset import reset diff --git a/tests/sinqMotor/common.py b/tests/sinqMotor/turboPmac/common.py old mode 100644 new mode 100755 similarity index 90% rename from tests/sinqMotor/common.py rename to tests/sinqMotor/turboPmac/common.py index 1ba8fc0..6da1124 --- a/tests/sinqMotor/common.py +++ b/tests/sinqMotor/turboPmac/common.py @@ -1,7 +1,3 @@ -import time -import pytest - - def stop_reset_enable_move_sequence(motor, target): motor.write_field('stop', 1)