mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2025-06-06 20:00:41 +02:00
Blacking
This commit is contained in:
parent
4e59f15285
commit
59103f16c6
@ -15,6 +15,7 @@ from ophyd.utils.epics_pvs import AlarmSeverity
|
||||
|
||||
class SpmgStates:
|
||||
"""Enum for the EPICS MotorRecord's SPMG state"""
|
||||
|
||||
# pylint: disable=too-few-public-methods
|
||||
STOP = 0
|
||||
PAUSE = 1
|
||||
@ -29,16 +30,15 @@ class EpicsMotorMR(EpicsMotor):
|
||||
It extends EpicsMotor base class to provide some simple status checks
|
||||
before movement. Usage is the same as EpicsMotor.
|
||||
"""
|
||||
|
||||
tolerated_alarm = AlarmSeverity.INVALID
|
||||
|
||||
motor_deadband = Component(
|
||||
EpicsSignalRO, ".RDBD", auto_monitor=True, kind=Kind.config)
|
||||
motor_deadband = Component(EpicsSignalRO, ".RDBD", auto_monitor=True, kind=Kind.config)
|
||||
motor_mode = Component(
|
||||
EpicsSignal, ".SPMG", auto_monitor=True, put_complete=True, kind=Kind.omitted)
|
||||
motor_status = Component(
|
||||
EpicsSignal, ".STAT", auto_monitor=True, kind=Kind.omitted)
|
||||
motor_enable = Component(
|
||||
EpicsSignal, ".CNEN", auto_monitor=True, kind=Kind.omitted)
|
||||
EpicsSignal, ".SPMG", auto_monitor=True, put_complete=True, kind=Kind.omitted
|
||||
)
|
||||
motor_status = Component(EpicsSignal, ".STAT", auto_monitor=True, kind=Kind.omitted)
|
||||
motor_enable = Component(EpicsSignal, ".CNEN", auto_monitor=True, kind=Kind.omitted)
|
||||
|
||||
def move(self, position, wait=True, **kwargs) -> MoveStatus:
|
||||
"""Extended move function with a few sanity checks
|
||||
@ -54,8 +54,7 @@ class EpicsMotorMR(EpicsMotor):
|
||||
status = self.motor_status.get()
|
||||
if status:
|
||||
warnings.warn(
|
||||
f"EPICS MotorRecord is in alarm state {status}, ophyd will raise",
|
||||
RuntimeWarning
|
||||
f"EPICS MotorRecord is in alarm state {status}, ophyd will raise", RuntimeWarning
|
||||
)
|
||||
# Warni if trying to move beyond an active limit
|
||||
# if self.high_limit_switch and position > self.position:
|
||||
@ -81,10 +80,12 @@ class EpicsMotorEC(EpicsMotorMR):
|
||||
It exposes additional diagnostic fields and includes basic error management.
|
||||
Usage is the same as EpicsMotor.
|
||||
"""
|
||||
USER_ACCESS = ['reset']
|
||||
|
||||
USER_ACCESS = ["reset"]
|
||||
motor_enable_readback = Component(EpicsSignalRO, "-EnaAct", auto_monitor=True, kind=Kind.normal)
|
||||
motor_enable = Component(
|
||||
EpicsSignal, "-EnaCmd-RB", write_pv="-EnaCmd", auto_monitor=True, kind=Kind.normal)
|
||||
EpicsSignal, "-EnaCmd-RB", write_pv="-EnaCmd", auto_monitor=True, kind=Kind.normal
|
||||
)
|
||||
homed = Component(EpicsSignalRO, "-Homed", auto_monitor=True, kind=Kind.normal)
|
||||
velocity_readback = Component(EpicsSignalRO, "-VelAct", auto_monitor=True, kind=Kind.normal)
|
||||
position_readback = Component(EpicsSignalRO, "-PosAct", auto_monitor=True, kind=Kind.normal)
|
||||
|
Loading…
x
Reference in New Issue
Block a user