fix cont_grid scan
This commit is contained in:
@@ -599,23 +599,24 @@ class DDG1(PSIDeviceBase, DelayGeneratorCSAXS):
|
||||
# an acquisition regularly with a WaitTimeoutError, the timeout can be increased but it should
|
||||
# be investigated why the EPICS interface is slow to respond.
|
||||
try:
|
||||
current_time = time.time()
|
||||
while time.time() - current_time < 3 and mcs.acquiring.get() != ACQUIRING.ACQUIRING:
|
||||
time.sleep(0.1)
|
||||
logger.warning(
|
||||
f"MCS card is not in acquiring state, current state: {mcs.acquiring.get()}"
|
||||
)
|
||||
if mcs.acquiring.get() != ACQUIRING.ACQUIRING:
|
||||
logger.warning(
|
||||
f"MCS card is not in acquiring state, current state: {mcs.acquiring.get()}"
|
||||
)
|
||||
status_mcs.wait(timeout=3)
|
||||
# current_time = time.time()
|
||||
# while time.time() - current_time < 3 and mcs.acquiring.get() != ACQUIRING.ACQUIRING:
|
||||
# time.sleep(0.1)
|
||||
# logger.warning(
|
||||
# f"MCS card is not in acquiring state, current state: {mcs.acquiring.get()}"
|
||||
# )
|
||||
# if mcs.acquiring.get() != ACQUIRING.ACQUIRING:
|
||||
# logger.error(
|
||||
# f"MCS card is not finishing after 3s, current state: {mcs.acquiring.get()}, waiting another 3s for its return to ACQUIRING state. If this happens regularly, please check the EPICS interface and the MCS card logic."
|
||||
# )
|
||||
status_mcs.wait(timeout=3)
|
||||
except Exception as exc:
|
||||
logger.warning(f"MCS did not go to Acquiring within 3s. Retrying erase_start {exc}")
|
||||
mcs.erase_start.put(1)
|
||||
status_mcs.wait(timeout=3)
|
||||
status = TransitionStatus(mcs.acquiring, [ACQUIRING.ACQUIRING, ACQUIRING.DONE])
|
||||
logger.debug(f"Finished preparing mcs card {time.time()-start_time}")
|
||||
raise exc
|
||||
# mcs.erase_start.put(1)
|
||||
# status_mcs.wait(timeout=3)
|
||||
status = CompareStatus(mcs.acquiring, ACQUIRING.DONE)
|
||||
logger.info(f"Finished preparing mcs card {time.time()-start_time}")
|
||||
|
||||
# Send trigger
|
||||
self.trigger_shot.put(1, use_complete=True)
|
||||
|
||||
@@ -272,7 +272,7 @@ class ContGrid(ScanBase):
|
||||
status_motor.wait()
|
||||
status_mcs.wait()
|
||||
mcs_aquiring_status = self.mcs.get_transition_status(
|
||||
signal="acquiring", transition=[1, 0]
|
||||
signal_name="acquiring", transition=[1, 0]
|
||||
)
|
||||
|
||||
self.at_each_point(
|
||||
|
||||
Reference in New Issue
Block a user