Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cs
ds
felmaster
Commits
d564683b
Commit
d564683b
authored
Oct 05, 2021
by
Claudio Scafuri
💬
Browse files
use write value of opa Wavelength attribute for compensation calculations
parent
e478cbe1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/opathread.py
View file @
d564683b
...
...
@@ -39,20 +39,20 @@ class opathread(threading.Thread):
delaycomp
=
0.0
compressor_position
=
float
(
'Nan'
)
try
:
lmb0
=
self
.
master
.
opa
.
read_attribute
(
'Wavelength
SP
'
).
value
except
tango
.
DevFailed
as
e
:
lmb0
=
self
.
master
.
opa
.
read_attribute
(
'Wavelength'
).
w_
value
except
tango
.
DevFailed
as
e
x
:
self
.
master
.
set_status
(
'step 1: failed reading l0'
)
self
.
master
.
attr_LastSetOk
=
False
self
.
master
.
attr_LastSetMsg
+=
'step 1: failed reading l0
\n
'
self
.
master
.
error_stream
(
'step 1: failed reading l0'
)
tango
.
Except
.
print_exception
(
e
)
tango
.
Except
.
print_exception
(
e
x
)
if
self
.
master
.
delay_line_compensation_enabled
:
try
:
delaycomp
=
self
.
master
.
delay_calc
.
get_compensation_delay
(
lmb0
,
self
.
lmb
)
self
.
master
.
debug
_stream
(
self
.
master
.
info
_stream
(
'opathread step1: , lmb0, lmb, delaycomp %s %s %s'
%
(
lmb0
,
self
.
lmb
,
delaycomp
))
except
ValueError
as
e
:
except
ValueError
as
e
x
:
self
.
master
.
set_status
(
'step 1: exception calculating delay comp.'
)
self
.
master
.
attr_LastSetOk
=
False
self
.
master
.
attr_LastSetMsg
+=
'step 1: exception calculating delay comp.
\n
'
...
...
@@ -62,7 +62,7 @@ class opathread(threading.Thread):
if
self
.
master
.
set_compressor
and
self
.
master
.
compressor_calc
:
try
:
compressor_position
=
self
.
master
.
compressor_calc
.
get_position
(
self
.
lmb
)
except
ValueError
as
e
:
except
ValueError
as
e
x
:
self
.
master
.
set_status
(
'step 1: exception calculating compressor position.'
)
self
.
master
.
attr_LastSetOk
=
False
self
.
master
.
attr_LastSetMsg
+=
'step 1: exception calculating compressor position.
\n
'
...
...
@@ -76,8 +76,8 @@ class opathread(threading.Thread):
self
.
master
.
ltf
.
command_inout
(
'Standby'
)
self
.
master
.
info_stream
(
'LTF Standby OK'
)
restart_LTF
=
True
except
tango
.
DevFailed
as
e
:
tango
.
Except
.
print_exception
(
e
)
except
tango
.
DevFailed
as
e
x
:
tango
.
Except
.
print_exception
(
e
x
)
self
.
master
.
error_stream
(
'LTF Standby FAILED'
)
self
.
master
.
attr_LastSetOk
=
False
self
.
master
.
attr_LastSetMsg
+=
'LTF Standby FAILED'
...
...
@@ -91,8 +91,8 @@ class opathread(threading.Thread):
self
.
master
.
info_stream
(
'step 1: start pre sequencer OPA.'
)
self
.
master
.
pre_sequencer_opa
.
command_inout
(
'Start'
)
pre_started
=
True
except
tango
.
DevFailed
as
e
:
tango
.
Except
.
print_exception
(
e
)
except
tango
.
DevFailed
as
e
x
:
tango
.
Except
.
print_exception
(
e
x
)
self
.
master
.
error_stream
(
'Pre sequencer OPA Start FAILED'
)
self
.
master
.
attr_LastSetOk
=
False
self
.
master
.
attr_LastSetMsg
+=
'Pre sequencer OPA Start FAILED'
...
...
@@ -106,8 +106,8 @@ class opathread(threading.Thread):
try
:
pre_state
=
self
.
master
.
pre_sequencer_opa
.
state
()
self
.
master
.
info_stream
(
'step 1: check pre sequencer OPA termination.'
)
except
tango
.
DevFailed
as
e
:
tango
.
Except
.
print_exception
(
e
)
except
tango
.
DevFailed
as
e
x
:
tango
.
Except
.
print_exception
(
e
x
)
self
.
master
.
set_status
(
'failed reading pre sequencer state'
)
self
.
master
.
attr_LastSetMsg
+=
'failed reading pre sequencer state
\n
'
self
.
master
.
error_stream
(
'failed reading pre sequencer state'
)
...
...
@@ -332,8 +332,8 @@ class opathread(threading.Thread):
try
:
post_state
=
self
.
master
.
post_sequencer_opa
.
state
()
self
.
master
.
info_stream
(
'step 9: check post sequencer OPA termination.'
)
except
tango
.
DevFailed
as
e
:
tango
.
Except
.
print_exception
(
e
)
except
tango
.
DevFailed
as
e
x
:
tango
.
Except
.
print_exception
(
e
x
)
self
.
master
.
set_status
(
'failed reading post sequencer state'
)
self
.
master
.
attr_LastSetMsg
+=
'failed reading post sequencer state
\n
'
self
.
master
.
error_stream
(
'failed reading post sequencer state'
)
...
...
Write
Preview
Markdown
is supported
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