bluesky.plan_stubs.rd(obj, *, default_value=0)[source]

Reads a single-value non-triggered object

This is a helper plan to get the scalar value out of a Device (such as an EpicsMotor or a single EpicsSignal).

For devices that implement the Locatable protocol, the location is canonical and is returned without parsing the read keys.

For devices that have more than one read key the following rules are used:

  • if exactly 1 field is hinted that value is used

  • if no fields are hinted and there is exactly 1 value in the reading that value is used

  • if more than one field is hinted an Exception is raised

  • if no fields are hinted and there is more than one key in the reading an Exception is raised

The devices is not triggered and this plan does not create any Events


The device to be read


The value to return when not running in a “live” RunEngine. This come ups when

ret = yield Msg('read', obj)
assert ret is None

the plan is passed to list or some other iterator that repeatedly sends None into the plan to advance the generator.

valAny or None

The “single” value of the device