Skip to content

Commit

Permalink
Add a PMAC device (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
noemifrisina authored Dec 4, 2023
1 parent 5a24dff commit 9e2928b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/dodal/beamlines/i24.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
11 changes: 11 additions & 0 deletions src/dodal/devices/i24/pmac.py
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit 9e2928b

Please sign in to comment.