#! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ############################################## # This is the head of the main processing chain # that runs at the highest priority. ############################################## ############################################# # This is the head of the processing chain for # diagnostics. ############################################## record(ai, "BPMS:BTS:8:GRN") { field(DESC, "GRN Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C0 S0") field(EGU, "raw") #TODO set HOPR/LOPR, alarm limits field(SCAN, "I/O Intr") # The priority determines what scan list we are being # put on (see drvPadUdpComm.c) field(PRIO, "LOW") field(FLNK, "BPMS:BTS:8:RED") # HOPR for the energy algorithm is determined as follows: # # inf inf # 1) Fourier relation / h^2 dt = / |H|^2 df = 2 B # 0 -inf # # 1a) It can be shown that the maximum of the impuls response # ha is ~ 2 B # # 2) The digitizer produces the numbers # # Ai = 2^s (hi/ha) # # where ha is the maximum of the impuls response # and 2^s is a scale factor. # # 3) 'Energy algorithm' calculates S = sum( Ai^2 ) # # inf # 4) S = (2^s / ha)^2 sum(hi^2) = K sum(hi^2) Dt ~ K / h^2 dt # 0 # # with K = (2^s / ha)^2 fs # # 5) From 4) and 1a) -> S ~ K ha and therefore # # 6) S = 2^(2s) fs/ha = 2^(2s) fs/(2 B) # # 7) The strip signals are sqrt(S); hence HOPR is about # # HOPR ~ 2^s sqrt( fs/2/B ) # # with 2^s = 32768, fs=120MHz, B=10MHz it follows # that HOPR ~ 1E5; we add some margin... field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:BTS:8:RED") { field(DESC, "RED Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C0 S1") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:BTS:8:BLU") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:BTS:8:BLU") { field(DESC, "BLU Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C0 S2") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:BTS:8:YLO") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:BTS:8:YLO") { field(DESC, "YLO Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C0 S3") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } ############################################## # Slowly-scanned diagnostics ############################################## # record(waveform, "BPMS:BTS:8:REDW") { field(DESC, "Raw CAL RED Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C0 S1") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "BPMS:BTS:8:GRNW") { field(DESC, "Raw CAL GRN Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C0 S2") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "BPMS:BTS:8:RAWDBG") { field(DESC, "Raw BEAM Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' # do not 'wbscan' for now since e.g., an underrange # condition on the real signal can happen. field(INP, "#C0 S7") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "BPMS:BTS:8:REDDBG") { field(DESC, "Raw CAL RED Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C0 S8 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "BPMS:BTS:8:GRNDBG") { field(DESC, "Raw CAL GRN Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C0 S9 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(ai, "BPMS:BTS:8:GRUV") { field(DESC, "CAL Gain GRN/RED") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C0 S0") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") } record(ai, "BPMS:BTS:8:GRU") { field(DESC, "CAL Gain GRN/BLU") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C0 S1") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "BPMS:BTS:8:GRV") { field(DESC, "CAL Gain RED/YLO") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C0 S2") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "BPMS:BTS:8:TGRN") { field(DESC, "Green arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C0 S4") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:BTS:8:TRED") { field(DESC, "Red arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C0 S5") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:BTS:8:TBLU") { field(DESC, "Blue arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C0 S6") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:BTS:8:TYLO") { field(DESC, "Yellow arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C0 S7") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ao, "BPMS:BTS:8:PINC_ADJ") { field(DESC, "Adjust Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:BTS:8:CALC.K PP MS") field(VAL, "0") field(DRVL, "0") field(DRVH, "2") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:BTS:8:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:BTS:8:QSCA.A PP MS") # 5.0E-6 / 1.6E-10 [nC/e-] field(VAL, "31250") field(EGU, "Nel") field(PREC, "3") field(PINI, "YES") info(autosaveFields, "VAL") } # Adjust TMIT scale for AFE attenuation record(calcout, "BPMS:BTS:8:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:BTS:8:ATT1 CP") field(INPC, "BPMS:BTS:8:ATT2 CP") field(CALC, "A*10^((B+C+D)/20)") # use CA link to deposit into TMIT.ASLO so # that TMIT is not forced into linkset # of this record field(OUT, "BPMS:BTS:8:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:BTS:8:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:BTS:8:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:BTS:8:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:BTS:8:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:BTS:8:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:BTS:8:ASIM.C PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } # Attenuate charge either by # real attenuator settings or # by fake ones. # If B, C >= 0 then their # values will be used instead # of ATT1, ATT2 record(calcout, "BPMS:BTS:8:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:BTS:8:QSIM.ESLO PP") # ATT1SIM puts value into A # set to -1 to use real attenuator settings # and >=0 to use B instead field(B, "-1") # ATT2SIM puts value into C # set to -1 to use real attenuator settings # and >=0 to use D instead field(D, "-1") field(CALC, "10^(((B>=0?B:A)+(D>=0?D:C))/20)") field(PINI, "YES") } record(ao, "BPMS:BTS:8:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:BTS:8:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "BPMS:BTS:8:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:BTS:8:RSTA.SEVR MS NPP") field(INPB, "BPMS:BTS:8:TMIT.SEVR MS NPP") field(INPC, "BPMS:BTS:8:Y.SEVR MS NPP") field(INPD, "BPMS:BTS:8:X.SEVR MS NPP") field(INPE, "BPMS:BTS:8:TGRN.SEVR MS NPP") field(INPF, "BPMS:BTS:8:TRED.SEVR MS NPP") field(INPG, "BPMS:BTS:8:TBLU.SEVR MS NPP") field(INPH, "BPMS:BTS:8:TYLO.SEVR MS NPP") field(INPI, "BPMS:BTS:8:GRU.SEVR MS NPP") field(INPJ, "BPMS:BTS:8:GRV.SEVR MS NPP") field(SCAN, "1 second") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:BTS:8:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:BTS:8:ATTC.B PP") field(DRVL, "-10") field(DRVH, "30") field(LOPR, "-10") field(HOPR, "30") field(EGU, "dB") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:BTS:8:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:BTS:8:ATTC.C PP") field(DRVL, "-20") field(DRVH, "20") field(LOPR, "-20") field(HOPR, "20") field(EGU, "dB") field(VAL, "40") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } record(calc, "BPMS:BTS:8:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:BTS:8:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:BTS:8:GRU.SEVR MS NPP") field(INPC, "BPMS:BTS:8:GRV.SEVR MS NPP") field(INPD, "BPMS:BTS:8:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:BTS:8:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:BTS:8:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:BTS:8:RED_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:BTS:8:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:BTS:8:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:BTS:8:BLU_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:BTS:8:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:BTS:8:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:BTS:8:YLO_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:BTS:8:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:BTS:8:YLO NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(sub, "BPMS:BTS:8:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "0") field(SCAN, "Passive") } record(bo, "BPMS:BTS:8:PINC_ENA") { field(DESC, "Simple Pincushion Alg") field(DTYP, "BusAddress") field(OUT, "#C0S2@drvBpmStriplPincEna,m32") field(MASK, "1") field(ZNAM, "DISABLED") field(ONAM, "ENABLED") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } record(ao, "BPMS:BTS:8:UDR_THRES") { field(DESC, "Detection Underrange Threshold") field(DTYP, "Bpm Parameters") field(OUT, "#C0S0") field(EGU, "ADC Ticks") field(DOL, "45.26") field(PINI, "YES") field(DRVL, "0") field(DRVH, "32767") info(autosaveFields, "VAL") } #! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ###################################### # HEAD of main processing chain ###################################### record(ai, "BPMS:BTS:8:X") { field(DESC, "X Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S11") field(SCAN, "I/O Intr") # The priority determines what scan list we are being # put on (see drvPadUdpComm.c) field(PRIO, "HIGH") field(FLNK, "BPMS:BTS:8:Y") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "0") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "BPMS:BTS:8:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S12") field(FLNK, "BPMS:BTS:8:TMIT") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "0") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "BPMS:BTS:8:TMIT") { field(DESC, "Charge Estimate") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S13") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") # FLINK into BSA field(FLNK, "BPMS:BTS:8:EFX.PROC") field(ASG, "") field(TSE, "0") info(autosaveFields, "LOLO LOW HIGH HIHI HHSV LLSV ") } ###################################### # HEAD of diagnostics processing chain ###################################### # leave RWAV in it's own lockset; don't FLNK # to 'U' & friends record(waveform, "BPMS:BTS:8:RWAV") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C0 S0") field(SCAN, "I/O Intr") # use LOW or HIGH to end up on the 'diagnostic' # scan list (see drvPadUdpComm.c) field(PRIO, "LOW") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") } record(ai, "BPMS:BTS:8:U") { field(DESC, "Raw U Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S8") field(SCAN, "I/O Intr") # use LOW or HIGH to end up on the 'diagnostic' # scan list (see drvPadUdpComm.c) field(PRIO, "LOW") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "BPMS:BTS:8:V") } record(ai, "BPMS:BTS:8:V") { field(DESC, "Raw V Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S9") field(SCAN, "Passive") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "BPMS:BTS:8:PINC") } record(ai, "BPMS:BTS:8:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S10") field(SCAN, "Passive") } record(longin, "BPMS:BTS:8:RSTA") { field(DESC, "Status of Raw Processor") field(DTYP, "Bpm Raw Status") field(INP, "#C0S0") field(SCAN, "1 second") field(LOLO, "-1") field(HIHI, "+1") field(HHSV, "INVALID") field(LLSV, "INVALID") field(FLNK, "BPMS:BTS:8:RSTA_ALH") } record(calc, "BPMS:BTS:8:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:BTS:8:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:BTS:8:PHI") { field(DESC, "Rot Angle") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "deg") field(PREC, "1") field(LOPR, "-180") field(HOPR, "+180") field(FLNK, "BPMS:BTS:8:PHI_SEQ") } record(ao, "BPMS:BTS:8:PSI") { field(DESC, "Axis Sep. Angle") field(DTYP, "Soft Channel") field(VAL, "90") field(EGU, "deg") field(PREC, "1") field(LOPR, "0") field(HOPR, "+180") field(FLNK, "BPMS:BTS:8:PSI_SEQ") } #record(dfanout, "BPMS:BTS:8:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:BTS:8:USCL PP MS") # field(OUTB, "BPMS:BTS:8:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:BTS:8:UOFF") { field(DESC, "BPM U Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:BTS:8:UOFF_SEQ") } record(ao, "BPMS:BTS:8:VOFF") { field(DESC, "BPM V Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:BTS:8:VOFF_SEQ") } record(ao, "BPMS:BTS:8:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:BTS:8:USCL_SEQ") } record(ao, "BPMS:BTS:8:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:BTS:8:VSCL_SEQ") } record(mbbo, "BPMS:BTS:8:ACCESS") { field(DESC, "BPM On Line") field(DTYP, "StreamSwitch") field(OUT, "#C0 S0") field(ZRVL, "1") field(ZRST, "Running") field(ZRSV, "NO_ALARM") field(ONVL, "1") field(ONST, "Maintenance") field(ONSV, "MINOR") field(TWVL, "1") field(TWST, "Test") field(TWSV, "MINOR") field(THVL, "0") field(THST, "OFFLINE") field(THSV, "MAJOR") # set both, rval and val to get it right # regardless of whether devsup does conversion # or not. field(RVAL, "0") field(VAL, "0") field(PINI, "YES") field(FLNK, "BPMS:BTS:8:SIMOFF") info(autosaveFields, "RVAL") } # # Used by higher level software to determine if a PV is in feedback or not. # May also be used by actuator (magnet and RF) IOC applications to # switch output records to "closed_loop" to prevent outside programs from # changing setpoints when an actuator device is in feedback. # record(mbbo, "BPMS:BTS:8:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") field(OMSL, "supervisory") field(VAL, "0") field(ZRVL, "0") field(ONVL, "1") field(TWVL, "2") # Off - this device can be used in feedback but all feedback loops # using it are off. field(ZRST, "Off") # On - this device is being used by one or more feedback loops. field(ONST, "On") # Unavailable - this device is not used by any feedback loop. field(TWST, "Unavailable") info(autosaveFields, "VAL") } # Convenience record holding the MAD name record(stringin, "BPMS:BTS:8:MADN") { field(DESC, "MAD Name") field(VAL, "BTS-BPM08") field(PINI, "YES") } record(stringin, "BTS-BPM08:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:BTS:8") field(PINI, "YES") } record(ai, "BPMS:BTS:8:X_SLOW") { alias("BPMS:BTS:8:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:BTS:8:X MS") field(FLNK, "BPMS:BTS:8:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:BTS:8:Y_SLOW") { alias("BPMS:BTS:8:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:BTS:8:Y NPP MS") field(FLNK, "BPMS:BTS:8:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:BTS:8:TMIT_SLOW") { alias("BPMS:BTS:8:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "BPMS:BTS:8:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "BPMS:BTS:8:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:BTS:8:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:BTS:8:SIMC PP") } record(calcout, "BPMS:BTS:8:SIM") { field(DESC, "BPM Pos. Simulation") field(DTYP, "Strip Signal Simulator") field(OUT, "0") #CALC & VAL unused; the real calculation is done # in device support. The reason this is a # calcout rather than sub is that we want # to use the OUT link... field(CALC, "A") field(INPA, "BPMS:BTS:8:USCL") field(INPL, "0") } # Switch simulation record BPMS:BTS:8:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:BTS:8:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:BTS:8:SIMCSEQ.SELN PP") field(ZRST, "OFF") field(ZRVL, "0x0f") field(ONST, "ON") field(ONVL, "0x1c0") field(TWST, "SOFT") field(TWVL, "0x030") field(MASK, "-1") field(NOBT, "16") field(VAL, "0") field(RVAL, "0x0f") field(PINI, "YES") } record(ao, "BPMS:BTS:8:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:BTS:8:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:BTS:8:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:BTS:8:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:BTS:8:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:BTS:8:SIM.D PP") field(EGU, "Nel") field(ASLO, "6000") #ESLO is used to add attenuation field(LINR, "LINEAR") field(VAL, "1E9") field(PINI, "YES") field(PREC, "4") field(LOPR, "0") field(HOPR, "1E11") } record(ao, "BPMS:BTS:8:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:BTS:8:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:BTS:8:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:BTS:8:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:BTS:8:DIGISIMW") { field(DESC, "VME Digi Sim. Waveform") field(DTYP, "VmeDigi Sim Wav") field(OUT, "#C0 S0") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32678") field(LOPR, "-32768") # 16384 samples/channel * 4 channels field(NELM, "65536") field(PINI, "NO") } #Used by model/database folks to verify BPM record(ao, "BPMS:BTS:8:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:BTS:8:MPSBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C0S2@bpmMPS+0,m32") field(MASK, "1") field(ZNAM, "BYPASSED") field(ONAM, "NOT_BYPASSED") field(ZSV, "MAJOR") field(OSV, "NO_ALARM") field(VAL, "0") field(PINI, "YES") field(ASG, "") info(autosaveFields, "VAL") } record(bo, "BPMS:BTS:8:MPSLTBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C1S2@bpmMPS+0,m32") field(MASK, "1") field(ZNAM, "BYPASSED") field(ONAM, "NOT_BYPASSED") field(ZSV, "NO_ALARM") field(OSV, "NO_ALARM") field(VAL, "0") field(PINI, "YES") field(ASG, "") info(autosaveFields, "VAL") } record(calc, "BPMS:BTS:8:MPSIGNRCALC") { field(DESC, "MPS ignore if TMIT too low") field(CALC, "A $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:BTS:8:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:BTS:8:UOFF") field(DOL2, "BPMS:BTS:8:UOFF") field(DOL3, "BPMS:BTS:8:UOFF") field(DOL4, "BPMS:BTS:8:UOFF") field(DOL5, "BPMS:BTS:8:UOFF") field(DOL6, "BPMS:BTS:8:UOFF") field(DOL7, "BPMS:BTS:8:UOFF") field(DOL8, "BPMS:BTS:8:UOFF") field(DOL9, "BPMS:BTS:8:UOFF") field(DOLA, "BPMS:BTS:8:UOFF") field(LNK1, "BPMS:BTS:8:UOFF_SEL.A PP") field(LNK2, "BPMS:BTS:8:UOFF_SEL.B PP") field(LNK3, "BPMS:BTS:8:UOFF_SEL.C PP") field(LNK4, "BPMS:BTS:8:UOFF_SEL.D PP") field(LNK5, "BPMS:BTS:8:UOFF_SEL.E PP") field(LNK6, "BPMS:BTS:8:UOFF_SEL.F PP") field(LNK7, "BPMS:BTS:8:UOFF_SEL.G PP") field(LNK8, "BPMS:BTS:8:UOFF_SEL.H PP") field(LNK9, "BPMS:BTS:8:UOFF_SEL.I PP") field(LNKA, "BPMS:BTS:8:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:BTS:8:UOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:BTS:8:UOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:BTS:8:UOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:BTS:8:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:BTS:8:UOFF_SEL") field(OUTA, "BPMS:BTS:8:U.AOFF CA") field(OUTB, "BPMS:BTS:8:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:BTS:8:UOFF_CTRL") { field(INPA, "BPMS:BTS:8:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:BTS:8:UOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:BTS:8:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:BTS:8:VOFF") field(DOL2, "BPMS:BTS:8:VOFF") field(DOL3, "BPMS:BTS:8:VOFF") field(DOL4, "BPMS:BTS:8:VOFF") field(DOL5, "BPMS:BTS:8:VOFF") field(DOL6, "BPMS:BTS:8:VOFF") field(DOL7, "BPMS:BTS:8:VOFF") field(DOL8, "BPMS:BTS:8:VOFF") field(DOL9, "BPMS:BTS:8:VOFF") field(DOLA, "BPMS:BTS:8:VOFF") field(LNK1, "BPMS:BTS:8:VOFF_SEL.A PP") field(LNK2, "BPMS:BTS:8:VOFF_SEL.B PP") field(LNK3, "BPMS:BTS:8:VOFF_SEL.C PP") field(LNK4, "BPMS:BTS:8:VOFF_SEL.D PP") field(LNK5, "BPMS:BTS:8:VOFF_SEL.E PP") field(LNK6, "BPMS:BTS:8:VOFF_SEL.F PP") field(LNK7, "BPMS:BTS:8:VOFF_SEL.G PP") field(LNK8, "BPMS:BTS:8:VOFF_SEL.H PP") field(LNK9, "BPMS:BTS:8:VOFF_SEL.I PP") field(LNKA, "BPMS:BTS:8:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:BTS:8:VOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:BTS:8:VOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:BTS:8:VOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:BTS:8:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:BTS:8:VOFF_SEL") field(OUTA, "BPMS:BTS:8:V.AOFF CA") field(OUTB, "BPMS:BTS:8:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:BTS:8:VOFF_CTRL") { field(INPA, "BPMS:BTS:8:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:BTS:8:VOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:BTS:8:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:BTS:8:USCL") field(DOL2, "BPMS:BTS:8:USCL") field(DOL3, "BPMS:BTS:8:USCL") field(DOL4, "BPMS:BTS:8:USCL") field(DOL5, "BPMS:BTS:8:USCL") field(DOL6, "BPMS:BTS:8:USCL") field(DOL7, "BPMS:BTS:8:USCL") field(DOL8, "BPMS:BTS:8:USCL") field(DOL9, "BPMS:BTS:8:USCL") field(DOLA, "BPMS:BTS:8:USCL") field(LNK1, "BPMS:BTS:8:USCL_SEL.A PP") field(LNK2, "BPMS:BTS:8:USCL_SEL.B PP") field(LNK3, "BPMS:BTS:8:USCL_SEL.C PP") field(LNK4, "BPMS:BTS:8:USCL_SEL.D PP") field(LNK5, "BPMS:BTS:8:USCL_SEL.E PP") field(LNK6, "BPMS:BTS:8:USCL_SEL.F PP") field(LNK7, "BPMS:BTS:8:USCL_SEL.G PP") field(LNK8, "BPMS:BTS:8:USCL_SEL.H PP") field(LNK9, "BPMS:BTS:8:USCL_SEL.I PP") field(LNKA, "BPMS:BTS:8:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:BTS:8:USCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:BTS:8:USCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:BTS:8:USCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:BTS:8:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:BTS:8:USCL_SEL") field(OUTA, "BPMS:BTS:8:U.ASLO CA") field(OUTB, "BPMS:BTS:8:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:BTS:8:USCL_CTRL") { field(INPA, "BPMS:BTS:8:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:BTS:8:USCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:BTS:8:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:BTS:8:VSCL") field(DOL2, "BPMS:BTS:8:VSCL") field(DOL3, "BPMS:BTS:8:VSCL") field(DOL4, "BPMS:BTS:8:VSCL") field(DOL5, "BPMS:BTS:8:VSCL") field(DOL6, "BPMS:BTS:8:VSCL") field(DOL7, "BPMS:BTS:8:VSCL") field(DOL8, "BPMS:BTS:8:VSCL") field(DOL9, "BPMS:BTS:8:VSCL") field(DOLA, "BPMS:BTS:8:VSCL") field(LNK1, "BPMS:BTS:8:VSCL_SEL.A PP") field(LNK2, "BPMS:BTS:8:VSCL_SEL.B PP") field(LNK3, "BPMS:BTS:8:VSCL_SEL.C PP") field(LNK4, "BPMS:BTS:8:VSCL_SEL.D PP") field(LNK5, "BPMS:BTS:8:VSCL_SEL.E PP") field(LNK6, "BPMS:BTS:8:VSCL_SEL.F PP") field(LNK7, "BPMS:BTS:8:VSCL_SEL.G PP") field(LNK8, "BPMS:BTS:8:VSCL_SEL.H PP") field(LNK9, "BPMS:BTS:8:VSCL_SEL.I PP") field(LNKA, "BPMS:BTS:8:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:BTS:8:VSCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:BTS:8:VSCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:BTS:8:VSCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:BTS:8:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:BTS:8:VSCL_SEL") field(OUTA, "BPMS:BTS:8:V.ASLO CA") field(OUTB, "BPMS:BTS:8:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:BTS:8:VSCL_CTRL") { field(INPA, "BPMS:BTS:8:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:BTS:8:VSCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:BTS:8:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:BTS:8:PHI") field(DOL2, "BPMS:BTS:8:PHI") field(DOL3, "BPMS:BTS:8:PHI") field(DOL4, "BPMS:BTS:8:PHI") field(DOL5, "BPMS:BTS:8:PHI") field(DOL6, "BPMS:BTS:8:PHI") field(DOL7, "BPMS:BTS:8:PHI") field(DOL8, "BPMS:BTS:8:PHI") field(DOL9, "BPMS:BTS:8:PHI") field(DOLA, "BPMS:BTS:8:PHI") field(LNK1, "BPMS:BTS:8:PHI_SEL.A PP") field(LNK2, "BPMS:BTS:8:PHI_SEL.B PP") field(LNK3, "BPMS:BTS:8:PHI_SEL.C PP") field(LNK4, "BPMS:BTS:8:PHI_SEL.D PP") field(LNK5, "BPMS:BTS:8:PHI_SEL.E PP") field(LNK6, "BPMS:BTS:8:PHI_SEL.F PP") field(LNK7, "BPMS:BTS:8:PHI_SEL.G PP") field(LNK8, "BPMS:BTS:8:PHI_SEL.H PP") field(LNK9, "BPMS:BTS:8:PHI_SEL.I PP") field(LNKA, "BPMS:BTS:8:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:BTS:8:PHI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:BTS:8:PHI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:BTS:8:PHI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:BTS:8:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:BTS:8:PHI_SEL") field(OUTA, "BPMS:BTS:8:CALC.E CA") field(OUTB, "BPMS:BTS:8:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:BTS:8:PHI_CTRL") { field(INPA, "BPMS:BTS:8:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:BTS:8:PHI_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:BTS:8:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:BTS:8:PSI") field(DOL2, "BPMS:BTS:8:PSI") field(DOL3, "BPMS:BTS:8:PSI") field(DOL4, "BPMS:BTS:8:PSI") field(DOL5, "BPMS:BTS:8:PSI") field(DOL6, "BPMS:BTS:8:PSI") field(DOL7, "BPMS:BTS:8:PSI") field(DOL8, "BPMS:BTS:8:PSI") field(DOL9, "BPMS:BTS:8:PSI") field(DOLA, "BPMS:BTS:8:PSI") field(LNK1, "BPMS:BTS:8:PSI_SEL.A PP") field(LNK2, "BPMS:BTS:8:PSI_SEL.B PP") field(LNK3, "BPMS:BTS:8:PSI_SEL.C PP") field(LNK4, "BPMS:BTS:8:PSI_SEL.D PP") field(LNK5, "BPMS:BTS:8:PSI_SEL.E PP") field(LNK6, "BPMS:BTS:8:PSI_SEL.F PP") field(LNK7, "BPMS:BTS:8:PSI_SEL.G PP") field(LNK8, "BPMS:BTS:8:PSI_SEL.H PP") field(LNK9, "BPMS:BTS:8:PSI_SEL.I PP") field(LNKA, "BPMS:BTS:8:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:BTS:8:PSI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:BTS:8:PSI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "90") field(B, "90") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:BTS:8:PSI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:BTS:8:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:BTS:8:PSI_SEL") field(OUTA, "BPMS:BTS:8:CALC.F CA") field(OUTB, "BPMS:BTS:8:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:BTS:8:PSI_CTRL") { field(INPA, "BPMS:BTS:8:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:BTS:8:PSI_SEL.L PP") } record(longout, "BPMS:BTS:8:PARMSEL") { field(VAL, "0") field(PINI, "YES") } #! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ############################################## # This is the head of the main processing chain # that runs at the highest priority. ############################################## ############################################# # This is the head of the processing chain for # diagnostics. ############################################## record(ai, "BPMS:BTS:9:GRN") { field(DESC, "GRN Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C1 S0") field(EGU, "raw") #TODO set HOPR/LOPR, alarm limits field(SCAN, "I/O Intr") # The priority determines what scan list we are being # put on (see drvPadUdpComm.c) field(PRIO, "LOW") field(FLNK, "BPMS:BTS:9:RED") # HOPR for the energy algorithm is determined as follows: # # inf inf # 1) Fourier relation / h^2 dt = / |H|^2 df = 2 B # 0 -inf # # 1a) It can be shown that the maximum of the impuls response # ha is ~ 2 B # # 2) The digitizer produces the numbers # # Ai = 2^s (hi/ha) # # where ha is the maximum of the impuls response # and 2^s is a scale factor. # # 3) 'Energy algorithm' calculates S = sum( Ai^2 ) # # inf # 4) S = (2^s / ha)^2 sum(hi^2) = K sum(hi^2) Dt ~ K / h^2 dt # 0 # # with K = (2^s / ha)^2 fs # # 5) From 4) and 1a) -> S ~ K ha and therefore # # 6) S = 2^(2s) fs/ha = 2^(2s) fs/(2 B) # # 7) The strip signals are sqrt(S); hence HOPR is about # # HOPR ~ 2^s sqrt( fs/2/B ) # # with 2^s = 32768, fs=120MHz, B=10MHz it follows # that HOPR ~ 1E5; we add some margin... field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:BTS:9:RED") { field(DESC, "RED Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C1 S1") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:BTS:9:BLU") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:BTS:9:BLU") { field(DESC, "BLU Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C1 S2") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:BTS:9:YLO") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:BTS:9:YLO") { field(DESC, "YLO Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C1 S3") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } ############################################## # Slowly-scanned diagnostics ############################################## # record(waveform, "BPMS:BTS:9:REDW") { field(DESC, "Raw CAL RED Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C1 S1") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "BPMS:BTS:9:GRNW") { field(DESC, "Raw CAL GRN Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C1 S2") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "BPMS:BTS:9:RAWDBG") { field(DESC, "Raw BEAM Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' # do not 'wbscan' for now since e.g., an underrange # condition on the real signal can happen. field(INP, "#C1 S7") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "BPMS:BTS:9:REDDBG") { field(DESC, "Raw CAL RED Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C1 S8 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "BPMS:BTS:9:GRNDBG") { field(DESC, "Raw CAL GRN Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C1 S9 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(ai, "BPMS:BTS:9:GRUV") { field(DESC, "CAL Gain GRN/RED") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C1 S0") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") } record(ai, "BPMS:BTS:9:GRU") { field(DESC, "CAL Gain GRN/BLU") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C1 S1") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "BPMS:BTS:9:GRV") { field(DESC, "CAL Gain RED/YLO") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C1 S2") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "BPMS:BTS:9:TGRN") { field(DESC, "Green arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C1 S4") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:BTS:9:TRED") { field(DESC, "Red arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C1 S5") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:BTS:9:TBLU") { field(DESC, "Blue arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C1 S6") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:BTS:9:TYLO") { field(DESC, "Yellow arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C1 S7") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ao, "BPMS:BTS:9:PINC_ADJ") { field(DESC, "Adjust Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:BTS:9:CALC.K PP MS") field(VAL, "0") field(DRVL, "0") field(DRVH, "2") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:BTS:9:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:BTS:9:QSCA.A PP MS") # 5.0E-6 / 1.6E-10 [nC/e-] field(VAL, "31250") field(EGU, "Nel") field(PREC, "3") field(PINI, "YES") info(autosaveFields, "VAL") } # Adjust TMIT scale for AFE attenuation record(calcout, "BPMS:BTS:9:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:BTS:9:ATT1 CP") field(INPC, "BPMS:BTS:9:ATT2 CP") field(CALC, "A*10^((B+C+D)/20)") # use CA link to deposit into TMIT.ASLO so # that TMIT is not forced into linkset # of this record field(OUT, "BPMS:BTS:9:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:BTS:9:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:BTS:9:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:BTS:9:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:BTS:9:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:BTS:9:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:BTS:9:ASIM.C PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } # Attenuate charge either by # real attenuator settings or # by fake ones. # If B, C >= 0 then their # values will be used instead # of ATT1, ATT2 record(calcout, "BPMS:BTS:9:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:BTS:9:QSIM.ESLO PP") # ATT1SIM puts value into A # set to -1 to use real attenuator settings # and >=0 to use B instead field(B, "-1") # ATT2SIM puts value into C # set to -1 to use real attenuator settings # and >=0 to use D instead field(D, "-1") field(CALC, "10^(((B>=0?B:A)+(D>=0?D:C))/20)") field(PINI, "YES") } record(ao, "BPMS:BTS:9:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:BTS:9:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "BPMS:BTS:9:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:BTS:9:RSTA.SEVR MS NPP") field(INPB, "BPMS:BTS:9:TMIT.SEVR MS NPP") field(INPC, "BPMS:BTS:9:Y.SEVR MS NPP") field(INPD, "BPMS:BTS:9:X.SEVR MS NPP") field(INPE, "BPMS:BTS:9:TGRN.SEVR MS NPP") field(INPF, "BPMS:BTS:9:TRED.SEVR MS NPP") field(INPG, "BPMS:BTS:9:TBLU.SEVR MS NPP") field(INPH, "BPMS:BTS:9:TYLO.SEVR MS NPP") field(INPI, "BPMS:BTS:9:GRU.SEVR MS NPP") field(INPJ, "BPMS:BTS:9:GRV.SEVR MS NPP") field(SCAN, "1 second") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:BTS:9:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:BTS:9:ATTC.B PP") field(DRVL, "-10") field(DRVH, "30") field(LOPR, "-10") field(HOPR, "30") field(EGU, "dB") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:BTS:9:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:BTS:9:ATTC.C PP") field(DRVL, "-20") field(DRVH, "20") field(LOPR, "-20") field(HOPR, "20") field(EGU, "dB") field(VAL, "40") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } record(calc, "BPMS:BTS:9:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:BTS:9:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:BTS:9:GRU.SEVR MS NPP") field(INPC, "BPMS:BTS:9:GRV.SEVR MS NPP") field(INPD, "BPMS:BTS:9:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:BTS:9:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:BTS:9:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:BTS:9:RED_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:BTS:9:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:BTS:9:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:BTS:9:BLU_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:BTS:9:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:BTS:9:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:BTS:9:YLO_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:BTS:9:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:BTS:9:YLO NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(sub, "BPMS:BTS:9:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "1") field(SCAN, "Passive") } record(bo, "BPMS:BTS:9:PINC_ENA") { field(DESC, "Simple Pincushion Alg") field(DTYP, "BusAddress") field(OUT, "#C0S2@drvBpmStriplPincEna,m32") field(MASK, "2") field(ZNAM, "DISABLED") field(ONAM, "ENABLED") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } record(ao, "BPMS:BTS:9:UDR_THRES") { field(DESC, "Detection Underrange Threshold") field(DTYP, "Bpm Parameters") field(OUT, "#C1S0") field(EGU, "ADC Ticks") field(DOL, "45.26") field(PINI, "YES") field(DRVL, "0") field(DRVH, "32767") info(autosaveFields, "VAL") } #! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ###################################### # HEAD of main processing chain ###################################### record(ai, "BPMS:BTS:9:X") { field(DESC, "X Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S11") field(SCAN, "I/O Intr") # The priority determines what scan list we are being # put on (see drvPadUdpComm.c) field(PRIO, "HIGH") field(FLNK, "BPMS:BTS:9:Y") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "0") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "BPMS:BTS:9:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S12") field(FLNK, "BPMS:BTS:9:TMIT") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "0") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "BPMS:BTS:9:TMIT") { field(DESC, "Charge Estimate") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S13") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") # FLINK into BSA field(FLNK, "BPMS:BTS:9:EFX.PROC") field(ASG, "") field(TSE, "0") info(autosaveFields, "LOLO LOW HIGH HIHI HHSV LLSV ") } ###################################### # HEAD of diagnostics processing chain ###################################### # leave RWAV in it's own lockset; don't FLNK # to 'U' & friends record(waveform, "BPMS:BTS:9:RWAV") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C1 S0") field(SCAN, "I/O Intr") # use LOW or HIGH to end up on the 'diagnostic' # scan list (see drvPadUdpComm.c) field(PRIO, "LOW") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") } record(ai, "BPMS:BTS:9:U") { field(DESC, "Raw U Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S8") field(SCAN, "I/O Intr") # use LOW or HIGH to end up on the 'diagnostic' # scan list (see drvPadUdpComm.c) field(PRIO, "LOW") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "BPMS:BTS:9:V") } record(ai, "BPMS:BTS:9:V") { field(DESC, "Raw V Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S9") field(SCAN, "Passive") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "BPMS:BTS:9:PINC") } record(ai, "BPMS:BTS:9:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S10") field(SCAN, "Passive") } record(longin, "BPMS:BTS:9:RSTA") { field(DESC, "Status of Raw Processor") field(DTYP, "Bpm Raw Status") field(INP, "#C1S0") field(SCAN, "1 second") field(LOLO, "-1") field(HIHI, "+1") field(HHSV, "INVALID") field(LLSV, "INVALID") field(FLNK, "BPMS:BTS:9:RSTA_ALH") } record(calc, "BPMS:BTS:9:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:BTS:9:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:BTS:9:PHI") { field(DESC, "Rot Angle") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "deg") field(PREC, "1") field(LOPR, "-180") field(HOPR, "+180") field(FLNK, "BPMS:BTS:9:PHI_SEQ") } record(ao, "BPMS:BTS:9:PSI") { field(DESC, "Axis Sep. Angle") field(DTYP, "Soft Channel") field(VAL, "90") field(EGU, "deg") field(PREC, "1") field(LOPR, "0") field(HOPR, "+180") field(FLNK, "BPMS:BTS:9:PSI_SEQ") } #record(dfanout, "BPMS:BTS:9:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:BTS:9:USCL PP MS") # field(OUTB, "BPMS:BTS:9:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:BTS:9:UOFF") { field(DESC, "BPM U Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:BTS:9:UOFF_SEQ") } record(ao, "BPMS:BTS:9:VOFF") { field(DESC, "BPM V Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:BTS:9:VOFF_SEQ") } record(ao, "BPMS:BTS:9:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:BTS:9:USCL_SEQ") } record(ao, "BPMS:BTS:9:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:BTS:9:VSCL_SEQ") } record(mbbo, "BPMS:BTS:9:ACCESS") { field(DESC, "BPM On Line") field(DTYP, "StreamSwitch") field(OUT, "#C1 S0") field(ZRVL, "1") field(ZRST, "Running") field(ZRSV, "NO_ALARM") field(ONVL, "1") field(ONST, "Maintenance") field(ONSV, "MINOR") field(TWVL, "1") field(TWST, "Test") field(TWSV, "MINOR") field(THVL, "0") field(THST, "OFFLINE") field(THSV, "MAJOR") # set both, rval and val to get it right # regardless of whether devsup does conversion # or not. field(RVAL, "0") field(VAL, "0") field(PINI, "YES") field(FLNK, "BPMS:BTS:9:SIMOFF") info(autosaveFields, "RVAL") } # # Used by higher level software to determine if a PV is in feedback or not. # May also be used by actuator (magnet and RF) IOC applications to # switch output records to "closed_loop" to prevent outside programs from # changing setpoints when an actuator device is in feedback. # record(mbbo, "BPMS:BTS:9:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") field(OMSL, "supervisory") field(VAL, "0") field(ZRVL, "0") field(ONVL, "1") field(TWVL, "2") # Off - this device can be used in feedback but all feedback loops # using it are off. field(ZRST, "Off") # On - this device is being used by one or more feedback loops. field(ONST, "On") # Unavailable - this device is not used by any feedback loop. field(TWST, "Unavailable") info(autosaveFields, "VAL") } # Convenience record holding the MAD name record(stringin, "BPMS:BTS:9:MADN") { field(DESC, "MAD Name") field(VAL, "BTS-BPM09") field(PINI, "YES") } record(stringin, "BTS-BPM09:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:BTS:9") field(PINI, "YES") } record(ai, "BPMS:BTS:9:X_SLOW") { alias("BPMS:BTS:9:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:BTS:9:X MS") field(FLNK, "BPMS:BTS:9:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:BTS:9:Y_SLOW") { alias("BPMS:BTS:9:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:BTS:9:Y NPP MS") field(FLNK, "BPMS:BTS:9:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:BTS:9:TMIT_SLOW") { alias("BPMS:BTS:9:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "BPMS:BTS:9:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "BPMS:BTS:9:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:BTS:9:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:BTS:9:SIMC PP") } record(calcout, "BPMS:BTS:9:SIM") { field(DESC, "BPM Pos. Simulation") field(DTYP, "Strip Signal Simulator") field(OUT, "1") #CALC & VAL unused; the real calculation is done # in device support. The reason this is a # calcout rather than sub is that we want # to use the OUT link... field(CALC, "A") field(INPA, "BPMS:BTS:9:USCL") field(INPL, "0") } # Switch simulation record BPMS:BTS:9:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:BTS:9:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:BTS:9:SIMCSEQ.SELN PP") field(ZRST, "OFF") field(ZRVL, "0x0f") field(ONST, "ON") field(ONVL, "0x1c0") field(TWST, "SOFT") field(TWVL, "0x030") field(MASK, "-1") field(NOBT, "16") field(VAL, "0") field(RVAL, "0x0f") field(PINI, "YES") } record(ao, "BPMS:BTS:9:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:BTS:9:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:BTS:9:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:BTS:9:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:BTS:9:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:BTS:9:SIM.D PP") field(EGU, "Nel") field(ASLO, "6000") #ESLO is used to add attenuation field(LINR, "LINEAR") field(VAL, "1E9") field(PINI, "YES") field(PREC, "4") field(LOPR, "0") field(HOPR, "1E11") } record(ao, "BPMS:BTS:9:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:BTS:9:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:BTS:9:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:BTS:9:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:BTS:9:DIGISIMW") { field(DESC, "VME Digi Sim. Waveform") field(DTYP, "VmeDigi Sim Wav") field(OUT, "#C1 S0") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32678") field(LOPR, "-32768") # 16384 samples/channel * 4 channels field(NELM, "65536") field(PINI, "NO") } #Used by model/database folks to verify BPM record(ao, "BPMS:BTS:9:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:BTS:9:MPSBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C0S2@bpmMPS+0,m32") field(MASK, "2") field(ZNAM, "BYPASSED") field(ONAM, "NOT_BYPASSED") field(ZSV, "MAJOR") field(OSV, "NO_ALARM") field(VAL, "0") field(PINI, "YES") field(ASG, "") info(autosaveFields, "VAL") } record(bo, "BPMS:BTS:9:MPSLTBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C1S2@bpmMPS+0,m32") field(MASK, "2") field(ZNAM, "BYPASSED") field(ONAM, "NOT_BYPASSED") field(ZSV, "NO_ALARM") field(OSV, "NO_ALARM") field(VAL, "0") field(PINI, "YES") field(ASG, "") info(autosaveFields, "VAL") } record(calc, "BPMS:BTS:9:MPSIGNRCALC") { field(DESC, "MPS ignore if TMIT too low") field(CALC, "A $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:BTS:9:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:BTS:9:UOFF") field(DOL2, "BPMS:BTS:9:UOFF") field(DOL3, "BPMS:BTS:9:UOFF") field(DOL4, "BPMS:BTS:9:UOFF") field(DOL5, "BPMS:BTS:9:UOFF") field(DOL6, "BPMS:BTS:9:UOFF") field(DOL7, "BPMS:BTS:9:UOFF") field(DOL8, "BPMS:BTS:9:UOFF") field(DOL9, "BPMS:BTS:9:UOFF") field(DOLA, "BPMS:BTS:9:UOFF") field(LNK1, "BPMS:BTS:9:UOFF_SEL.A PP") field(LNK2, "BPMS:BTS:9:UOFF_SEL.B PP") field(LNK3, "BPMS:BTS:9:UOFF_SEL.C PP") field(LNK4, "BPMS:BTS:9:UOFF_SEL.D PP") field(LNK5, "BPMS:BTS:9:UOFF_SEL.E PP") field(LNK6, "BPMS:BTS:9:UOFF_SEL.F PP") field(LNK7, "BPMS:BTS:9:UOFF_SEL.G PP") field(LNK8, "BPMS:BTS:9:UOFF_SEL.H PP") field(LNK9, "BPMS:BTS:9:UOFF_SEL.I PP") field(LNKA, "BPMS:BTS:9:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:BTS:9:UOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:BTS:9:UOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:BTS:9:UOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:BTS:9:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:BTS:9:UOFF_SEL") field(OUTA, "BPMS:BTS:9:U.AOFF CA") field(OUTB, "BPMS:BTS:9:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:BTS:9:UOFF_CTRL") { field(INPA, "BPMS:BTS:9:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:BTS:9:UOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:BTS:9:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:BTS:9:VOFF") field(DOL2, "BPMS:BTS:9:VOFF") field(DOL3, "BPMS:BTS:9:VOFF") field(DOL4, "BPMS:BTS:9:VOFF") field(DOL5, "BPMS:BTS:9:VOFF") field(DOL6, "BPMS:BTS:9:VOFF") field(DOL7, "BPMS:BTS:9:VOFF") field(DOL8, "BPMS:BTS:9:VOFF") field(DOL9, "BPMS:BTS:9:VOFF") field(DOLA, "BPMS:BTS:9:VOFF") field(LNK1, "BPMS:BTS:9:VOFF_SEL.A PP") field(LNK2, "BPMS:BTS:9:VOFF_SEL.B PP") field(LNK3, "BPMS:BTS:9:VOFF_SEL.C PP") field(LNK4, "BPMS:BTS:9:VOFF_SEL.D PP") field(LNK5, "BPMS:BTS:9:VOFF_SEL.E PP") field(LNK6, "BPMS:BTS:9:VOFF_SEL.F PP") field(LNK7, "BPMS:BTS:9:VOFF_SEL.G PP") field(LNK8, "BPMS:BTS:9:VOFF_SEL.H PP") field(LNK9, "BPMS:BTS:9:VOFF_SEL.I PP") field(LNKA, "BPMS:BTS:9:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:BTS:9:VOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:BTS:9:VOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:BTS:9:VOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:BTS:9:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:BTS:9:VOFF_SEL") field(OUTA, "BPMS:BTS:9:V.AOFF CA") field(OUTB, "BPMS:BTS:9:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:BTS:9:VOFF_CTRL") { field(INPA, "BPMS:BTS:9:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:BTS:9:VOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:BTS:9:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:BTS:9:USCL") field(DOL2, "BPMS:BTS:9:USCL") field(DOL3, "BPMS:BTS:9:USCL") field(DOL4, "BPMS:BTS:9:USCL") field(DOL5, "BPMS:BTS:9:USCL") field(DOL6, "BPMS:BTS:9:USCL") field(DOL7, "BPMS:BTS:9:USCL") field(DOL8, "BPMS:BTS:9:USCL") field(DOL9, "BPMS:BTS:9:USCL") field(DOLA, "BPMS:BTS:9:USCL") field(LNK1, "BPMS:BTS:9:USCL_SEL.A PP") field(LNK2, "BPMS:BTS:9:USCL_SEL.B PP") field(LNK3, "BPMS:BTS:9:USCL_SEL.C PP") field(LNK4, "BPMS:BTS:9:USCL_SEL.D PP") field(LNK5, "BPMS:BTS:9:USCL_SEL.E PP") field(LNK6, "BPMS:BTS:9:USCL_SEL.F PP") field(LNK7, "BPMS:BTS:9:USCL_SEL.G PP") field(LNK8, "BPMS:BTS:9:USCL_SEL.H PP") field(LNK9, "BPMS:BTS:9:USCL_SEL.I PP") field(LNKA, "BPMS:BTS:9:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:BTS:9:USCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:BTS:9:USCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:BTS:9:USCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:BTS:9:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:BTS:9:USCL_SEL") field(OUTA, "BPMS:BTS:9:U.ASLO CA") field(OUTB, "BPMS:BTS:9:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:BTS:9:USCL_CTRL") { field(INPA, "BPMS:BTS:9:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:BTS:9:USCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:BTS:9:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:BTS:9:VSCL") field(DOL2, "BPMS:BTS:9:VSCL") field(DOL3, "BPMS:BTS:9:VSCL") field(DOL4, "BPMS:BTS:9:VSCL") field(DOL5, "BPMS:BTS:9:VSCL") field(DOL6, "BPMS:BTS:9:VSCL") field(DOL7, "BPMS:BTS:9:VSCL") field(DOL8, "BPMS:BTS:9:VSCL") field(DOL9, "BPMS:BTS:9:VSCL") field(DOLA, "BPMS:BTS:9:VSCL") field(LNK1, "BPMS:BTS:9:VSCL_SEL.A PP") field(LNK2, "BPMS:BTS:9:VSCL_SEL.B PP") field(LNK3, "BPMS:BTS:9:VSCL_SEL.C PP") field(LNK4, "BPMS:BTS:9:VSCL_SEL.D PP") field(LNK5, "BPMS:BTS:9:VSCL_SEL.E PP") field(LNK6, "BPMS:BTS:9:VSCL_SEL.F PP") field(LNK7, "BPMS:BTS:9:VSCL_SEL.G PP") field(LNK8, "BPMS:BTS:9:VSCL_SEL.H PP") field(LNK9, "BPMS:BTS:9:VSCL_SEL.I PP") field(LNKA, "BPMS:BTS:9:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:BTS:9:VSCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:BTS:9:VSCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:BTS:9:VSCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:BTS:9:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:BTS:9:VSCL_SEL") field(OUTA, "BPMS:BTS:9:V.ASLO CA") field(OUTB, "BPMS:BTS:9:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:BTS:9:VSCL_CTRL") { field(INPA, "BPMS:BTS:9:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:BTS:9:VSCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:BTS:9:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:BTS:9:PHI") field(DOL2, "BPMS:BTS:9:PHI") field(DOL3, "BPMS:BTS:9:PHI") field(DOL4, "BPMS:BTS:9:PHI") field(DOL5, "BPMS:BTS:9:PHI") field(DOL6, "BPMS:BTS:9:PHI") field(DOL7, "BPMS:BTS:9:PHI") field(DOL8, "BPMS:BTS:9:PHI") field(DOL9, "BPMS:BTS:9:PHI") field(DOLA, "BPMS:BTS:9:PHI") field(LNK1, "BPMS:BTS:9:PHI_SEL.A PP") field(LNK2, "BPMS:BTS:9:PHI_SEL.B PP") field(LNK3, "BPMS:BTS:9:PHI_SEL.C PP") field(LNK4, "BPMS:BTS:9:PHI_SEL.D PP") field(LNK5, "BPMS:BTS:9:PHI_SEL.E PP") field(LNK6, "BPMS:BTS:9:PHI_SEL.F PP") field(LNK7, "BPMS:BTS:9:PHI_SEL.G PP") field(LNK8, "BPMS:BTS:9:PHI_SEL.H PP") field(LNK9, "BPMS:BTS:9:PHI_SEL.I PP") field(LNKA, "BPMS:BTS:9:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:BTS:9:PHI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:BTS:9:PHI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:BTS:9:PHI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:BTS:9:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:BTS:9:PHI_SEL") field(OUTA, "BPMS:BTS:9:CALC.E CA") field(OUTB, "BPMS:BTS:9:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:BTS:9:PHI_CTRL") { field(INPA, "BPMS:BTS:9:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:BTS:9:PHI_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:BTS:9:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:BTS:9:PSI") field(DOL2, "BPMS:BTS:9:PSI") field(DOL3, "BPMS:BTS:9:PSI") field(DOL4, "BPMS:BTS:9:PSI") field(DOL5, "BPMS:BTS:9:PSI") field(DOL6, "BPMS:BTS:9:PSI") field(DOL7, "BPMS:BTS:9:PSI") field(DOL8, "BPMS:BTS:9:PSI") field(DOL9, "BPMS:BTS:9:PSI") field(DOLA, "BPMS:BTS:9:PSI") field(LNK1, "BPMS:BTS:9:PSI_SEL.A PP") field(LNK2, "BPMS:BTS:9:PSI_SEL.B PP") field(LNK3, "BPMS:BTS:9:PSI_SEL.C PP") field(LNK4, "BPMS:BTS:9:PSI_SEL.D PP") field(LNK5, "BPMS:BTS:9:PSI_SEL.E PP") field(LNK6, "BPMS:BTS:9:PSI_SEL.F PP") field(LNK7, "BPMS:BTS:9:PSI_SEL.G PP") field(LNK8, "BPMS:BTS:9:PSI_SEL.H PP") field(LNK9, "BPMS:BTS:9:PSI_SEL.I PP") field(LNKA, "BPMS:BTS:9:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:BTS:9:PSI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:BTS:9:PSI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "90") field(B, "90") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:BTS:9:PSI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:BTS:9:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:BTS:9:PSI_SEL") field(OUTA, "BPMS:BTS:9:CALC.F CA") field(OUTB, "BPMS:BTS:9:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:BTS:9:PSI_CTRL") { field(INPA, "BPMS:BTS:9:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:BTS:9:PSI_SEL.L PP") } record(longout, "BPMS:BTS:9:PARMSEL") { field(VAL, "0") field(PINI, "YES") } # bpmAfe.db; database for controlling stripline-BPM AFE # This database should not be loaded on PADs w/o AFE hardware. # # THIS FILE WAS GENERATED WITH msi FROM bpmPadAfe.template or bpmVmeDigiAfe.db AND EXPANDED FOR # # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # MODE: a -- Use VME IOC PVs # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # # NOTE: The template can be configured by means of proper macro # substitutions to # a) operate in 'normal' LCLS stripline BPM mode. In this # mode a few CA links to the VME/main IOC are active fetching # '$(dev):ACCESS', '$(dev):ATTO' and '$(dev):CLAO' from the # main IOC. # # b) standalone mode. In this mode, ACCESS is ignored and 'ATTO' and # 'CLAO' are instantiated / hosted on the PAD IOC. # # Mode 'a' is chosen by substituting # 'suffix' ='L', # 'propomsl' = 'closed_loop' # 'attomsl' = 'supervisory' # 'chrgL' = ' CPP' # 'actlL' = '$(dev):ACCESS.RVAL CP' # 'attoL' = '$(dev):ATTO CP' # 'claoL' = '$(dev):CLAO CP' # # Mode 'b' is chosen by substituting # 'suffix' = '' (empty) # 'propomsl' = 'supervisory' # 'attomsl' = 'supervisory' # 'chrgL' = '0' # 'actlL' = '0' # 'attoL' = '0' # 'claoL' = '0' # # SUBSTITUTIONS: # Substitutions available in main .db file # 'dev' : device name prefix # 'chrg' : name of global attenuator PV (for scaling all AFE attenuators with beam charge)(mode a) or '0' (mode b) # 'chrg' is only available in mode 'a'. # # Substitutions available in the template -- intended to be expanded when generating '.db' with MSI. # # 'chrgL' : name of global attenuator PV (for scaling all AFE attenuators with beam charge) + CPP attribute (mode a) or '0' (mode b) # 'actlL' : name of ACCESS.RVAL PV + CP attribute (mode a) or '0' (mode b) # 'attoL' : name of ATTO PV + CP attribute (mode a) or '0' (mode b) # 'claoL' : name of CLAO PV + CP attribute (mode a) or '0' (mode b) #'attomsl' : default/initial OMSL; if 'supervisory' then the 'ATT' PV controls attenuators # if 'closed_loop' then ATT is fetched from it's DOL (=='chrg' PV). # 'suffix' : see above. #'propomsl': see above. # # LINKS (pointing outside of this file): These links are only used in mode a and set to '0' in mode b. # BPMS:BTS:8:ATT.DOL <---- BTS:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # BPMS:BTS:8:ACTL.DOL <---- BPMS:BTS:8:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # BPMS:BTS:8:ATTOL.DOL<---- BPMS:BTS:8:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # BPMS:BTS:8:CLAOL.DOL<---- BPMS:BTS:8:CLAO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # # # # Additional macros added to support other architectures. These macros do NOT need to be populated for PAD AFEs # because the default value is set for them: # # instance - AFE identifier (0,1,... or identifying string) # devsup - device support name (qspiAfe for 'generic' suppport used by SLAC RTM and XTA AFE) # type - AFE flavor, 0 for PAD, 1 for XTA, 2 for RTM # record(longout, "BPMS:BTS:8:CALA") { field(DESC, "AFE Cal. Att.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE0+1,qspiAfe") field(LOPR, "0") field(HOPR, "31") field(DRVL, "6") field(DRVH, "31") field(EGU, "dB") } record(longout, "BPMS:BTS:8:ATT1") { field(DESC, "AFE Att. 1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE0+2,qspiAfe") field(LOPR, "0") field(HOPR, "15") field(DRVL, "0") field(DRVH, "15") field(EGU, "dB") } record(longout, "BPMS:BTS:8:ATT2") { field(DESC, "AFE Att. 2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE0+3,qspiAfe") field(EGU, "dB") field(LOPR, "0") field(HOPR, "31") field(DRVL, "0") field(DRVH, "31") field(EGU, "dB") } # AFE FW versions (decimal): # 4 original LCLS-I FW version # >=32 ATT2 has 32 dB range; before 16 dB # 33 200 MHz board # 34 140 MHz board w/ 6dB PAD removed # 35 200 MHz board w/ 6dB PAD removed # > 64 140 MHz board not used with PAD/coldfire (XTA) # 8 MicroTCA RTM record(longin, "BPMS:BTS:8:VERS") { field(DESC, "AFE Firmware Vers.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(INP, "#C0S0@AFE0+5,qspiAfe") field(LOLO, "3") field(LLSV, "MAJOR") field(PINI, "YES") field(FLNK, "BPMS:BTS:8:ATTINIT") } record(longout, "BPMS:BTS:8:AODL") { field(DESC, "Delay Trig -> AMP On") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE0+0x10,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "BPMS:BTS:8:R1DL") { field(DESC, "Delay AMP On -> RF1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE0+0x11,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "BPMS:BTS:8:RFWD") { field(DESC, "RF Pulse Width") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE0+0x13,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") info(autosaveFields, "VAL") } record(longout, "BPMS:BTS:8:OFFT") { field(DESC, "Delay RF Off -> Ctrl Sw.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE0+0x14,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "BPMS:BTS:8:R2DL") { field(DESC, "Ctrl Sw. -> RF2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE0+0x12,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } # This record just issues a CAL trigger record(longout, "BPMS:BTS:8:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE0+6,qspiAfe") } record(mbbo, "BPMS:BTS:8:CALM") { field(DESC, "AFE Cal. Mode") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE0+0,softTogAfe") field(NOBT, "2") field(SHFT, "0") field(ZRST, "CAL RED") field(ZRVL, "0") field(ONST, "CAL GRN") field(ONVL, "1") field(THST, "CAL NONE") field(THVL, "3") # 'soft toggle' mode. NOTE: LSB must match RED or GRN # which choses the mode to start with field(FRST, "CAL TOGGLE") field(FRVL, "4") field(VAL, "4") field(PINI, "YES") } # Subroutine to set up attenuator limits at ioc startup. # Attenuator ranges vary among AFE types and FW versions # This record also in bpmVmeDigiAfePart.db record(aSub, "BPMS:BTS:8:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "BPMS:BTS:8:VERS") field(FTVA, "LONG") field(OUTA, "BPMS:BTS:8:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "BPMS:BTS:8:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "BPMS:BTS:8:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "BPMS:BTS:8:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "BPMS:BTS:8:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "BPMS:BTS:8:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "BPMS:BTS:8:ATT.VAL") field(FTVH, "LONG") field(OUTH, "BPMS:BTS:8:ATTC.D") field(FTVI, "LONG") field(OUTI, "BPMS:BTS:8:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "BPMS:BTS:8:ATTC.F") field(FTVK, "LONG") field(OUTK, "BPMS:BTS:8:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "BPMS:BTS:8:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "BPMS:BTS:8:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "BPMS:BTS:8:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "BPMS:BTS:8:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "BPMS:BTS:8:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "BPMS:BTS:8:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "BPMS:BTS:8:CLAO.HOPR") field(FLNK, "BPMS:BTS:8:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "BPMS:BTS:8:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "BPMS:BTS:8:ATTC.A PP") field(DRVL, "0") field(DRVH, "30") field(LOPR, "0") field(HOPR, "30") field(EGU, "dB") field(DOL, "BTS:ATTR CPP") field(OMSL, "supervisory") field(VAL, "30") } # This subroutine record performs the # following operation (ATTC.D defines # the breakpoint where ATT1 kicks in # -- it depends on losses and gains: # BPT = G1 + L1 - L2 # with # G1: gain of 1st stage, # L1: loss + NF upstream of 1st stage, # L2: loss between 1st and 2nd stage + NF of 2nd stage # # if L1 : 2dB cable, 3dB 1st Filter, 1dB Att1 residual, 2.8dB NF = 8.8dB # L2 : 1dB Att2 residual, 4.5dB BPF, 3dB NF = 8.5dB # G1 : = 20.0dB # # -> breakpoint ~ 20dB # #----------------------------------------------------------------------------- # New RTM AFE characteristics are different (assume 140 ft LMR: 2.2db/100ft): # L1 : 3.1 dB cable, 4.5 dB 1st BPF, 1.1 dB att1, 3.3dB NF = 12.0dB # L2 : 1.1 dB att2, 2.7 dB NF, 1 dB BPF = 4.8dB # G1 : = 16.0dB # # -> breakpoint ~ 23dB # #----------------------------------------------------------------------------- # # Semantics of the different fields # A: Total attenuation (ATT records deposits value there) # B: ATTO # C: CLAO # D: BPT Breakpoint (see above) # E: (ATT1MAX) max. ATT1 attenuation (depends on version, set by ATTINIT) # F: (ATT2MAX) max. ATT2 attenuation (depends on version, set by ATTINIT) # # if ( (T=ATT+ATTO) > ATT1MAX + ATT2MAX ) # T = ATT1MAX + ATT2MAX # endif # # if ( (A1 = floor((T - BPT)/2)) < 0 ) # A1 = 0; # A2 = T; # else # if (A1 > ATT1MAX) # A1 = ATT1MAX; # endif # A2 = T - A1 # endif # # if ( A2 > ATT2MAX ) # A1 = A2-ATT2MAX # A2 = ATT2MAX # endif # # CA = CLAO + ATT1MAX + ATT2MAX - ATT # if ( CA < 0 ) # CA = 0 # else if ( CA > ACMAX ) # CA = ACMAX # endif # # Then, it writes three links: # BPMS:BTS:8:ATT1 = A1 # BPMS:BTS:8:ATT2 = A2 # BPMS:BTS:8:CALA = CA # record(sub, "BPMS:BTS:8:ATTC") { # Note: this record uses it's name to calculate # db link addresses to ATT1, ATT2, CALA field(DESC, "AFE Total Att. Calc.") # initialize fields to max. attenuation: # During init: # 1. hw initializes to max # 2. this record holds max # 3. PINI of the placeholder PVs (ATT, ATTO & friends) # trickle in and cause the total attenuation to # go down... field(A, "30") field(B, "0") field(C, "60") field(D, "20") field(EGU, "dB") field(INAM, "subAttIni") field(SNAM, "subAtt") } #propagate 'ACCESS.RVAL' state to #attenuator control #This record is unused in stdalone mode 'b' record(bo, "BPMS:BTS:8:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "BPMS:BTS:8:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "BPMS:BTS:8:ATT.OMSL PP") } ### ### Keep 'ATTO' and 'CLAO' on the main/VME IOC. ### It is more confusing but then we don't have ### to restore anything across reboots on the PAD ### IOC... ### ### This db now used for AFEs controlled by either ### a VME IOC or a PAD IOC. Use the same db for ### both for simplicity. ### ### NOTE: We could use the INPB / INPC ### links of ATTC directly but we DONT. ### Potentially, ATTC can be processed ### on every shot -- we don't want the ### links to be fetched every time for ### efficiency reasons. Hence the 'propagator' ### records which monitor ATTO/CLAO and ### write to ATTC.B ATTC.C only when ### necessary... record(longout, "BPMS:BTS:8:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:BTS:8:ATTO CP") field(OMSL, "closed_loop") field(OUT, "BPMS:BTS:8:ATTC.B PP") field(EGU, "dB") } record(longout, "BPMS:BTS:8:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:BTS:8:CLAO CP") field(OMSL, "closed_loop") field(OUT, "BPMS:BTS:8:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "BPMS:BTS:8:TRIG2BEAM") { field(DESC, "Trigger -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE0+0x15,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVH, "255") field(PINI, "YES") info(autosaveFields, "VAL") } record(longout, "BPMS:BTS:8:RF2RED") { field(DESC, "Red RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE0+0x16,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVH, "255") field(VAL, "6") field(PINI, "YES") info(autosaveFields, "VAL") } record(longout, "BPMS:BTS:8:RF2GRN") { field(DESC, "Grn RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE0+0x17,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVH, "255") field(VAL, "6") field(PINI, "YES") info(autosaveFields, "VAL") } # bpmAfe.db; database for controlling stripline-BPM AFE # This database should not be loaded on PADs w/o AFE hardware. # # THIS FILE WAS GENERATED WITH msi FROM bpmPadAfe.template or bpmVmeDigiAfe.db AND EXPANDED FOR # # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # MODE: a -- Use VME IOC PVs # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # # NOTE: The template can be configured by means of proper macro # substitutions to # a) operate in 'normal' LCLS stripline BPM mode. In this # mode a few CA links to the VME/main IOC are active fetching # '$(dev):ACCESS', '$(dev):ATTO' and '$(dev):CLAO' from the # main IOC. # # b) standalone mode. In this mode, ACCESS is ignored and 'ATTO' and # 'CLAO' are instantiated / hosted on the PAD IOC. # # Mode 'a' is chosen by substituting # 'suffix' ='L', # 'propomsl' = 'closed_loop' # 'attomsl' = 'supervisory' # 'chrgL' = ' CPP' # 'actlL' = '$(dev):ACCESS.RVAL CP' # 'attoL' = '$(dev):ATTO CP' # 'claoL' = '$(dev):CLAO CP' # # Mode 'b' is chosen by substituting # 'suffix' = '' (empty) # 'propomsl' = 'supervisory' # 'attomsl' = 'supervisory' # 'chrgL' = '0' # 'actlL' = '0' # 'attoL' = '0' # 'claoL' = '0' # # SUBSTITUTIONS: # Substitutions available in main .db file # 'dev' : device name prefix # 'chrg' : name of global attenuator PV (for scaling all AFE attenuators with beam charge)(mode a) or '0' (mode b) # 'chrg' is only available in mode 'a'. # # Substitutions available in the template -- intended to be expanded when generating '.db' with MSI. # # 'chrgL' : name of global attenuator PV (for scaling all AFE attenuators with beam charge) + CPP attribute (mode a) or '0' (mode b) # 'actlL' : name of ACCESS.RVAL PV + CP attribute (mode a) or '0' (mode b) # 'attoL' : name of ATTO PV + CP attribute (mode a) or '0' (mode b) # 'claoL' : name of CLAO PV + CP attribute (mode a) or '0' (mode b) #'attomsl' : default/initial OMSL; if 'supervisory' then the 'ATT' PV controls attenuators # if 'closed_loop' then ATT is fetched from it's DOL (=='chrg' PV). # 'suffix' : see above. #'propomsl': see above. # # LINKS (pointing outside of this file): These links are only used in mode a and set to '0' in mode b. # BPMS:BTS:9:ATT.DOL <---- BTS:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # BPMS:BTS:9:ACTL.DOL <---- BPMS:BTS:9:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # BPMS:BTS:9:ATTOL.DOL<---- BPMS:BTS:9:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # BPMS:BTS:9:CLAOL.DOL<---- BPMS:BTS:9:CLAO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # # # # Additional macros added to support other architectures. These macros do NOT need to be populated for PAD AFEs # because the default value is set for them: # # instance - AFE identifier (0,1,... or identifying string) # devsup - device support name (qspiAfe for 'generic' suppport used by SLAC RTM and XTA AFE) # type - AFE flavor, 0 for PAD, 1 for XTA, 2 for RTM # record(longout, "BPMS:BTS:9:CALA") { field(DESC, "AFE Cal. Att.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE1+1,qspiAfe") field(LOPR, "0") field(HOPR, "31") field(DRVL, "6") field(DRVH, "31") field(EGU, "dB") } record(longout, "BPMS:BTS:9:ATT1") { field(DESC, "AFE Att. 1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE1+2,qspiAfe") field(LOPR, "0") field(HOPR, "15") field(DRVL, "0") field(DRVH, "15") field(EGU, "dB") } record(longout, "BPMS:BTS:9:ATT2") { field(DESC, "AFE Att. 2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE1+3,qspiAfe") field(EGU, "dB") field(LOPR, "0") field(HOPR, "31") field(DRVL, "0") field(DRVH, "31") field(EGU, "dB") } # AFE FW versions (decimal): # 4 original LCLS-I FW version # >=32 ATT2 has 32 dB range; before 16 dB # 33 200 MHz board # 34 140 MHz board w/ 6dB PAD removed # 35 200 MHz board w/ 6dB PAD removed # > 64 140 MHz board not used with PAD/coldfire (XTA) # 8 MicroTCA RTM record(longin, "BPMS:BTS:9:VERS") { field(DESC, "AFE Firmware Vers.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(INP, "#C0S0@AFE1+5,qspiAfe") field(LOLO, "3") field(LLSV, "MAJOR") field(PINI, "YES") field(FLNK, "BPMS:BTS:9:ATTINIT") } record(longout, "BPMS:BTS:9:AODL") { field(DESC, "Delay Trig -> AMP On") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE1+0x10,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "BPMS:BTS:9:R1DL") { field(DESC, "Delay AMP On -> RF1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE1+0x11,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "BPMS:BTS:9:RFWD") { field(DESC, "RF Pulse Width") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE1+0x13,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") info(autosaveFields, "VAL") } record(longout, "BPMS:BTS:9:OFFT") { field(DESC, "Delay RF Off -> Ctrl Sw.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE1+0x14,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "BPMS:BTS:9:R2DL") { field(DESC, "Ctrl Sw. -> RF2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE1+0x12,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } # This record just issues a CAL trigger record(longout, "BPMS:BTS:9:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE1+6,qspiAfe") } record(mbbo, "BPMS:BTS:9:CALM") { field(DESC, "AFE Cal. Mode") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE1+0,softTogAfe") field(NOBT, "2") field(SHFT, "0") field(ZRST, "CAL RED") field(ZRVL, "0") field(ONST, "CAL GRN") field(ONVL, "1") field(THST, "CAL NONE") field(THVL, "3") # 'soft toggle' mode. NOTE: LSB must match RED or GRN # which choses the mode to start with field(FRST, "CAL TOGGLE") field(FRVL, "4") field(VAL, "4") field(PINI, "YES") } # Subroutine to set up attenuator limits at ioc startup. # Attenuator ranges vary among AFE types and FW versions # This record also in bpmVmeDigiAfePart.db record(aSub, "BPMS:BTS:9:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "BPMS:BTS:9:VERS") field(FTVA, "LONG") field(OUTA, "BPMS:BTS:9:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "BPMS:BTS:9:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "BPMS:BTS:9:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "BPMS:BTS:9:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "BPMS:BTS:9:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "BPMS:BTS:9:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "BPMS:BTS:9:ATT.VAL") field(FTVH, "LONG") field(OUTH, "BPMS:BTS:9:ATTC.D") field(FTVI, "LONG") field(OUTI, "BPMS:BTS:9:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "BPMS:BTS:9:ATTC.F") field(FTVK, "LONG") field(OUTK, "BPMS:BTS:9:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "BPMS:BTS:9:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "BPMS:BTS:9:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "BPMS:BTS:9:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "BPMS:BTS:9:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "BPMS:BTS:9:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "BPMS:BTS:9:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "BPMS:BTS:9:CLAO.HOPR") field(FLNK, "BPMS:BTS:9:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "BPMS:BTS:9:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "BPMS:BTS:9:ATTC.A PP") field(DRVL, "0") field(DRVH, "30") field(LOPR, "0") field(HOPR, "30") field(EGU, "dB") field(DOL, "BTS:ATTR CPP") field(OMSL, "supervisory") field(VAL, "30") } # This subroutine record performs the # following operation (ATTC.D defines # the breakpoint where ATT1 kicks in # -- it depends on losses and gains: # BPT = G1 + L1 - L2 # with # G1: gain of 1st stage, # L1: loss + NF upstream of 1st stage, # L2: loss between 1st and 2nd stage + NF of 2nd stage # # if L1 : 2dB cable, 3dB 1st Filter, 1dB Att1 residual, 2.8dB NF = 8.8dB # L2 : 1dB Att2 residual, 4.5dB BPF, 3dB NF = 8.5dB # G1 : = 20.0dB # # -> breakpoint ~ 20dB # #----------------------------------------------------------------------------- # New RTM AFE characteristics are different (assume 140 ft LMR: 2.2db/100ft): # L1 : 3.1 dB cable, 4.5 dB 1st BPF, 1.1 dB att1, 3.3dB NF = 12.0dB # L2 : 1.1 dB att2, 2.7 dB NF, 1 dB BPF = 4.8dB # G1 : = 16.0dB # # -> breakpoint ~ 23dB # #----------------------------------------------------------------------------- # # Semantics of the different fields # A: Total attenuation (ATT records deposits value there) # B: ATTO # C: CLAO # D: BPT Breakpoint (see above) # E: (ATT1MAX) max. ATT1 attenuation (depends on version, set by ATTINIT) # F: (ATT2MAX) max. ATT2 attenuation (depends on version, set by ATTINIT) # # if ( (T=ATT+ATTO) > ATT1MAX + ATT2MAX ) # T = ATT1MAX + ATT2MAX # endif # # if ( (A1 = floor((T - BPT)/2)) < 0 ) # A1 = 0; # A2 = T; # else # if (A1 > ATT1MAX) # A1 = ATT1MAX; # endif # A2 = T - A1 # endif # # if ( A2 > ATT2MAX ) # A1 = A2-ATT2MAX # A2 = ATT2MAX # endif # # CA = CLAO + ATT1MAX + ATT2MAX - ATT # if ( CA < 0 ) # CA = 0 # else if ( CA > ACMAX ) # CA = ACMAX # endif # # Then, it writes three links: # BPMS:BTS:9:ATT1 = A1 # BPMS:BTS:9:ATT2 = A2 # BPMS:BTS:9:CALA = CA # record(sub, "BPMS:BTS:9:ATTC") { # Note: this record uses it's name to calculate # db link addresses to ATT1, ATT2, CALA field(DESC, "AFE Total Att. Calc.") # initialize fields to max. attenuation: # During init: # 1. hw initializes to max # 2. this record holds max # 3. PINI of the placeholder PVs (ATT, ATTO & friends) # trickle in and cause the total attenuation to # go down... field(A, "30") field(B, "0") field(C, "60") field(D, "20") field(EGU, "dB") field(INAM, "subAttIni") field(SNAM, "subAtt") } #propagate 'ACCESS.RVAL' state to #attenuator control #This record is unused in stdalone mode 'b' record(bo, "BPMS:BTS:9:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "BPMS:BTS:9:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "BPMS:BTS:9:ATT.OMSL PP") } ### ### Keep 'ATTO' and 'CLAO' on the main/VME IOC. ### It is more confusing but then we don't have ### to restore anything across reboots on the PAD ### IOC... ### ### This db now used for AFEs controlled by either ### a VME IOC or a PAD IOC. Use the same db for ### both for simplicity. ### ### NOTE: We could use the INPB / INPC ### links of ATTC directly but we DONT. ### Potentially, ATTC can be processed ### on every shot -- we don't want the ### links to be fetched every time for ### efficiency reasons. Hence the 'propagator' ### records which monitor ATTO/CLAO and ### write to ATTC.B ATTC.C only when ### necessary... record(longout, "BPMS:BTS:9:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:BTS:9:ATTO CP") field(OMSL, "closed_loop") field(OUT, "BPMS:BTS:9:ATTC.B PP") field(EGU, "dB") } record(longout, "BPMS:BTS:9:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:BTS:9:CLAO CP") field(OMSL, "closed_loop") field(OUT, "BPMS:BTS:9:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "BPMS:BTS:9:TRIG2BEAM") { field(DESC, "Trigger -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE1+0x15,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVH, "255") field(PINI, "YES") info(autosaveFields, "VAL") } record(longout, "BPMS:BTS:9:RF2RED") { field(DESC, "Red RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE1+0x16,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVH, "255") field(VAL, "6") field(PINI, "YES") info(autosaveFields, "VAL") } record(longout, "BPMS:BTS:9:RF2GRN") { field(DESC, "Grn RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE1+0x17,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVH, "255") field(VAL, "6") field(PINI, "YES") info(autosaveFields, "VAL") } # Registers on Struck AMC # Digitizer AMC FW version record(stringin, "BPMS:BTS:8:DIGIVERS") { field(DESC, "Digitizer Firmware Vers.") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C0S0@0x4F8(8)") field(PINI, "YES") } # Firmware date record(stringin, "BPMS:BTS:8:DIGIVERS_DATE") { field(DESC, "Firmware Vers. Date") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C0S0@0x4FE(8)") field(PINI, "YES") } # System ID record(stringin, "BPMS:BTS:8:DIGI_SYSID") { field(DESC, "Digitizer System ID") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C0S0@0x4FA(8)") field(PINI, "YES") } # Sub Type record(stringin, "BPMS:BTS:8:SUBSYS") { field(DESC, "Subsystem type") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C0S0@0x4FC(8)") field(PINI, "YES") } # Registers on Struck AMC # Digitizer AMC FW version record(stringin, "BPMS:BTS:9:DIGIVERS") { field(DESC, "Digitizer Firmware Vers.") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C1S0@0x4F8(8)") field(PINI, "YES") } # Firmware date record(stringin, "BPMS:BTS:9:DIGIVERS_DATE") { field(DESC, "Firmware Vers. Date") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C1S0@0x4FE(8)") field(PINI, "YES") } # System ID record(stringin, "BPMS:BTS:9:DIGI_SYSID") { field(DESC, "Digitizer System ID") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C1S0@0x4FA(8)") field(PINI, "YES") } # Sub Type record(stringin, "BPMS:BTS:9:SUBSYS") { field(DESC, "Subsystem type") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C1S0@0x4FC(8)") field(PINI, "YES") } # # For LCLS, which contains many BPM eiocs (many clients of this # database), this db is loaded into a soft ioc instead of one of # the BPM iocs to reduce the number of channel access links on that ioc. # # a few records to host the 'announced charge' # so that everybody can adjust their gains record(ao, "BTS:QANN") { field(DESC, "Announced Beam Charge") field(ADEL, ".01") field(LOPR, ".01") field(DRVL, ".01") field(HOPR, "2") field(DRVH, "1") field(PREC, "3") field(VAL, ".1") field(EGU, "nC") field(PINI, "YES") field(FLNK, "BTS:QANNSET PP") info(autosaveFields, "VAL HIHI HIGH LOW LOLO HHSV HSV LSV LLSV DRVH") } # Make proxy record to write QANN in order # to limit access to QANN.DRVH (HW protection) # QANNSET value will be used to set eioc attenuators record(ao, "BTS:QANNSET") { field(DESC, "Set QANN") field(DOL, "BTS:QANN") field(OMSL, "closed_loop") field(OUT, "BTS:ATTR.A PP") field(ADEL, ".01") field(LOPR, ".01") field(DRVL, ".01") field(HOPR, "2") field(DRVH, "1") field(PREC, "3") field(VAL, ".1") field(EGU, "nC") field(VAL, "1") field(ASG, "EOICDESK") field(FLNK, "BTS:QANNF") info(autosaveFields, "DRVH") } # Record to copy selected QANNSET fields to QANN # Sync QANN.DRVH to 'real' QANNSET.DRVH # Just DRVH for now; want to keep alarms with # accessible QANN record(seq, "BTS:QANNF") { field(DESC, "Update QANN fields") field(SELM, "All") field(DOL1, "BTS:QANNSET.DRVH CP") field(LNK1, "BTS:QANN.DRVH PP") } record(ao, "BTS:QREF") { field(DESC, "Ann. Charge Ref. Val.") field(OUT, "BTS:ATTR.B PP") field(ADEL, ".01") field(LOPR, ".01") field(DRVL, ".01") field(HOPR, "100") field(DRVH, "100") field(PREC, "3") field(VAL, ".1") field(EGU, "nC") field(PINI, "YES") field(ASG, "EOICDESK") info(autosaveFields, "VAL") } record(calc, "BTS:ATTR") { field(DESC, "Reference Attenuation") field(EGU, "dB") field(CALC, "20*LOG(a/b)") field(ASG, "EOICDESK") } record(calcout, "BTS:QANNH") { field(DESC, "Calculates QANN.HIHI,.HIGH") field(SCAN, "Passive") field(CALC, "A*B") #Feedback charge setpoint field(INPA, "FBCK:BCI0:1:CHRGSP CPP") #Upper limits coefficient field(B, "1.1") field(OUT, "BTS:QANNHFO PP") field(OOPT, "Every Time") field(PINI, "YES") info(autosaveFields, "INPA B") } record(dfanout, "BTS:QANNHFO") { field(DESC, "Fanout to QANN.HIHI,HIGH") field(OUTA, "BTS:QANN.HIHI PP") field(OUTB, "BTS:QANN.HIGH PP") } record(calcout, "BTS:QANNL") { field(DESC, "Calculates QANN.LOLO,.LOW") field(SCAN, "Passive") field(CALC, "A*B") #Feedback charge setpoint field(INPA, "FBCK:BCI0:1:CHRGSP CPP") #Lower limits coefficient field(B, "0.9") field(OUT, "BTS:QANNLFO PP") field(OOPT, "Every Time") field(PINI, "YES") info(autosaveFields, "INPA B") } record(dfanout, "BTS:QANNLFO") { field(DESC, "Fanout to QANN.LOLO,LOW") field(OUTA, "BTS:QANN.LOLO PP") field(OUTB, "BTS:QANN.LOW PP") } # Two records for users who prefer bunch charge in # of electrons # Users set QANNEL, which sets QANN (changes to QANN bypassing QANNNEL # will be lost). Must restore QANNEL on reboot. # New macro qann for QANN PV, which has default of "" to remain # backward-compatible with existing db substitutions files. # IMPORTANT: Only those wishing to use QANNEL should define value for qann macro, # otherwise QANN will be set to QANNEL's default on boot. record(ao, "BTS:QANNNEL") { field(DESC, "Announced Beam Charge") field(ADEL, "1E7") field(LOPR, "6.25E7") field(DRVL, "6.25E7") field(HOPR, "2E10") field(DRVH, "2E10") field(VAL, "6.25E8") field(EGU, "Nel") field(PINI, "YES") field(FLNK, "BTS:QANNNELC") info(autosaveFields, "VAL") } record(calcout, "BTS:QANNNELC") { field(DESC, "Convert beam charge units") field(CALC, "A*1E9*1.6E-19") field(INPA, "BTS:QANNNEL") field(OUT, "") field(OOPT, "Every Time") field(FLNK, "") } # 10hz records to ship over to b140-iocbpm record(fanout, "BPMS:BTS:8:EFX") { field(DESC, "Fanout") field(LNK1, "BPMS:BTS:8:XTH") field(LNK2, "BPMS:BTS:8:YTH") field(LNK3, "BPMS:BTS:8:TMITTH") } record(ai, "BPMS:BTS:8:XTH") { field(DESC, "X Position") field(EGU, "mm") field(INP, "BPMS:BTS:8:X MSI") field(MDEL,"-1") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:BTS:8:YTH") { field(DESC, "Y Position") field(EGU, "mm") field(INP, "BPMS:BTS:8:Y MSI") field(MDEL,"-1") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:BTS:8:TMITTH") { field(DESC, "Charge Estimate") field(INP, "BPMS:BTS:8:TMIT MS") field(MDEL,"-1") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } # 10hz records to ship over to b140-iocbpm record(fanout, "BPMS:BTS:9:EFX") { field(DESC, "Fanout") field(LNK1, "BPMS:BTS:9:XTH") field(LNK2, "BPMS:BTS:9:YTH") field(LNK3, "BPMS:BTS:9:TMITTH") } record(ai, "BPMS:BTS:9:XTH") { field(DESC, "X Position") field(EGU, "mm") field(INP, "BPMS:BTS:9:X MSI") field(MDEL,"-1") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:BTS:9:YTH") { field(DESC, "Y Position") field(EGU, "mm") field(INP, "BPMS:BTS:9:Y MSI") field(MDEL,"-1") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:BTS:9:TMITTH") { field(DESC, "Charge Estimate") field(INP, "BPMS:BTS:9:TMIT MS") field(MDEL,"-1") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") }