#!../../bin/linux-x86/struckScaler ## You may have to change struckScaler to something else ## everywhere it appears in this file < envPaths epicsEnvSet("PREFIX", "sixtyHz:st:") epicsEnvSet("RNAME", "mca") epicsEnvSet("MAX_SIGNALS", "32") epicsEnvSet("MAX_CHANS", "1024") epicsEnvSet("NFREQS", "512") epicsEnvSet("EPICS_CA_MAX_ARRAY_BYTES", "500000") epicsEnvSet("PORT", "STR1") epicsEnvSet("DWEL", "0.000976563" ) cd ${TOP} ## Register all support components dbLoadDatabase "dbd/struckScaler.dbd" struckScaler_registerRecordDeviceDriver pdbbase # Load IOC status records dbLoadRecords("db/iocAdminSoft.db","IOC=STSXTYHZ") ## Load record instances #dbLoadRecords("db/xxx.db","user=hovanesHost") #drvSIS3820Config("Port name", # baseAddress, # interruptVector, # int interruptLevel, # channels, # signals, # use DMA # fifoBufferWords) #drvSIS3820Config($(PORT), 0xA8000000, 224, 6, $(MAX_CHANS), $(MAX_SIGNALS), 1, 0x200000) drvSIS3820_LinuxConfig($(PORT), 0x08000000, 220, 6, $(MAX_CHANS), 32, 0, 0x4000) # Load the MCA records dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)1, DTYP=asynMCA, INP=@asyn($(PORT) 0), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)2, DTYP=asynMCA, INP=@asyn($(PORT) 1), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)3, DTYP=asynMCA, INP=@asyn($(PORT) 2), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)4, DTYP=asynMCA, INP=@asyn($(PORT) 3), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)5, DTYP=asynMCA, INP=@asyn($(PORT) 4), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)6, DTYP=asynMCA, INP=@asyn($(PORT) 5), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)7, DTYP=asynMCA, INP=@asyn($(PORT) 6), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)8, DTYP=asynMCA, INP=@asyn($(PORT) 7), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)9, DTYP=asynMCA, INP=@asyn($(PORT) 8), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)10, DTYP=asynMCA, INP=@asyn($(PORT) 9), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)11, DTYP=asynMCA, INP=@asyn($(PORT) 10), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)12, DTYP=asynMCA, INP=@asyn($(PORT) 11), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)13, DTYP=asynMCA, INP=@asyn($(PORT) 12), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)14, DTYP=asynMCA, INP=@asyn($(PORT) 13), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)15, DTYP=asynMCA, INP=@asyn($(PORT) 14), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)16, DTYP=asynMCA, INP=@asyn($(PORT) 15), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)17, DTYP=asynMCA, INP=@asyn($(PORT) 16), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)18, DTYP=asynMCA, INP=@asyn($(PORT) 17), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)19, DTYP=asynMCA, INP=@asyn($(PORT) 18), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)20, DTYP=asynMCA, INP=@asyn($(PORT) 19), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)21, DTYP=asynMCA, INP=@asyn($(PORT) 20), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)22, DTYP=asynMCA, INP=@asyn($(PORT) 21), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)23, DTYP=asynMCA, INP=@asyn($(PORT) 22), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)24, DTYP=asynMCA, INP=@asyn($(PORT) 23), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)25, DTYP=asynMCA, INP=@asyn($(PORT) 24), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)26, DTYP=asynMCA, INP=@asyn($(PORT) 25), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)27, DTYP=asynMCA, INP=@asyn($(PORT) 26), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)28, DTYP=asynMCA, INP=@asyn($(PORT) 27), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)29, DTYP=asynMCA, INP=@asyn($(PORT) 28), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)30, DTYP=asynMCA, INP=@asyn($(PORT) 29), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)31, DTYP=asynMCA, INP=@asyn($(PORT) 30), PREC=3, CHANS=$(MAX_CHANS)") dbLoadRecords("$(TOP)/db/simple_mca.db", "P=$(PREFIX), M=$(RNAME)32, DTYP=asynMCA, INP=@asyn($(PORT) 31), PREC=3, CHANS=$(MAX_CHANS)") # This loads the scaler record and supporting records dbLoadRecords("$(TOP)/db/scaler32.db", "P=$(PREFIX), S=scaler, DTYP=Asyn Scaler, OUT=@asyn($(PORT)), FREQ=25000000") # This database provides the support for the MCS functions dbLoadRecords("$(TOP)/db/SIS38XX.template", "P=$(PREFIX), PORT=$(PORT), SCALER=scaler") dbLoadRecords("$(TOP)/db/struckTrigger.db", "PREF=$(PREFIX)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)1, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)2, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)3, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)4, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)5, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)6, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)7, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)8, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)9, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)10, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)11, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)12, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)13, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)14, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)15, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)16, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)17, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)18, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)19, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)20, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)20, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)21, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)22, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)23, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)24, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)25, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)26, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)27, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)28, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)29, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)30, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)31, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") dbLoadRecords("$(TOP)/db/sixtyHzFFT.db", "P=$(PREFIX), M=$(RNAME)32, NSLICES=$(MAX_CHANS), NFREQS=$(NFREQS), DWEL=$(DWEL)") cd ${TOP}/iocBoot/${IOC} < stSixtyHz_save_restore.cmd set_pass0_restoreFile("stSixtyHz.sav") set_pass1_restoreFile("stSixtyHz.sav") iocInit create_monitor_set("stSixtyHz.req", 30, "PREF=${PREFIX}") makeAutosaveFiles() dbpf( $(PREFIX)ReadAll.SCAN, "Passive" ) dbpf( $(PREFIX)ChannelAdvance, "0" ) dbpf( $(PREFIX)Channel1Source, "1" ) dbpf( $(PREFIX)Dwell, "$(DWEL)" ) dbpf( $(PREFIX)StartAll, "1" ) ## Start Linux-version sequence programs for scaler modules and MCA, not profiler specific seq(&SIS38XX_Linux_SNL, "P=$(PREFIX), R=$(RNAME), NUM_SIGNALS=$(MAX_SIGNALS), FIELD=READ") seq &struckTrigger, "PREF=$(PREFIX)"