workflows: added maintenance2sa and maintenance2se methods
This commit is contained in:
@@ -54,7 +54,17 @@ def common_2rse(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
devs.aerotech_pos = ABR_POS_MOUNT
|
||||
|
||||
def m2se(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
pass
|
||||
devs.samcam_auto(AutoEnum.AUTO)
|
||||
devs.bec_worker.planner.move_to(BeamlineState.MANUAL_SAMPLE_EXCHANGE)
|
||||
logger.info(f"moved to sample exchange, now moving to {cfg.abr_meas_pos}")
|
||||
devs.aerotech_pos = cfg.abr_meas_pos
|
||||
devs.smargon_move_home()
|
||||
devs.samcam_auto(AutoEnum.ONCE)
|
||||
|
||||
def m2sa(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
devs.samcam_auto(AutoEnum.AUTO)
|
||||
devs.bec_worker.planner.move_to(BeamlineState.SAMPLE_ALIGNMENT)
|
||||
devs.samcam_auto(AutoEnum.ONCE)
|
||||
|
||||
def sa2se(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
try:
|
||||
@@ -64,7 +74,8 @@ def sa2se(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
devs.aerotech_pos = cfg.abr_meas_pos
|
||||
devs.smargon_move_home()
|
||||
devs.samcam_auto(AutoEnum.ONCE)
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to move to sample exchange: {e}")
|
||||
devs.aerotech_pos = cfg.abr_meas_pos
|
||||
devs.smargon_move_home()
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user