Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
F-CRG
BM07
bm07
Commits
d4234a37
Commit
d4234a37
authored
Dec 10, 2021
by
Yoann Sallaz Damaz
Browse files
correct light disprecancy
parent
fabe9404
Pipeline
#61892
failed with stages
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
d4234a37
...
...
@@ -100,3 +100,4 @@ ENV/
# mypy
.mypy_cache/
.favorites.json
bm07/videmono.txt
bm07/optical_setup.py_rest
0 → 100644
View file @
d4234a37
This diff is collapsed.
Click to expand it.
bm07/wagoMotor_FIP.py
0 → 100644
View file @
d4234a37
from
bliss.controllers.motors.wago
import
WagoMotor
from
bliss.controllers.motor
import
Controller
from
bliss.common.utils
import
rounder
import
gevent
class
WagoMotor_FIP
(
WagoMotor
,
Controller
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
().
__init__
(
*
args
,
**
kwargs
)
def
start_one
(
self
,
motion
):
logical_name
=
motion
.
axis
.
config
.
get
(
"logical_name"
)
logical_channel
=
int
(
motion
.
axis
.
config
.
get
(
"logical_channel"
))
tolerance
=
motion
.
axis
.
config
.
get
(
"tolerance"
,
float
,
1e-2
)
target_rounded
=
rounder
(
tolerance
,
motion
.
target_pos
)
self
.
wago
.
controller
.
devwritephys
(
(
self
.
wago
.
controller
.
devname2key
(
logical_name
),
logical_channel
,
motion
.
target_pos
,
)
)
with
gevent
.
Timeout
(
0.5
,
TimeoutError
):
while
rounder
(
tolerance
,
self
.
wago
.
get
(
logical_name
))
!=
target_rounded
:
gevent
.
sleep
(
0.1
)
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