#!../../bin/linux-x86_64/collimatorMotion < envPaths cd ${TOP} ## Register all support components dbLoadDatabase "dbd/collimatorMotion.dbd" collimatorMotion_registerRecordDeviceDriver pdbbase epicsEnvSet("PREFIX","") # Load IOC status records dbLoadRecords("db/iocAdminSoft.db","IOC=${PREFIX}COLMOTION") epicsEnvSet("SCAN","$(PREFIX)colim:scan") epicsEnvSet("MOTOR_X","${PREFIX}hd:collimator:x:motor") epicsEnvSet("MOTOR_Y","${PREFIX}hd:collimator:y:motor") # Load X- and Y- motion coordinate records individually dbLoadRecords "db/collimatorX.db" , "pref=${PREFIX}" dbLoadRecords "db/collimatorY.db" , "pref=${PREFIX}" # Load DB for collimator 2D coordinates dbLoadRecords "db/collimators.db" , "pref=${PREFIX}" # Load DB for the collimator 2D scan using sscan EPICS record dbLoadRecords("db/standardScans.db","P=$(SCAN):,MAXPTS1=2000,MAXPTS2=1000,MAXPTS3=1000,MAXPTS4=10,MAXPTSH=2000") dbLoadRecords("db/saveData.db","P=$(SCAN):") dbLoadRecords("db/scanProgress.db","P=$(SCAN):scanProgress:") dbLoadRecords("db/beamCheck4scan.db","PREF='',R=$(SCAN)") dbLoadRecords("db/timer4scan.db","PREF='',R=$(SCAN)") cd ${TOP}/iocBoot/${IOC} asSetFilename("${TOP}/iocBoot/common/ca_security.acf") < collimatorMotion_save_restore.cmd set_pass0_restoreFile("collimatorMotion.sav") set_pass1_restoreFile("collimatorMotion.sav") # Initialize the IOC iocInit # autosave startup create_monitor_set("collimatorMotion.req", 30, "PREF=${SCAN}") # Handle autosave 'commands' contained in loaded databases. makeAutosaveFiles() #create_monitor_set("info_positions.req", 5, "P=xxx:") #create_monitor_set("info_settings.req", 30, "P=xxx:") # Launch sequencer for to do scan progress and save data cd ${TOP}/iocBoot/iocxpsMotor saveData_Init("saveData.req", "P=$(SCAN):") seq &scanProgress, "S=$(SCAN):,P=$(SCAN):scanProgress:" # Setup scan parameters # # first positioner - X # dbpf("$(SCAN):scan1.R1PV", "$(MOTOR_X).RBV") dbpf("$(SCAN):scan1.P1PV", "$(MOTOR_X).VAL") # dbpf("$(SCAN):scan1.D01PV", "$(MOTOR_X).RBV") dbpf("$(SCAN):scan1.D02PV", "$(MOTOR_Y).RBV") dbpf("$(SCAN):scan1.D03PV", "IBCAD00CRCUR6") dbpf("$(SCAN):scan1.D04PV", "PSC:T:1:scaler_r1") dbpf("$(SCAN):scan1.D05PV", "PSC:T:2:scaler_r1") dbpf("$(SCAN):scan1.D06PV", "PSC:T:3:scaler_r1") dbpf("$(SCAN):scan1.D07PV", "PSC:T:4:scaler_r1") dbpf("$(SCAN):scan1.D08PV", "PSC:T:5:scaler_r1") dbpf("$(SCAN):scan1.D09PV", "PSC:T:6:scaler_r1") dbpf("$(SCAN):scan1.D10PV", "PSC:T:7:scaler_r1") dbpf("$(SCAN):scan1.D11PV", "PSC:T:8:scaler_r1") dbpf("$(SCAN):scan1.D12PV", "PSC:T:9:scaler_r1") dbpf("$(SCAN):scan1.D13PV", "PSC:T:10:scaler_r1") dbpf("$(SCAN):scan1.D14PV", "PSC:T:11:scaler_r1") dbpf("$(SCAN):scan1.D15PV", "PSC:T:12:scaler_r1") dbpf("$(SCAN):scan1.D16PV", "PSC:T:13:scaler_r1") dbpf("$(SCAN):scan1.D17PV", "PSC:T:14:scaler_r1") dbpf("$(SCAN):scan1.D18PV", "PSC:T:15:scaler_r1") dbpf("$(SCAN):scan1.D19PV", "PSC:T:16:scaler_r1") dbpf("$(SCAN):scan1.D20PV", "HALO:T:gamma:col:left:scaler_r1") dbpf("$(SCAN):scan1.D21PV", "HALO:T:gamma:col:top:scaler_r1") dbpf("$(SCAN):scan1.D22PV", "HALO:T:gamma:col:right:scaler_r1") dbpf("$(SCAN):scan1.D23PV", "HALO:T:gamma:col:bottom:scaler_r1") dbpf("$(SCAN):scan1.D24PV", "HALO:T:gamma:tgt:left:scaler_r1") dbpf("$(SCAN):scan1.D25PV", "HALO:T:gamma:tgt:top:scaler_r1") dbpf("$(SCAN):scan1.D26PV", "HALO:T:gamma:tgt:right:scaler_r1") dbpf("$(SCAN):scan1.D27PV", "HALO:T:gamma:tgt:bottom:scaler_r1") dbpf("$(SCAN):scan1.D28PV", "IOCHDCOL:VMICADC1_1") dbpf("$(SCAN):scan1.D29PV", "IOCHDCOL:VMICADC2_1") dbpf("$(SCAN):scan1.D30PV", "IOCHDCOL:VMICADC3_1") dbpf("$(SCAN):scan1.D31PV", "IOCHDCOL:VMICADC4_1") dbpf("$(SCAN):scan1.D32PV", "IOCHDCOL:VMICADC1_2") dbpf("$(SCAN):scan1.D33PV", "IOCHDCOL:VMICADC2_2") dbpf("$(SCAN):scan1.D34PV", "IOCHDCOL:VMICADC3_2") dbpf("$(SCAN):scan1.D35PV", "IOCHDCOL:VMICADC4_2") dbpf("$(SCAN):scan1.D36PV", "ST:T:1:scaler_r1") dbpf("$(SCAN):scan1.D37PV", "ST:T:2:scaler_r1") dbpf("$(SCAN):scan1.D38PV", "ST:T:3:scaler_r1") dbpf("$(SCAN):scan1.D39PV", "ST:T:4:scaler_r1") dbpf("$(SCAN):scan1.D40PV", "ST:T:5:scaler_r1") dbpf("$(SCAN):scan1.D41PV", "ST:T:6:scaler_r1") dbpf("$(SCAN):scan1.D42PV", "ST:T:7:scaler_r1") dbpf("$(SCAN):scan1.D43PV", "ST:T:8:scaler_r1") dbpf("$(SCAN):scan1.D44PV", "ST:T:9:scaler_r1") dbpf("$(SCAN):scan1.D45PV", "ST:T:10:scaler_r1") dbpf("$(SCAN):scan1.D46PV", "ST:T:11:scaler_r1") dbpf("$(SCAN):scan1.D47PV", "ST:T:12:scaler_r1") dbpf("$(SCAN):scan1.D48PV", "ST:T:13:scaler_r1") dbpf("$(SCAN):scan1.D49PV", "ST:T:14:scaler_r1") dbpf("$(SCAN):scan1.D50PV", "ST:T:15:scaler_r1") dbpf("$(SCAN):scan1.D51PV", "ST:T:16:scaler_r1") dbpf("$(SCAN):scan1.D52PV", "ST:T:17:scaler_r1") dbpf("$(SCAN):scan1.D53PV", "ST:T:18:scaler_r1") dbpf("$(SCAN):scan1.D54PV", "ST:T:19:scaler_r1") dbpf("$(SCAN):scan1.D55PV", "ST:T:20:scaler_r1") dbpf("$(SCAN):scan1.D56PV", "ST:T:21:scaler_r1") dbpf("$(SCAN):scan1.D57PV", "ST:T:22:scaler_r1") dbpf("$(SCAN):scan1.D58PV", "ST:T:23:scaler_r1") dbpf("$(SCAN):scan1.D59PV", "ST:T:24:scaler_r1") dbpf("$(SCAN):scan1.D60PV", "ST:T:25:scaler_r1") dbpf("$(SCAN):scan1.D61PV", "ST:T:26:scaler_r1") dbpf("$(SCAN):scan1.D62PV", "ST:T:27:scaler_r1") dbpf("$(SCAN):scan1.D63PV", "ST:T:28:scaler_r1") dbpf("$(SCAN):scan1.D64PV", "ST:T:29:scaler_r1") dbpf("$(SCAN):scan1.D65PV", "ST:T:30:scaler_r1") dbpf("$(SCAN):scan1.D66PV", "Active_Target:T:scaler_r1") dbpf("$(SCAN):scan1.D67PV", "PSC:coinc:scaler:rate") dbpf("$(SCAN):scan1.D68PV", "PS:coinc:scaler:rate") dbpf("$(SCAN):scan1.D69PV", "AC:inner:position:x") dbpf("$(SCAN):scan1.D70PV", "AC:inner:position:y") dbpf("$(SCAN):scan1.T1PV", "$(SCAN):beamCheckBusy") dbpf("$(SCAN):scan1.T1CD", "1.") # # # second positioner - Y # dbpf("$(SCAN):scan2.R1PV", "$(MOTOR_Y).RBV") dbpf("$(SCAN):scan2.P1PV", "$(MOTOR_Y).VAL") #dbpf("$(SCAN):scan2.P1SP", "0") #dbpf("$(SCAN):scan2.P1EP", "2.") #dbpf("$(SCAN):scan2.P1SI", "0.5") #dbpf("$(SCAN):scan2.PDLY", "1.") dbpf("$(SCAN):scan2.T1PV", "$(SCAN):scan1.EXSC") dbpf("$(SCAN):scan2.T1CD", "1.")