diff --git a/config_params.py b/config_params.py index 4eec0140..a56c7f93 100644 --- a/config_params.py +++ b/config_params.py @@ -91,7 +91,7 @@ class OnMountAvailOptions(Enum): DEWAR_SECTORS = {'amx':8, 'fmx':8, 'nyx':8} PUCKS_PER_DEWAR_SECTOR = {'amx':3, 'fmx':3, 'nyx':3} -cryostreamTempPV = {"amx": "XF:17IDB-ES:AMX{CS:1}SAMPLE_TEMP_RBV", "fmx": "FMX:cs700:gasT-I", "nyx":"XF:19ID2:CS700:TEMP"} +cryostreamTempPV = {"amx": "XF:17ID1:CS700:TEMP", "fmx": "XF:17ID2:CS700:TEMP", "nyx":"XF:19ID2:CS700:TEMP"} VALID_EXP_TIMES = { "amx": {"min": 0.005, "max": 1, "digits": 3}, diff --git a/mxbluesky/devices/generic.py b/mxbluesky/devices/generic.py index e9c9cbdd..0317560a 100644 --- a/mxbluesky/devices/generic.py +++ b/mxbluesky/devices/generic.py @@ -1,6 +1,7 @@ from ophyd import Component as Cpt -from ophyd import Device, EpicsMotor, EpicsSignal +from ophyd import Device, EpicsMotor, EpicsSignal, EpicsSignalRO, PVPositionerIsClose from mxbluesky.devices import standardize_readback +from enum import IntEnum, unique class WorkPositions(Device): gx = Cpt(EpicsSignal, "{Gov:Robot-Dev:gx}Pos:Work-Pos") @@ -33,4 +34,19 @@ def __init__(self, *args, **kwargs): self.cy = self.py self.z = self.pz self.cz = self.pz - self.omega = self.o \ No newline at end of file + self.omega = self.o + +@unique +class CryoStreamCmd(IntEnum): + START_RAMP = 1 + STOP_RAMP = 0 + + +class CryoStream(PVPositionerIsClose): + readback = Cpt(EpicsSignalRO, 'TEMP') + setpoint = Cpt(EpicsSignal, 'RTEMP') + actuate = Cpt(EpicsSignal, "RAMP.PROC") + actuate_value = CryoStreamCmd.START_RAMP + stop_signal = Cpt(EpicsSignal, "RAMP.PROC") + stop_value = CryoStreamCmd.STOP_RAMP + diff --git a/start_bs.py b/start_bs.py index 44064966..770f3d2a 100755 --- a/start_bs.py +++ b/start_bs.py @@ -114,6 +114,7 @@ class SampleXYZ(Device): if (beamline=="amx"): from mxbluesky.devices import (WorkPositions, TwoClickLowMag, LoopDetector, MountPositions, TopAlignerFast, TopAlignerSlow, GoniometerStack) + from mxbluesky.devices.generic import CryoStream mercury = ABBIXMercury('XF:17IDB-ES:AMX{Det:Mer}', name='mercury') mercury.read_attrs = ['mca.spectrum', 'mca.preset_live_time', 'mca.rois.roi0.count', 'mca.rois.roi1.count', 'mca.rois.roi2.count', 'mca.rois.roi3.count'] @@ -144,11 +145,12 @@ class SampleXYZ(Device): loop_detector = LoopDetector(name="loop_detector") top_aligner_fast = TopAlignerFast(name="top_aligner_fast", gov_robot=gov_robot) top_aligner_slow = TopAlignerSlow(name="top_aligner_slow") - + cs700 = CryoStream("XF:17ID1:CS700:", name="cs700", atol=0.1) elif beamline == "fmx": from mxbluesky.devices import (WorkPositions, TwoClickLowMag, LoopDetector, MountPositions, TopAlignerFast, TopAlignerSlow, GoniometerStack) + from mxbluesky.devices.generic import CryoStream mercury = ABBIXMercury('XF:17IDC-ES:FMX{Det:Mer}', name='mercury') mercury.read_attrs = ['mca.spectrum', 'mca.preset_live_time', 'mca.rois.roi0.count', 'mca.rois.roi1.count', 'mca.rois.roi2.count', 'mca.rois.roi3.count'] @@ -181,6 +183,7 @@ class SampleXYZ(Device): top_aligner_slow = TopAlignerSlow(name="top_aligner_slow") import setenergy_lsdc + cs700 = CryoStream("XF:17ID2:CS700:", name="cs700", atol=0.1) elif beamline=="nyx": from mxbluesky.devices.md2 import LightDevice, BeamstopDevice, MD2SimpleHVDevice, MD2Device, ShutterDevice