diff --git a/src/dodal/beamlines/i24.py b/src/dodal/beamlines/i24.py index 8d21bf5097..9d5660a569 100644 --- a/src/dodal/beamlines/i24.py +++ b/src/dodal/beamlines/i24.py @@ -7,6 +7,7 @@ from dodal.devices.i24.dual_backlight import DualBacklight from dodal.devices.i24.I24_detector_motion import DetectorMotion from dodal.devices.i24.i24_vgonio import VGonio +from dodal.devices.i24.pmac import PMAC from dodal.devices.oav.oav_detector import OAV, OAVConfigParams from dodal.devices.zebra import Zebra from dodal.log import set_beamline @@ -76,6 +77,21 @@ def set_params(eiger: EigerDetector): ) +def pmac(wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False) -> PMAC: + """Get the i24 PMAC device, instantiate it if it hasn't already been. + If this is called when already instantiated in i24, it will return the existing object. + """ + # prefix not BL but ME14E + return device_instantiation( + PMAC, + "pmac", + "ME14E-MO-CHIP-01:", + wait_for_connection, + fake_with_ophyd_sim, + bl_prefix=False, + ) + + @skip_device(lambda: BL == "s24") def oav(wait_for_connection: bool = True, fake_with_ophyd_sim: bool = False) -> OAV: """Get the i24 OAV device, instantiate it if it hasn't already been. diff --git a/src/dodal/devices/i24/pmac.py b/src/dodal/devices/i24/pmac.py new file mode 100644 index 0000000000..f32978498e --- /dev/null +++ b/src/dodal/devices/i24/pmac.py @@ -0,0 +1,11 @@ +from ophyd import Component as Cpt +from ophyd import ( + Device, + EpicsSignal, +) + + +class PMAC(Device): + """Device to control the chip stage on I24.""" + + pmac_string: EpicsSignal = Cpt(EpicsSignal, "PMAC_STRING")