Skip to content

Difference between EpicsMotor from other positioners #1227

@prjemian

Description

@prjemian

The EpicsMotor class has a notable inconsistency from other positioners. The names for readback and setpoint components differ from all other positioners.

# position
user_readback = Cpt(EpicsSignalRO, ".RBV", kind="hinted", auto_monitor=True)
user_setpoint = Cpt(EpicsSignal, ".VAL", limits=True, auto_monitor=True)

setpoint = Cpt(EpicsSignal, "", kind="hinted")

ophyd/ophyd/pseudopos.py

Lines 51 to 52 in 1e5f037

readback = Cpt(AttributeSignal, attr="position", kind=Kind.hinted)
setpoint = Cpt(AttributeSignal, attr="target", kind=Kind.normal)

setpoint = pvproperty(value=0.0, precision=1)
readback = pvproperty(value=0.0, read_only=True, precision=1)

I'm sure the user_ prefix used in EpicsMotor is inherited from the EPICS motor record which has raw, dial, and user coordinates. But NO bluesky users (maybe there is a rare exception) use motors with dial coordinates.

Not only is this confusing for newer Bluesky users, this leads to special-case programming when handling positioners v. motors.

Is there a way to resolve this inconsistency that remains backwards-compatible? Adding a synonym?

 # position 
    readback = user_readback = Cpt(EpicsSignalRO, ".RBV", kind="hinted", auto_monitor=True) 
    setpoint = user_setpoint = Cpt(EpicsSignal, ".VAL", limits=True, auto_monitor=True) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions