Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
bliss
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
483
Issues
483
List
Boards
Labels
Service Desk
Milestones
Jira
Jira
Merge Requests
126
Merge Requests
126
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bliss
bliss
Commits
3dc23960
Commit
3dc23960
authored
Sep 20, 2017
by
Jose Tiago Macara Coutinho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix
#120
: send axis position signal to controller output
parent
9c8a1e63
Pipeline
#1050
passed with stages
in 5 minutes and 50 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
1 deletion
+64
-1
bliss/controllers/motors/icepap/__init__.py
bliss/controllers/motors/icepap/__init__.py
+64
-1
No files found.
bliss/controllers/motors/icepap/__init__.py
View file @
3dc23960
...
...
@@ -412,6 +412,69 @@ class Icepap(Controller):
_ackcommand
(
self
.
_cnx
,
"%d:POS INPOS 0"
%
address
)
_ackcommand
(
self
.
_cnx
,
"%d:LTRACK %s"
%
(
address
,
mode
))
@
object_method
(
types_info
=
((
"bool"
,
"str"
,
"sense"
),
"None"
))
def
activate_axis_to_sync
(
self
,
axis
,
activate
=
True
,
signal
=
'MEASURE'
,
sense
=
'NORMAL'
):
"""
Send the given motor position to IcePAP controller
"SYNCRO" output (DB9 on controller front panel)
Valid values for *signal* are:
- AXIS - axis nominal position
- MOTOR - axis electrical phase (MOTOR internal variable)
- MEASURE (default) - signal used as axis measurement
- SHFTENC
- CTRLENC
- ENCIN
- INPOS
- ABSENC
Valid values for *sense* are:
- NORMAL (default)
- INVERTED
Args:
axis (Axis): concerned axis object
Keyword Args:
activate (bool): activate or de-activate axis to sync [default: True]
signal (str): position signal [default: MEASURE]
sense (str): position signal sense [default: NORMAL]
"""
address
=
axis
.
address
if
not
activate
:
# only remove pmux if the axis is active (avoid deactivating
# other axes unintentionally)
if
self
.
is_axis_to_sync_active
(
axis
):
self
.
pmux_remove
()
return
# remove any previous multiplexer rule
self
.
pmux_remove
()
# set the new multiplexer rule
cmd
=
"PMUX HARD B{0}"
.
format
(
address
)
_ackcommand
(
self
.
_cnx
,
cmd
)
# set which signal the DRIVER has to send to multiplexer
cmd
=
'{0}:SYNCPOS {1} {2}'
.
format
(
address
,
signal
,
sense
)
_ackcommand
(
self
.
_cnx
,
cmd
)
@
object_method
(
types_info
=
(
"None"
,
"bool"
))
def
is_axis_to_sync_active
(
self
,
axis
):
"""
Tell if the given axis is feeding a position signal to the
"SYNCRO" output (DB9 on controller front panel)
Returns:
bool: True if active or False otherwise
"""
return
'B{0}'
.
format
(
axis
.
address
)
in
_command
(
self
.
_cnx
,
'?PMUX'
)
def
pmux_remove
(
self
):
_command
(
self
.
_cnx
,
"PMUX REMOVE"
)
def
reset
(
self
):
_command
(
self
.
_cnx
,
"RESET"
)
...
...
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