DAQ/GUI: Fixes during pre-beamtime test (2)
Build and Publish / build (push) Successful in 22s

This commit is contained in:
leonarski_f committed 2025-06-17 10:44:50 +02:00
1 parent 7aeee1a029
commit a126f7ccb4
6 files changed
+45 -17

No files matched your search

+13
View File
@@ -46,6 +46,8 @@ class BeamlineDevices:
self.bsx = MyMotor(f"{BEAMLINE}-ES-BS:TRX1")
self.bsy = MyMotor(f"{BEAMLINE}-ES-BS:TRY1")
self.__collimator = PV(f"{BEAMLINE}-ES-COL:TRY1")
self.aerotech = aerotech.Abr(beamline)
self.aerotech.reload_programs()
@@ -170,6 +172,17 @@ class BeamlineDevices:
def zoom_sync(self, value: float):
self.__zoom.move(value, wait=True)
@property
def collimator_up(self) -> bool:
return bool(abs(self.__collimator.value - 92.979) < 0.01)
@collimator_up.setter
def collimator_up(self, value: bool):
if value:
self.__collimator.put(92.979, wait=True)
else:
self.__collimator.put(42.979, wait=True)
@property
def reflector_up(self) -> bool:
return bool(self.__reflector.position_is("measure"))
+7 -4
View File
@@ -141,7 +141,7 @@ def sa2dc(devs: BeamlineDevices, cfg: BeamlineConfig):
_cryo = hub.cryojet_in_use
cryo_meas = hub.cryojet_measurement_position
# devs.reflector = False
devs.reflector_up = False
if _cryo:
devs.cryo.move(cryo_meas)
@@ -149,6 +149,8 @@ def sa2dc(devs: BeamlineDevices, cfg: BeamlineConfig):
#devs.reflector.wait("park")
devs.beamstop_stage_up = True
devs.dtz.move(cfg.dtz, wait=True)
devs.collimator_up = True
pv_wait(devs.dtz, None, tolerance=1.0)
wait_for_dc_devices(devs)
@@ -170,14 +172,15 @@ def dc2se(devs: BeamlineDevices, cfg: BeamlineConfig):
if devs.dtz.position < _dtzpark:
devs.dtz.move(_dtzpark)
devs.collimator_up = False
devs.reflector_up = True
def dc2sa(devs: BeamlineDevices, cfg: BeamlineConfig):
hub = cfg.settings
devs.collimator_up = False
devs.reflector_up = True
devs.gmz.move(cfg.abr_meas_pos.z, wait=True)
# devs.gmz.move(cfg.abr_meas_pos.z, wait=True)
def sa2xrf(devs: BeamlineDevices, cfg: BeamlineConfig):