Files
motorDriverTests/setup/sinqMotor/masterMacs/reset.py
Stefan Mathis 7ab4486748 Restructured the test setup
General test configurations are now separated from specific axis test
definitions.
2025-08-11 12:01:37 +02:00

16 lines
411 B
Python
Executable File

def reset(motor, target):
"""
Reset the motor for the next test. This means the following things:
1) Stopping the motor
2) Resetting all errors
3) Enabling the motor
4) Moving to zero
"""
motor.put_pv('stop', 1)
motor.put_pv('reseterrorpv', 1)
motor.put_pv('enable', 1)
motor.move_and_wait(target)
assert motor.at_target(target)
assert not motor.has_error()