## PAD RTEMS startup script for Klystron 24-8 and Phase Cavity 3 PAD at Sector 25 PADLAN9118_BPH3 app setenv("PADMCGRP", "239.219.0.3") # PAD multicasting group / ioc-li24-rf01-padg setenv("IPADDR1","172.27.28.60",1) setenv("NETMASK1","255.255.255.0",1) setenv("PADSLOT","11",1) setenv("LOCAs","LI25",1) setenv("UNITs","300",1) #addpath("/boot/g/lcls/users/strauman/epics/dev/app/bin/RTEMS-uC5282/:",1) wdStart(20) # Debugger stub daemon ld("rtems-gdb-stub.obj") # Dedicated ethernet + network stack driver ld("lanIpBasic_ln9.obj") #check that it finds this # turning on lanIpDebug shows you all the ARP requests on the console lanIpDebug = 0 lanIpSetup(getenv("IPADDR1"),getenv("NETMASK1"),0,0) chdir("../..") ld("bin/RTEMS-uC5282/padLan9118Bph3App.obj") epicsEnvSet("EPICS_CA_MAX_ARRAY_BYTES","1000000") lsmod() dbLoadDatabase("dbd/pad4App.dbd") pad4App_registerRecordDeviceDriver(pdbbase) drvPadScalFlag=2 drvPadLan9118DacqFlag=2 ## Load record instances dbLoadTemplate("db/padKLY248.bph3_template") dbLoadRecords("db/iocAdmin.db","IOC=EIOC:LI24:RD02") # New: pre maps /data to /u1/lcls/epics/ioc/data/ dbRestore("/data/EIOC-LI24-RD02.sav") iocInit() # force scalar waveforms to read (once) dbpf("KLYS:LI24:K8:TC3_0_SCL_WF.PROC","1") dbpf("KLYS:LI24:K8:TC3_1_SCL_WF.PROC","1") dbpf("KLYS:LI24:K8:TC3_2_SCL_WF.PROC","1") # channel 3 used by PCAV dbpf("KLYS:LI24:K8:TC3_0_OFST.PROC","1") dbpf("KLYS:LI24:K8:TC3_1_OFST.PROC","1") dbpf("KLYS:LI24:K8:TC3_2_OFST.PROC","1") dbpf("PCAV:LI25:300:PH3_3_OF_0.PROC","1") dbpf("PCAV:LI25:300:PH3_3_OF_1.PROC","1") # regardless of CW dbpf("KLYS:LI24:K8:TC3_4_OFST","0") dbpf("KLYS:LI24:K8:TC3_5_OFST","0") dbpf("KLYS:LI24:K8:TC3_6_OFST","0") dbpf("KLYS:LI24:K8:TC3_7_OFST","0") # size must be a multiple of 4 since # data in quadruples of (Q1,I2,Q3,I4) read # (see comments in drvPad.c for more info) dbpf("KLYS:LI24:K8:TC3_0_SIZE.PROC","1") dbpf("KLYS:LI24:K8:TC3_1_SIZE.PROC","1") dbpf("KLYS:LI24:K8:TC3_2_SIZE.PROC","1") dbpf("PCAV:LI25:300:PH3_3_SZ_0.PROC","1") dbpf("PCAV:LI25:300:PH3_3_SZ_1.PROC","1") # regardless of CW dbpf("KLYS:LI24:K8:TC3_4_SIZE","65536") dbpf("KLYS:LI24:K8:TC3_5_SIZE","65536") dbpf("KLYS:LI24:K8:TC3_6_SIZE","65536") dbpf("KLYS:LI24:K8:TC3_7_SIZE","65536") ## Start any sequence programs. Note: RTEMS Cexp syntax # Skip state machine for nonlin test ################ 5/12/8: MOST IMPORTANT TODAY: This can't run for IOC # to see padProtoHost cmds #seq(&sncpad,"PRIM=KLYS,LOCA=LI24,UNIT=K8,PAD=TC3") seq(&trgDetector, "PRIM=KLYS,LOCA=LI24,UNIT=K8,PAD=TC3") padProtoDebug=0 padStreamFlag=2 drvPadLan9118Flag=2 drvPadLan9118GetdataFlag=2 drvPadGenFlag=2 drvPadCbFlag=2