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
f452d66e
Commit
f452d66e
authored
1 year ago
by
Your Name
Browse files
Options
Downloads
Patches
Plain Diff
added servo enable, debug
parent
324fbd24
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
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
iexcode/instruments/Kappa.py
+7
-0
7 additions, 0 deletions
iexcode/instruments/Kappa.py
iexcode/macros/BL_shutdown.py
+17
-7
17 additions, 7 deletions
iexcode/macros/BL_shutdown.py
iexcode/macros/kappa_exersize_PI_motors.py
+6
-2
6 additions, 2 deletions
iexcode/macros/kappa_exersize_PI_motors.py
with
30 additions
and
9 deletions
iexcode/instruments/Kappa.py
+
7
−
0
View file @
f452d66e
...
...
@@ -765,6 +765,13 @@ def PI_motors_sync():
caput
(
val_pv
,
current_rbv
)
print
(
'
PI motors VAL synced to RBV
'
)
def
PI_motor_servo
(
Enable_Disable
=
'
Enable
'
):
motor_dictionary
=
_kappa_motor_dictionary
()
for
motor
in
_PI_motor_list
():
servo_pv
=
motor_dictionary
[
motor
][
3
]
+
'
.CNEN
'
caput
(
servo_pv
,
Enable_Disable
)
print
(
'
PI motors servos
'
+
Enable_Disable
)
def
Euler_motors_sync
():
"""
Syncs the Euler motores
...
...
This diff is collapsed.
Click to expand it.
iexcode/macros/BL_shutdown.py
+
17
−
7
View file @
f452d66e
from
epics
import
caget
,
caput
from
..instruments.electron_analyzer
import
EA
from
..instruments.shutters
import
main_shutter_close
,
branch_shutter_close
from
..instruments.diagnostics
import
diagnostics_all_out
from
iexcode.instruments.electron_analyzer
import
EA
from
iexcode.instruments.shutters
import
main_shutter_close
,
branch_shutter_close
from
iexcode.instruments.diagnostics
import
diagnostics_all_out
from
iexcode.instruments.xrays
import
grating
,
mvmono
from
iexcode.instruments.ARPES
import
ARPES_safestate
from
iexcode.instruments.kappa
import
kappa_safestate
from
iexcode.instruments.Octupole
import
Octupole_safestate
##############################################################################################################
############################################ Shut down #################################################
...
...
@@ -10,14 +14,20 @@ from ..instruments.diagnostics import diagnostics_all_out
def
BL_Shutdown
():
BL_CloseAllShutters
()
print
(
'
\n
Closed all beamline shutters
'
)
BL_Valve_All
(
state
=
"
CLOSE
"
)
print
(
'
\n
Closed all beamline valves
'
)
diagnostics_all_out
()
print
(
'
\n
All diagnostics out
'
)
try
:
EA
.
off
()
ARPES_safestate
()
kappa_safestate
()
Octupole_safestate
()
except
:
print
(
'
EA is not running, visually confirm HV is off
'
)
caput
(
"
29iddau1:dau1:011:DAC_Set
"
,
0
)
#RSXS HV = "OFF"
print
(
'
Check that endstations are in a safe state
'
)
grating
(
'
MEG
'
)
mvmono
(
500
)
def
BL_CloseAllShutters
():
main_shutter_close
()
...
...
This diff is collapsed.
Click to expand it.
iexcode/macros/kappa_exersize_PI_motors.py
+
6
−
2
View file @
f452d66e
...
...
@@ -2,11 +2,11 @@ from epics import caput,caget
import
iexcode.instruments.cfg
as
iex
from
iexcode.instruments.Kappa
import
_kappa_motor_dictionary
,
_kappaTransfer_StrSeq
,
physical_motors
,
pseudo_motors
from
iexcode.instruments.Kappa
import
kappa_init
from
iexcode.instruments.Kappa
import
kappa_init
,
mvkappa
,
PI_motor_servo
from
iexcode.instruments.utilities
import
dateandtime
from
iexcode.instruments.Motors
import
Motors
def
move_PI_motors_full_range
():
def
move_PI_motors_full_range
(
kappa_pos
=
[
0
,
0
,
0
,
90
,
0
,
0
,
0
]
):
"""
runs the PI motors through thier full range to prevent burrs and uneven wearing
run on Mondays
...
...
@@ -16,6 +16,8 @@ def move_PI_motors_full_range():
kappa_Motors
=
Motors
(
'
kappa
'
,
_kappa_motor_dictionary
(),
physical_motors
,
pseudo_motors
)
kappa_motor_dictionary
=
_kappa_motor_dictionary
()
PI_motor_servo
(
Enable_Disable
=
'
Enable
'
)
"
Setting everyone to transfer
"
caput
(
_kappaTransfer_StrSeq
(),
1
)
print
(
'
Starting kappa move sequence:
'
,
dateandtime
())
...
...
@@ -28,6 +30,8 @@ def move_PI_motors_full_range():
kappa_Motors
.
move
(
motor
,
HLM
)
kappa_Motors
.
move
(
motor
,
transfer
)
print
(
'
Finished kappa move sequence:
'
,
dateandtime
())
mvkappa
(
kappa_pos
)
PI_motor_servo
(
Enable_Disable
=
'
Disable
'
)
...
...
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