Ready-to-Use Devices

These devices are have ready-made classes in Python. To configure them, the user need only provide a PV prefix and a name.


Create an EpicsMotor to communicate with a single EPICS motor record:

from ophyd import EpicsMotor

# the two-theta motor
tth = EpicsMotor('XF:28IDC-ES:1{Dif:1-Ax:2ThI}Mtr', name='tth')
class ophyd.epics_motor.EpicsMotor(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, **kwargs)

An EPICS motor record, wrapped in a Positioner

Keyword arguments are passed through to the base class, Positioner

prefix : str

The record to use

read_attrs : sequence of attribute names

The signals to be read during data acquisition (i.e., in read() and describe() calls)

name : str, optional

The name of the device

parent : instance or None

The instance of the parent device, if applicable

settle_time : float, optional

The amount of time to wait after moves to report status completion

timeout : float, optional

The default timeout to use for motion requests, in seconds.


Check that the position is within the soft limits


The engineering units (EGU) for a position


Returns the travel limit of motor

  • flag > 0: returns high limit
  • flag < 0: returns low limit
  • flag == 0: returns None

Included here for compatibility with similar with SPEC command.

high : float

Limit of travel in the positive direction.

low : float

Limit of travel in the negative direction.

home(direction, wait=True, **kwargs)

Perform the default homing function in the desired direction

direction : HomeEnum

Direction in which to perform the home search.

move(position, wait=True, **kwargs)

Move to a specified position, optionally waiting for motion to complete.


Position to move to

moved_cb : callable

Call this callback when movement has finished. This callback must accept one keyword argument: ‘obj’ which will be set to this positioner instance.

timeout : float, optional

Maximum time to wait for the motion. If None, the default timeout for this positioner is used.

status : MoveStatus

When motion takes longer than timeout


On invalid positions


If motion fails other than timing out


Whether or not the motor is moving

moving : bool

The current position of the motor in its engineering units

position : float

The precision of the readback PV, as reported by EPICS


Configure the motor user position to the given value


Position to set.

set_lim(low, high)

Sets the low and high travel limits of motor

  • No action taken if motor is moving.
  • Low limit is set to lesser of (low, high)
  • High limit is set to greater of (low, high)

Included here for compatibility with similar with SPEC command.

high : float

Limit of travel in the positive direction.

low : float

Limit of travel in the negative direction.


Create an EpicsScaler to control an EPICS scaler record:

from ophyd import EpicsScaler
scaler = EpicsScaler('XF:28IDC-ES:1{Sclr:1}', name='tth')
class ophyd.scaler.EpicsScaler(*args, **kwargs)

SynApps Scaler Record interface

EpicsMCA and EpicsDXP

MCA records and DXP-based devices are also supported, through the EpicsMCA and EpicsDXP devices.

class ophyd.mca.EpicsMCARecord(*args, **kwargs)

SynApps MCA Record interface

class ophyd.mca.EpicsDXP(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, **kwargs)

All high-level DXP parameters for each channel


Creating ‘bundles’ of motors is very common so we also have a helper class that tweaks the default behavior of read_attrs, configuration_attrs, and hints

class ophyd.epics_motor.MotorBundle(prefix='', *, name, kind=None, read_attrs=None, configuration_attrs=None, parent=None, **kwargs)

Sub-class this to device a bundle of motors

This provides better default behavior for :ref:hints.

This must be sub-classed (like Device) to be useful.

from ophyd import MotorBundle, EpicsMotor
from ophyd import Component as Cpt

class StageXY(MotorBundle):
    x = Cpt(EpicsMotor, ':X')
    y = Cpt(EpicsMotor, ':Y')

stage = StageXY('STAGE_PV', name='stage')