Newer
Older
# vxWorks startup script
# For devIocStats
#epicsEnvSet("ENGINEER", "engineer")
#epicsEnvSet("LOCATION", "location")
putenv("ENGINEER=engineer")
putenv("LOCATION=location")
cd ""
< ../nfsCommands
< cdCommands
#sysClkRateSet(100)
#sysClkRateGet()
################################################################################
cd topbin
# If the VxWorks kernel was built using the project facility, the following must
# be added before any C++ code is loaded (see SPR #28980).
sysCplusEnable=1
# If using a PowerPC CPU with more than 32MB of memory, and not building with longjump, then
# allocate enough memory here to force code to load in lower 32 MB.
### Load synApps EPICS software
# Increase size of buffer for error logging from default 1256
errlogInit(20000)
# need more entries in wait/scan-record channel-access queue?
recDynLinkQsize = 1024
# Specify largest array CA will transport
# Note for N sscanRecord data points, need (N+1)*8 bytes, else MEDM
# plot doesn't display
################################################################################
# Tell EPICS all about the record types, device-support modules, drivers,
# etc. in the software we just loaded (xxx.munch)
iocxxxVX_registerRecordDeviceDriver(pdbbase)
#dbLoadRecords("$(CALC)/calcApp/Db/FuncGen.db","P=xxx:,Q=fgen,OUT=xxx:m7.VAL")

mooney
committed
### save_restore setup
# We presume a suitable initHook routine was compiled into xxx.munch.
# See also create_monitor_set(), after iocInit() .
< save_restore.cmd
# Industry Pack support
# CAMAC hardware
#<camac.cmd
#dbLoadTemplate("basic_motor.substitutions")
dbLoadTemplate("motor.substitutions")
### Allstop, alldone
dbLoadRecords("$(MOTOR)/db/motorUtil.db", "P=xxx:")
### streamDevice example
#dbLoadRecords("$(TOP)/xxxApp/Db/streamExample.db","P=xxx:,PORT=serial1")
### Insertion-device control
#dbLoadRecords("$(STD)/stdApp/Db/IDctrl.db","P=xxx:,xx=02us")
### Scan-support software
# crate-resident scan. This executes 1D, 2D, 3D, and 4D scans, and caches
# 1D data, but it doesn't store anything to disk. (See 'saveData' below for that.)
putenv "SDB=$(SSCAN)/sscanApp/Db/standardScans.db"
dbLoadRecords("$(SDB)","P=xxx:,MAXPTS1=1000,MAXPTS2=1000,MAXPTS3=1000,MAXPTS4=1000,MAXPTSH=1000")
dbLoadRecords("$(SSCAN)/sscanApp/Db/saveData.db","P=xxx:")
dbLoadRecords("$(SSCAN)/sscanApp/Db/scanProgress.db","P=xxx:scanProgress:")
# configMenu example. See create_manual_set() command after iocInit.
dbLoadRecords("$(AUTOSAVE)/asApp/Db/configMenu.db","P=xxx:,CONFIG=scan1")
# 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 (If not supplied, RELTOCENTER defaults to zero)
dbLoadRecords("$(OPTICS)/opticsApp/Db/2slit.db","P=xxx:,SLIT=Slit1V,mXp=m3,mXn=m4,RELTOCENTER=0")
dbLoadRecords("$(OPTICS)/opticsApp/Db/2slit.db","P=xxx:,SLIT=Slit1H,mXp=m5,mXn=m6,RELTOCENTER=0")
#dbLoadRecords("$(OPTICS)/opticsApp/Db/2slit_soft.db","P=xxx:,SLIT=Slit2V,mXp=m3,mXn=m4")
#dbLoadRecords("$(OPTICS)/opticsApp/Db/2slit_soft.db","P=xxx:,SLIT=Slit2H,mXp=m5,mXn=m6")
# X-ray Instrumentation Associates Huber Slit Controller
# supported by a customized version of the SNL program written by Pete Jemian
# (Uses asyn record loaded separately)
#dbLoadRecords("$(OPTICS)/opticsApp/Db/xia_slit.db", "P=xxx:, HSC=hsc1:")
#dbLoadRecords("$(OPTICS)/opticsApp/Db/xia_slit.db", "P=xxx:, HSC=hsc2:")
### 2-post mirror
#dbLoadRecords("$(OPTICS)/opticsApp/Db/2postMirror.db","P=xxx:,Q=M1,mDn=m1,mUp=m2,LENGTH=0.3")
### User filters
#dbLoadRecords("$(OPTICS)/opticsApp/Db/filterMotor.db","P=xxx:,Q=fltr1:,MOTOR=m1,LOCK=fltr_1_2:")
#dbLoadRecords("$(OPTICS)/opticsApp/Db/filterMotor.db","P=xxx:,Q=fltr2:,MOTOR=m2,LOCK=fltr_1_2:")
#dbLoadRecords("$(OPTICS)/opticsApp/Db/filterLock.db","P=xxx:,Q=fltr2:,LOCK=fltr_1_2:,LOCK_PV=xxx:DAC1_1.VAL")
### Optical tables
dbLoadRecords("$(DIR)/table.db","P=xxx:,Q=Table1,T=table1,M0X=m9,M0Y=m10,M1Y=m11,M2X=m12,M2Y=m13,M2Z=m14,GEOM=SRI")
### 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")
# modified geometry (geometry 2)
#dbLoadRecords("$(OPTICS)/opticsApp/Db/kohzuSeq.db","P=xxx:,M_THETA=m9,M_Y=m10,M_Z=m11,yOffLo=4,yOffHi=36")
# 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=m9,M_PHI2=m10")
#dbLoadRecords("$(OPTICS)/opticsApp/Db/hrSeq.db","P=xxx:,N=2,M_PHI1=m11,M_PHI2=m12")
### Orientation matrix, four-circle diffractometer (see seq program 'orient' below)
#dbLoadRecords("$(OPTICS)/opticsApp/Db/orient.db", "P=xxx:,O=1,PREC=6")
#dbLoadTemplate("orient_xtals.substitutions")
# Coarse/Fine stage
dbLoadRecords("$(OPTICS)/opticsApp/Db/CoarseFineMotor.db","P=xxx:cf1:,PM=xxx:,CM=m7,FM=m8")
# Load single element Canberra AIM MCA and ICB modules
# Load 13 element detector software
#< canberra_13.cmd
# Load 3 element detector software
#< canberra_3.cmd
### Stuff for user programming ###
dbLoadRecords("$(CALC)/calcApp/Db/userCalcOuts10.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("$(STD)/stdApp/Db/userStringSeqs10.db","P=xxx:")
dbLoadRecords("$(CALC)/calcApp/Db/userStringSeqs10.db","P=xxx:")
# 4-step measurement
# interpolation
dbLoadRecords("$(CALC)/calcApp/Db/interpNew.db", "P=xxx:,Q=1,N=100")
# user-assignable ramp/tweak
dbLoadRecords("$(STD)/stdApp/Db/ramp_tweak.db","P=xxx:,Q=rt1")
# pvHistory (in-crate archive of up to three PV's)
dbLoadRecords("$(STD)/stdApp/Db/pvHistory.db","P=xxx:,N=1,MAXSAMPLES=1440")
#dbLoadRecords("$(BUSY)/busyApp/Db/busyRecord.db","P=xxx:,R=mybusy")
dbLoadTemplate "pid_slow.substitutions"
dbLoadTemplate "async_pid_slow.substitutions"
# Miscellaneous PV's, such as burtResult
dbLoadRecords("$(STD)/stdApp/Db/misc.db","P=xxx:")
dbLoadRecords("$(DEVIOCSTATS)/db/iocAdminVxWorks.db","IOC=xxx")
### Queensgate piezo driver
#dbLoadRecords("$(IP)/ipApp/Db/pzt.db","P=xxx:,PORT=")
### Queensgate Nano2k piezo controller
#dbLoadRecords("$(STD)/stdApp/Db/Nano2k.db","P=xxx:,S=s1")
#dbLoadRecords("$(STD)/stdApp/Db/femto.db","P=xxx:,H=fem01:,F=seq01:")
### 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")
### Load database records for alternative PF4-filter support
dbLoadTemplate "filter.substitutions"
dbLoadRecords("$(MOTOR)/motorApp/Db/trajectoryScan.db","P=xxx:,R=traj1:,NAXES=8,NELM=200,NPULSE=200")
#dbLoadRecords("$(MOTOR)/motorApp/Db/trajectoryScan.db","P=xxx:,R=traj2:,NAXES=8,NELM=200,NPULSE=200")
###############################################################################
# Set shell prompt (otherwise it is left at mv167 or mv162)
iocLogDisable=0
Pete Jemian
committed
###############################################################################
# write all the PV names to a local file
dbl > dbl-all.txt
### Startup State Notation Language (SNL) programs
# NOTE: Command line limited to 128 characters
#seq &kohzuCtl, "P=xxx:, M_THETA=m1, M_Y=m2, M_Z=m3, GEOM=2, logfile=kohzuCtl.log"
### Example of specifying offset limits
##taskDelay(300)
##dbpf xxx:kohzu_yOffsetAO.DRVH 17.51
##dbpf xxx:kohzu_yOffsetAO.DRVL 17.49
# multilayer monochromator
#seq &ml_monoCtl, "P=xxx:, M_THETA=m1, M_THETA2=m2, M_Y=m3, M_Z=m4, Y_OFF=35., GEOM=1"
#seq &hrCtl, "P=xxx:, N=1, M_PHI1=m9, M_PHI2=m10, 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")
#seq &Keithley2kDMM,("P=xxx:, Dmm=D2, channels=10, model=2000")
# Bunch clock generator
#seq &getFillPat, "unit=xxx"
# 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:asyn_6"
# Orientation-matrix
#seq &orient, "P=xxx:orient1:,PM=xxx:,mTTH=m13,mTH=m14,mCHI=m15,mPHI=m16"
# Start Femto amplifier sequence programs
putenv "FBO=xxx:Unidig1Bo"
#seq &femto,"name=fem1,P=xxx:,H=fem01:,F=seq01:,G1=$(FBO)6,G2=$(FBO)7,G3=$(FBO)8,NO=$(FBO)10"
# Start PF4 filter sequence program
# name = what user will call it
# P = prefix of database and sequencer
# H = hardware (i.e. pf4)
# B = bank indicator (i.e. A,B)
# M = Monochromatic-beam energy PV
# BP = Filter control bit PV prefix
# B1 = Filter control bit 0 number
# B2 = Filter control bit 1 number
# B3 = Filter control bit 2 number
# B4 = Fitler control bit 3 number
#seq &pf4,"name=pf1,P=xxx:,H=pf4:,B=A,M=xxx:BraggEAO,BP=xxx:Unidig1Bo,B1=3,B2=4,B3=5,B4=6"
#seq &pf4,"name=pf2,P=xxx:,H=pf4:,B=B,M=xxx:BraggEAO,BP=xxx:Unidig1Bo,B1=7,B2=8,B3=9,B4=10"
#seq(&pf4,"name=pf1,P=xxx:,H=pf4:,B=A,M=xxx:userCalc1,BP=xxx:Unidig1Bo,B1=3,B2=4,B3=5,B4=6")
#seq(&pf4,"name=pf2,P=xxx:,H=pf4:,B=B,M=xxx:userCalc1,BP=xxx:Unidig1Bo,B1=7,B2=8,B3=9,B4=10")
# Alternative pf4 filter seq program
seq &filterDrive,"NAME=filterDrive,P=xxx:,R=filter:,NUM_FILTERS=16"
### Octupole power-supply
#seq &octupole, "P=xxx:, Q=octupole:, S=softGlue:"
#seq &MAX_trajectoryScan, "P=xxx:,R=traj1:,M1=m1,M2=m2,M3=m3,M4=m4,M5=m5,M6=m6,M7=m7,M8=m8,PORT=none"
seq(&SIS38XX_SNL, "P=xxx:3820:, R=mca, NUM_SIGNALS=8, FIELD=READ")
### Start up the autosave task and tell it what to do.
# The task is actually named "save_restore".
# test starting the save_restore task without loading any save sets
#create_monitor_set("dummy.req",0,"")
# Note that you can reload these sets after creating them: e.g.,
# reload_monitor_set("auto_settings.req",30,"P=xxx:")
#
# 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:")
# You can have a save set triggered by a PV, and specify the path and/or name of the file it
# will write to via PVs. If you specify a path PV, the path must already exist; autosave won't
# create a directory. If the path begins with '/', autosave will use it exactly as read.
# If the path does not begin with '/', autosave will prepend the path that was specified in a
# call to set_savefile_path().
#create_triggered_set(<request file>,<trigger PV>,<macrostring>)
#macro="P=xxx:,SAVENAMEPV=xxx:userStringCalc1.SVAL,SAVEPATHPV=xxx:userStringCalc2.SVAL"
#create_triggered_set("trigSet.req","xxx:userStringCalc1.A",macro)
# This autosave command cooperates with the configMenu.db database loaded by
# softGlue.cmd. Note that the request file MUST be named $(CONFIG)Menu.req
create_manual_set("SGMenu.req","P=xxx:,CONFIG=SG,H=softGlue:")
# configMenu for scans
create_manual_set("scan1Menu.req","P=xxx:,CONFIG=scan1")
### Start the saveData task. If you start this task, scan records mentioned
# in saveData.req will *always* write data files. There is no programmable
# disable for this software.
saveData_Init("saveData.req", "P=xxx:")
# motorUtil (allstop & alldone)
motorUtilInit("xxx:")
Pete Jemian
committed
# print the time our boot was finished
date