updated safe psotions for 6D not 10S. please fix me

This commit is contained in:
appleb_m
2026-06-11 16:14:54 +02:00
parent a88423d413
commit 940268222f
+9 -9
View File
@@ -10,7 +10,7 @@ import time
logger = setup_logger("aareDAQ")
SAFE_POSITION = 900
SAFE_POSITION = 200
def move_bsz(devs: BeamlineDevices, target: float):
if abs(target - devs.bsz.position) > 0.1:
@@ -148,16 +148,16 @@ def sa2dc(devs: BeamlineDevices, cfg: BeamlineConfig):
#TODO det_z_minimum
if not det_z_pos:
logger.error("Detector Z position not set, defaulting to 170")
det_z_pos = 170
cfg.dtz = 170
if det_z_pos and det_z_pos < 170:
det_z_pos = 99
cfg.dtz = 99
if det_z_pos and det_z_pos < 99:
logger.warning(f"Detector Z position is less than 170: {det_z_pos}, setting to 170")
det_z_pos = 170
cfg.dtz = 170
if det_z_pos and det_z_pos > 1200:
det_z_pos = 99
cfg.dtz = 99
if det_z_pos and det_z_pos > 830:
logger.warning(f"Detector Z position is greater than 1200: {det_z_pos}, setting to 1200")
det_z_pos = 1200
cfg.dtz = 1200
det_z_pos = 800
cfg.dtz = 800
status = devs.bec_worker.det_z(value=det_z_pos)
logger.info(f"start detector move to {cfg.dtz} at {time.perf_counter() - start:.2f}")
devs.samcam_auto(AutoEnum.AUTO)