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
Bliss
bliss
Commits
73c44fcf
Commit
73c44fcf
authored
May 07, 2021
by
Cyril Guilloud
Browse files
allow `undulator_prefix` in addition to `undu_prefix` + bit of doc
parent
37210d7c
Pipeline
#46486
passed with stages
in 104 minutes and 51 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bliss/controllers/motors/esrf_undulator.py
View file @
73c44fcf
...
...
@@ -88,6 +88,9 @@ class ESRF_Undulator(Controller):
"""
def
initialize_axis
(
self
,
axis
):
"""
Read configuration to forge tango attributes names.
"""
attr_pos_name
=
axis
.
config
.
get
(
"attribute_position"
,
str
,
"Position"
)
...
...
@@ -110,17 +113,20 @@ class ESRF_Undulator(Controller):
log_debug
(
self
,
f
"alpha=
{
alpha
}
period=
{
period
}
"
)
undu_prefix
=
axis
.
config
.
get
(
"undu_prefix"
,
str
)
if
undu_prefix
is
None
:
log_debug
(
self
,
"'undu_prefix' not specified in config"
)
if
attr_pos_name
==
"Position"
:
raise
RuntimeError
(
"'undu_prefix' must be specified in config"
)
undu_prefix
=
axis
.
config
.
get
(
"undulator_prefix"
,
str
)
if
undu_prefix
is
None
:
log_debug
(
self
,
"'undu_prefix' not specified in config"
)
if
attr_pos_name
==
"Position"
:
raise
RuntimeError
(
"'undu_prefix' must be specified in config"
)
else
:
undu_prefix
=
""
else
:
undu_prefix
=
""
else
:
attr_pos_name
=
undu_prefix
+
attr_pos_name
attr_vel_name
=
undu_prefix
+
attr_vel_name
attr_fvel_name
=
undu_prefix
+
attr_fvel_name
attr_acc_name
=
undu_prefix
+
attr_acc_name
attr_pos_name
=
undu_prefix
+
attr_pos_name
attr_vel_name
=
undu_prefix
+
attr_vel_name
attr_fvel_name
=
undu_prefix
+
attr_fvel_name
attr_acc_name
=
undu_prefix
+
attr_acc_name
# check for revolver undulator
is_revolver
=
False
...
...
doc/docs/config_undulator.md
View file @
73c44fcf
...
...
@@ -15,7 +15,7 @@ velocity and acceleration have to be specified.
`ESRF_Undulator`
controller is a
`NoSettingsAxis`
, i.e. the parameters
like velocity, accelerations are not configured in Beacon but read from Tango DS.
There are 2 ways to
do that
:
There are 2 ways to
configure undulators axes
:
*
either giving the fulls names of the attributes:
```
...
...
@@ -24,10 +24,10 @@ There are 2 ways to do that:
attribute_first_velocity: U42B_GAP_FirstVelocity
attribute_acceleration: U42B_GAP_Acceleration
```
*
or
just giving
the undu_prefix:
*
or
better give only
the
`
undu
lator
_prefix
`
(or
`undu_prefix`
)
:
```
undu_prefix: U42C_GAP_
undu
lator
_prefix: U42C_GAP_
```
## YAML configuration file example
...
...
@@ -54,7 +54,7 @@ In this example, the 2 types of configuration are used:
alpha
:
1.9206
-
name
:
u42c
undu_prefix
:
U42C_GAP_
undu
lator
_prefix
:
U42C_GAP_
steps_per_unit
:
1
tolerance
:
0.1
low_limit
:
0.01
...
...
@@ -64,9 +64,24 @@ In this example, the 2 types of configuration are used:
```
## info
## info
rmation
Example of non-initialized undulator:
`wid()`
command gives info about all undulators configured in a session:
```
DEMO [1]: wid()
---------------------------------------
ID Device Server //acs.esrf.fr:10000/id/master/id42
Power: 0.000 / 10.0 KW
Power density: 0.000 / 300.0 KW/mr2
u42b - GAP:200.000 - ENABLED
u42c - GAP:199.999 - ENABLED
u32a - GAP:199.999 - ENABLED
```
Inline info provides detailed information about undulator axis:
```
u42b
AXIS:
...
...
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