Consider the following plan:
{
"name": "mv",
"args": ["sim_motor_2.user_setpoint", -20]
}
If sim_motor_2 is a device created during the startup script with the following:
from ophyd_async.epics.motor import Motor
with init_devices():
sim_motor_2 = Motor("25idc:simMotor:m2", name="sim_motor_2")
then I would expect this description to result in:
RE(mv(sim_motor_2.user_setpoint, -20))
However I get the following exception: AttributeError: 'str' object has no attribute 'parent'
In the existing plans and devices YAML file I see:
sim_motor_2:
classname: Motor
is_flyable: true
is_movable: true
is_readable: true
module: ophyd_async.epics.motor
However, there are no components. An equivalent device using ophyd produces the following:
sim_motor_2:
classname: EpicsMotor
components:
acceleration:
classname: EpicsSignal
is_flyable: false
is_movable: true
is_readable: true
module: ophyd.signal
...
Best I can tell, this causes _is_object_name_in_list(v) to fail and the device does not get resolved from it's name "sim_motor_2.user_setpoint" to the actual device to be moved.
Looking ahead, the following line should call _get_nspace_object. I'm not sure if this will work either, since this function relies on the device having component_names, which ophyd-async devices don't have.
Consider the following plan:
{ "name": "mv", "args": ["sim_motor_2.user_setpoint", -20] }If
sim_motor_2is a device created during the startup script with the following:then I would expect this description to result in:
However I get the following exception:
AttributeError: 'str' object has no attribute 'parent'In the existing plans and devices YAML file I see:
However, there are no components. An equivalent device using ophyd produces the following:
Best I can tell, this causes
_is_object_name_in_list(v)to fail and the device does not get resolved from it's name"sim_motor_2.user_setpoint"to the actual device to be moved.Looking ahead, the following line should call
_get_nspace_object. I'm not sure if this will work either, since this function relies on the device havingcomponent_names, which ophyd-async devices don't have.