Commit 8a77e0b5 authored by bliss administrator's avatar bliss administrator
Browse files

reads XS acknoledge on cleanup, more logging

parent 1cddba58
......@@ -808,6 +808,9 @@ class ID26FScanController:
)
print("Programming trajectory on PM600")
print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print("!!! WARNING: DO NOT CTR-C !!!"
print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
nintervals = self.fscan_par['pm600_prf_intervals']
......@@ -1180,17 +1183,25 @@ class ID26FScanController:
if self.event_trajectory_started.is_set():
#MCL 20210325 - that takes about 567μs
self.pm600.sock.flush()
#self.pm600.sock.flush()
#MCL 20210325 - that takes about 100ms
try:
try:
self.pm600.sock.readline() #readsacknoledge of XS command that is delayed always
except:
log_warning(
self,
"PM600 _cleanup : nothing (no OK) on serial line",
)
self.energy.sync_hard()
except KeyboardInterrupt as e:
raise e
except:
log_error(
except Exception as e:
log_warning(
self,
"Error during mono.sync_hard() - flush once more pm600 and retry once..."
"Error during mono.sync_hard() ({0}) - retry once...".format(e)
)
#time.sleep(1)
#self.pm600.sock.flush()
......@@ -1283,6 +1294,13 @@ class ID26FScanController:
"FSCAN ERROR CLEANUP - aborting trajectories and resetting controller ports"
)
self.pm600.stop_trajectory()
try:
self.pm600.sock.readline() #readsacknoledge of XS command that is delayed always
except:
log_warning(
self,
"PM600 _error_cleanup : nothing on serial line",
)
self.pm600.raw_write_read(f"{self.mono.channel}WP22222221\r")
#no need - already n acquisition_master
#if self.idtraj is not None:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment