2 ##ISIS## Run IOC initialisation
13 < $(IOCSTARTUP)/init.cmd
15 ##ISIS## Load common DB records
16 < $(IOCSTARTUP)/dbload.cmd
18 ### Scan-support software
19 # crate-resident scan. This executes 1D, 2D, 3D, and 4D scans, and caches
20 # 1D data, but it doesn't store anything to disk. (See 'saveData' below for that.)
21 #dbLoadRecords("$(SSCAN)/sscanApp/Db/scan.db","P=$(MYPVPREFIX)$(IOCNAME):,MAXPTS1=8000,MAXPTS2=1000,MAXPTS3=10,MAXPTS4=10,MAXPTSH=8000")
24 # specify additional directories in which to to search for included request files
28 ## as all Galils cd to GALIL-IOC-01 need to add this explicitly so info generated req files are found
29 set_requestfile_path("${TOP}/iocBoot/iocGALIL-IOC-01
", "")
31 ## Make sure controller number is 2 digits long
32 calc("MTRCTRL
", "$(MTRCTRL)
", 2, 2)
34 epicsEnvSet("GALILCONFIG
","$(GALILCONFIGDIR=$(ICPCONFIGROOT)/galil)
")
36 ## uncomment to see every command sent to every galil, of define in st.cmd for just one galil
37 #epicsEnvSet("GALIL_DEBUG_FILE
", "galil_debug.txt
")
39 ## create simulated motor if required (asyn port "GalilSim
")
40 $(IFDEVSIM) < motorsim.cmd
41 $(IFRECSIM) < motorsim.cmd
43 ## configure the galil, if we are simulated this will not be used to drive the
44 ## actual device, but creating this asyn port at least allows record initialisation
46 < $(GALILCONFIG)/galil$(MTRCTRL).cmd
48 ## GALIL_MTR_PORT is the asyn port used to load just the motor record, other records
49 ## are loaded with "Galil
" as the asyn port
50 $(IFDEVSIM) epicsEnvSet("GALIL_MTR_PORT
", "GalilSim
")
51 $(IFRECSIM) epicsEnvSet("GALIL_MTR_PORT
", "GalilSim
")
52 $(IFNOTDEVSIM) $(IFNOTRECSIM) epicsEnvSet("GALIL_MTR_PORT
", "Galil
")
54 ## load the galil db files
57 ## load the generic ISIS axis db for each axis
58 iocshCmdLoop("< st-axis.cmd
", "MN=\$(I)
", "I
", 1, 8)
61 < $(GALILCONFIG)/jaws.cmd
63 ## configure barndoors
64 < $(GALILCONFIG)/barndoors.cmd
67 < $(GALILCONFIG)/axes.cmd
70 < $(GALILCONFIG)/motionsetpoints.cmd
73 < $(GALILCONFIG)/sampleChanger.cmd
76 < $(GALILCONFIG)/motorExtensions.cmd
79 dbLoadRecords("$(MOTOR)/db/motorUtil.db
","P=$(MYPVPREFIX)$(IOCNAME):,$(IFIOC)= ,PVPREFIX=$(MYPVPREFIX)
")
81 stringiftest("MOTORCONFIG
", "$(MOTORCONFIG=)
", 0, 0)
82 $(IFMOTORCONFIG) dbLoadRecords("$(AUTOSAVE)/asApp/Db/configMenu.db
","P=$(MYPVPREFIX)$(IOCNAME):CONFIG:,CONFIG=$(MOTORCONFIG=)
")
84 ##ISIS## Stuff that needs to be done after all records are loaded but before iocInit is called
85 < $(IOCSTARTUP)/preiocinit.cmd
87 ## trace mask: 0x1=trace_error,0x2=traceio_device,0x4=traceio_filter, 0x8=traceio_driver, 0x10=trace_flow, 0x20=trace_warning
88 #asynSetTraceMask("Galil
",-1,0x39)
89 #asynSetTraceFile("Galil
",-1,"galil.trace
")
90 #asynSetTraceIOMask("Galil
",-1,0x2)
95 #var motorUtil_debug 1
96 motorUtilInit("$(MYPVPREFIX)$(IOCNAME):
")
98 ##ISIS## Stuff that needs to be done after iocInit is called e.g. sequence programs
99 < $(IOCSTARTUP)/postiocinit.cmd
101 stringiftest("HASMTRCTRL
", "$(MTRCTRL=)
", 0, 0)
102 $(IFNOTHASMTRCTRL) errlogSev(2, "MTRCTRL has not been set
")
104 # Save motor positions every 5 seconds
105 $(IFHASMTRCTRL) $(IFNOTDEVSIM) $(IFNOTRECSIM) create_monitor_set("$(IOCNAME)_positions.req
", 5, "P=$(MYPVPREFIX)MOT:,CCP=$(MTRCTRL)
")
107 # Save motor settings every 30 seconds
108 $(IFHASMTRCTRL) $(IFNOTDEVSIM) $(IFNOTRECSIM) create_monitor_set("$(IOCNAME)_settings.req
", 30, "P=$(MYPVPREFIX)MOT:,CCP=$(MTRCTRL)
")
110 $(IFHASMTRCTRL) $(IFMOTORCONFIG) create_manual_set("$(MOTORCONFIG=)Menu.req
","P=$(MYPVPREFIX)MOT:,CMP=$(MYPVPREFIX)$(IOCNAME):CONFIG:,CONFIG=$(MOTORCONFIG=),IOCNAME=$(IOCNAME),MTRCTRL=$(MTRCTRL),CONFIGMENU=1
")
112 ## Start any sequence programs
113 #seq sncxxx,"user=icsHost
"
epicsEnvSet("AMOTORNAME","MTR$(MTRCTRL)0$(MN)")
set_requestfile_path("${GALIL}/GalilSup/Db","")
ISIS## Load common DB records ;.