Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xxx-R6-1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository 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
synApps_6_1_Working
xxx-R6-1
Commits
99d08d73
Commit
99d08d73
authored
10 years ago
by
mooney
Browse files
Options
Downloads
Patches
Plain Diff
use doAfterIocInit
parent
45c7ec4b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iocBoot/iocLinux/st.cmd
+61
-105
61 additions, 105 deletions
iocBoot/iocLinux/st.cmd
with
61 additions
and
105 deletions
iocBoot/iocLinux/st.cmd
+
61
−
105
View file @
99d08d73
...
...
@@ -14,9 +14,8 @@ epicsEnvSet(STARTUP,$(TOP)/iocBoot/$(IOC))
errlogInit
(
20000
)
#
Specify
largest
array
CA
will
transport
#
Note
for
N
sscanRecord
data
points
,
need
(
N
+
1
)*
8
bytes
,
else
MEDM
#
plot
doesn
't display
epicsEnvSet EPICS_CA_MAX_ARRAY_BYTES 64008
#
Note
for
N
doubles
,
need
N
*
8
bytes
epicsEnvSet
EPICS_CA_MAX_ARRAY_BYTES
64000
################################################################################
#
Tell
EPICS
all
about
the
record
types
,
device
-support
modules
,
drivers
,
...
...
@@ -24,22 +23,20 @@ epicsEnvSet EPICS_CA_MAX_ARRAY_BYTES 64008
dbLoadDatabase
(
"../../dbd/iocxxxLinux.dbd"
)
iocxxxLinux_registerRecordDeviceDriver
(
pdbbase
)
< areaDetector.cmd
###
save_restore
setup
<
save_restore
.cmd
# Autosave info node example
#dbLoadRecords("$(AUTOSAVE)/asApp/Db/infoExample.db","P=xxx:")
#
Access
Security
dbLoadRecords
(
"$(TOP)/xxxApp/Db/Security_Control.db"
,
"P=xxx:"
)
asSetFilename
(
"$(TOP)/iocBoot/accessSecurity.acf"
)
asSetSubstitutions
(
"P=xxx:"
)
#
Can
modify
file
and
reinit
with
"asInit"
# Soft function generator
dbLoadRecords("$(CALC)/calcApp/Db/FuncGen.db","P=xxx:,Q=fgen,OUT=xxx:m7.VAL")
<
areaDetector
.cmd
#
user
-assignable
ramp
/tweak
dbLoadRecords
(
"$(STD)/stdApp/Db/ramp_tweak.db"
,
"P=xxx:,Q=rt1"
)
### save_restore setup
# We presume a suitable initHook routine was compiled into xxx.munch.
# See also create_monitor_set(), after iocInit() .
< save_restore.cmd
#
serial
support
#<
serial
.cmd
...
...
@@ -47,43 +44,53 @@ dbLoadRecords("$(STD)/stdApp/Db/ramp_tweak.db","P=xxx:,Q=rt1")
#dbLoadTemplate
(
"basic_motor.substitutions"
)
#dbLoadTemplate
(
"motor.substitutions"
)
dbLoadTemplate
(
"softMotor.substitutions"
)
#
dbLoadTemplate("pseudoMotor.substitutions")
dbLoadTemplate
(
"pseudoMotor.substitutions"
)
<
motorSim
.cmd
#< areaDetector.cmd
### Allstop, alldone
#
motorUtil
(
allstop
&
alldone
)
dbLoadRecords
(
"$(MOTOR)/db/motorUtil.db"
,
"P=xxx:"
)
### Insertion-device control
#dbLoadRecords("$(STD)/stdApp/Db/IDctrl.db","P=xxx:,xx=02us")
#
Run
this
after
iocInit
:
doAfterIocInit
(
"motorUtilInit('xxx:')"
)
###
Scan
-support
software
#
crate
-resident
scan
.
This
executes
1
D
,
2
D
,
3
D
,
and
4
D
scans
,
and
caches
#
1
D
data
,
but
it
doesn
't store anything to disk. (See '
saveData
' below for that.)
dbLoadRecords("$(SSCAN)/sscanApp/Db/standardScans.db","P=xxx:,MAXPTS1=1000,MAXPTS2=1000,MAXPTS3=1000,MAXPTS4=1000,MAXPTSH=1000")
dbLoadRecords("$(SSCAN)/sscanApp/Db/saveData.db","P=xxx:")
# Run this after iocInit:
doAfterIocInit("saveData_Init(saveData.req, '
P
=
xxx
:
')")
dbLoadRecords("$(SSCAN)/sscanApp/Db/scanProgress.db","P=xxx:scanProgress:")
#
configMenu
example
.
See
create_manual_set
()
command
after
iocInit
.
# Run this after iocInit:
doAfterIocInit("seq &scanProgress, '
S
=
xxx
:
,
P
=
xxx
:scanProgress
:
'")
# configMenu example.
dbLoadRecords("$(AUTOSAVE)/asApp/Db/configMenu.db","P=xxx:,CONFIG=scan1")
# Note that the request file MUST be named $(CONFIG)Menu.req
# If the macro CONFIGMENU is defined with any value, backup (".savB") and
# sequence files (".savN") will not be written. We don'
t
want
these
for
configMenu
.
#
Run
this
after
iocInit
:
doAfterIocInit
(
"create_manual_set('scan1Menu.req','P=xxx:,CONFIG=scan1,CONFIGMENU=1')"
)
#
You
could
make
scan
configurations
read
-only
:
#dbLoadRecords
(
"$(AUTOSAVE)/asApp/Db/configMenu.db"
,
"P=xxx:,CONFIG=scan1,ENABLE_SAVE=0"
)
#
read
-only
configMenu
example
.
(
Read
-only
,
because
we
're not calling create_manual_set().)
#dbLoadRecords("$(AUTOSAVE)/asApp/Db/configMenu.db","P=xxx:,CONFIG=scan2")
# A set of scan parameters for each positioner. This is a convenience
# for the user. It can contain an entry for each scannable thing in the
# crate.
dbLoadTemplate("scanParms.substitutions")
### Slits
#
dbLoadRecords
(
"$(OPTICS)/opticsApp/Db/2slit.db"
,
"P=xxx:,SLIT=Slit1V,mXp=m3,mXn=m4"
)
#
dbLoadRecords
(
"$(OPTICS)/opticsApp/Db/2slit.db"
,
"P=xxx:,SLIT=Slit1H,mXp=m5,mXn=m6"
)
dbLoadRecords("$(OPTICS)/opticsApp/Db/2slit.db","P=xxx:,SLIT=Slit1V,mXp=m3,mXn=m4")
dbLoadRecords("$(OPTICS)/opticsApp/Db/2slit.db","P=xxx:,SLIT=Slit1H,mXp=m5,mXn=m6")
# X-ray Instrumentation Associates Huber Slit Controller
# supported by a customized version of the SNL program written by Pete Jemian
#dbLoadRecords("$(OPTICS)/opticsApp/Db/xia_slit.db", "P=xxx:, HSC=hsc1:")
#dbLoadRecords("$(OPTICS)/opticsApp/Db/xia_slit.db", "P=xxx:, HSC=hsc2:")
#dbLoadRecords("$(IP)/ipApp/Db/generic_serial.db", "P=xxx:,C=0,SERVER=serial7")
# Run this after iocInit:
#doAfterIocInit("seq &xia_slit, '
name
=
hsc1
,
P
=
xxx
:
,
HSC
=
hsc1
:
,
S
=
xxx
:seriala
[
6
]
'")
### 2-post mirror
#dbLoadRecords("$(OPTICS)/opticsApp/Db/2postMirror.db","P=xxx:,Q=M1,mDn=m1,mUp=m2,LENGTH=0.3")
...
...
@@ -94,7 +101,6 @@ dbLoadTemplate("scanParms.substitutions")
#dbLoadRecords("$(OPTICS)/opticsApp/Db/filterLock.db","P=xxx:,Q=fltr2:,LOCK=fltr_1_2:,LOCK_PV=xxx:DAC1_1.VAL")
### Optical tables
#tableRecordDebug
=
1
#dbLoadRecords("$(OPTICS)/opticsApp/Db/table.db","P=xxx:,Q=Table1,T=table1,M0X=m1,M0Y=m2,M1Y=m3,M2X=m4,M2Y=m5,M2Z=m6,GEOM=SRI")
# Io calculation
...
...
@@ -103,19 +109,27 @@ dbLoadRecords("$(OPTICS)/opticsApp/Db/Io.db","P=xxx:Io:")
### Monochromator support ###
# Kohzu and PSL monochromators: Bragg and theta/Y/Z motors
# standard geometry (geometry 1)
#dbLoadRecords
(
"$(OPTICS)/opticsApp/Db/kohzuSeq.db"
,
"P=xxx:,M_THETA=m1,M_Y=m2,M_Z=m3,yOffLo=17.4999,yOffHi=17.5001"
)
dbLoadRecords("$(OPTICS)/opticsApp/Db/kohzuSeq.db","P=xxx:,M_THETA=m1,M_Y=m2,M_Z=m3,yOffLo=17.4999,yOffHi=17.5001")
# Run this after iocInit:
doAfterIocInit("seq &kohzuCtl, '
P
=
xxx
:
,
M_THETA
=
m1
,
M_Y
=
m2
,
M_Z
=
m3
,
GEOM
=
1
,
logfile
=
kohzuCtl
.log
'")
# modified geometry (geometry 2)
#dbLoadRecords("$(OPTICS)/opticsApp/Db/kohzuSeq.db","P=xxx:,M_THETA=m1,M_Y=m2,M_Z=m2,yOffLo=4,yOffHi=36")
# Run this after iocInit:
#doAfterIocInit("seq &kohzuCtl, '
P
=
xxx
:
,
M_THETA
=
m1
,
M_Y
=
m2
,
M_Z
=
m3
,
GEOM
=
2
,
logfile
=
kohzuCtl
.log
'")
# Spherical grating monochromator
#dbLoadRecords("$(OPTICS)/opticsApp/Db/SGM.db","P=xxx:,N=1,M_x=m7,M_rIn=m6,M_rOut=m8,M_g=m9")
# 4-bounce high-resolution monochromator
#dbLoadRecords
(
"$(OPTICS)/opticsApp/Db/hrSeq.db"
,
"P=xxx:,N=1,M_PHI1=m1,M_PHI2=m2"
)
dbLoadRecords("$(OPTICS)/opticsApp/Db/hrSeq.db","P=xxx:,N=1,M_PHI1=m4,M_PHI2=m5")
# Run this after iocInit:
doAfterIocInit("seq &hrCtl1, '
P
=
xxx
:
,
N
=
1
,
M_PHI1
=
m4
,
M_PHI2
=
m5
,
logfile
=
hrCtl1
.log
'")
### Orientation matrix, four-circle diffractometer (see seq program '
orient
' below)
#dbLoadRecords("$(OPTICS)/opticsApp/Db/orient.db", "P=xxx:,O=1,PREC=4")
#dbLoadTemplate("orient_xtals.substitutions")
# Run this after iocInit:
#doAfterIocInit("seq &orient, '
P
=
xxx
:orient
1
:
,
PM
=
xxx
:
,
mTTH
=
m9
,
mTH
=
m10
,
mCHI
=
m11
,
mPHI
=
m12
'")
# Load single element Canberra AIM MCA and ICB modules
#< canberra_1.cmd
...
...
@@ -127,31 +141,14 @@ dbLoadRecords("$(OPTICS)/opticsApp/Db/Io.db","P=xxx:Io:")
#< canberra_3.cmd
### Stuff for user programming ###
dbLoadRecords
(
"$(CALC)/calcApp/Db/userCalcs10.db"
,
"P=xxx:"
)
dbLoadRecords
(
"$(CALC)/calcApp/Db/userCalcOuts10.db"
,
"P=xxx:"
)
dbLoadRecords
(
"$(CALC)/calcApp/Db/userStringCalcs10.db"
,
"P=xxx:"
)
dbLoadRecords
(
"$(CALC)/calcApp/Db/userArrayCalcs10.db"
,
"P=xxx:,N=2000"
)
dbLoadRecords
(
"$(CALC)/calcApp/Db/userTransforms10.db"
,
"P=xxx:"
)
dbLoadRecords
(
"$(CALC)/calcApp/Db/userAve10.db"
,
"P=xxx:"
)
#
string
sequence
(
sseq
)
records
dbLoadRecords
(
"$(CALC)/calcApp/Db/userStringSeqs10.db"
,
"P=xxx:"
)
< calc.cmd
# 4-step measurement
dbLoadRecords
(
"$(STD)/stdApp/Db/4step.db"
,
"P=xxx:"
)
#
interpolation
dbLoadRecords
(
"$(CALC)/calcApp/Db/interp.db"
,
"P=xxx:,N=2000"
)
dbLoadRecords
(
"$(CALC)/calcApp/Db/interpNew.db"
,
"P=xxx:,Q=1,N=2000"
)
#
array
test
dbLoadRecords
(
"$(CALC)/calcApp/Db/arrayTest.db"
,
"P=xxx:,N=2000"
)
#
pvHistory
(
in
-crate
archive
of
up
to
three
PV
's)
dbLoadRecords("$(STD)/stdApp/Db/pvHistory.db","P=xxx:,N=1,MAXSAMPLES=1440")
# busy record
dbLoadRecords("$(BUSY)/busyApp/Db/busyRecord.db", "P=xxx:,R=mybusy")
dbLoadRecords("$(STD)/stdApp/Db/4step.db", "P=xxx:,Q=4step:")
# Slow feedback
dbLoadTemplate "pid_slow.substitutions"
dbLoadTemplate "async_pid_slow.substitutions"
# PID-based feedback
#dbLoadTemplate "fb_epid.substitutions"
# Miscellaneous PV'
s
,
such
as
burtResult
...
...
@@ -161,19 +158,28 @@ dbLoadRecords("$(STD)/stdApp/Db/misc.db","P=xxx:")
dbLoadRecords
(
"$(DEVIOCSTATS)/db/iocAdminSoft.db"
,
"IOC=xxx"
)
###
Queensgate
piezo
driver
#dbLoadRecords
(
"$(IP)/ipApp/Db/pzt_3id.db"
,
"P=xxx:"
)
#dbLoadRecords
(
"$(IP)/ipApp/Db/pzt.db"
,
"P=xxx:"
)
###
Queensgate
Nano2k
piezo
controller
#dbLoadRecords
(
"$(STD)/stdApp/Db/Nano2k.db"
,
"P=xxx:,S=s1"
)
###
Load
database
records
for
Femto
amplifiers
#dbLoadRecords
(
"$(STD)/stdApp/Db/femto.db"
,
"P=xxx:,H=fem01:,F=seq01:"
)
dbLoadRecords
(
"$(STD)/stdApp/Db/femto.db"
,
"P=xxx:,H=fem01:,F=seq01:"
)
#
Run
this
after
iocInit
:
doAfterIocInit
(
"seq femto,'name=fem1,P=xxx:,H=fem01:,F=seq01:,G1=xxx:Unidig1Bo6,G2=xxx:Unidig1Bo7,G3=xxx:Unidig1Bo8,NO=xxx:Unidig1Bo10'"
)
###
Load
database
records
for
dual
PF4
filters
#dbLoadRecords
(
"$(OPTICS)/opticsApp/Db/pf4common.db"
,
"P=xxx:,H=pf4:,A=A,B=B"
)
#dbLoadRecords
(
"$(OPTICS)/opticsApp/Db/pf4bank.db"
,
"P=xxx:,H=pf4:,B=A"
)
#dbLoadRecords
(
"$(OPTICS)/opticsApp/Db/pf4bank.db"
,
"P=xxx:,H=pf4:,B=B"
)
dbLoadRecords
(
"$(OPTICS)/opticsApp/Db/pf4common.db"
,
"P=xxx:,H=pf4:,A=A,B=B"
)
dbLoadRecords
(
"$(OPTICS)/opticsApp/Db/pf4bank.db"
,
"P=xxx:,H=pf4:,B=A"
)
dbLoadRecords
(
"$(OPTICS)/opticsApp/Db/pf4bank.db"
,
"P=xxx:,H=pf4:,B=B"
)
#
Run
this
after
iocInit
:
doAfterIocInit
(
"seq pf4,'name=pf1,P=xxx:,H=pf4:,B=A,M=xxx:userTran10.I,B1=xxx:userTran10.A,B2=xxx:userTran10.B,B3=xxx:userTran10.C,B4=xxx:userTran10.D'"
)
doAfterIocInit
(
"seq pf4,'name=pf2,P=xxx:,H=pf4:,B=B,M=xxx:userTran10.I,B1=xxx:userTran10.E,B2=xxx:userTran10.F,B3=xxx:userTran10.G,B4=xxx:userTran10.H'"
)
###
Load
database
records
for
alternative
PF4
-filter
support
dbLoadTemplate
"filter.substitutions"
#
Run
this
after
iocInit
:
doAfterIocInit
(
"seq filterDrive,'NAME=filterDrive,P=xxx:,R=filter:,NUM_FILTERS=16'"
)
###############################################################################
iocInit
...
...
@@ -182,58 +188,8 @@ iocInit
#
write
all
the
PV
names
to
a
local
file
dbl
>
dbl
-all
.txt
###
startup
State
Notation
Language
programs
#seq
&
kohzuCtl
,
"P=xxx:, M_THETA=m1, M_Y=m2, M_Z=m3, GEOM=1, logfile=kohzuCtl.log"
#seq
&
hrCtl
,
"P=xxx:, N=1, M_PHI1=m1, M_PHI2=m2, logfile=hrCtl1.log"
#
Keithley
2000
series
DMM
#
channels
:
10
,
20
,
or
22
;
model
:
2000
or
2700
#seq
&
Keithley2kDMM
,(
"P=xxx:, Dmm=D1, channels=22, model=2700"
)
#
X
-ray
Instrumentation
Associates
Huber
Slit
Controller
#
supported
by
a
SNL
program
written
by
Pete
Jemian
and
modified
(
TMM
)
for
use
with
the
#
sscan
record
#seq
&
xia_slit
,
"name=hsc1, P=xxx:, HSC=hsc1:, S=xxx:seriala[6]"
#
Orientation
-matrix
#seq
&
orient
,
"P=xxx:orient1:,PM=xxx:,mTTH=m9,mTH=m10,mCHI=m11,mPHI=m12"
#
Start
PF4
filter
sequence
program
#seq
pf4
,
"name=pf1,P=xxx:,H=pf4:,B=A,M=xxx:userTran10.I,B1=xxx:userTran10.A,B2=xxx:userTran10.B,B3=xxx:userTran10.C,B4=xxx:userTran10.D"
#seq
pf4
,
"name=pf2,P=xxx:,H=pf4:,B=B,M=xxx:userTran10.I,B1=xxx:userTran10.E,B2=xxx:userTran10.F,B3=xxx:userTran10.G,B4=xxx:userTran10.H"
#
Alternative
pf4
filter
seq
program
#seq
filterDrive
,
"NAME=filterDrive,P=xxx:,R=filter:,NUM_FILTERS=16"
#
Start
Femto
amplifier
sequence
programs
#seq
femto
,
"name=fem1,P=xxx:,H=fem01:,F=seq01:,G1=xxx:Unidig1Bo6,G2=xxx:Unidig1Bo7,G3=xxx:Unidig1Bo8,NO=xxx:Unidig1Bo10"
seq
&
scanProgress
,
"S=xxx:, P=xxx:scanProgress:"
###
Start
up
the
autosave
task
and
tell
it
what
to
do
.
#
The
task
is
actually
named
"save_restore"
.
#
Note
that
you
can
reload
these
sets
after
creating
them
:
e
.g.
,
#
reload_monitor_set
(
"auto_settings.req"
,
30
,
"P=xxx:"
)
#save_restoreDebug
=
20
#
#
save
positions
every
five
seconds
create_monitor_set
(
"auto_positions.req"
,
5
,
"P=xxx:"
)
#
save
other
things
every
thirty
seconds
create_monitor_set
(
"auto_settings.req"
,
30
,
"P=xxx:"
)
#
configMenu
example
#
Note
that
auto_settings
.req
includes
scan1MenuNames
.req
,
so
the
names
of
#
configurations
will
be
saved
and
restored
.
#
Also
note
that
the
request
file
MUST
be
named
$
(
CONFIG
)
Menu
.req
create_manual_set
(
"scan1Menu.req"
,
"P=xxx:,CONFIG=scan1"
)
###
Start
the
saveData
task
.
saveData_Init
(
"saveData.req"
,
"P=xxx:"
)
dbcar
(
0
,
1
)
#
motorUtil
(
allstop
&
alldone
)
motorUtilInit
(
"xxx:"
)
#
Report
states
of
database
CA
links
dbcar
(*,
1
)
#
print
the
time
our
boot
was
finished
date
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