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
Benoit Rousselle
bliss
Commits
6e86691e
Commit
6e86691e
authored
Nov 22, 2016
by
Cyril Guilloud
Browse files
uniformization of all sleep durations.
parent
1efec405
Changes
1
Hide whitespace changes
Inline
Side-by-side
bliss/controllers/motors/PI_E871.py
View file @
6e86691e
...
@@ -22,6 +22,7 @@ import serial
...
@@ -22,6 +22,7 @@ import serial
Bliss controller for ethernet PI E871 piezo controller.
Bliss controller for ethernet PI E871 piezo controller.
Cyril Guilloud ESRF BLISS 2016
Cyril Guilloud ESRF BLISS 2016
"""
"""
PI871_SLEEP_TIME
=
0.5
class
PI_E871
(
Controller
):
class
PI_E871
(
Controller
):
...
@@ -120,7 +121,7 @@ class PI_E871(Controller):
...
@@ -120,7 +121,7 @@ class PI_E871(Controller):
"""
"""
elog
.
debug
(
"custom axis initialization , current_pos=%g"
%
current_pos
)
elog
.
debug
(
"custom axis initialization , current_pos=%g"
%
current_pos
)
self
.
send_no_ans
(
axis
,
"%d SVO %s 1"
%
(
axis
.
address
,
axis
.
axis_id
))
self
.
send_no_ans
(
axis
,
"%d SVO %s 1"
%
(
axis
.
address
,
axis
.
axis_id
))
time
.
sleep
(
0.05
)
time
.
sleep
(
PI871_SLEEP_TIME
)
self
.
_check_error
(
axis
)
self
.
_check_error
(
axis
)
self
.
reference_axis_ref_switch
(
axis
)
self
.
reference_axis_ref_switch
(
axis
)
self
.
_check_error
(
axis
)
self
.
_check_error
(
axis
)
...
@@ -295,7 +296,7 @@ class PI_E871(Controller):
...
@@ -295,7 +296,7 @@ class PI_E871(Controller):
"""
"""
self
.
send_no_ans
(
axis
,
"%d SVO %s 1"
%
(
axis
.
address
,
axis
.
axis_id
))
self
.
send_no_ans
(
axis
,
"%d SVO %s 1"
%
(
axis
.
address
,
axis
.
axis_id
))
# ???
# ???
time
.
sleep
(
0.05
)
time
.
sleep
(
PI871_SLEEP_TIME
)
self
.
_check_error
(
axis
)
self
.
_check_error
(
axis
)
...
@@ -317,11 +318,11 @@ class PI_E871(Controller):
...
@@ -317,11 +318,11 @@ class PI_E871(Controller):
Launches referencing of axis <axis> and waits for end of referencing.
Launches referencing of axis <axis> and waits for end of referencing.
"""
"""
self
.
send_no_ans
(
axis
,
"%d FRF"
%
axis
.
address
)
self
.
send_no_ans
(
axis
,
"%d FRF"
%
axis
.
address
)
time
.
sleep
(
0.5
)
time
.
sleep
(
PI871_SLEEP_TIME
)
_ref
=
self
.
_get_referencing
(
axis
)
_ref
=
self
.
_get_referencing
(
axis
)
while
_ref
!=
1
:
while
_ref
!=
1
:
time
.
sleep
(
0.5
)
time
.
sleep
(
PI871_SLEEP_TIME
)
_ref
=
self
.
_get_referencing
(
axis
)
_ref
=
self
.
_get_referencing
(
axis
)
self
.
_check_error
(
axis
)
self
.
_check_error
(
axis
)
...
@@ -333,11 +334,11 @@ class PI_E871(Controller):
...
@@ -333,11 +334,11 @@ class PI_E871(Controller):
Launches referencing of axis <axis> using NEGATIVE limit switch.
Launches referencing of axis <axis> using NEGATIVE limit switch.
"""
"""
self
.
send_no_ans
(
axis
,
"%d FNL"
%
axis
.
address
)
self
.
send_no_ans
(
axis
,
"%d FNL"
%
axis
.
address
)
time
.
sleep
(
0.5
)
time
.
sleep
(
PI871_SLEEP_TIME
)
_ref
=
self
.
_get_referencing
(
axis
)
_ref
=
self
.
_get_referencing
(
axis
)
while
_ref
!=
1
:
while
_ref
!=
1
:
time
.
sleep
(
0.5
)
time
.
sleep
(
PI871_SLEEP_TIME
)
_ref
=
self
.
_get_referencing
(
axis
)
_ref
=
self
.
_get_referencing
(
axis
)
self
.
_check_error
(
axis
)
self
.
_check_error
(
axis
)
...
@@ -349,11 +350,11 @@ class PI_E871(Controller):
...
@@ -349,11 +350,11 @@ class PI_E871(Controller):
Launches referencing of axis <axis> using POSITIVE limit switch.
Launches referencing of axis <axis> using POSITIVE limit switch.
"""
"""
self
.
send_no_ans
(
axis
,
"%d FPL"
%
axis
.
address
)
self
.
send_no_ans
(
axis
,
"%d FPL"
%
axis
.
address
)
time
.
sleep
(
0.5
)
time
.
sleep
(
PI871_SLEEP_TIME
)
_ref
=
self
.
_get_referencing
(
axis
)
_ref
=
self
.
_get_referencing
(
axis
)
while
_ref
!=
1
:
while
_ref
!=
1
:
time
.
sleep
(
0.5
)
time
.
sleep
(
PI871_SLEEP_TIME
)
_ref
=
self
.
_get_referencing
(
axis
)
_ref
=
self
.
_get_referencing
(
axis
)
self
.
_check_error
(
axis
)
self
.
_check_error
(
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