exp_hutch_shutter added back in
This commit is contained in:
+4
-1
@@ -2755,6 +2755,8 @@ class AareDAQ:
|
||||
f"State already set to {target}",
|
||||
extra={"from_state": curr_state, "to_state": target},
|
||||
)
|
||||
#TODO unify BeamlineStateEnum and BeamlineState and allow transition from same state to same state to recover motor positions!
|
||||
#TODO or just allow BEC thingy
|
||||
return
|
||||
elif target != curr_state:
|
||||
self.__cfg.state = BeamlineStateEnum.Moving
|
||||
@@ -2946,7 +2948,7 @@ class AareDAQ:
|
||||
back_light=self.back_light,
|
||||
cryojet_K=self.__devs.cryojet_temp,
|
||||
shutter_open=self.__devs.shutter,
|
||||
exp_shutter_open=self.__devs.shutter,
|
||||
exp_shutter_open=self.__devs.exp_shutter.state(),
|
||||
flux_ph_s=self.__devs.full_flux,
|
||||
sample_camera=self.__devs.samcam_settings,
|
||||
name=self.__bl,
|
||||
@@ -3000,6 +3002,7 @@ class AareDAQ:
|
||||
except AerotechCommunicationError as e:
|
||||
logger.warning(f"Aeroetch error in _safe_geom: {e}")
|
||||
aerotech_error = f"Cannot connect to Aerotech: {e}"
|
||||
self.__devs.exp_shutter.close()
|
||||
aerotech_connected = False
|
||||
except Exception as e:
|
||||
logger.warning(f"Unexpected error in _safe_geom: {e}")
|
||||
|
||||
@@ -36,6 +36,7 @@ class BeamlineDevices:
|
||||
self.bec_worker = BECClientWorker(beamline)
|
||||
logger.debug("initialising BEC worker done")
|
||||
self.__smargon = smargon.Smargon(beamline)
|
||||
self.exp_shutter = ExperimentalHutchShutter(beamline=self._beamline)
|
||||
|
||||
#only used at the moment to get hlm and llm from BEC
|
||||
self.__dtz = self.bec_worker.dev.det_z
|
||||
@@ -303,9 +304,6 @@ class BeamlineDevices:
|
||||
def set_dtz(self, value: float, /, wait: bool = True):
|
||||
if value < self.__dtz.low_limit:
|
||||
#raise ValueError(f"Detector distance cannot be less than {self.detector_distance_minimum} mm")
|
||||
logger.warning(f"Requested detector distance {value} is less than minimum: {self.detector_distance_minimum}, setting to minimum")
|
||||
value = self.detector_distance_minimum
|
||||
self.__dtz.move(value, wait=wait)
|
||||
logger.warning(f"Requested detector distance {value} is less than minimum: {self.__dtz.low_limit}, setting to minimum")
|
||||
value = self.__dtz.low_limit + self.dtz_mod
|
||||
if value > self.__dtz.high_limit:
|
||||
|
||||
Reference in New Issue
Block a user