Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BCU-Vercors
ID26
id26
Commits
8a77e0b5
Commit
8a77e0b5
authored
Sep 30, 2021
by
bliss administrator
Browse files
reads XS acknoledge on cleanup, more logging
parent
1cddba58
Changes
1
Hide whitespace changes
Inline
Side-by-side
id26/controllers/fscan_controller.py
View file @
8a77e0b5
...
...
@@ -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:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment