Skip to content
GitLab
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
362b17a8
Commit
362b17a8
authored
Apr 26, 2022
by
bliss administrator
Browse files
Undulators steps_position_precision
parent
a1ab2e80
Pipeline
#73178
failed
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
id26/controllers/id26undulators.py
View file @
362b17a8
...
...
@@ -66,23 +66,25 @@ class ID26_Undulator(ESRF_Undulator):
def
start_one
(
self
,
motion
,
t0
=
None
):
if
motion
.
target_pos
!=
pytest
.
approx
(
motion
.
axis
.
position
,
abs
=
motion
.
axis
.
tolerance
):
self
.
_set_attribute
(
motion
.
axis
,
"attr_pos_name"
,
float
(
motion
.
target_pos
/
motion
.
axis
.
steps_per_unit
),
)
else
:
log_warning
(
self
,
"{0} within tolerance {1}: {2} (requested new pos id: {3})"
.
format
(
motion
.
axis
.
name
,
motion
.
axis
.
tolerance
,
motion
.
axis
.
position
,
motion
.
target_pos
,
)
)
log_debug
(
self
,
f
"end of start
{
motion
.
axis
.
name
}
"
)
log_warning
(
self
,
f
"
{
motion
.
axis
.
name
}
: moving from
{
motion
.
axis
.
position
}
to
{
motion
.
target_pos
}
"
)
return
super
().
start_one
(
motion
)
#if motion.target_pos != pytest.approx(motion.axis.position, abs=motion.axis.tolerance):
# self._set_attribute(
# motion.axis,
# "attr_pos_name",
# float(motion.target_pos / motion.axis.steps_per_unit),
# )
#else:
# log_warning(self,
# "{0} within tolerance {1}: {2} (requested new pos id: {3})".format(
# motion.axis.name,
# motion.axis.tolerance,
# motion.axis.position,
# motion.target_pos,
# )
# )
#
#log_debug(self, f"end of start {motion.axis.name}")
@
_log_devfailed
def
_set_attribute
(
self
,
*
args
):
...
...
@@ -108,3 +110,6 @@ class ID26_Undulator(ESRF_Undulator):
def
stop_all
(
self
,
*
motion_list
):
return
ESRF_Undulator
.
stop_all
(
self
,
*
motion_list
)
def
steps_position_precision
(
self
,
axis
):
return
0.02
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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