diff --git a/ophyd_devices/epics/db/x12sa_database.yml b/ophyd_devices/epics/db/x12sa_database.yml index a80281d..e6d9cfc 100644 --- a/ophyd_devices/epics/db/x12sa_database.yml +++ b/ophyd_devices/epics/db/x12sa_database.yml @@ -1,10 +1,10 @@ idgap: desc: 'Undulator gap size [mm]' acquisition: {schedule: sync} - config: {name: idgap, read_pv: 'X12SA-ID-GAP:READ'} + config: {name: idgap, prefix: 'X12SA-ID'} deviceGroup: monitor status: {enabled: true} - type: EpicsSignalRO + type: InsertionDevice bm1trx: desc: 'FrontEnd XBPM 1 horizontal movement' acquisition: {schedule: sync} diff --git a/ophyd_devices/epics/proxies/InsertionDevice.py b/ophyd_devices/epics/proxies/InsertionDevice.py new file mode 100644 index 0000000..53cc976 --- /dev/null +++ b/ophyd_devices/epics/proxies/InsertionDevice.py @@ -0,0 +1,43 @@ +from ophyd import PVPositioner, Component, EpicsSignal, EpicsSignalRO, Kind + + +class InsertionDevice(PVPositioner): + """ Python wrapper for the CSAXS insertion device control + + This wrapper provides a positioner interface for the ID control. + is completely custom XBPM with templates directly in the + VME repo. Thus it needs a custom ophyd template as well... + + WARN: The x and y are not updated by the IOC + """ + status = Component(EpicsSignalRO, "-USER:STATUS", auto_monitor=True) + errorSource = Component(EpicsSignalRO, "-USER:ERROR-SOURCE", auto_monitor=True) + isOpen = Component(EpicsSignalRO, "-GAP:ISOPEN", auto_monitor=True) + + # PVPositioner interface + setpoint = Component(EpicsSignal, "-GAP:SET", auto_monitor=True) + readback = Component(EpicsSignalRO, "-GAP:READ", auto_monitor=True, kind=Kind.hinted) + done = Component(EpicsSignalRO, ":DONE", auto_monitor=True) + stop_signal = Component(EpicsSignal, "-GAP:STOP", kind=Kind.omitted) + +# Automatically start simulation if directly invoked +# (NA for important devices) +if __name__ == "__main__": + pass + + + + + + + + + + + + + + + + + diff --git a/ophyd_devices/epics/proxies/__init__.py b/ophyd_devices/epics/proxies/__init__.py index 5c7c1e3..6539e1e 100644 --- a/ophyd_devices/epics/proxies/__init__.py +++ b/ophyd_devices/epics/proxies/__init__.py @@ -2,3 +2,4 @@ from .DelayGeneratorDG645 import DelayGeneratorDG645 from .slits import SlitH, SlitV from .XbpmBase import XbpmBase, XbpmCsaxsOp from .SpmBase import SpmBase +from .InsertionDevice import InsertionDevice