Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iexcode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
29id
iexcode
Commits
7faad755
Commit
7faad755
authored
2 years ago
by
Your Name
Browse files
Options
Downloads
Patches
Plain Diff
fixed kappa exersize
parent
99584bc1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!11
Main merge jmcchesn-main-patch branch with main
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
iexcode/instruments/Kappa.py
+2
-2
2 additions, 2 deletions
iexcode/instruments/Kappa.py
iexcode/macros/kappa_exersize_PI_motors.py
+33
-0
33 additions, 0 deletions
iexcode/macros/kappa_exersize_PI_motors.py
with
35 additions
and
2 deletions
iexcode/instruments/Kappa.py
+
2
−
2
View file @
7faad755
...
...
@@ -38,6 +38,8 @@ from iexcode.instruments.spec_stuff import folders_spec
default_ioc
=
'
29idKappa:
'
kth_offset_pv
=
'
29idKappa:userCalcOut1.G
'
physical_motors
=
[
'
x
'
,
'
y
'
,
'
z
'
,
'
tth
'
,
'
kth
'
,
'
kap
'
,
'
kphi
'
]
pseudo_motors
=
[
'
th
'
,
'
chi
'
,
'
phi
'
]
#############################################################################
def
kappa_init
(
*
userName
,
**
kwargs
):
"""
...
...
@@ -66,8 +68,6 @@ def kappa_init(*userName,**kwargs):
#motors
physical_motors
=
[
'
x
'
,
'
y
'
,
'
z
'
,
'
tth
'
,
'
kth
'
,
'
kap
'
,
'
kphi
'
]
pseudo_motors
=
[
'
th
'
,
'
chi
'
,
'
phi
'
]
global
kappa_Motors
kappa_Motors
=
Motors
(
'
kappa
'
,
_kappa_motor_dictionary
(),
physical_motors
,
pseudo_motors
)
...
...
This diff is collapsed.
Click to expand it.
iexcode/macros/kappa_exersize_PI_motors.py
0 → 100644
+
33
−
0
View file @
7faad755
from
epics
import
caput
,
caget
from
iexcode.instruments.Kappa
import
_kappa_motor_dictionary
,
_kappaTransfer_StrSeq
,
physical_motors
,
pseudo_motors
from
iexcode.instruments.Kappa
import
kappa_init
from
iexcode.instruments.utilities
import
dateandtime
from
iexcode.instruments.Motors
import
Motors
def
move_PI_motors_full_range
():
"""
runs the PI motors through thier full range to prevent burrs and uneven wearing
run on Mondays
"""
ds
=
kappa_init
()
kappa_Motors
=
Motors
(
'
kappa
'
,
_kappa_motor_dictionary
(),
physical_motors
,
pseudo_motors
)
kappa_motor_dictionary
=
_kappa_motor_dictionary
()
"
Setting everyone to transfer
"
caput
(
_kappaTransfer_StrSeq
(),
1
)
print
(
'
Starting kappa move sequence:
'
,
dateandtime
())
for
motor
in
[
'
tth
'
,
'
kth
'
,
'
kap
'
]:
transfer
=
iex
.
BL
.
motors
.
get
(
motor
)
LLM
=
caget
(
kappa_motor_dictionary
[
motor
][
3
]
+
"
.LLM
"
)
HLM
=
caget
(
kappa_motor_dictionary
[
motor
][
3
]
+
"
.HLM
"
)
print
(
"
Moving
"
+
motor
+
"
through it
'
s full range:
"
,
LLM
,
HHM
)
kappa_Motors
.
move
(
motor
,
LLM
)
kappa_Motors
.
move
(
motor
,
HLM
)
kappa_Motors
.
move
(
motor
,
transfer
)
print
(
'
Finished kappa move sequence:
'
,
dateandtime
())
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment