diff --git a/csaxs_bec/device_configs/bl_endstation.yaml b/csaxs_bec/device_configs/bl_endstation.yaml index 3347e25..ffc291b 100644 --- a/csaxs_bec/device_configs/bl_endstation.yaml +++ b/csaxs_bec/device_configs/bl_endstation.yaml @@ -37,6 +37,21 @@ mcs: readoutPriority: monitored softwareTrigger: false + + +########################################################################## +########################### FAST SHUTTER ################################# +########################################################################## + +fsh: + description: Fast shutter manual control and readback + deviceClass: csaxs_bec.devices.epics.fast_shutter.cSAXSFastEpicsShutter + deviceConfig: + prefix: 'X12SA-ES1-TTL:' + onFailure: raise + enabled: true + readoutPriority: monitored + ########################################################################## ######################## SMARACT STAGES ################################## ########################################################################## diff --git a/csaxs_bec/device_configs/ptycho_flomni.yaml b/csaxs_bec/device_configs/ptycho_flomni.yaml index 7ca30d6..fd2bda1 100644 --- a/csaxs_bec/device_configs/ptycho_flomni.yaml +++ b/csaxs_bec/device_configs/ptycho_flomni.yaml @@ -158,7 +158,7 @@ fsamy: enabled: true onFailure: buffer readOnly: true - readoutPriority: baseline' + readoutPriority: baseline connectionTimeout: 20 userParameter: in: 2.75 @@ -460,8 +460,8 @@ flomni_temphum: # ########## OMNY / flOMNI / LamNI fast shutter ############## # ############################################################ omnyfsh: - description: omnyfsh connects to read fast shutter at X12 if in that network - deviceClass: csaxs_bec.devices.omny.shutter.OMNYFastEpicsShutter + description: omnyfsh connects to fast shutter at X12 if device fsh exists + deviceClass: csaxs_bec.devices.omny.shutter.OMNYFastShutter deviceConfig: {} enabled: true onFailure: buffer diff --git a/csaxs_bec/devices/epics/delay_generator_csaxs/ddg_1.py b/csaxs_bec/devices/epics/delay_generator_csaxs/ddg_1.py index a6eb98b..6090454 100644 --- a/csaxs_bec/devices/epics/delay_generator_csaxs/ddg_1.py +++ b/csaxs_bec/devices/epics/delay_generator_csaxs/ddg_1.py @@ -137,7 +137,7 @@ class DDG1(PSIDeviceBase, DelayGeneratorCSAXS): fast_shutter_readback = Cpt( EpicsSignalRO, - read_pv="X12SA-ES1-TTL:IN_01", + read_pv="X12SA-ES1-TTL:INP_01", add_prefix=("",), # Add this to prevent the prefix to be added to the signal kind=Kind.omitted, auto_monitor=True, @@ -513,6 +513,7 @@ class DDG1(PSIDeviceBase, DelayGeneratorCSAXS): """ self._stop_polling() self._poll_thread_poll_loop_done.wait(timeout=1) + time.sleep(0.02) # TODO This may move to scan modifiers if self.trigger_source.get() != TRIGGERSOURCE.SINGLE_SHOT.value: status = StatusBase(obj=self) diff --git a/csaxs_bec/devices/epics/fast_shutter.py b/csaxs_bec/devices/epics/fast_shutter.py index 0009550..937f876 100644 --- a/csaxs_bec/devices/epics/fast_shutter.py +++ b/csaxs_bec/devices/epics/fast_shutter.py @@ -19,7 +19,7 @@ class cSAXSFastEpicsShutter(Device): # PVs shutter = Cpt(EpicsSignal, "OUT_01", kind=Kind.normal, auto_monitor=True) - shutter_readback = Cpt(EpicsSignalRO, "IN_01", kind=Kind.normal, auto_monitor=True) + shutter_readback = Cpt(EpicsSignalRO, "INP_01", kind=Kind.normal, auto_monitor=True) # ----------------------------------------------------- # User-facing shutter control functions diff --git a/csaxs_bec/devices/omny/rt/rt_flomni_ophyd.py b/csaxs_bec/devices/omny/rt/rt_flomni_ophyd.py index 92e3754..e0ee6f2 100644 --- a/csaxs_bec/devices/omny/rt/rt_flomni_ophyd.py +++ b/csaxs_bec/devices/omny/rt/rt_flomni_ophyd.py @@ -498,6 +498,9 @@ class RtFlomniController(Controller): ) # while scan is running while mode > 0: + + #TODO here?: scan abortion if no progress in scan *raise error + # logger.info(f"Current scan position {current_position_in_scan} out of {number_of_positions_planned}") mode, number_of_positions_planned, current_position_in_scan = self.get_scan_status() time.sleep(0.01) diff --git a/csaxs_bec/devices/omny/shutter.py b/csaxs_bec/devices/omny/shutter.py index 983b632..c318ebf 100644 --- a/csaxs_bec/devices/omny/shutter.py +++ b/csaxs_bec/devices/omny/shutter.py @@ -13,7 +13,7 @@ from ophyd_devices import PSIDeviceBase logger = bec_logger.logger -class OMNYFastEpicsShutter(PSIDeviceBase, Device): +class OMNYFastShutter(PSIDeviceBase, Device): """ Fast Shutter control for OMNY setup. If started with at the beamline, it will expose the shutter control methods (fshopen, fshclose, fshstatus, fshinfo) from the