From 0c0a5e4f475cf88e947be2177e72c1d16d2a392d Mon Sep 17 00:00:00 2001 From: Noemi Frisina <54588199+noemifrisina@users.noreply.github.com> Date: Tue, 23 Jan 2024 17:30:27 +0000 Subject: [PATCH] Add motor records to pmac device (#259) * Add motor record to pmac * Add method to home stages to pmac * Rething home method * Use epicsmotors * Use put instead of set --- src/dodal/devices/i24/pmac.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/dodal/devices/i24/pmac.py b/src/dodal/devices/i24/pmac.py index 78cec0d7b8..2155dec6b4 100644 --- a/src/dodal/devices/i24/pmac.py +++ b/src/dodal/devices/i24/pmac.py @@ -1,6 +1,7 @@ from ophyd import Component as Cpt from ophyd import ( Device, + EpicsMotor, EpicsSignal, ) @@ -9,3 +10,10 @@ class PMAC(Device): """Device to control the chip stage on I24.""" pmac_string = Cpt(EpicsSignal, "PMAC_STRING") + + x = Cpt(EpicsMotor, "X") + y = Cpt(EpicsMotor, "Y") + z = Cpt(EpicsMotor, "Z") + + def home_stages(self): + self.pmac_string.put(r"\#1hmz\#2hmz\#3hmz", wait=True)