# per IOC database for stripline BPMs #record(sub, "VIOC:DF2S:BPM:FIDP") { # field(DESC, "BPM Fiducial Processing") # field(SNAM, "bpmEvrFidProcess") # #This tells us if there is beam during this cycle... # field(INPA, "VIOC:DF2S:BPM:MODIFIER5.R") #} #record(mbbo, "VIOC:DF2S:BPM:PATTERNSIM") { # field(DESC, "Pattern Simulation") # field(ZRST, "Off") # field(ONST, "Soft") # field(TWST, "Raw") # field(DOL, "0") # field(PINI, "YES") #} record(sub, "VIOC:DF2S:BPM:EVTM") { field(SNAM, "subEventTestTiming") field(SCAN, "Event") field(EVNT, "40") } #! 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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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(bo, "SL3:SBPM:SL16:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL16:CALC.K NPP MS") field(ZNAM, "Off") field(ONAM, "On") field(VAL, "0") 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, "SL3:SBPM:SL16:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "SL3:SBPM:SL16:ATT1 CP") field(INPC, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "SL3:SBPM:SL16:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL16:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL16:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "SL3:SBPM:SL16:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL16:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL16:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "SL3:SBPM:SL16:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "SL3:SBPM:SL16:RSTA.SEVR MS NPP") field(INPB, "SL3:SBPM:SL16:TMIT.SEVR MS NPP") field(INPC, "SL3:SBPM:SL16:Y.SEVR MS NPP") field(INPD, "SL3:SBPM:SL16:X.SEVR MS NPP") field(INPE, "SL3:SBPM:SL16:TGRN.SEVR MS NPP") field(INPF, "SL3:SBPM:SL16:TRED.SEVR MS NPP") field(INPG, "SL3:SBPM:SL16:TBLU.SEVR MS NPP") field(INPH, "SL3:SBPM:SL16:TYLO.SEVR MS NPP") field(INPI, "SL3:SBPM:SL16:GRU.SEVR MS NPP") field(INPJ, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "SL3:SBPM:SL16:RSTA_ALH.SEVR MS NPP") field(INPB, "SL3:SBPM:SL16:GRU.SEVR MS NPP") field(INPC, "SL3:SBPM:SL16:GRV.SEVR MS NPP") field(INPD, "SL3:SBPM:SL16:CHK.SEVR MS NPP") # for optional additional alarm input: field(INPE, "") } # snapshot PV for the bpm values display record(ai, "SL3:SBPM:SL16:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "SL3:SBPM:SL16:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SL3:SBPM:SL16:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SL3:SBPM:SL16:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "0") field(SCAN, "Passive") } record(bo, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:Y") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SL3:SBPM:SL16:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S12") field(FLNK, "SL3:SBPM:SL16:TMIT") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:EFX.PROC") field(ASG, "") field(TSE, "-2") 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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:V") } record(ai, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:PINC") } record(ai, "SL3:SBPM:SL16:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S10") field(SCAN, "Passive") } record(longin, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:RSTA_ALH") } record(calc, "SL3:SBPM:SL16:RSTA_ALH") { field(CALC, "A & B") field(INPA, "SL3:SBPM:SL16:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:PHI_SEQ") } record(ao, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:PSI_SEQ") } #record(dfanout, "SL3:SBPM:SL16:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "SL3:SBPM:SL16:USCL PP MS") # field(OUTB, "SL3:SBPM:SL16:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:UOFF_SEQ") } record(ao, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:VOFF_SEQ") } record(ao, "SL3:SBPM:SL16:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SL3:SBPM:SL16:USCL_SEQ") } record(ao, "SL3:SBPM:SL16:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SL3:SBPM:SL16:VSCL_SEQ") } record(mbbo, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMSL16") field(PINI, "YES") } record(stringin, "SBPMSL16:NAME") { field(DESC, "BPM Name") field(VAL, "SL3:SBPM:SL16") field(PINI, "YES") } record(ai, "SL3:SBPM:SL16:X_SLOW") { #alias("SL3:SBPM:SL16:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SL3:SBPM:SL16:X MS") field(FLNK, "SL3:SBPM:SL16:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SL3:SBPM:SL16:Y_SLOW") { #alias("SL3:SBPM:SL16:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SL3:SBPM:SL16:Y NPP MS") field(FLNK, "SL3:SBPM:SL16:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SL3:SBPM:SL16:TMIT_SLOW") { #alias("SL3:SBPM:SL16:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "SL3:SBPM:SL16:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } # Slowly updating PVs for displays # May point to either SW- or FW-calculated # values, depending on architecture # Set dispsuffix macro to "F" to use FW values record(ai, "SL3:SBPM:SL16:XDISP") { field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SL3:SBPM:SL16:X_SLOW MS CA") field(FLNK, "SL3:SBPM:SL16:YDISP") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SL3:SBPM:SL16:YDISP") { field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SL3:SBPM:SL16:Y_SLOW MS CA") field(FLNK, "SL3:SBPM:SL16:TMITDISP") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SL3:SBPM:SL16:TMITDISP") { field(DESC, "TMIT snapshot for display") field(INP, "SL3:SBPM:SL16:TMIT_SLOW MS CA") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "SL3:SBPM:SL16:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "SL3:SBPM:SL16:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "SL3:SBPM:SL16:SIMC PP") } record(calcout, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:USCL") field(INPL, "0") } # Switch simulation record SL3:SBPM:SL16:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "SL3:SBPM:SL16:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL16:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SL3:SBPM:SL16:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL16:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SL3:SBPM:SL16:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL16:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "SL3:SBPM:SL16:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL16:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL16:UOFF") field(DOL2, "SL3:SBPM:SL16:UOFF") field(DOL3, "SL3:SBPM:SL16:UOFF") field(DOL4, "SL3:SBPM:SL16:UOFF") field(DOL5, "SL3:SBPM:SL16:UOFF") field(DOL6, "SL3:SBPM:SL16:UOFF") field(DOL7, "SL3:SBPM:SL16:UOFF") field(DOL8, "SL3:SBPM:SL16:UOFF") field(DOL9, "SL3:SBPM:SL16:UOFF") field(DOLA, "SL3:SBPM:SL16:UOFF") field(LNK1, "SL3:SBPM:SL16:UOFF_SEL.A PP") field(LNK2, "SL3:SBPM:SL16:UOFF_SEL.B PP") field(LNK3, "SL3:SBPM:SL16:UOFF_SEL.C PP") field(LNK4, "SL3:SBPM:SL16:UOFF_SEL.D PP") field(LNK5, "SL3:SBPM:SL16:UOFF_SEL.E PP") field(LNK6, "SL3:SBPM:SL16:UOFF_SEL.F PP") field(LNK7, "SL3:SBPM:SL16:UOFF_SEL.G PP") field(LNK8, "SL3:SBPM:SL16:UOFF_SEL.H PP") field(LNK9, "SL3:SBPM:SL16:UOFF_SEL.I PP") field(LNKA, "SL3:SBPM:SL16:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL16:UOFF_SEL") field(OUTA, "SL3:SBPM:SL16:U.AOFF CA") field(OUTB, "SL3:SBPM:SL16:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL16:UOFF_CTRL") { field(INPA, "SL3:SBPM:SL16:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL16:VOFF") field(DOL2, "SL3:SBPM:SL16:VOFF") field(DOL3, "SL3:SBPM:SL16:VOFF") field(DOL4, "SL3:SBPM:SL16:VOFF") field(DOL5, "SL3:SBPM:SL16:VOFF") field(DOL6, "SL3:SBPM:SL16:VOFF") field(DOL7, "SL3:SBPM:SL16:VOFF") field(DOL8, "SL3:SBPM:SL16:VOFF") field(DOL9, "SL3:SBPM:SL16:VOFF") field(DOLA, "SL3:SBPM:SL16:VOFF") field(LNK1, "SL3:SBPM:SL16:VOFF_SEL.A PP") field(LNK2, "SL3:SBPM:SL16:VOFF_SEL.B PP") field(LNK3, "SL3:SBPM:SL16:VOFF_SEL.C PP") field(LNK4, "SL3:SBPM:SL16:VOFF_SEL.D PP") field(LNK5, "SL3:SBPM:SL16:VOFF_SEL.E PP") field(LNK6, "SL3:SBPM:SL16:VOFF_SEL.F PP") field(LNK7, "SL3:SBPM:SL16:VOFF_SEL.G PP") field(LNK8, "SL3:SBPM:SL16:VOFF_SEL.H PP") field(LNK9, "SL3:SBPM:SL16:VOFF_SEL.I PP") field(LNKA, "SL3:SBPM:SL16:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL16:VOFF_SEL") field(OUTA, "SL3:SBPM:SL16:V.AOFF CA") field(OUTB, "SL3:SBPM:SL16:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL16:VOFF_CTRL") { field(INPA, "SL3:SBPM:SL16:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL16:USCL") field(DOL2, "SL3:SBPM:SL16:USCL") field(DOL3, "SL3:SBPM:SL16:USCL") field(DOL4, "SL3:SBPM:SL16:USCL") field(DOL5, "SL3:SBPM:SL16:USCL") field(DOL6, "SL3:SBPM:SL16:USCL") field(DOL7, "SL3:SBPM:SL16:USCL") field(DOL8, "SL3:SBPM:SL16:USCL") field(DOL9, "SL3:SBPM:SL16:USCL") field(DOLA, "SL3:SBPM:SL16:USCL") field(LNK1, "SL3:SBPM:SL16:USCL_SEL.A PP") field(LNK2, "SL3:SBPM:SL16:USCL_SEL.B PP") field(LNK3, "SL3:SBPM:SL16:USCL_SEL.C PP") field(LNK4, "SL3:SBPM:SL16:USCL_SEL.D PP") field(LNK5, "SL3:SBPM:SL16:USCL_SEL.E PP") field(LNK6, "SL3:SBPM:SL16:USCL_SEL.F PP") field(LNK7, "SL3:SBPM:SL16:USCL_SEL.G PP") field(LNK8, "SL3:SBPM:SL16:USCL_SEL.H PP") field(LNK9, "SL3:SBPM:SL16:USCL_SEL.I PP") field(LNKA, "SL3:SBPM:SL16:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL16:USCL_SEL") field(OUTA, "SL3:SBPM:SL16:U.ASLO CA") field(OUTB, "SL3:SBPM:SL16:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL16:USCL_CTRL") { field(INPA, "SL3:SBPM:SL16:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL16:VSCL") field(DOL2, "SL3:SBPM:SL16:VSCL") field(DOL3, "SL3:SBPM:SL16:VSCL") field(DOL4, "SL3:SBPM:SL16:VSCL") field(DOL5, "SL3:SBPM:SL16:VSCL") field(DOL6, "SL3:SBPM:SL16:VSCL") field(DOL7, "SL3:SBPM:SL16:VSCL") field(DOL8, "SL3:SBPM:SL16:VSCL") field(DOL9, "SL3:SBPM:SL16:VSCL") field(DOLA, "SL3:SBPM:SL16:VSCL") field(LNK1, "SL3:SBPM:SL16:VSCL_SEL.A PP") field(LNK2, "SL3:SBPM:SL16:VSCL_SEL.B PP") field(LNK3, "SL3:SBPM:SL16:VSCL_SEL.C PP") field(LNK4, "SL3:SBPM:SL16:VSCL_SEL.D PP") field(LNK5, "SL3:SBPM:SL16:VSCL_SEL.E PP") field(LNK6, "SL3:SBPM:SL16:VSCL_SEL.F PP") field(LNK7, "SL3:SBPM:SL16:VSCL_SEL.G PP") field(LNK8, "SL3:SBPM:SL16:VSCL_SEL.H PP") field(LNK9, "SL3:SBPM:SL16:VSCL_SEL.I PP") field(LNKA, "SL3:SBPM:SL16:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL16:VSCL_SEL") field(OUTA, "SL3:SBPM:SL16:V.ASLO CA") field(OUTB, "SL3:SBPM:SL16:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL16:VSCL_CTRL") { field(INPA, "SL3:SBPM:SL16:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL16:PHI") field(DOL2, "SL3:SBPM:SL16:PHI") field(DOL3, "SL3:SBPM:SL16:PHI") field(DOL4, "SL3:SBPM:SL16:PHI") field(DOL5, "SL3:SBPM:SL16:PHI") field(DOL6, "SL3:SBPM:SL16:PHI") field(DOL7, "SL3:SBPM:SL16:PHI") field(DOL8, "SL3:SBPM:SL16:PHI") field(DOL9, "SL3:SBPM:SL16:PHI") field(DOLA, "SL3:SBPM:SL16:PHI") field(LNK1, "SL3:SBPM:SL16:PHI_SEL.A PP") field(LNK2, "SL3:SBPM:SL16:PHI_SEL.B PP") field(LNK3, "SL3:SBPM:SL16:PHI_SEL.C PP") field(LNK4, "SL3:SBPM:SL16:PHI_SEL.D PP") field(LNK5, "SL3:SBPM:SL16:PHI_SEL.E PP") field(LNK6, "SL3:SBPM:SL16:PHI_SEL.F PP") field(LNK7, "SL3:SBPM:SL16:PHI_SEL.G PP") field(LNK8, "SL3:SBPM:SL16:PHI_SEL.H PP") field(LNK9, "SL3:SBPM:SL16:PHI_SEL.I PP") field(LNKA, "SL3:SBPM:SL16:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL16:PHI_SEL") field(OUTA, "SL3:SBPM:SL16:CALC.E CA") field(OUTB, "SL3:SBPM:SL16:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL16:PHI_CTRL") { field(INPA, "SL3:SBPM:SL16:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL16:PSI") field(DOL2, "SL3:SBPM:SL16:PSI") field(DOL3, "SL3:SBPM:SL16:PSI") field(DOL4, "SL3:SBPM:SL16:PSI") field(DOL5, "SL3:SBPM:SL16:PSI") field(DOL6, "SL3:SBPM:SL16:PSI") field(DOL7, "SL3:SBPM:SL16:PSI") field(DOL8, "SL3:SBPM:SL16:PSI") field(DOL9, "SL3:SBPM:SL16:PSI") field(DOLA, "SL3:SBPM:SL16:PSI") field(LNK1, "SL3:SBPM:SL16:PSI_SEL.A PP") field(LNK2, "SL3:SBPM:SL16:PSI_SEL.B PP") field(LNK3, "SL3:SBPM:SL16:PSI_SEL.C PP") field(LNK4, "SL3:SBPM:SL16:PSI_SEL.D PP") field(LNK5, "SL3:SBPM:SL16:PSI_SEL.E PP") field(LNK6, "SL3:SBPM:SL16:PSI_SEL.F PP") field(LNK7, "SL3:SBPM:SL16:PSI_SEL.G PP") field(LNK8, "SL3:SBPM:SL16:PSI_SEL.H PP") field(LNK9, "SL3:SBPM:SL16:PSI_SEL.I PP") field(LNKA, "SL3:SBPM:SL16:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL16:PSI_SEL") field(OUTA, "SL3:SBPM:SL16:CALC.F CA") field(OUTB, "SL3:SBPM:SL16:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL16:PSI_CTRL") { field(INPA, "SL3:SBPM:SL16:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL16:PSI_SEL.L PP") } record(longout, "SL3:SBPM:SL16: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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(bo, "SL3:SBPM:SL17:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL17:CALC.K NPP MS") field(ZNAM, "Off") field(ONAM, "On") field(VAL, "0") 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, "SL3:SBPM:SL17:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "SL3:SBPM:SL17:ATT1 CP") field(INPC, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "SL3:SBPM:SL17:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL17:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL17:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "SL3:SBPM:SL17:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL17:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL17:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "SL3:SBPM:SL17:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "SL3:SBPM:SL17:RSTA.SEVR MS NPP") field(INPB, "SL3:SBPM:SL17:TMIT.SEVR MS NPP") field(INPC, "SL3:SBPM:SL17:Y.SEVR MS NPP") field(INPD, "SL3:SBPM:SL17:X.SEVR MS NPP") field(INPE, "SL3:SBPM:SL17:TGRN.SEVR MS NPP") field(INPF, "SL3:SBPM:SL17:TRED.SEVR MS NPP") field(INPG, "SL3:SBPM:SL17:TBLU.SEVR MS NPP") field(INPH, "SL3:SBPM:SL17:TYLO.SEVR MS NPP") field(INPI, "SL3:SBPM:SL17:GRU.SEVR MS NPP") field(INPJ, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "SL3:SBPM:SL17:RSTA_ALH.SEVR MS NPP") field(INPB, "SL3:SBPM:SL17:GRU.SEVR MS NPP") field(INPC, "SL3:SBPM:SL17:GRV.SEVR MS NPP") field(INPD, "SL3:SBPM:SL17:CHK.SEVR MS NPP") # for optional additional alarm input: field(INPE, "") } # snapshot PV for the bpm values display record(ai, "SL3:SBPM:SL17:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "SL3:SBPM:SL17:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SL3:SBPM:SL17:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SL3:SBPM:SL17:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "1") field(SCAN, "Passive") } record(bo, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:Y") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SL3:SBPM:SL17:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S12") field(FLNK, "SL3:SBPM:SL17:TMIT") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:EFX.PROC") field(ASG, "") field(TSE, "-2") 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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:V") } record(ai, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:PINC") } record(ai, "SL3:SBPM:SL17:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S10") field(SCAN, "Passive") } record(longin, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:RSTA_ALH") } record(calc, "SL3:SBPM:SL17:RSTA_ALH") { field(CALC, "A & B") field(INPA, "SL3:SBPM:SL17:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:PHI_SEQ") } record(ao, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:PSI_SEQ") } #record(dfanout, "SL3:SBPM:SL17:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "SL3:SBPM:SL17:USCL PP MS") # field(OUTB, "SL3:SBPM:SL17:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:UOFF_SEQ") } record(ao, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:VOFF_SEQ") } record(ao, "SL3:SBPM:SL17:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SL3:SBPM:SL17:USCL_SEQ") } record(ao, "SL3:SBPM:SL17:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SL3:SBPM:SL17:VSCL_SEQ") } record(mbbo, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMSL17") field(PINI, "YES") } record(stringin, "SBPMSL17:NAME") { field(DESC, "BPM Name") field(VAL, "SL3:SBPM:SL17") field(PINI, "YES") } record(ai, "SL3:SBPM:SL17:X_SLOW") { #alias("SL3:SBPM:SL17:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SL3:SBPM:SL17:X MS") field(FLNK, "SL3:SBPM:SL17:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SL3:SBPM:SL17:Y_SLOW") { #alias("SL3:SBPM:SL17:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SL3:SBPM:SL17:Y NPP MS") field(FLNK, "SL3:SBPM:SL17:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SL3:SBPM:SL17:TMIT_SLOW") { #alias("SL3:SBPM:SL17:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "SL3:SBPM:SL17:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } # Slowly updating PVs for displays # May point to either SW- or FW-calculated # values, depending on architecture # Set dispsuffix macro to "F" to use FW values record(ai, "SL3:SBPM:SL17:XDISP") { field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SL3:SBPM:SL17:X_SLOW MS CA") field(FLNK, "SL3:SBPM:SL17:YDISP") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SL3:SBPM:SL17:YDISP") { field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SL3:SBPM:SL17:Y_SLOW MS CA") field(FLNK, "SL3:SBPM:SL17:TMITDISP") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SL3:SBPM:SL17:TMITDISP") { field(DESC, "TMIT snapshot for display") field(INP, "SL3:SBPM:SL17:TMIT_SLOW MS CA") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "SL3:SBPM:SL17:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "SL3:SBPM:SL17:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "SL3:SBPM:SL17:SIMC PP") } record(calcout, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:USCL") field(INPL, "0") } # Switch simulation record SL3:SBPM:SL17:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "SL3:SBPM:SL17:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL17:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SL3:SBPM:SL17:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL17:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SL3:SBPM:SL17:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL17:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "SL3:SBPM:SL17:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL17:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL17:UOFF") field(DOL2, "SL3:SBPM:SL17:UOFF") field(DOL3, "SL3:SBPM:SL17:UOFF") field(DOL4, "SL3:SBPM:SL17:UOFF") field(DOL5, "SL3:SBPM:SL17:UOFF") field(DOL6, "SL3:SBPM:SL17:UOFF") field(DOL7, "SL3:SBPM:SL17:UOFF") field(DOL8, "SL3:SBPM:SL17:UOFF") field(DOL9, "SL3:SBPM:SL17:UOFF") field(DOLA, "SL3:SBPM:SL17:UOFF") field(LNK1, "SL3:SBPM:SL17:UOFF_SEL.A PP") field(LNK2, "SL3:SBPM:SL17:UOFF_SEL.B PP") field(LNK3, "SL3:SBPM:SL17:UOFF_SEL.C PP") field(LNK4, "SL3:SBPM:SL17:UOFF_SEL.D PP") field(LNK5, "SL3:SBPM:SL17:UOFF_SEL.E PP") field(LNK6, "SL3:SBPM:SL17:UOFF_SEL.F PP") field(LNK7, "SL3:SBPM:SL17:UOFF_SEL.G PP") field(LNK8, "SL3:SBPM:SL17:UOFF_SEL.H PP") field(LNK9, "SL3:SBPM:SL17:UOFF_SEL.I PP") field(LNKA, "SL3:SBPM:SL17:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL17:UOFF_SEL") field(OUTA, "SL3:SBPM:SL17:U.AOFF CA") field(OUTB, "SL3:SBPM:SL17:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL17:UOFF_CTRL") { field(INPA, "SL3:SBPM:SL17:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL17:VOFF") field(DOL2, "SL3:SBPM:SL17:VOFF") field(DOL3, "SL3:SBPM:SL17:VOFF") field(DOL4, "SL3:SBPM:SL17:VOFF") field(DOL5, "SL3:SBPM:SL17:VOFF") field(DOL6, "SL3:SBPM:SL17:VOFF") field(DOL7, "SL3:SBPM:SL17:VOFF") field(DOL8, "SL3:SBPM:SL17:VOFF") field(DOL9, "SL3:SBPM:SL17:VOFF") field(DOLA, "SL3:SBPM:SL17:VOFF") field(LNK1, "SL3:SBPM:SL17:VOFF_SEL.A PP") field(LNK2, "SL3:SBPM:SL17:VOFF_SEL.B PP") field(LNK3, "SL3:SBPM:SL17:VOFF_SEL.C PP") field(LNK4, "SL3:SBPM:SL17:VOFF_SEL.D PP") field(LNK5, "SL3:SBPM:SL17:VOFF_SEL.E PP") field(LNK6, "SL3:SBPM:SL17:VOFF_SEL.F PP") field(LNK7, "SL3:SBPM:SL17:VOFF_SEL.G PP") field(LNK8, "SL3:SBPM:SL17:VOFF_SEL.H PP") field(LNK9, "SL3:SBPM:SL17:VOFF_SEL.I PP") field(LNKA, "SL3:SBPM:SL17:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL17:VOFF_SEL") field(OUTA, "SL3:SBPM:SL17:V.AOFF CA") field(OUTB, "SL3:SBPM:SL17:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL17:VOFF_CTRL") { field(INPA, "SL3:SBPM:SL17:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL17:USCL") field(DOL2, "SL3:SBPM:SL17:USCL") field(DOL3, "SL3:SBPM:SL17:USCL") field(DOL4, "SL3:SBPM:SL17:USCL") field(DOL5, "SL3:SBPM:SL17:USCL") field(DOL6, "SL3:SBPM:SL17:USCL") field(DOL7, "SL3:SBPM:SL17:USCL") field(DOL8, "SL3:SBPM:SL17:USCL") field(DOL9, "SL3:SBPM:SL17:USCL") field(DOLA, "SL3:SBPM:SL17:USCL") field(LNK1, "SL3:SBPM:SL17:USCL_SEL.A PP") field(LNK2, "SL3:SBPM:SL17:USCL_SEL.B PP") field(LNK3, "SL3:SBPM:SL17:USCL_SEL.C PP") field(LNK4, "SL3:SBPM:SL17:USCL_SEL.D PP") field(LNK5, "SL3:SBPM:SL17:USCL_SEL.E PP") field(LNK6, "SL3:SBPM:SL17:USCL_SEL.F PP") field(LNK7, "SL3:SBPM:SL17:USCL_SEL.G PP") field(LNK8, "SL3:SBPM:SL17:USCL_SEL.H PP") field(LNK9, "SL3:SBPM:SL17:USCL_SEL.I PP") field(LNKA, "SL3:SBPM:SL17:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL17:USCL_SEL") field(OUTA, "SL3:SBPM:SL17:U.ASLO CA") field(OUTB, "SL3:SBPM:SL17:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL17:USCL_CTRL") { field(INPA, "SL3:SBPM:SL17:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL17:VSCL") field(DOL2, "SL3:SBPM:SL17:VSCL") field(DOL3, "SL3:SBPM:SL17:VSCL") field(DOL4, "SL3:SBPM:SL17:VSCL") field(DOL5, "SL3:SBPM:SL17:VSCL") field(DOL6, "SL3:SBPM:SL17:VSCL") field(DOL7, "SL3:SBPM:SL17:VSCL") field(DOL8, "SL3:SBPM:SL17:VSCL") field(DOL9, "SL3:SBPM:SL17:VSCL") field(DOLA, "SL3:SBPM:SL17:VSCL") field(LNK1, "SL3:SBPM:SL17:VSCL_SEL.A PP") field(LNK2, "SL3:SBPM:SL17:VSCL_SEL.B PP") field(LNK3, "SL3:SBPM:SL17:VSCL_SEL.C PP") field(LNK4, "SL3:SBPM:SL17:VSCL_SEL.D PP") field(LNK5, "SL3:SBPM:SL17:VSCL_SEL.E PP") field(LNK6, "SL3:SBPM:SL17:VSCL_SEL.F PP") field(LNK7, "SL3:SBPM:SL17:VSCL_SEL.G PP") field(LNK8, "SL3:SBPM:SL17:VSCL_SEL.H PP") field(LNK9, "SL3:SBPM:SL17:VSCL_SEL.I PP") field(LNKA, "SL3:SBPM:SL17:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL17:VSCL_SEL") field(OUTA, "SL3:SBPM:SL17:V.ASLO CA") field(OUTB, "SL3:SBPM:SL17:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL17:VSCL_CTRL") { field(INPA, "SL3:SBPM:SL17:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL17:PHI") field(DOL2, "SL3:SBPM:SL17:PHI") field(DOL3, "SL3:SBPM:SL17:PHI") field(DOL4, "SL3:SBPM:SL17:PHI") field(DOL5, "SL3:SBPM:SL17:PHI") field(DOL6, "SL3:SBPM:SL17:PHI") field(DOL7, "SL3:SBPM:SL17:PHI") field(DOL8, "SL3:SBPM:SL17:PHI") field(DOL9, "SL3:SBPM:SL17:PHI") field(DOLA, "SL3:SBPM:SL17:PHI") field(LNK1, "SL3:SBPM:SL17:PHI_SEL.A PP") field(LNK2, "SL3:SBPM:SL17:PHI_SEL.B PP") field(LNK3, "SL3:SBPM:SL17:PHI_SEL.C PP") field(LNK4, "SL3:SBPM:SL17:PHI_SEL.D PP") field(LNK5, "SL3:SBPM:SL17:PHI_SEL.E PP") field(LNK6, "SL3:SBPM:SL17:PHI_SEL.F PP") field(LNK7, "SL3:SBPM:SL17:PHI_SEL.G PP") field(LNK8, "SL3:SBPM:SL17:PHI_SEL.H PP") field(LNK9, "SL3:SBPM:SL17:PHI_SEL.I PP") field(LNKA, "SL3:SBPM:SL17:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL17:PHI_SEL") field(OUTA, "SL3:SBPM:SL17:CALC.E CA") field(OUTB, "SL3:SBPM:SL17:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL17:PHI_CTRL") { field(INPA, "SL3:SBPM:SL17:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL17:PSI") field(DOL2, "SL3:SBPM:SL17:PSI") field(DOL3, "SL3:SBPM:SL17:PSI") field(DOL4, "SL3:SBPM:SL17:PSI") field(DOL5, "SL3:SBPM:SL17:PSI") field(DOL6, "SL3:SBPM:SL17:PSI") field(DOL7, "SL3:SBPM:SL17:PSI") field(DOL8, "SL3:SBPM:SL17:PSI") field(DOL9, "SL3:SBPM:SL17:PSI") field(DOLA, "SL3:SBPM:SL17:PSI") field(LNK1, "SL3:SBPM:SL17:PSI_SEL.A PP") field(LNK2, "SL3:SBPM:SL17:PSI_SEL.B PP") field(LNK3, "SL3:SBPM:SL17:PSI_SEL.C PP") field(LNK4, "SL3:SBPM:SL17:PSI_SEL.D PP") field(LNK5, "SL3:SBPM:SL17:PSI_SEL.E PP") field(LNK6, "SL3:SBPM:SL17:PSI_SEL.F PP") field(LNK7, "SL3:SBPM:SL17:PSI_SEL.G PP") field(LNK8, "SL3:SBPM:SL17:PSI_SEL.H PP") field(LNK9, "SL3:SBPM:SL17:PSI_SEL.I PP") field(LNKA, "SL3:SBPM:SL17:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL17:PSI_SEL") field(OUTA, "SL3:SBPM:SL17:CALC.F CA") field(OUTB, "SL3:SBPM:SL17:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL17:PSI_CTRL") { field(INPA, "SL3:SBPM:SL17:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL17:PSI_SEL.L PP") } record(longout, "SL3:SBPM:SL17: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, "SL3:SBPM:SL18:GRN") { field(DESC, "GRN Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C2 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, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:RED") { field(DESC, "RED Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C2 S1") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:BLU") { field(DESC, "BLU Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C2 S2") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:YLO") { field(DESC, "YLO Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C2 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, "SL3:SBPM:SL18:REDW") { field(DESC, "Raw CAL RED Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C2 S1") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "SL3:SBPM:SL18:GRNW") { field(DESC, "Raw CAL GRN Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C2 S2") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "SL3:SBPM:SL18: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, "#C2 S7") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "SL3:SBPM:SL18:REDDBG") { field(DESC, "Raw CAL RED Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C2 S8 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "SL3:SBPM:SL18:GRNDBG") { field(DESC, "Raw CAL GRN Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C2 S9 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(ai, "SL3:SBPM:SL18:GRUV") { field(DESC, "CAL Gain GRN/RED") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C2 S0") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") } record(ai, "SL3:SBPM:SL18:GRU") { field(DESC, "CAL Gain GRN/BLU") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C2 S1") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "SL3:SBPM:SL18:GRV") { field(DESC, "CAL Gain RED/YLO") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C2 S2") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "SL3:SBPM:SL18: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, "#C2 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, "SL3:SBPM:SL18: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, "#C2 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, "SL3:SBPM:SL18: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, "#C2 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, "SL3:SBPM:SL18: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, "#C2 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(bo, "SL3:SBPM:SL18:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL18:CALC.K NPP MS") field(ZNAM, "Off") field(ONAM, "On") field(VAL, "0") 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, "SL3:SBPM:SL18:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "SL3:SBPM:SL18:ATT1 CP") field(INPC, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "SL3:SBPM:SL18:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL18:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL18:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "SL3:SBPM:SL18:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL18:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL18:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "SL3:SBPM:SL18:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "SL3:SBPM:SL18:RSTA.SEVR MS NPP") field(INPB, "SL3:SBPM:SL18:TMIT.SEVR MS NPP") field(INPC, "SL3:SBPM:SL18:Y.SEVR MS NPP") field(INPD, "SL3:SBPM:SL18:X.SEVR MS NPP") field(INPE, "SL3:SBPM:SL18:TGRN.SEVR MS NPP") field(INPF, "SL3:SBPM:SL18:TRED.SEVR MS NPP") field(INPG, "SL3:SBPM:SL18:TBLU.SEVR MS NPP") field(INPH, "SL3:SBPM:SL18:TYLO.SEVR MS NPP") field(INPI, "SL3:SBPM:SL18:GRU.SEVR MS NPP") field(INPJ, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "SL3:SBPM:SL18:RSTA_ALH.SEVR MS NPP") field(INPB, "SL3:SBPM:SL18:GRU.SEVR MS NPP") field(INPC, "SL3:SBPM:SL18:GRV.SEVR MS NPP") field(INPD, "SL3:SBPM:SL18:CHK.SEVR MS NPP") # for optional additional alarm input: field(INPE, "") } # snapshot PV for the bpm values display record(ai, "SL3:SBPM:SL18:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "SL3:SBPM:SL18:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SL3:SBPM:SL18:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SL3:SBPM:SL18:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "2") field(SCAN, "Passive") } record(bo, "SL3:SBPM:SL18:PINC_ENA") { field(DESC, "Simple Pincushion Alg") field(DTYP, "BusAddress") field(OUT, "#C0S2@drvBpmStriplPincEna,m32") field(MASK, "4") field(ZNAM, "DISABLED") field(ONAM, "ENABLED") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } record(ao, "SL3:SBPM:SL18:UDR_THRES") { field(DESC, "Detection Underrange Threshold") field(DTYP, "Bpm Parameters") field(OUT, "#C2S0") 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, "SL3:SBPM:SL18:X") { field(DESC, "X Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C2 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, "SL3:SBPM:SL18:Y") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SL3:SBPM:SL18:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C2 S12") field(FLNK, "SL3:SBPM:SL18:TMIT") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SL3:SBPM:SL18:TMIT") { field(DESC, "Charge Estimate") field(DTYP, "Raw Bpm Signal") field(INP, "#C2 S13") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") # FLINK into BSA field(FLNK, "SL3:SBPM:SL18:EFX.PROC") field(ASG, "") field(TSE, "-2") 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, "SL3:SBPM:SL18:RWAV") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C2 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, "SL3:SBPM:SL18:U") { field(DESC, "Raw U Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C2 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, "SL3:SBPM:SL18:V") } record(ai, "SL3:SBPM:SL18:V") { field(DESC, "Raw V Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C2 S9") field(SCAN, "Passive") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "SL3:SBPM:SL18:PINC") } record(ai, "SL3:SBPM:SL18:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C2 S10") field(SCAN, "Passive") } record(longin, "SL3:SBPM:SL18:RSTA") { field(DESC, "Status of Raw Processor") field(DTYP, "Bpm Raw Status") field(INP, "#C2S0") field(SCAN, "1 second") field(LOLO, "-1") field(HIHI, "+1") field(HHSV, "INVALID") field(LLSV, "INVALID") field(FLNK, "SL3:SBPM:SL18:RSTA_ALH") } record(calc, "SL3:SBPM:SL18:RSTA_ALH") { field(CALC, "A & B") field(INPA, "SL3:SBPM:SL18:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:PHI_SEQ") } record(ao, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:PSI_SEQ") } #record(dfanout, "SL3:SBPM:SL18:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "SL3:SBPM:SL18:USCL PP MS") # field(OUTB, "SL3:SBPM:SL18:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:UOFF_SEQ") } record(ao, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:VOFF_SEQ") } record(ao, "SL3:SBPM:SL18:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SL3:SBPM:SL18:USCL_SEQ") } record(ao, "SL3:SBPM:SL18:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SL3:SBPM:SL18:VSCL_SEQ") } record(mbbo, "SL3:SBPM:SL18:ACCESS") { field(DESC, "BPM On Line") field(DTYP, "StreamSwitch") field(OUT, "#C2 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, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMSL18") field(PINI, "YES") } record(stringin, "SBPMSL18:NAME") { field(DESC, "BPM Name") field(VAL, "SL3:SBPM:SL18") field(PINI, "YES") } record(ai, "SL3:SBPM:SL18:X_SLOW") { #alias("SL3:SBPM:SL18:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SL3:SBPM:SL18:X MS") field(FLNK, "SL3:SBPM:SL18:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SL3:SBPM:SL18:Y_SLOW") { #alias("SL3:SBPM:SL18:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SL3:SBPM:SL18:Y NPP MS") field(FLNK, "SL3:SBPM:SL18:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SL3:SBPM:SL18:TMIT_SLOW") { #alias("SL3:SBPM:SL18:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "SL3:SBPM:SL18:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } # Slowly updating PVs for displays # May point to either SW- or FW-calculated # values, depending on architecture # Set dispsuffix macro to "F" to use FW values record(ai, "SL3:SBPM:SL18:XDISP") { field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SL3:SBPM:SL18:X_SLOW MS CA") field(FLNK, "SL3:SBPM:SL18:YDISP") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SL3:SBPM:SL18:YDISP") { field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SL3:SBPM:SL18:Y_SLOW MS CA") field(FLNK, "SL3:SBPM:SL18:TMITDISP") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SL3:SBPM:SL18:TMITDISP") { field(DESC, "TMIT snapshot for display") field(INP, "SL3:SBPM:SL18:TMIT_SLOW MS CA") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "SL3:SBPM:SL18:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "SL3:SBPM:SL18:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "SL3:SBPM:SL18:SIMC PP") } record(calcout, "SL3:SBPM:SL18:SIM") { field(DESC, "BPM Pos. Simulation") field(DTYP, "Strip Signal Simulator") field(OUT, "2") #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, "SL3:SBPM:SL18:USCL") field(INPL, "0") } # Switch simulation record SL3:SBPM:SL18:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "SL3:SBPM:SL18:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL18:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SL3:SBPM:SL18:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL18:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SL3:SBPM:SL18:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL18:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "SL3:SBPM:SL18:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL18:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "SL3:SBPM:SL18:DIGISIMW") { field(DESC, "VME Digi Sim. Waveform") field(DTYP, "VmeDigi Sim Wav") field(OUT, "#C2 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, "SL3:SBPM:SL18:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "SL3:SBPM:SL18:MPSBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C0S2@bpmMPS+0,m32") field(MASK, "4") 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, "SL3:SBPM:SL18:MPSLTBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C1S2@bpmMPS+0,m32") field(MASK, "4") 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, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL18:UOFF") field(DOL2, "SL3:SBPM:SL18:UOFF") field(DOL3, "SL3:SBPM:SL18:UOFF") field(DOL4, "SL3:SBPM:SL18:UOFF") field(DOL5, "SL3:SBPM:SL18:UOFF") field(DOL6, "SL3:SBPM:SL18:UOFF") field(DOL7, "SL3:SBPM:SL18:UOFF") field(DOL8, "SL3:SBPM:SL18:UOFF") field(DOL9, "SL3:SBPM:SL18:UOFF") field(DOLA, "SL3:SBPM:SL18:UOFF") field(LNK1, "SL3:SBPM:SL18:UOFF_SEL.A PP") field(LNK2, "SL3:SBPM:SL18:UOFF_SEL.B PP") field(LNK3, "SL3:SBPM:SL18:UOFF_SEL.C PP") field(LNK4, "SL3:SBPM:SL18:UOFF_SEL.D PP") field(LNK5, "SL3:SBPM:SL18:UOFF_SEL.E PP") field(LNK6, "SL3:SBPM:SL18:UOFF_SEL.F PP") field(LNK7, "SL3:SBPM:SL18:UOFF_SEL.G PP") field(LNK8, "SL3:SBPM:SL18:UOFF_SEL.H PP") field(LNK9, "SL3:SBPM:SL18:UOFF_SEL.I PP") field(LNKA, "SL3:SBPM:SL18:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL18:UOFF_SEL") field(OUTA, "SL3:SBPM:SL18:U.AOFF CA") field(OUTB, "SL3:SBPM:SL18:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL18:UOFF_CTRL") { field(INPA, "SL3:SBPM:SL18:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL18:VOFF") field(DOL2, "SL3:SBPM:SL18:VOFF") field(DOL3, "SL3:SBPM:SL18:VOFF") field(DOL4, "SL3:SBPM:SL18:VOFF") field(DOL5, "SL3:SBPM:SL18:VOFF") field(DOL6, "SL3:SBPM:SL18:VOFF") field(DOL7, "SL3:SBPM:SL18:VOFF") field(DOL8, "SL3:SBPM:SL18:VOFF") field(DOL9, "SL3:SBPM:SL18:VOFF") field(DOLA, "SL3:SBPM:SL18:VOFF") field(LNK1, "SL3:SBPM:SL18:VOFF_SEL.A PP") field(LNK2, "SL3:SBPM:SL18:VOFF_SEL.B PP") field(LNK3, "SL3:SBPM:SL18:VOFF_SEL.C PP") field(LNK4, "SL3:SBPM:SL18:VOFF_SEL.D PP") field(LNK5, "SL3:SBPM:SL18:VOFF_SEL.E PP") field(LNK6, "SL3:SBPM:SL18:VOFF_SEL.F PP") field(LNK7, "SL3:SBPM:SL18:VOFF_SEL.G PP") field(LNK8, "SL3:SBPM:SL18:VOFF_SEL.H PP") field(LNK9, "SL3:SBPM:SL18:VOFF_SEL.I PP") field(LNKA, "SL3:SBPM:SL18:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL18:VOFF_SEL") field(OUTA, "SL3:SBPM:SL18:V.AOFF CA") field(OUTB, "SL3:SBPM:SL18:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL18:VOFF_CTRL") { field(INPA, "SL3:SBPM:SL18:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL18:USCL") field(DOL2, "SL3:SBPM:SL18:USCL") field(DOL3, "SL3:SBPM:SL18:USCL") field(DOL4, "SL3:SBPM:SL18:USCL") field(DOL5, "SL3:SBPM:SL18:USCL") field(DOL6, "SL3:SBPM:SL18:USCL") field(DOL7, "SL3:SBPM:SL18:USCL") field(DOL8, "SL3:SBPM:SL18:USCL") field(DOL9, "SL3:SBPM:SL18:USCL") field(DOLA, "SL3:SBPM:SL18:USCL") field(LNK1, "SL3:SBPM:SL18:USCL_SEL.A PP") field(LNK2, "SL3:SBPM:SL18:USCL_SEL.B PP") field(LNK3, "SL3:SBPM:SL18:USCL_SEL.C PP") field(LNK4, "SL3:SBPM:SL18:USCL_SEL.D PP") field(LNK5, "SL3:SBPM:SL18:USCL_SEL.E PP") field(LNK6, "SL3:SBPM:SL18:USCL_SEL.F PP") field(LNK7, "SL3:SBPM:SL18:USCL_SEL.G PP") field(LNK8, "SL3:SBPM:SL18:USCL_SEL.H PP") field(LNK9, "SL3:SBPM:SL18:USCL_SEL.I PP") field(LNKA, "SL3:SBPM:SL18:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL18:USCL_SEL") field(OUTA, "SL3:SBPM:SL18:U.ASLO CA") field(OUTB, "SL3:SBPM:SL18:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL18:USCL_CTRL") { field(INPA, "SL3:SBPM:SL18:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL18:VSCL") field(DOL2, "SL3:SBPM:SL18:VSCL") field(DOL3, "SL3:SBPM:SL18:VSCL") field(DOL4, "SL3:SBPM:SL18:VSCL") field(DOL5, "SL3:SBPM:SL18:VSCL") field(DOL6, "SL3:SBPM:SL18:VSCL") field(DOL7, "SL3:SBPM:SL18:VSCL") field(DOL8, "SL3:SBPM:SL18:VSCL") field(DOL9, "SL3:SBPM:SL18:VSCL") field(DOLA, "SL3:SBPM:SL18:VSCL") field(LNK1, "SL3:SBPM:SL18:VSCL_SEL.A PP") field(LNK2, "SL3:SBPM:SL18:VSCL_SEL.B PP") field(LNK3, "SL3:SBPM:SL18:VSCL_SEL.C PP") field(LNK4, "SL3:SBPM:SL18:VSCL_SEL.D PP") field(LNK5, "SL3:SBPM:SL18:VSCL_SEL.E PP") field(LNK6, "SL3:SBPM:SL18:VSCL_SEL.F PP") field(LNK7, "SL3:SBPM:SL18:VSCL_SEL.G PP") field(LNK8, "SL3:SBPM:SL18:VSCL_SEL.H PP") field(LNK9, "SL3:SBPM:SL18:VSCL_SEL.I PP") field(LNKA, "SL3:SBPM:SL18:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL18:VSCL_SEL") field(OUTA, "SL3:SBPM:SL18:V.ASLO CA") field(OUTB, "SL3:SBPM:SL18:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL18:VSCL_CTRL") { field(INPA, "SL3:SBPM:SL18:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL18:PHI") field(DOL2, "SL3:SBPM:SL18:PHI") field(DOL3, "SL3:SBPM:SL18:PHI") field(DOL4, "SL3:SBPM:SL18:PHI") field(DOL5, "SL3:SBPM:SL18:PHI") field(DOL6, "SL3:SBPM:SL18:PHI") field(DOL7, "SL3:SBPM:SL18:PHI") field(DOL8, "SL3:SBPM:SL18:PHI") field(DOL9, "SL3:SBPM:SL18:PHI") field(DOLA, "SL3:SBPM:SL18:PHI") field(LNK1, "SL3:SBPM:SL18:PHI_SEL.A PP") field(LNK2, "SL3:SBPM:SL18:PHI_SEL.B PP") field(LNK3, "SL3:SBPM:SL18:PHI_SEL.C PP") field(LNK4, "SL3:SBPM:SL18:PHI_SEL.D PP") field(LNK5, "SL3:SBPM:SL18:PHI_SEL.E PP") field(LNK6, "SL3:SBPM:SL18:PHI_SEL.F PP") field(LNK7, "SL3:SBPM:SL18:PHI_SEL.G PP") field(LNK8, "SL3:SBPM:SL18:PHI_SEL.H PP") field(LNK9, "SL3:SBPM:SL18:PHI_SEL.I PP") field(LNKA, "SL3:SBPM:SL18:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL18:PHI_SEL") field(OUTA, "SL3:SBPM:SL18:CALC.E CA") field(OUTB, "SL3:SBPM:SL18:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL18:PHI_CTRL") { field(INPA, "SL3:SBPM:SL18:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL18:PSI") field(DOL2, "SL3:SBPM:SL18:PSI") field(DOL3, "SL3:SBPM:SL18:PSI") field(DOL4, "SL3:SBPM:SL18:PSI") field(DOL5, "SL3:SBPM:SL18:PSI") field(DOL6, "SL3:SBPM:SL18:PSI") field(DOL7, "SL3:SBPM:SL18:PSI") field(DOL8, "SL3:SBPM:SL18:PSI") field(DOL9, "SL3:SBPM:SL18:PSI") field(DOLA, "SL3:SBPM:SL18:PSI") field(LNK1, "SL3:SBPM:SL18:PSI_SEL.A PP") field(LNK2, "SL3:SBPM:SL18:PSI_SEL.B PP") field(LNK3, "SL3:SBPM:SL18:PSI_SEL.C PP") field(LNK4, "SL3:SBPM:SL18:PSI_SEL.D PP") field(LNK5, "SL3:SBPM:SL18:PSI_SEL.E PP") field(LNK6, "SL3:SBPM:SL18:PSI_SEL.F PP") field(LNK7, "SL3:SBPM:SL18:PSI_SEL.G PP") field(LNK8, "SL3:SBPM:SL18:PSI_SEL.H PP") field(LNK9, "SL3:SBPM:SL18:PSI_SEL.I PP") field(LNKA, "SL3:SBPM:SL18:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL18:PSI_SEL") field(OUTA, "SL3:SBPM:SL18:CALC.F CA") field(OUTB, "SL3:SBPM:SL18:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL18:PSI_CTRL") { field(INPA, "SL3:SBPM:SL18:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL18:PSI_SEL.L PP") } record(longout, "SL3:SBPM:SL18: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, "SL3:SBPM:SL19:GRN") { field(DESC, "GRN Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C3 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, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:RED") { field(DESC, "RED Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C3 S1") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:BLU") { field(DESC, "BLU Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C3 S2") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:YLO") { field(DESC, "YLO Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C3 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, "SL3:SBPM:SL19:REDW") { field(DESC, "Raw CAL RED Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C3 S1") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "SL3:SBPM:SL19:GRNW") { field(DESC, "Raw CAL GRN Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C3 S2") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "SL3:SBPM:SL19: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, "#C3 S7") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "SL3:SBPM:SL19:REDDBG") { field(DESC, "Raw CAL RED Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C3 S8 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "SL3:SBPM:SL19:GRNDBG") { field(DESC, "Raw CAL GRN Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C3 S9 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(ai, "SL3:SBPM:SL19:GRUV") { field(DESC, "CAL Gain GRN/RED") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C3 S0") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") } record(ai, "SL3:SBPM:SL19:GRU") { field(DESC, "CAL Gain GRN/BLU") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C3 S1") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "SL3:SBPM:SL19:GRV") { field(DESC, "CAL Gain RED/YLO") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C3 S2") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "SL3:SBPM:SL19: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, "#C3 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, "SL3:SBPM:SL19: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, "#C3 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, "SL3:SBPM:SL19: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, "#C3 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, "SL3:SBPM:SL19: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, "#C3 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(bo, "SL3:SBPM:SL19:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL19:CALC.K NPP MS") field(ZNAM, "Off") field(ONAM, "On") field(VAL, "0") 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, "SL3:SBPM:SL19:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "SL3:SBPM:SL19:ATT1 CP") field(INPC, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "SL3:SBPM:SL19:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL19:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL19:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "SL3:SBPM:SL19:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL19:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL19:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "SL3:SBPM:SL19:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "SL3:SBPM:SL19:RSTA.SEVR MS NPP") field(INPB, "SL3:SBPM:SL19:TMIT.SEVR MS NPP") field(INPC, "SL3:SBPM:SL19:Y.SEVR MS NPP") field(INPD, "SL3:SBPM:SL19:X.SEVR MS NPP") field(INPE, "SL3:SBPM:SL19:TGRN.SEVR MS NPP") field(INPF, "SL3:SBPM:SL19:TRED.SEVR MS NPP") field(INPG, "SL3:SBPM:SL19:TBLU.SEVR MS NPP") field(INPH, "SL3:SBPM:SL19:TYLO.SEVR MS NPP") field(INPI, "SL3:SBPM:SL19:GRU.SEVR MS NPP") field(INPJ, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "SL3:SBPM:SL19:RSTA_ALH.SEVR MS NPP") field(INPB, "SL3:SBPM:SL19:GRU.SEVR MS NPP") field(INPC, "SL3:SBPM:SL19:GRV.SEVR MS NPP") field(INPD, "SL3:SBPM:SL19:CHK.SEVR MS NPP") # for optional additional alarm input: field(INPE, "") } # snapshot PV for the bpm values display record(ai, "SL3:SBPM:SL19:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "SL3:SBPM:SL19:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SL3:SBPM:SL19:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SL3:SBPM:SL19:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "3") field(SCAN, "Passive") } record(bo, "SL3:SBPM:SL19:PINC_ENA") { field(DESC, "Simple Pincushion Alg") field(DTYP, "BusAddress") field(OUT, "#C0S2@drvBpmStriplPincEna,m32") field(MASK, "8") field(ZNAM, "DISABLED") field(ONAM, "ENABLED") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } record(ao, "SL3:SBPM:SL19:UDR_THRES") { field(DESC, "Detection Underrange Threshold") field(DTYP, "Bpm Parameters") field(OUT, "#C3S0") 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, "SL3:SBPM:SL19:X") { field(DESC, "X Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C3 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, "SL3:SBPM:SL19:Y") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SL3:SBPM:SL19:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C3 S12") field(FLNK, "SL3:SBPM:SL19:TMIT") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SL3:SBPM:SL19:TMIT") { field(DESC, "Charge Estimate") field(DTYP, "Raw Bpm Signal") field(INP, "#C3 S13") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") # FLINK into BSA field(FLNK, "SL3:SBPM:SL19:EFX.PROC") field(ASG, "") field(TSE, "-2") 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, "SL3:SBPM:SL19:RWAV") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C3 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, "SL3:SBPM:SL19:U") { field(DESC, "Raw U Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C3 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, "SL3:SBPM:SL19:V") } record(ai, "SL3:SBPM:SL19:V") { field(DESC, "Raw V Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C3 S9") field(SCAN, "Passive") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "SL3:SBPM:SL19:PINC") } record(ai, "SL3:SBPM:SL19:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C3 S10") field(SCAN, "Passive") } record(longin, "SL3:SBPM:SL19:RSTA") { field(DESC, "Status of Raw Processor") field(DTYP, "Bpm Raw Status") field(INP, "#C3S0") field(SCAN, "1 second") field(LOLO, "-1") field(HIHI, "+1") field(HHSV, "INVALID") field(LLSV, "INVALID") field(FLNK, "SL3:SBPM:SL19:RSTA_ALH") } record(calc, "SL3:SBPM:SL19:RSTA_ALH") { field(CALC, "A & B") field(INPA, "SL3:SBPM:SL19:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:PHI_SEQ") } record(ao, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:PSI_SEQ") } #record(dfanout, "SL3:SBPM:SL19:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "SL3:SBPM:SL19:USCL PP MS") # field(OUTB, "SL3:SBPM:SL19:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:UOFF_SEQ") } record(ao, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:VOFF_SEQ") } record(ao, "SL3:SBPM:SL19:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SL3:SBPM:SL19:USCL_SEQ") } record(ao, "SL3:SBPM:SL19:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SL3:SBPM:SL19:VSCL_SEQ") } record(mbbo, "SL3:SBPM:SL19:ACCESS") { field(DESC, "BPM On Line") field(DTYP, "StreamSwitch") field(OUT, "#C3 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, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMSL19") field(PINI, "YES") } record(stringin, "SBPMSL19:NAME") { field(DESC, "BPM Name") field(VAL, "SL3:SBPM:SL19") field(PINI, "YES") } record(ai, "SL3:SBPM:SL19:X_SLOW") { #alias("SL3:SBPM:SL19:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SL3:SBPM:SL19:X MS") field(FLNK, "SL3:SBPM:SL19:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SL3:SBPM:SL19:Y_SLOW") { #alias("SL3:SBPM:SL19:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SL3:SBPM:SL19:Y NPP MS") field(FLNK, "SL3:SBPM:SL19:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SL3:SBPM:SL19:TMIT_SLOW") { #alias("SL3:SBPM:SL19:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "SL3:SBPM:SL19:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } # Slowly updating PVs for displays # May point to either SW- or FW-calculated # values, depending on architecture # Set dispsuffix macro to "F" to use FW values record(ai, "SL3:SBPM:SL19:XDISP") { field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SL3:SBPM:SL19:X_SLOW MS CA") field(FLNK, "SL3:SBPM:SL19:YDISP") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SL3:SBPM:SL19:YDISP") { field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SL3:SBPM:SL19:Y_SLOW MS CA") field(FLNK, "SL3:SBPM:SL19:TMITDISP") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SL3:SBPM:SL19:TMITDISP") { field(DESC, "TMIT snapshot for display") field(INP, "SL3:SBPM:SL19:TMIT_SLOW MS CA") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "SL3:SBPM:SL19:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "SL3:SBPM:SL19:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "SL3:SBPM:SL19:SIMC PP") } record(calcout, "SL3:SBPM:SL19:SIM") { field(DESC, "BPM Pos. Simulation") field(DTYP, "Strip Signal Simulator") field(OUT, "3") #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, "SL3:SBPM:SL19:USCL") field(INPL, "0") } # Switch simulation record SL3:SBPM:SL19:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "SL3:SBPM:SL19:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL19:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SL3:SBPM:SL19:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL19:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SL3:SBPM:SL19:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL19:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "SL3:SBPM:SL19:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "SL3:SBPM:SL19:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "SL3:SBPM:SL19:DIGISIMW") { field(DESC, "VME Digi Sim. Waveform") field(DTYP, "VmeDigi Sim Wav") field(OUT, "#C3 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, "SL3:SBPM:SL19:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "SL3:SBPM:SL19:MPSBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C0S2@bpmMPS+0,m32") field(MASK, "8") 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, "SL3:SBPM:SL19:MPSLTBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C1S2@bpmMPS+0,m32") field(MASK, "8") 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, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL19:UOFF") field(DOL2, "SL3:SBPM:SL19:UOFF") field(DOL3, "SL3:SBPM:SL19:UOFF") field(DOL4, "SL3:SBPM:SL19:UOFF") field(DOL5, "SL3:SBPM:SL19:UOFF") field(DOL6, "SL3:SBPM:SL19:UOFF") field(DOL7, "SL3:SBPM:SL19:UOFF") field(DOL8, "SL3:SBPM:SL19:UOFF") field(DOL9, "SL3:SBPM:SL19:UOFF") field(DOLA, "SL3:SBPM:SL19:UOFF") field(LNK1, "SL3:SBPM:SL19:UOFF_SEL.A PP") field(LNK2, "SL3:SBPM:SL19:UOFF_SEL.B PP") field(LNK3, "SL3:SBPM:SL19:UOFF_SEL.C PP") field(LNK4, "SL3:SBPM:SL19:UOFF_SEL.D PP") field(LNK5, "SL3:SBPM:SL19:UOFF_SEL.E PP") field(LNK6, "SL3:SBPM:SL19:UOFF_SEL.F PP") field(LNK7, "SL3:SBPM:SL19:UOFF_SEL.G PP") field(LNK8, "SL3:SBPM:SL19:UOFF_SEL.H PP") field(LNK9, "SL3:SBPM:SL19:UOFF_SEL.I PP") field(LNKA, "SL3:SBPM:SL19:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL19:UOFF_SEL") field(OUTA, "SL3:SBPM:SL19:U.AOFF CA") field(OUTB, "SL3:SBPM:SL19:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL19:UOFF_CTRL") { field(INPA, "SL3:SBPM:SL19:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL19:VOFF") field(DOL2, "SL3:SBPM:SL19:VOFF") field(DOL3, "SL3:SBPM:SL19:VOFF") field(DOL4, "SL3:SBPM:SL19:VOFF") field(DOL5, "SL3:SBPM:SL19:VOFF") field(DOL6, "SL3:SBPM:SL19:VOFF") field(DOL7, "SL3:SBPM:SL19:VOFF") field(DOL8, "SL3:SBPM:SL19:VOFF") field(DOL9, "SL3:SBPM:SL19:VOFF") field(DOLA, "SL3:SBPM:SL19:VOFF") field(LNK1, "SL3:SBPM:SL19:VOFF_SEL.A PP") field(LNK2, "SL3:SBPM:SL19:VOFF_SEL.B PP") field(LNK3, "SL3:SBPM:SL19:VOFF_SEL.C PP") field(LNK4, "SL3:SBPM:SL19:VOFF_SEL.D PP") field(LNK5, "SL3:SBPM:SL19:VOFF_SEL.E PP") field(LNK6, "SL3:SBPM:SL19:VOFF_SEL.F PP") field(LNK7, "SL3:SBPM:SL19:VOFF_SEL.G PP") field(LNK8, "SL3:SBPM:SL19:VOFF_SEL.H PP") field(LNK9, "SL3:SBPM:SL19:VOFF_SEL.I PP") field(LNKA, "SL3:SBPM:SL19:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL19:VOFF_SEL") field(OUTA, "SL3:SBPM:SL19:V.AOFF CA") field(OUTB, "SL3:SBPM:SL19:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL19:VOFF_CTRL") { field(INPA, "SL3:SBPM:SL19:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL19:USCL") field(DOL2, "SL3:SBPM:SL19:USCL") field(DOL3, "SL3:SBPM:SL19:USCL") field(DOL4, "SL3:SBPM:SL19:USCL") field(DOL5, "SL3:SBPM:SL19:USCL") field(DOL6, "SL3:SBPM:SL19:USCL") field(DOL7, "SL3:SBPM:SL19:USCL") field(DOL8, "SL3:SBPM:SL19:USCL") field(DOL9, "SL3:SBPM:SL19:USCL") field(DOLA, "SL3:SBPM:SL19:USCL") field(LNK1, "SL3:SBPM:SL19:USCL_SEL.A PP") field(LNK2, "SL3:SBPM:SL19:USCL_SEL.B PP") field(LNK3, "SL3:SBPM:SL19:USCL_SEL.C PP") field(LNK4, "SL3:SBPM:SL19:USCL_SEL.D PP") field(LNK5, "SL3:SBPM:SL19:USCL_SEL.E PP") field(LNK6, "SL3:SBPM:SL19:USCL_SEL.F PP") field(LNK7, "SL3:SBPM:SL19:USCL_SEL.G PP") field(LNK8, "SL3:SBPM:SL19:USCL_SEL.H PP") field(LNK9, "SL3:SBPM:SL19:USCL_SEL.I PP") field(LNKA, "SL3:SBPM:SL19:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL19:USCL_SEL") field(OUTA, "SL3:SBPM:SL19:U.ASLO CA") field(OUTB, "SL3:SBPM:SL19:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL19:USCL_CTRL") { field(INPA, "SL3:SBPM:SL19:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL19:VSCL") field(DOL2, "SL3:SBPM:SL19:VSCL") field(DOL3, "SL3:SBPM:SL19:VSCL") field(DOL4, "SL3:SBPM:SL19:VSCL") field(DOL5, "SL3:SBPM:SL19:VSCL") field(DOL6, "SL3:SBPM:SL19:VSCL") field(DOL7, "SL3:SBPM:SL19:VSCL") field(DOL8, "SL3:SBPM:SL19:VSCL") field(DOL9, "SL3:SBPM:SL19:VSCL") field(DOLA, "SL3:SBPM:SL19:VSCL") field(LNK1, "SL3:SBPM:SL19:VSCL_SEL.A PP") field(LNK2, "SL3:SBPM:SL19:VSCL_SEL.B PP") field(LNK3, "SL3:SBPM:SL19:VSCL_SEL.C PP") field(LNK4, "SL3:SBPM:SL19:VSCL_SEL.D PP") field(LNK5, "SL3:SBPM:SL19:VSCL_SEL.E PP") field(LNK6, "SL3:SBPM:SL19:VSCL_SEL.F PP") field(LNK7, "SL3:SBPM:SL19:VSCL_SEL.G PP") field(LNK8, "SL3:SBPM:SL19:VSCL_SEL.H PP") field(LNK9, "SL3:SBPM:SL19:VSCL_SEL.I PP") field(LNKA, "SL3:SBPM:SL19:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL19:VSCL_SEL") field(OUTA, "SL3:SBPM:SL19:V.ASLO CA") field(OUTB, "SL3:SBPM:SL19:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL19:VSCL_CTRL") { field(INPA, "SL3:SBPM:SL19:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL19:PHI") field(DOL2, "SL3:SBPM:SL19:PHI") field(DOL3, "SL3:SBPM:SL19:PHI") field(DOL4, "SL3:SBPM:SL19:PHI") field(DOL5, "SL3:SBPM:SL19:PHI") field(DOL6, "SL3:SBPM:SL19:PHI") field(DOL7, "SL3:SBPM:SL19:PHI") field(DOL8, "SL3:SBPM:SL19:PHI") field(DOL9, "SL3:SBPM:SL19:PHI") field(DOLA, "SL3:SBPM:SL19:PHI") field(LNK1, "SL3:SBPM:SL19:PHI_SEL.A PP") field(LNK2, "SL3:SBPM:SL19:PHI_SEL.B PP") field(LNK3, "SL3:SBPM:SL19:PHI_SEL.C PP") field(LNK4, "SL3:SBPM:SL19:PHI_SEL.D PP") field(LNK5, "SL3:SBPM:SL19:PHI_SEL.E PP") field(LNK6, "SL3:SBPM:SL19:PHI_SEL.F PP") field(LNK7, "SL3:SBPM:SL19:PHI_SEL.G PP") field(LNK8, "SL3:SBPM:SL19:PHI_SEL.H PP") field(LNK9, "SL3:SBPM:SL19:PHI_SEL.I PP") field(LNKA, "SL3:SBPM:SL19:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL19:PHI_SEL") field(OUTA, "SL3:SBPM:SL19:CALC.E CA") field(OUTB, "SL3:SBPM:SL19:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL19:PHI_CTRL") { field(INPA, "SL3:SBPM:SL19:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SL3:SBPM:SL19:PSI") field(DOL2, "SL3:SBPM:SL19:PSI") field(DOL3, "SL3:SBPM:SL19:PSI") field(DOL4, "SL3:SBPM:SL19:PSI") field(DOL5, "SL3:SBPM:SL19:PSI") field(DOL6, "SL3:SBPM:SL19:PSI") field(DOL7, "SL3:SBPM:SL19:PSI") field(DOL8, "SL3:SBPM:SL19:PSI") field(DOL9, "SL3:SBPM:SL19:PSI") field(DOLA, "SL3:SBPM:SL19:PSI") field(LNK1, "SL3:SBPM:SL19:PSI_SEL.A PP") field(LNK2, "SL3:SBPM:SL19:PSI_SEL.B PP") field(LNK3, "SL3:SBPM:SL19:PSI_SEL.C PP") field(LNK4, "SL3:SBPM:SL19:PSI_SEL.D PP") field(LNK5, "SL3:SBPM:SL19:PSI_SEL.E PP") field(LNK6, "SL3:SBPM:SL19:PSI_SEL.F PP") field(LNK7, "SL3:SBPM:SL19:PSI_SEL.G PP") field(LNK8, "SL3:SBPM:SL19:PSI_SEL.H PP") field(LNK9, "SL3:SBPM:SL19:PSI_SEL.I PP") field(LNKA, "SL3:SBPM:SL19:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "SL3:SBPM:SL19:PSI_SEL") field(OUTA, "SL3:SBPM:SL19:CALC.F CA") field(OUTB, "SL3:SBPM:SL19:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SL3:SBPM:SL19:PSI_CTRL") { field(INPA, "SL3:SBPM:SL19:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SL3:SBPM:SL19:PSI_SEL.L PP") } record(longout, "SL3:SBPM:SL19: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, "SBTL:SBPM:SB01:GRN") { field(DESC, "GRN Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C4 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, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:RED") { field(DESC, "RED Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C4 S1") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:BLU") { field(DESC, "BLU Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C4 S2") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:YLO") { field(DESC, "YLO Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C4 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, "SBTL:SBPM:SB01:REDW") { field(DESC, "Raw CAL RED Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C4 S1") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "SBTL:SBPM:SB01:GRNW") { field(DESC, "Raw CAL GRN Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C4 S2") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "SBTL:SBPM:SB01: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, "#C4 S7") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "SBTL:SBPM:SB01:REDDBG") { field(DESC, "Raw CAL RED Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C4 S8 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "SBTL:SBPM:SB01:GRNDBG") { field(DESC, "Raw CAL GRN Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C4 S9 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(ai, "SBTL:SBPM:SB01:GRUV") { field(DESC, "CAL Gain GRN/RED") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C4 S0") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") } record(ai, "SBTL:SBPM:SB01:GRU") { field(DESC, "CAL Gain GRN/BLU") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C4 S1") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "SBTL:SBPM:SB01:GRV") { field(DESC, "CAL Gain RED/YLO") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C4 S2") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "SBTL:SBPM:SB01: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, "#C4 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, "SBTL:SBPM:SB01: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, "#C4 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, "SBTL:SBPM:SB01: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, "#C4 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, "SBTL:SBPM:SB01: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, "#C4 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(bo, "SBTL:SBPM:SB01:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SB01:CALC.K NPP MS") field(ZNAM, "Off") field(ONAM, "On") field(VAL, "0") 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, "SBTL:SBPM:SB01:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "SBTL:SBPM:SB01:ATT1 CP") field(INPC, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "SBTL:SBPM:SB01:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SB01:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SB01:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "SBTL:SBPM:SB01:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SB01:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SB01:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "SBTL:SBPM:SB01:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "SBTL:SBPM:SB01:RSTA.SEVR MS NPP") field(INPB, "SBTL:SBPM:SB01:TMIT.SEVR MS NPP") field(INPC, "SBTL:SBPM:SB01:Y.SEVR MS NPP") field(INPD, "SBTL:SBPM:SB01:X.SEVR MS NPP") field(INPE, "SBTL:SBPM:SB01:TGRN.SEVR MS NPP") field(INPF, "SBTL:SBPM:SB01:TRED.SEVR MS NPP") field(INPG, "SBTL:SBPM:SB01:TBLU.SEVR MS NPP") field(INPH, "SBTL:SBPM:SB01:TYLO.SEVR MS NPP") field(INPI, "SBTL:SBPM:SB01:GRU.SEVR MS NPP") field(INPJ, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "SBTL:SBPM:SB01:RSTA_ALH.SEVR MS NPP") field(INPB, "SBTL:SBPM:SB01:GRU.SEVR MS NPP") field(INPC, "SBTL:SBPM:SB01:GRV.SEVR MS NPP") field(INPD, "SBTL:SBPM:SB01:CHK.SEVR MS NPP") # for optional additional alarm input: field(INPE, "") } # snapshot PV for the bpm values display record(ai, "SBTL:SBPM:SB01:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "SBTL:SBPM:SB01:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SBTL:SBPM:SB01:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SBTL:SBPM:SB01:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "4") field(SCAN, "Passive") } record(bo, "SBTL:SBPM:SB01:PINC_ENA") { field(DESC, "Simple Pincushion Alg") field(DTYP, "BusAddress") field(OUT, "#C0S2@drvBpmStriplPincEna,m32") field(MASK, "16") field(ZNAM, "DISABLED") field(ONAM, "ENABLED") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } record(ao, "SBTL:SBPM:SB01:UDR_THRES") { field(DESC, "Detection Underrange Threshold") field(DTYP, "Bpm Parameters") field(OUT, "#C4S0") 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, "SBTL:SBPM:SB01:X") { field(DESC, "X Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C4 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, "SBTL:SBPM:SB01:Y") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SBTL:SBPM:SB01:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C4 S12") field(FLNK, "SBTL:SBPM:SB01:TMIT") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SBTL:SBPM:SB01:TMIT") { field(DESC, "Charge Estimate") field(DTYP, "Raw Bpm Signal") field(INP, "#C4 S13") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") # FLINK into BSA field(FLNK, "SBTL:SBPM:SB01:EFX.PROC") field(ASG, "") field(TSE, "-2") 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, "SBTL:SBPM:SB01:RWAV") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C4 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, "SBTL:SBPM:SB01:U") { field(DESC, "Raw U Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C4 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, "SBTL:SBPM:SB01:V") } record(ai, "SBTL:SBPM:SB01:V") { field(DESC, "Raw V Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C4 S9") field(SCAN, "Passive") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "SBTL:SBPM:SB01:PINC") } record(ai, "SBTL:SBPM:SB01:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C4 S10") field(SCAN, "Passive") } record(longin, "SBTL:SBPM:SB01:RSTA") { field(DESC, "Status of Raw Processor") field(DTYP, "Bpm Raw Status") field(INP, "#C4S0") field(SCAN, "1 second") field(LOLO, "-1") field(HIHI, "+1") field(HHSV, "INVALID") field(LLSV, "INVALID") field(FLNK, "SBTL:SBPM:SB01:RSTA_ALH") } record(calc, "SBTL:SBPM:SB01:RSTA_ALH") { field(CALC, "A & B") field(INPA, "SBTL:SBPM:SB01:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:PHI_SEQ") } record(ao, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:PSI_SEQ") } #record(dfanout, "SBTL:SBPM:SB01:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "SBTL:SBPM:SB01:USCL PP MS") # field(OUTB, "SBTL:SBPM:SB01:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:UOFF_SEQ") } record(ao, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:VOFF_SEQ") } record(ao, "SBTL:SBPM:SB01:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SBTL:SBPM:SB01:USCL_SEQ") } record(ao, "SBTL:SBPM:SB01:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SBTL:SBPM:SB01:VSCL_SEQ") } record(mbbo, "SBTL:SBPM:SB01:ACCESS") { field(DESC, "BPM On Line") field(DTYP, "StreamSwitch") field(OUT, "#C4 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, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMSB01") field(PINI, "YES") } record(stringin, "SBPMSB01:NAME") { field(DESC, "BPM Name") field(VAL, "SBTL:SBPM:SB01") field(PINI, "YES") } record(ai, "SBTL:SBPM:SB01:X_SLOW") { #alias("SBTL:SBPM:SB01:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SB01:X MS") field(FLNK, "SBTL:SBPM:SB01:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SB01:Y_SLOW") { #alias("SBTL:SBPM:SB01:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SB01:Y NPP MS") field(FLNK, "SBTL:SBPM:SB01:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SB01:TMIT_SLOW") { #alias("SBTL:SBPM:SB01:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "SBTL:SBPM:SB01:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } # Slowly updating PVs for displays # May point to either SW- or FW-calculated # values, depending on architecture # Set dispsuffix macro to "F" to use FW values record(ai, "SBTL:SBPM:SB01:XDISP") { field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SB01:X_SLOW MS CA") field(FLNK, "SBTL:SBPM:SB01:YDISP") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SB01:YDISP") { field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SB01:Y_SLOW MS CA") field(FLNK, "SBTL:SBPM:SB01:TMITDISP") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SB01:TMITDISP") { field(DESC, "TMIT snapshot for display") field(INP, "SBTL:SBPM:SB01:TMIT_SLOW MS CA") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "SBTL:SBPM:SB01:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "SBTL:SBPM:SB01:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "SBTL:SBPM:SB01:SIMC PP") } record(calcout, "SBTL:SBPM:SB01:SIM") { field(DESC, "BPM Pos. Simulation") field(DTYP, "Strip Signal Simulator") field(OUT, "4") #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, "SBTL:SBPM:SB01:USCL") field(INPL, "0") } # Switch simulation record SBTL:SBPM:SB01:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "SBTL:SBPM:SB01:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SB01:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SBTL:SBPM:SB01:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SB01:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SBTL:SBPM:SB01:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SB01:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "SBTL:SBPM:SB01:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SB01:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "SBTL:SBPM:SB01:DIGISIMW") { field(DESC, "VME Digi Sim. Waveform") field(DTYP, "VmeDigi Sim Wav") field(OUT, "#C4 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, "SBTL:SBPM:SB01:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "SBTL:SBPM:SB01:MPSBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C0S2@bpmMPS+0,m32") field(MASK, "16") 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, "SBTL:SBPM:SB01:MPSLTBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C1S2@bpmMPS+0,m32") field(MASK, "16") 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, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SB01:UOFF") field(DOL2, "SBTL:SBPM:SB01:UOFF") field(DOL3, "SBTL:SBPM:SB01:UOFF") field(DOL4, "SBTL:SBPM:SB01:UOFF") field(DOL5, "SBTL:SBPM:SB01:UOFF") field(DOL6, "SBTL:SBPM:SB01:UOFF") field(DOL7, "SBTL:SBPM:SB01:UOFF") field(DOL8, "SBTL:SBPM:SB01:UOFF") field(DOL9, "SBTL:SBPM:SB01:UOFF") field(DOLA, "SBTL:SBPM:SB01:UOFF") field(LNK1, "SBTL:SBPM:SB01:UOFF_SEL.A PP") field(LNK2, "SBTL:SBPM:SB01:UOFF_SEL.B PP") field(LNK3, "SBTL:SBPM:SB01:UOFF_SEL.C PP") field(LNK4, "SBTL:SBPM:SB01:UOFF_SEL.D PP") field(LNK5, "SBTL:SBPM:SB01:UOFF_SEL.E PP") field(LNK6, "SBTL:SBPM:SB01:UOFF_SEL.F PP") field(LNK7, "SBTL:SBPM:SB01:UOFF_SEL.G PP") field(LNK8, "SBTL:SBPM:SB01:UOFF_SEL.H PP") field(LNK9, "SBTL:SBPM:SB01:UOFF_SEL.I PP") field(LNKA, "SBTL:SBPM:SB01:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SB01:UOFF_SEL") field(OUTA, "SBTL:SBPM:SB01:U.AOFF CA") field(OUTB, "SBTL:SBPM:SB01:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SB01:UOFF_CTRL") { field(INPA, "SBTL:SBPM:SB01:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SB01:VOFF") field(DOL2, "SBTL:SBPM:SB01:VOFF") field(DOL3, "SBTL:SBPM:SB01:VOFF") field(DOL4, "SBTL:SBPM:SB01:VOFF") field(DOL5, "SBTL:SBPM:SB01:VOFF") field(DOL6, "SBTL:SBPM:SB01:VOFF") field(DOL7, "SBTL:SBPM:SB01:VOFF") field(DOL8, "SBTL:SBPM:SB01:VOFF") field(DOL9, "SBTL:SBPM:SB01:VOFF") field(DOLA, "SBTL:SBPM:SB01:VOFF") field(LNK1, "SBTL:SBPM:SB01:VOFF_SEL.A PP") field(LNK2, "SBTL:SBPM:SB01:VOFF_SEL.B PP") field(LNK3, "SBTL:SBPM:SB01:VOFF_SEL.C PP") field(LNK4, "SBTL:SBPM:SB01:VOFF_SEL.D PP") field(LNK5, "SBTL:SBPM:SB01:VOFF_SEL.E PP") field(LNK6, "SBTL:SBPM:SB01:VOFF_SEL.F PP") field(LNK7, "SBTL:SBPM:SB01:VOFF_SEL.G PP") field(LNK8, "SBTL:SBPM:SB01:VOFF_SEL.H PP") field(LNK9, "SBTL:SBPM:SB01:VOFF_SEL.I PP") field(LNKA, "SBTL:SBPM:SB01:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SB01:VOFF_SEL") field(OUTA, "SBTL:SBPM:SB01:V.AOFF CA") field(OUTB, "SBTL:SBPM:SB01:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SB01:VOFF_CTRL") { field(INPA, "SBTL:SBPM:SB01:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SB01:USCL") field(DOL2, "SBTL:SBPM:SB01:USCL") field(DOL3, "SBTL:SBPM:SB01:USCL") field(DOL4, "SBTL:SBPM:SB01:USCL") field(DOL5, "SBTL:SBPM:SB01:USCL") field(DOL6, "SBTL:SBPM:SB01:USCL") field(DOL7, "SBTL:SBPM:SB01:USCL") field(DOL8, "SBTL:SBPM:SB01:USCL") field(DOL9, "SBTL:SBPM:SB01:USCL") field(DOLA, "SBTL:SBPM:SB01:USCL") field(LNK1, "SBTL:SBPM:SB01:USCL_SEL.A PP") field(LNK2, "SBTL:SBPM:SB01:USCL_SEL.B PP") field(LNK3, "SBTL:SBPM:SB01:USCL_SEL.C PP") field(LNK4, "SBTL:SBPM:SB01:USCL_SEL.D PP") field(LNK5, "SBTL:SBPM:SB01:USCL_SEL.E PP") field(LNK6, "SBTL:SBPM:SB01:USCL_SEL.F PP") field(LNK7, "SBTL:SBPM:SB01:USCL_SEL.G PP") field(LNK8, "SBTL:SBPM:SB01:USCL_SEL.H PP") field(LNK9, "SBTL:SBPM:SB01:USCL_SEL.I PP") field(LNKA, "SBTL:SBPM:SB01:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SB01:USCL_SEL") field(OUTA, "SBTL:SBPM:SB01:U.ASLO CA") field(OUTB, "SBTL:SBPM:SB01:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SB01:USCL_CTRL") { field(INPA, "SBTL:SBPM:SB01:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SB01:VSCL") field(DOL2, "SBTL:SBPM:SB01:VSCL") field(DOL3, "SBTL:SBPM:SB01:VSCL") field(DOL4, "SBTL:SBPM:SB01:VSCL") field(DOL5, "SBTL:SBPM:SB01:VSCL") field(DOL6, "SBTL:SBPM:SB01:VSCL") field(DOL7, "SBTL:SBPM:SB01:VSCL") field(DOL8, "SBTL:SBPM:SB01:VSCL") field(DOL9, "SBTL:SBPM:SB01:VSCL") field(DOLA, "SBTL:SBPM:SB01:VSCL") field(LNK1, "SBTL:SBPM:SB01:VSCL_SEL.A PP") field(LNK2, "SBTL:SBPM:SB01:VSCL_SEL.B PP") field(LNK3, "SBTL:SBPM:SB01:VSCL_SEL.C PP") field(LNK4, "SBTL:SBPM:SB01:VSCL_SEL.D PP") field(LNK5, "SBTL:SBPM:SB01:VSCL_SEL.E PP") field(LNK6, "SBTL:SBPM:SB01:VSCL_SEL.F PP") field(LNK7, "SBTL:SBPM:SB01:VSCL_SEL.G PP") field(LNK8, "SBTL:SBPM:SB01:VSCL_SEL.H PP") field(LNK9, "SBTL:SBPM:SB01:VSCL_SEL.I PP") field(LNKA, "SBTL:SBPM:SB01:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SB01:VSCL_SEL") field(OUTA, "SBTL:SBPM:SB01:V.ASLO CA") field(OUTB, "SBTL:SBPM:SB01:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SB01:VSCL_CTRL") { field(INPA, "SBTL:SBPM:SB01:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SB01:PHI") field(DOL2, "SBTL:SBPM:SB01:PHI") field(DOL3, "SBTL:SBPM:SB01:PHI") field(DOL4, "SBTL:SBPM:SB01:PHI") field(DOL5, "SBTL:SBPM:SB01:PHI") field(DOL6, "SBTL:SBPM:SB01:PHI") field(DOL7, "SBTL:SBPM:SB01:PHI") field(DOL8, "SBTL:SBPM:SB01:PHI") field(DOL9, "SBTL:SBPM:SB01:PHI") field(DOLA, "SBTL:SBPM:SB01:PHI") field(LNK1, "SBTL:SBPM:SB01:PHI_SEL.A PP") field(LNK2, "SBTL:SBPM:SB01:PHI_SEL.B PP") field(LNK3, "SBTL:SBPM:SB01:PHI_SEL.C PP") field(LNK4, "SBTL:SBPM:SB01:PHI_SEL.D PP") field(LNK5, "SBTL:SBPM:SB01:PHI_SEL.E PP") field(LNK6, "SBTL:SBPM:SB01:PHI_SEL.F PP") field(LNK7, "SBTL:SBPM:SB01:PHI_SEL.G PP") field(LNK8, "SBTL:SBPM:SB01:PHI_SEL.H PP") field(LNK9, "SBTL:SBPM:SB01:PHI_SEL.I PP") field(LNKA, "SBTL:SBPM:SB01:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SB01:PHI_SEL") field(OUTA, "SBTL:SBPM:SB01:CALC.E CA") field(OUTB, "SBTL:SBPM:SB01:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SB01:PHI_CTRL") { field(INPA, "SBTL:SBPM:SB01:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SB01:PSI") field(DOL2, "SBTL:SBPM:SB01:PSI") field(DOL3, "SBTL:SBPM:SB01:PSI") field(DOL4, "SBTL:SBPM:SB01:PSI") field(DOL5, "SBTL:SBPM:SB01:PSI") field(DOL6, "SBTL:SBPM:SB01:PSI") field(DOL7, "SBTL:SBPM:SB01:PSI") field(DOL8, "SBTL:SBPM:SB01:PSI") field(DOL9, "SBTL:SBPM:SB01:PSI") field(DOLA, "SBTL:SBPM:SB01:PSI") field(LNK1, "SBTL:SBPM:SB01:PSI_SEL.A PP") field(LNK2, "SBTL:SBPM:SB01:PSI_SEL.B PP") field(LNK3, "SBTL:SBPM:SB01:PSI_SEL.C PP") field(LNK4, "SBTL:SBPM:SB01:PSI_SEL.D PP") field(LNK5, "SBTL:SBPM:SB01:PSI_SEL.E PP") field(LNK6, "SBTL:SBPM:SB01:PSI_SEL.F PP") field(LNK7, "SBTL:SBPM:SB01:PSI_SEL.G PP") field(LNK8, "SBTL:SBPM:SB01:PSI_SEL.H PP") field(LNK9, "SBTL:SBPM:SB01:PSI_SEL.I PP") field(LNKA, "SBTL:SBPM:SB01:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SB01:PSI_SEL") field(OUTA, "SBTL:SBPM:SB01:CALC.F CA") field(OUTB, "SBTL:SBPM:SB01:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SB01:PSI_CTRL") { field(INPA, "SBTL:SBPM:SB01:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SB01:PSI_SEL.L PP") } record(longout, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SL20:GRN") { field(DESC, "GRN Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C5 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, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:RED") { field(DESC, "RED Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C5 S1") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:BLU") { field(DESC, "BLU Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C5 S2") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:YLO") { field(DESC, "YLO Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C5 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, "SBTL:SBPM:SL20:REDW") { field(DESC, "Raw CAL RED Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C5 S1") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "SBTL:SBPM:SL20:GRNW") { field(DESC, "Raw CAL GRN Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C5 S2") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "SBTL:SBPM:SL20: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, "#C5 S7") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "SBTL:SBPM:SL20:REDDBG") { field(DESC, "Raw CAL RED Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C5 S8 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "SBTL:SBPM:SL20:GRNDBG") { field(DESC, "Raw CAL GRN Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C5 S9 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(ai, "SBTL:SBPM:SL20:GRUV") { field(DESC, "CAL Gain GRN/RED") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C5 S0") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") } record(ai, "SBTL:SBPM:SL20:GRU") { field(DESC, "CAL Gain GRN/BLU") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C5 S1") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "SBTL:SBPM:SL20:GRV") { field(DESC, "CAL Gain RED/YLO") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C5 S2") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "SBTL:SBPM:SL20: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, "#C5 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, "SBTL:SBPM:SL20: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, "#C5 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, "SBTL:SBPM:SL20: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, "#C5 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, "SBTL:SBPM:SL20: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, "#C5 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(bo, "SBTL:SBPM:SL20:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL20:CALC.K NPP MS") field(ZNAM, "Off") field(ONAM, "On") field(VAL, "0") 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, "SBTL:SBPM:SL20:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "SBTL:SBPM:SL20:ATT1 CP") field(INPC, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "SBTL:SBPM:SL20:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL20:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL20:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "SBTL:SBPM:SL20:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL20:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL20:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "SBTL:SBPM:SL20:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "SBTL:SBPM:SL20:RSTA.SEVR MS NPP") field(INPB, "SBTL:SBPM:SL20:TMIT.SEVR MS NPP") field(INPC, "SBTL:SBPM:SL20:Y.SEVR MS NPP") field(INPD, "SBTL:SBPM:SL20:X.SEVR MS NPP") field(INPE, "SBTL:SBPM:SL20:TGRN.SEVR MS NPP") field(INPF, "SBTL:SBPM:SL20:TRED.SEVR MS NPP") field(INPG, "SBTL:SBPM:SL20:TBLU.SEVR MS NPP") field(INPH, "SBTL:SBPM:SL20:TYLO.SEVR MS NPP") field(INPI, "SBTL:SBPM:SL20:GRU.SEVR MS NPP") field(INPJ, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "SBTL:SBPM:SL20:RSTA_ALH.SEVR MS NPP") field(INPB, "SBTL:SBPM:SL20:GRU.SEVR MS NPP") field(INPC, "SBTL:SBPM:SL20:GRV.SEVR MS NPP") field(INPD, "SBTL:SBPM:SL20:CHK.SEVR MS NPP") # for optional additional alarm input: field(INPE, "") } # snapshot PV for the bpm values display record(ai, "SBTL:SBPM:SL20:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "SBTL:SBPM:SL20:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SBTL:SBPM:SL20:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SBTL:SBPM:SL20:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "5") field(SCAN, "Passive") } record(bo, "SBTL:SBPM:SL20:PINC_ENA") { field(DESC, "Simple Pincushion Alg") field(DTYP, "BusAddress") field(OUT, "#C0S2@drvBpmStriplPincEna,m32") field(MASK, "32") field(ZNAM, "DISABLED") field(ONAM, "ENABLED") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } record(ao, "SBTL:SBPM:SL20:UDR_THRES") { field(DESC, "Detection Underrange Threshold") field(DTYP, "Bpm Parameters") field(OUT, "#C5S0") 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, "SBTL:SBPM:SL20:X") { field(DESC, "X Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C5 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, "SBTL:SBPM:SL20:Y") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SBTL:SBPM:SL20:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C5 S12") field(FLNK, "SBTL:SBPM:SL20:TMIT") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SBTL:SBPM:SL20:TMIT") { field(DESC, "Charge Estimate") field(DTYP, "Raw Bpm Signal") field(INP, "#C5 S13") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") # FLINK into BSA field(FLNK, "SBTL:SBPM:SL20:EFX.PROC") field(ASG, "") field(TSE, "-2") 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, "SBTL:SBPM:SL20:RWAV") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C5 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, "SBTL:SBPM:SL20:U") { field(DESC, "Raw U Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C5 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, "SBTL:SBPM:SL20:V") } record(ai, "SBTL:SBPM:SL20:V") { field(DESC, "Raw V Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C5 S9") field(SCAN, "Passive") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "SBTL:SBPM:SL20:PINC") } record(ai, "SBTL:SBPM:SL20:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C5 S10") field(SCAN, "Passive") } record(longin, "SBTL:SBPM:SL20:RSTA") { field(DESC, "Status of Raw Processor") field(DTYP, "Bpm Raw Status") field(INP, "#C5S0") field(SCAN, "1 second") field(LOLO, "-1") field(HIHI, "+1") field(HHSV, "INVALID") field(LLSV, "INVALID") field(FLNK, "SBTL:SBPM:SL20:RSTA_ALH") } record(calc, "SBTL:SBPM:SL20:RSTA_ALH") { field(CALC, "A & B") field(INPA, "SBTL:SBPM:SL20:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:PHI_SEQ") } record(ao, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:PSI_SEQ") } #record(dfanout, "SBTL:SBPM:SL20:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "SBTL:SBPM:SL20:USCL PP MS") # field(OUTB, "SBTL:SBPM:SL20:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:UOFF_SEQ") } record(ao, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:VOFF_SEQ") } record(ao, "SBTL:SBPM:SL20:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SBTL:SBPM:SL20:USCL_SEQ") } record(ao, "SBTL:SBPM:SL20:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SBTL:SBPM:SL20:VSCL_SEQ") } record(mbbo, "SBTL:SBPM:SL20:ACCESS") { field(DESC, "BPM On Line") field(DTYP, "StreamSwitch") field(OUT, "#C5 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, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMSL20") field(PINI, "YES") } record(stringin, "SBPMSL20:NAME") { field(DESC, "BPM Name") field(VAL, "SBTL:SBPM:SL20") field(PINI, "YES") } record(ai, "SBTL:SBPM:SL20:X_SLOW") { #alias("SBTL:SBPM:SL20:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SL20:X MS") field(FLNK, "SBTL:SBPM:SL20:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SL20:Y_SLOW") { #alias("SBTL:SBPM:SL20:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SL20:Y NPP MS") field(FLNK, "SBTL:SBPM:SL20:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SL20:TMIT_SLOW") { #alias("SBTL:SBPM:SL20:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "SBTL:SBPM:SL20:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } # Slowly updating PVs for displays # May point to either SW- or FW-calculated # values, depending on architecture # Set dispsuffix macro to "F" to use FW values record(ai, "SBTL:SBPM:SL20:XDISP") { field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SL20:X_SLOW MS CA") field(FLNK, "SBTL:SBPM:SL20:YDISP") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SL20:YDISP") { field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SL20:Y_SLOW MS CA") field(FLNK, "SBTL:SBPM:SL20:TMITDISP") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SL20:TMITDISP") { field(DESC, "TMIT snapshot for display") field(INP, "SBTL:SBPM:SL20:TMIT_SLOW MS CA") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "SBTL:SBPM:SL20:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "SBTL:SBPM:SL20:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "SBTL:SBPM:SL20:SIMC PP") } record(calcout, "SBTL:SBPM:SL20:SIM") { field(DESC, "BPM Pos. Simulation") field(DTYP, "Strip Signal Simulator") field(OUT, "5") #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, "SBTL:SBPM:SL20:USCL") field(INPL, "0") } # Switch simulation record SBTL:SBPM:SL20:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "SBTL:SBPM:SL20:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL20:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SBTL:SBPM:SL20:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL20:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SBTL:SBPM:SL20:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL20:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "SBTL:SBPM:SL20:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL20:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "SBTL:SBPM:SL20:DIGISIMW") { field(DESC, "VME Digi Sim. Waveform") field(DTYP, "VmeDigi Sim Wav") field(OUT, "#C5 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, "SBTL:SBPM:SL20:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "SBTL:SBPM:SL20:MPSBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C0S2@bpmMPS+0,m32") field(MASK, "32") 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, "SBTL:SBPM:SL20:MPSLTBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C1S2@bpmMPS+0,m32") field(MASK, "32") 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, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL20:UOFF") field(DOL2, "SBTL:SBPM:SL20:UOFF") field(DOL3, "SBTL:SBPM:SL20:UOFF") field(DOL4, "SBTL:SBPM:SL20:UOFF") field(DOL5, "SBTL:SBPM:SL20:UOFF") field(DOL6, "SBTL:SBPM:SL20:UOFF") field(DOL7, "SBTL:SBPM:SL20:UOFF") field(DOL8, "SBTL:SBPM:SL20:UOFF") field(DOL9, "SBTL:SBPM:SL20:UOFF") field(DOLA, "SBTL:SBPM:SL20:UOFF") field(LNK1, "SBTL:SBPM:SL20:UOFF_SEL.A PP") field(LNK2, "SBTL:SBPM:SL20:UOFF_SEL.B PP") field(LNK3, "SBTL:SBPM:SL20:UOFF_SEL.C PP") field(LNK4, "SBTL:SBPM:SL20:UOFF_SEL.D PP") field(LNK5, "SBTL:SBPM:SL20:UOFF_SEL.E PP") field(LNK6, "SBTL:SBPM:SL20:UOFF_SEL.F PP") field(LNK7, "SBTL:SBPM:SL20:UOFF_SEL.G PP") field(LNK8, "SBTL:SBPM:SL20:UOFF_SEL.H PP") field(LNK9, "SBTL:SBPM:SL20:UOFF_SEL.I PP") field(LNKA, "SBTL:SBPM:SL20:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL20:UOFF_SEL") field(OUTA, "SBTL:SBPM:SL20:U.AOFF CA") field(OUTB, "SBTL:SBPM:SL20:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL20:UOFF_CTRL") { field(INPA, "SBTL:SBPM:SL20:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL20:VOFF") field(DOL2, "SBTL:SBPM:SL20:VOFF") field(DOL3, "SBTL:SBPM:SL20:VOFF") field(DOL4, "SBTL:SBPM:SL20:VOFF") field(DOL5, "SBTL:SBPM:SL20:VOFF") field(DOL6, "SBTL:SBPM:SL20:VOFF") field(DOL7, "SBTL:SBPM:SL20:VOFF") field(DOL8, "SBTL:SBPM:SL20:VOFF") field(DOL9, "SBTL:SBPM:SL20:VOFF") field(DOLA, "SBTL:SBPM:SL20:VOFF") field(LNK1, "SBTL:SBPM:SL20:VOFF_SEL.A PP") field(LNK2, "SBTL:SBPM:SL20:VOFF_SEL.B PP") field(LNK3, "SBTL:SBPM:SL20:VOFF_SEL.C PP") field(LNK4, "SBTL:SBPM:SL20:VOFF_SEL.D PP") field(LNK5, "SBTL:SBPM:SL20:VOFF_SEL.E PP") field(LNK6, "SBTL:SBPM:SL20:VOFF_SEL.F PP") field(LNK7, "SBTL:SBPM:SL20:VOFF_SEL.G PP") field(LNK8, "SBTL:SBPM:SL20:VOFF_SEL.H PP") field(LNK9, "SBTL:SBPM:SL20:VOFF_SEL.I PP") field(LNKA, "SBTL:SBPM:SL20:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL20:VOFF_SEL") field(OUTA, "SBTL:SBPM:SL20:V.AOFF CA") field(OUTB, "SBTL:SBPM:SL20:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL20:VOFF_CTRL") { field(INPA, "SBTL:SBPM:SL20:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL20:USCL") field(DOL2, "SBTL:SBPM:SL20:USCL") field(DOL3, "SBTL:SBPM:SL20:USCL") field(DOL4, "SBTL:SBPM:SL20:USCL") field(DOL5, "SBTL:SBPM:SL20:USCL") field(DOL6, "SBTL:SBPM:SL20:USCL") field(DOL7, "SBTL:SBPM:SL20:USCL") field(DOL8, "SBTL:SBPM:SL20:USCL") field(DOL9, "SBTL:SBPM:SL20:USCL") field(DOLA, "SBTL:SBPM:SL20:USCL") field(LNK1, "SBTL:SBPM:SL20:USCL_SEL.A PP") field(LNK2, "SBTL:SBPM:SL20:USCL_SEL.B PP") field(LNK3, "SBTL:SBPM:SL20:USCL_SEL.C PP") field(LNK4, "SBTL:SBPM:SL20:USCL_SEL.D PP") field(LNK5, "SBTL:SBPM:SL20:USCL_SEL.E PP") field(LNK6, "SBTL:SBPM:SL20:USCL_SEL.F PP") field(LNK7, "SBTL:SBPM:SL20:USCL_SEL.G PP") field(LNK8, "SBTL:SBPM:SL20:USCL_SEL.H PP") field(LNK9, "SBTL:SBPM:SL20:USCL_SEL.I PP") field(LNKA, "SBTL:SBPM:SL20:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL20:USCL_SEL") field(OUTA, "SBTL:SBPM:SL20:U.ASLO CA") field(OUTB, "SBTL:SBPM:SL20:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL20:USCL_CTRL") { field(INPA, "SBTL:SBPM:SL20:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL20:VSCL") field(DOL2, "SBTL:SBPM:SL20:VSCL") field(DOL3, "SBTL:SBPM:SL20:VSCL") field(DOL4, "SBTL:SBPM:SL20:VSCL") field(DOL5, "SBTL:SBPM:SL20:VSCL") field(DOL6, "SBTL:SBPM:SL20:VSCL") field(DOL7, "SBTL:SBPM:SL20:VSCL") field(DOL8, "SBTL:SBPM:SL20:VSCL") field(DOL9, "SBTL:SBPM:SL20:VSCL") field(DOLA, "SBTL:SBPM:SL20:VSCL") field(LNK1, "SBTL:SBPM:SL20:VSCL_SEL.A PP") field(LNK2, "SBTL:SBPM:SL20:VSCL_SEL.B PP") field(LNK3, "SBTL:SBPM:SL20:VSCL_SEL.C PP") field(LNK4, "SBTL:SBPM:SL20:VSCL_SEL.D PP") field(LNK5, "SBTL:SBPM:SL20:VSCL_SEL.E PP") field(LNK6, "SBTL:SBPM:SL20:VSCL_SEL.F PP") field(LNK7, "SBTL:SBPM:SL20:VSCL_SEL.G PP") field(LNK8, "SBTL:SBPM:SL20:VSCL_SEL.H PP") field(LNK9, "SBTL:SBPM:SL20:VSCL_SEL.I PP") field(LNKA, "SBTL:SBPM:SL20:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL20:VSCL_SEL") field(OUTA, "SBTL:SBPM:SL20:V.ASLO CA") field(OUTB, "SBTL:SBPM:SL20:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL20:VSCL_CTRL") { field(INPA, "SBTL:SBPM:SL20:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL20:PHI") field(DOL2, "SBTL:SBPM:SL20:PHI") field(DOL3, "SBTL:SBPM:SL20:PHI") field(DOL4, "SBTL:SBPM:SL20:PHI") field(DOL5, "SBTL:SBPM:SL20:PHI") field(DOL6, "SBTL:SBPM:SL20:PHI") field(DOL7, "SBTL:SBPM:SL20:PHI") field(DOL8, "SBTL:SBPM:SL20:PHI") field(DOL9, "SBTL:SBPM:SL20:PHI") field(DOLA, "SBTL:SBPM:SL20:PHI") field(LNK1, "SBTL:SBPM:SL20:PHI_SEL.A PP") field(LNK2, "SBTL:SBPM:SL20:PHI_SEL.B PP") field(LNK3, "SBTL:SBPM:SL20:PHI_SEL.C PP") field(LNK4, "SBTL:SBPM:SL20:PHI_SEL.D PP") field(LNK5, "SBTL:SBPM:SL20:PHI_SEL.E PP") field(LNK6, "SBTL:SBPM:SL20:PHI_SEL.F PP") field(LNK7, "SBTL:SBPM:SL20:PHI_SEL.G PP") field(LNK8, "SBTL:SBPM:SL20:PHI_SEL.H PP") field(LNK9, "SBTL:SBPM:SL20:PHI_SEL.I PP") field(LNKA, "SBTL:SBPM:SL20:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL20:PHI_SEL") field(OUTA, "SBTL:SBPM:SL20:CALC.E CA") field(OUTB, "SBTL:SBPM:SL20:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL20:PHI_CTRL") { field(INPA, "SBTL:SBPM:SL20:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL20:PSI") field(DOL2, "SBTL:SBPM:SL20:PSI") field(DOL3, "SBTL:SBPM:SL20:PSI") field(DOL4, "SBTL:SBPM:SL20:PSI") field(DOL5, "SBTL:SBPM:SL20:PSI") field(DOL6, "SBTL:SBPM:SL20:PSI") field(DOL7, "SBTL:SBPM:SL20:PSI") field(DOL8, "SBTL:SBPM:SL20:PSI") field(DOL9, "SBTL:SBPM:SL20:PSI") field(DOLA, "SBTL:SBPM:SL20:PSI") field(LNK1, "SBTL:SBPM:SL20:PSI_SEL.A PP") field(LNK2, "SBTL:SBPM:SL20:PSI_SEL.B PP") field(LNK3, "SBTL:SBPM:SL20:PSI_SEL.C PP") field(LNK4, "SBTL:SBPM:SL20:PSI_SEL.D PP") field(LNK5, "SBTL:SBPM:SL20:PSI_SEL.E PP") field(LNK6, "SBTL:SBPM:SL20:PSI_SEL.F PP") field(LNK7, "SBTL:SBPM:SL20:PSI_SEL.G PP") field(LNK8, "SBTL:SBPM:SL20:PSI_SEL.H PP") field(LNK9, "SBTL:SBPM:SL20:PSI_SEL.I PP") field(LNKA, "SBTL:SBPM:SL20:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL20:PSI_SEL") field(OUTA, "SBTL:SBPM:SL20:CALC.F CA") field(OUTB, "SBTL:SBPM:SL20:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL20:PSI_CTRL") { field(INPA, "SBTL:SBPM:SL20:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL20:PSI_SEL.L PP") } record(longout, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL21:GRN") { field(DESC, "GRN Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C6 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, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:RED") { field(DESC, "RED Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C6 S1") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:BLU") { field(DESC, "BLU Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C6 S2") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:YLO") { field(DESC, "YLO Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C6 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, "SBTL:SBPM:SL21:REDW") { field(DESC, "Raw CAL RED Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C6 S1") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "SBTL:SBPM:SL21:GRNW") { field(DESC, "Raw CAL GRN Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C6 S2") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "SBTL:SBPM:SL21: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, "#C6 S7") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "SBTL:SBPM:SL21:REDDBG") { field(DESC, "Raw CAL RED Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C6 S8 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "SBTL:SBPM:SL21:GRNDBG") { field(DESC, "Raw CAL GRN Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C6 S9 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(ai, "SBTL:SBPM:SL21:GRUV") { field(DESC, "CAL Gain GRN/RED") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C6 S0") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") } record(ai, "SBTL:SBPM:SL21:GRU") { field(DESC, "CAL Gain GRN/BLU") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C6 S1") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "SBTL:SBPM:SL21:GRV") { field(DESC, "CAL Gain RED/YLO") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C6 S2") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "SBTL:SBPM:SL21: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, "#C6 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, "SBTL:SBPM:SL21: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, "#C6 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, "SBTL:SBPM:SL21: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, "#C6 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, "SBTL:SBPM:SL21: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, "#C6 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(bo, "SBTL:SBPM:SL21:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL21:CALC.K NPP MS") field(ZNAM, "Off") field(ONAM, "On") field(VAL, "0") 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, "SBTL:SBPM:SL21:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "SBTL:SBPM:SL21:ATT1 CP") field(INPC, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "SBTL:SBPM:SL21:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL21:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL21:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "SBTL:SBPM:SL21:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL21:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL21:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "SBTL:SBPM:SL21:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "SBTL:SBPM:SL21:RSTA.SEVR MS NPP") field(INPB, "SBTL:SBPM:SL21:TMIT.SEVR MS NPP") field(INPC, "SBTL:SBPM:SL21:Y.SEVR MS NPP") field(INPD, "SBTL:SBPM:SL21:X.SEVR MS NPP") field(INPE, "SBTL:SBPM:SL21:TGRN.SEVR MS NPP") field(INPF, "SBTL:SBPM:SL21:TRED.SEVR MS NPP") field(INPG, "SBTL:SBPM:SL21:TBLU.SEVR MS NPP") field(INPH, "SBTL:SBPM:SL21:TYLO.SEVR MS NPP") field(INPI, "SBTL:SBPM:SL21:GRU.SEVR MS NPP") field(INPJ, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "SBTL:SBPM:SL21:RSTA_ALH.SEVR MS NPP") field(INPB, "SBTL:SBPM:SL21:GRU.SEVR MS NPP") field(INPC, "SBTL:SBPM:SL21:GRV.SEVR MS NPP") field(INPD, "SBTL:SBPM:SL21:CHK.SEVR MS NPP") # for optional additional alarm input: field(INPE, "") } # snapshot PV for the bpm values display record(ai, "SBTL:SBPM:SL21:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "SBTL:SBPM:SL21:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SBTL:SBPM:SL21:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SBTL:SBPM:SL21:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "6") field(SCAN, "Passive") } record(bo, "SBTL:SBPM:SL21:PINC_ENA") { field(DESC, "Simple Pincushion Alg") field(DTYP, "BusAddress") field(OUT, "#C0S2@drvBpmStriplPincEna,m32") field(MASK, "64") field(ZNAM, "DISABLED") field(ONAM, "ENABLED") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } record(ao, "SBTL:SBPM:SL21:UDR_THRES") { field(DESC, "Detection Underrange Threshold") field(DTYP, "Bpm Parameters") field(OUT, "#C6S0") 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, "SBTL:SBPM:SL21:X") { field(DESC, "X Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C6 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, "SBTL:SBPM:SL21:Y") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SBTL:SBPM:SL21:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C6 S12") field(FLNK, "SBTL:SBPM:SL21:TMIT") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SBTL:SBPM:SL21:TMIT") { field(DESC, "Charge Estimate") field(DTYP, "Raw Bpm Signal") field(INP, "#C6 S13") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") # FLINK into BSA field(FLNK, "SBTL:SBPM:SL21:EFX.PROC") field(ASG, "") field(TSE, "-2") 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, "SBTL:SBPM:SL21:RWAV") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C6 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, "SBTL:SBPM:SL21:U") { field(DESC, "Raw U Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C6 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, "SBTL:SBPM:SL21:V") } record(ai, "SBTL:SBPM:SL21:V") { field(DESC, "Raw V Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C6 S9") field(SCAN, "Passive") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "SBTL:SBPM:SL21:PINC") } record(ai, "SBTL:SBPM:SL21:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C6 S10") field(SCAN, "Passive") } record(longin, "SBTL:SBPM:SL21:RSTA") { field(DESC, "Status of Raw Processor") field(DTYP, "Bpm Raw Status") field(INP, "#C6S0") field(SCAN, "1 second") field(LOLO, "-1") field(HIHI, "+1") field(HHSV, "INVALID") field(LLSV, "INVALID") field(FLNK, "SBTL:SBPM:SL21:RSTA_ALH") } record(calc, "SBTL:SBPM:SL21:RSTA_ALH") { field(CALC, "A & B") field(INPA, "SBTL:SBPM:SL21:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:PHI_SEQ") } record(ao, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:PSI_SEQ") } #record(dfanout, "SBTL:SBPM:SL21:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "SBTL:SBPM:SL21:USCL PP MS") # field(OUTB, "SBTL:SBPM:SL21:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:UOFF_SEQ") } record(ao, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:VOFF_SEQ") } record(ao, "SBTL:SBPM:SL21:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SBTL:SBPM:SL21:USCL_SEQ") } record(ao, "SBTL:SBPM:SL21:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SBTL:SBPM:SL21:VSCL_SEQ") } record(mbbo, "SBTL:SBPM:SL21:ACCESS") { field(DESC, "BPM On Line") field(DTYP, "StreamSwitch") field(OUT, "#C6 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, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMSL21") field(PINI, "YES") } record(stringin, "SBPMSL21:NAME") { field(DESC, "BPM Name") field(VAL, "SBTL:SBPM:SL21") field(PINI, "YES") } record(ai, "SBTL:SBPM:SL21:X_SLOW") { #alias("SBTL:SBPM:SL21:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SL21:X MS") field(FLNK, "SBTL:SBPM:SL21:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SL21:Y_SLOW") { #alias("SBTL:SBPM:SL21:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SL21:Y NPP MS") field(FLNK, "SBTL:SBPM:SL21:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SL21:TMIT_SLOW") { #alias("SBTL:SBPM:SL21:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "SBTL:SBPM:SL21:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } # Slowly updating PVs for displays # May point to either SW- or FW-calculated # values, depending on architecture # Set dispsuffix macro to "F" to use FW values record(ai, "SBTL:SBPM:SL21:XDISP") { field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SL21:X_SLOW MS CA") field(FLNK, "SBTL:SBPM:SL21:YDISP") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SL21:YDISP") { field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SL21:Y_SLOW MS CA") field(FLNK, "SBTL:SBPM:SL21:TMITDISP") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SL21:TMITDISP") { field(DESC, "TMIT snapshot for display") field(INP, "SBTL:SBPM:SL21:TMIT_SLOW MS CA") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "SBTL:SBPM:SL21:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "SBTL:SBPM:SL21:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "SBTL:SBPM:SL21:SIMC PP") } record(calcout, "SBTL:SBPM:SL21:SIM") { field(DESC, "BPM Pos. Simulation") field(DTYP, "Strip Signal Simulator") field(OUT, "6") #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, "SBTL:SBPM:SL21:USCL") field(INPL, "0") } # Switch simulation record SBTL:SBPM:SL21:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "SBTL:SBPM:SL21:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL21:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SBTL:SBPM:SL21:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL21:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SBTL:SBPM:SL21:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL21:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "SBTL:SBPM:SL21:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL21:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "SBTL:SBPM:SL21:DIGISIMW") { field(DESC, "VME Digi Sim. Waveform") field(DTYP, "VmeDigi Sim Wav") field(OUT, "#C6 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, "SBTL:SBPM:SL21:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "SBTL:SBPM:SL21:MPSBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C0S2@bpmMPS+0,m32") field(MASK, "64") 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, "SBTL:SBPM:SL21:MPSLTBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C1S2@bpmMPS+0,m32") field(MASK, "64") 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, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL21:UOFF") field(DOL2, "SBTL:SBPM:SL21:UOFF") field(DOL3, "SBTL:SBPM:SL21:UOFF") field(DOL4, "SBTL:SBPM:SL21:UOFF") field(DOL5, "SBTL:SBPM:SL21:UOFF") field(DOL6, "SBTL:SBPM:SL21:UOFF") field(DOL7, "SBTL:SBPM:SL21:UOFF") field(DOL8, "SBTL:SBPM:SL21:UOFF") field(DOL9, "SBTL:SBPM:SL21:UOFF") field(DOLA, "SBTL:SBPM:SL21:UOFF") field(LNK1, "SBTL:SBPM:SL21:UOFF_SEL.A PP") field(LNK2, "SBTL:SBPM:SL21:UOFF_SEL.B PP") field(LNK3, "SBTL:SBPM:SL21:UOFF_SEL.C PP") field(LNK4, "SBTL:SBPM:SL21:UOFF_SEL.D PP") field(LNK5, "SBTL:SBPM:SL21:UOFF_SEL.E PP") field(LNK6, "SBTL:SBPM:SL21:UOFF_SEL.F PP") field(LNK7, "SBTL:SBPM:SL21:UOFF_SEL.G PP") field(LNK8, "SBTL:SBPM:SL21:UOFF_SEL.H PP") field(LNK9, "SBTL:SBPM:SL21:UOFF_SEL.I PP") field(LNKA, "SBTL:SBPM:SL21:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL21:UOFF_SEL") field(OUTA, "SBTL:SBPM:SL21:U.AOFF CA") field(OUTB, "SBTL:SBPM:SL21:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL21:UOFF_CTRL") { field(INPA, "SBTL:SBPM:SL21:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL21:VOFF") field(DOL2, "SBTL:SBPM:SL21:VOFF") field(DOL3, "SBTL:SBPM:SL21:VOFF") field(DOL4, "SBTL:SBPM:SL21:VOFF") field(DOL5, "SBTL:SBPM:SL21:VOFF") field(DOL6, "SBTL:SBPM:SL21:VOFF") field(DOL7, "SBTL:SBPM:SL21:VOFF") field(DOL8, "SBTL:SBPM:SL21:VOFF") field(DOL9, "SBTL:SBPM:SL21:VOFF") field(DOLA, "SBTL:SBPM:SL21:VOFF") field(LNK1, "SBTL:SBPM:SL21:VOFF_SEL.A PP") field(LNK2, "SBTL:SBPM:SL21:VOFF_SEL.B PP") field(LNK3, "SBTL:SBPM:SL21:VOFF_SEL.C PP") field(LNK4, "SBTL:SBPM:SL21:VOFF_SEL.D PP") field(LNK5, "SBTL:SBPM:SL21:VOFF_SEL.E PP") field(LNK6, "SBTL:SBPM:SL21:VOFF_SEL.F PP") field(LNK7, "SBTL:SBPM:SL21:VOFF_SEL.G PP") field(LNK8, "SBTL:SBPM:SL21:VOFF_SEL.H PP") field(LNK9, "SBTL:SBPM:SL21:VOFF_SEL.I PP") field(LNKA, "SBTL:SBPM:SL21:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL21:VOFF_SEL") field(OUTA, "SBTL:SBPM:SL21:V.AOFF CA") field(OUTB, "SBTL:SBPM:SL21:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL21:VOFF_CTRL") { field(INPA, "SBTL:SBPM:SL21:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL21:USCL") field(DOL2, "SBTL:SBPM:SL21:USCL") field(DOL3, "SBTL:SBPM:SL21:USCL") field(DOL4, "SBTL:SBPM:SL21:USCL") field(DOL5, "SBTL:SBPM:SL21:USCL") field(DOL6, "SBTL:SBPM:SL21:USCL") field(DOL7, "SBTL:SBPM:SL21:USCL") field(DOL8, "SBTL:SBPM:SL21:USCL") field(DOL9, "SBTL:SBPM:SL21:USCL") field(DOLA, "SBTL:SBPM:SL21:USCL") field(LNK1, "SBTL:SBPM:SL21:USCL_SEL.A PP") field(LNK2, "SBTL:SBPM:SL21:USCL_SEL.B PP") field(LNK3, "SBTL:SBPM:SL21:USCL_SEL.C PP") field(LNK4, "SBTL:SBPM:SL21:USCL_SEL.D PP") field(LNK5, "SBTL:SBPM:SL21:USCL_SEL.E PP") field(LNK6, "SBTL:SBPM:SL21:USCL_SEL.F PP") field(LNK7, "SBTL:SBPM:SL21:USCL_SEL.G PP") field(LNK8, "SBTL:SBPM:SL21:USCL_SEL.H PP") field(LNK9, "SBTL:SBPM:SL21:USCL_SEL.I PP") field(LNKA, "SBTL:SBPM:SL21:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL21:USCL_SEL") field(OUTA, "SBTL:SBPM:SL21:U.ASLO CA") field(OUTB, "SBTL:SBPM:SL21:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL21:USCL_CTRL") { field(INPA, "SBTL:SBPM:SL21:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL21:VSCL") field(DOL2, "SBTL:SBPM:SL21:VSCL") field(DOL3, "SBTL:SBPM:SL21:VSCL") field(DOL4, "SBTL:SBPM:SL21:VSCL") field(DOL5, "SBTL:SBPM:SL21:VSCL") field(DOL6, "SBTL:SBPM:SL21:VSCL") field(DOL7, "SBTL:SBPM:SL21:VSCL") field(DOL8, "SBTL:SBPM:SL21:VSCL") field(DOL9, "SBTL:SBPM:SL21:VSCL") field(DOLA, "SBTL:SBPM:SL21:VSCL") field(LNK1, "SBTL:SBPM:SL21:VSCL_SEL.A PP") field(LNK2, "SBTL:SBPM:SL21:VSCL_SEL.B PP") field(LNK3, "SBTL:SBPM:SL21:VSCL_SEL.C PP") field(LNK4, "SBTL:SBPM:SL21:VSCL_SEL.D PP") field(LNK5, "SBTL:SBPM:SL21:VSCL_SEL.E PP") field(LNK6, "SBTL:SBPM:SL21:VSCL_SEL.F PP") field(LNK7, "SBTL:SBPM:SL21:VSCL_SEL.G PP") field(LNK8, "SBTL:SBPM:SL21:VSCL_SEL.H PP") field(LNK9, "SBTL:SBPM:SL21:VSCL_SEL.I PP") field(LNKA, "SBTL:SBPM:SL21:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL21:VSCL_SEL") field(OUTA, "SBTL:SBPM:SL21:V.ASLO CA") field(OUTB, "SBTL:SBPM:SL21:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL21:VSCL_CTRL") { field(INPA, "SBTL:SBPM:SL21:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL21:PHI") field(DOL2, "SBTL:SBPM:SL21:PHI") field(DOL3, "SBTL:SBPM:SL21:PHI") field(DOL4, "SBTL:SBPM:SL21:PHI") field(DOL5, "SBTL:SBPM:SL21:PHI") field(DOL6, "SBTL:SBPM:SL21:PHI") field(DOL7, "SBTL:SBPM:SL21:PHI") field(DOL8, "SBTL:SBPM:SL21:PHI") field(DOL9, "SBTL:SBPM:SL21:PHI") field(DOLA, "SBTL:SBPM:SL21:PHI") field(LNK1, "SBTL:SBPM:SL21:PHI_SEL.A PP") field(LNK2, "SBTL:SBPM:SL21:PHI_SEL.B PP") field(LNK3, "SBTL:SBPM:SL21:PHI_SEL.C PP") field(LNK4, "SBTL:SBPM:SL21:PHI_SEL.D PP") field(LNK5, "SBTL:SBPM:SL21:PHI_SEL.E PP") field(LNK6, "SBTL:SBPM:SL21:PHI_SEL.F PP") field(LNK7, "SBTL:SBPM:SL21:PHI_SEL.G PP") field(LNK8, "SBTL:SBPM:SL21:PHI_SEL.H PP") field(LNK9, "SBTL:SBPM:SL21:PHI_SEL.I PP") field(LNKA, "SBTL:SBPM:SL21:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL21:PHI_SEL") field(OUTA, "SBTL:SBPM:SL21:CALC.E CA") field(OUTB, "SBTL:SBPM:SL21:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL21:PHI_CTRL") { field(INPA, "SBTL:SBPM:SL21:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL21:PSI") field(DOL2, "SBTL:SBPM:SL21:PSI") field(DOL3, "SBTL:SBPM:SL21:PSI") field(DOL4, "SBTL:SBPM:SL21:PSI") field(DOL5, "SBTL:SBPM:SL21:PSI") field(DOL6, "SBTL:SBPM:SL21:PSI") field(DOL7, "SBTL:SBPM:SL21:PSI") field(DOL8, "SBTL:SBPM:SL21:PSI") field(DOL9, "SBTL:SBPM:SL21:PSI") field(DOLA, "SBTL:SBPM:SL21:PSI") field(LNK1, "SBTL:SBPM:SL21:PSI_SEL.A PP") field(LNK2, "SBTL:SBPM:SL21:PSI_SEL.B PP") field(LNK3, "SBTL:SBPM:SL21:PSI_SEL.C PP") field(LNK4, "SBTL:SBPM:SL21:PSI_SEL.D PP") field(LNK5, "SBTL:SBPM:SL21:PSI_SEL.E PP") field(LNK6, "SBTL:SBPM:SL21:PSI_SEL.F PP") field(LNK7, "SBTL:SBPM:SL21:PSI_SEL.G PP") field(LNK8, "SBTL:SBPM:SL21:PSI_SEL.H PP") field(LNK9, "SBTL:SBPM:SL21:PSI_SEL.I PP") field(LNKA, "SBTL:SBPM:SL21:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL21:PSI_SEL") field(OUTA, "SBTL:SBPM:SL21:CALC.F CA") field(OUTB, "SBTL:SBPM:SL21:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL21:PSI_CTRL") { field(INPA, "SBTL:SBPM:SL21:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL21:PSI_SEL.L PP") } record(longout, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL22:GRN") { field(DESC, "GRN Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C7 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, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:RED") { field(DESC, "RED Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C7 S1") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:BLU") { field(DESC, "BLU Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C7 S2") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:YLO") { field(DESC, "YLO Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C7 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, "SBTL:SBPM:SL22:REDW") { field(DESC, "Raw CAL RED Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C7 S1") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "SBTL:SBPM:SL22:GRNW") { field(DESC, "Raw CAL GRN Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C7 S2") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "SBTL:SBPM:SL22: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, "#C7 S7") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "SBTL:SBPM:SL22:REDDBG") { field(DESC, "Raw CAL RED Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C7 S8 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "SBTL:SBPM:SL22:GRNDBG") { field(DESC, "Raw CAL GRN Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C7 S9 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(ai, "SBTL:SBPM:SL22:GRUV") { field(DESC, "CAL Gain GRN/RED") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C7 S0") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") } record(ai, "SBTL:SBPM:SL22:GRU") { field(DESC, "CAL Gain GRN/BLU") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C7 S1") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "SBTL:SBPM:SL22:GRV") { field(DESC, "CAL Gain RED/YLO") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C7 S2") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "SBTL:SBPM:SL22: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, "#C7 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, "SBTL:SBPM:SL22: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, "#C7 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, "SBTL:SBPM:SL22: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, "#C7 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, "SBTL:SBPM:SL22: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, "#C7 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(bo, "SBTL:SBPM:SL22:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL22:CALC.K NPP MS") field(ZNAM, "Off") field(ONAM, "On") field(VAL, "0") 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, "SBTL:SBPM:SL22:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "SBTL:SBPM:SL22:ATT1 CP") field(INPC, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "SBTL:SBPM:SL22:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL22:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL22:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "SBTL:SBPM:SL22:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL22:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL22:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "SBTL:SBPM:SL22:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "SBTL:SBPM:SL22:RSTA.SEVR MS NPP") field(INPB, "SBTL:SBPM:SL22:TMIT.SEVR MS NPP") field(INPC, "SBTL:SBPM:SL22:Y.SEVR MS NPP") field(INPD, "SBTL:SBPM:SL22:X.SEVR MS NPP") field(INPE, "SBTL:SBPM:SL22:TGRN.SEVR MS NPP") field(INPF, "SBTL:SBPM:SL22:TRED.SEVR MS NPP") field(INPG, "SBTL:SBPM:SL22:TBLU.SEVR MS NPP") field(INPH, "SBTL:SBPM:SL22:TYLO.SEVR MS NPP") field(INPI, "SBTL:SBPM:SL22:GRU.SEVR MS NPP") field(INPJ, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "SBTL:SBPM:SL22:RSTA_ALH.SEVR MS NPP") field(INPB, "SBTL:SBPM:SL22:GRU.SEVR MS NPP") field(INPC, "SBTL:SBPM:SL22:GRV.SEVR MS NPP") field(INPD, "SBTL:SBPM:SL22:CHK.SEVR MS NPP") # for optional additional alarm input: field(INPE, "") } # snapshot PV for the bpm values display record(ai, "SBTL:SBPM:SL22:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "SBTL:SBPM:SL22:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SBTL:SBPM:SL22:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SBTL:SBPM:SL22:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "7") field(SCAN, "Passive") } record(bo, "SBTL:SBPM:SL22:PINC_ENA") { field(DESC, "Simple Pincushion Alg") field(DTYP, "BusAddress") field(OUT, "#C0S2@drvBpmStriplPincEna,m32") field(MASK, "128") field(ZNAM, "DISABLED") field(ONAM, "ENABLED") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } record(ao, "SBTL:SBPM:SL22:UDR_THRES") { field(DESC, "Detection Underrange Threshold") field(DTYP, "Bpm Parameters") field(OUT, "#C7S0") 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, "SBTL:SBPM:SL22:X") { field(DESC, "X Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C7 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, "SBTL:SBPM:SL22:Y") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SBTL:SBPM:SL22:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C7 S12") field(FLNK, "SBTL:SBPM:SL22:TMIT") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SBTL:SBPM:SL22:TMIT") { field(DESC, "Charge Estimate") field(DTYP, "Raw Bpm Signal") field(INP, "#C7 S13") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") # FLINK into BSA field(FLNK, "SBTL:SBPM:SL22:EFX.PROC") field(ASG, "") field(TSE, "-2") 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, "SBTL:SBPM:SL22:RWAV") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C7 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, "SBTL:SBPM:SL22:U") { field(DESC, "Raw U Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C7 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, "SBTL:SBPM:SL22:V") } record(ai, "SBTL:SBPM:SL22:V") { field(DESC, "Raw V Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C7 S9") field(SCAN, "Passive") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "SBTL:SBPM:SL22:PINC") } record(ai, "SBTL:SBPM:SL22:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C7 S10") field(SCAN, "Passive") } record(longin, "SBTL:SBPM:SL22:RSTA") { field(DESC, "Status of Raw Processor") field(DTYP, "Bpm Raw Status") field(INP, "#C7S0") field(SCAN, "1 second") field(LOLO, "-1") field(HIHI, "+1") field(HHSV, "INVALID") field(LLSV, "INVALID") field(FLNK, "SBTL:SBPM:SL22:RSTA_ALH") } record(calc, "SBTL:SBPM:SL22:RSTA_ALH") { field(CALC, "A & B") field(INPA, "SBTL:SBPM:SL22:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:PHI_SEQ") } record(ao, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:PSI_SEQ") } #record(dfanout, "SBTL:SBPM:SL22:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "SBTL:SBPM:SL22:USCL PP MS") # field(OUTB, "SBTL:SBPM:SL22:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:UOFF_SEQ") } record(ao, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:VOFF_SEQ") } record(ao, "SBTL:SBPM:SL22:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SBTL:SBPM:SL22:USCL_SEQ") } record(ao, "SBTL:SBPM:SL22:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SBTL:SBPM:SL22:VSCL_SEQ") } record(mbbo, "SBTL:SBPM:SL22:ACCESS") { field(DESC, "BPM On Line") field(DTYP, "StreamSwitch") field(OUT, "#C7 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, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMSL22") field(PINI, "YES") } record(stringin, "SBPMSL22:NAME") { field(DESC, "BPM Name") field(VAL, "SBTL:SBPM:SL22") field(PINI, "YES") } record(ai, "SBTL:SBPM:SL22:X_SLOW") { #alias("SBTL:SBPM:SL22:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SL22:X MS") field(FLNK, "SBTL:SBPM:SL22:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SL22:Y_SLOW") { #alias("SBTL:SBPM:SL22:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SL22:Y NPP MS") field(FLNK, "SBTL:SBPM:SL22:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SL22:TMIT_SLOW") { #alias("SBTL:SBPM:SL22:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "SBTL:SBPM:SL22:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } # Slowly updating PVs for displays # May point to either SW- or FW-calculated # values, depending on architecture # Set dispsuffix macro to "F" to use FW values record(ai, "SBTL:SBPM:SL22:XDISP") { field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SL22:X_SLOW MS CA") field(FLNK, "SBTL:SBPM:SL22:YDISP") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SL22:YDISP") { field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SL22:Y_SLOW MS CA") field(FLNK, "SBTL:SBPM:SL22:TMITDISP") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SL22:TMITDISP") { field(DESC, "TMIT snapshot for display") field(INP, "SBTL:SBPM:SL22:TMIT_SLOW MS CA") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "SBTL:SBPM:SL22:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "SBTL:SBPM:SL22:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "SBTL:SBPM:SL22:SIMC PP") } record(calcout, "SBTL:SBPM:SL22:SIM") { field(DESC, "BPM Pos. Simulation") field(DTYP, "Strip Signal Simulator") field(OUT, "7") #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, "SBTL:SBPM:SL22:USCL") field(INPL, "0") } # Switch simulation record SBTL:SBPM:SL22:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "SBTL:SBPM:SL22:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL22:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SBTL:SBPM:SL22:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL22:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SBTL:SBPM:SL22:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL22:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "SBTL:SBPM:SL22:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL22:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "SBTL:SBPM:SL22:DIGISIMW") { field(DESC, "VME Digi Sim. Waveform") field(DTYP, "VmeDigi Sim Wav") field(OUT, "#C7 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, "SBTL:SBPM:SL22:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "SBTL:SBPM:SL22:MPSBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C0S2@bpmMPS+0,m32") field(MASK, "128") 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, "SBTL:SBPM:SL22:MPSLTBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C1S2@bpmMPS+0,m32") field(MASK, "128") 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, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL22:UOFF") field(DOL2, "SBTL:SBPM:SL22:UOFF") field(DOL3, "SBTL:SBPM:SL22:UOFF") field(DOL4, "SBTL:SBPM:SL22:UOFF") field(DOL5, "SBTL:SBPM:SL22:UOFF") field(DOL6, "SBTL:SBPM:SL22:UOFF") field(DOL7, "SBTL:SBPM:SL22:UOFF") field(DOL8, "SBTL:SBPM:SL22:UOFF") field(DOL9, "SBTL:SBPM:SL22:UOFF") field(DOLA, "SBTL:SBPM:SL22:UOFF") field(LNK1, "SBTL:SBPM:SL22:UOFF_SEL.A PP") field(LNK2, "SBTL:SBPM:SL22:UOFF_SEL.B PP") field(LNK3, "SBTL:SBPM:SL22:UOFF_SEL.C PP") field(LNK4, "SBTL:SBPM:SL22:UOFF_SEL.D PP") field(LNK5, "SBTL:SBPM:SL22:UOFF_SEL.E PP") field(LNK6, "SBTL:SBPM:SL22:UOFF_SEL.F PP") field(LNK7, "SBTL:SBPM:SL22:UOFF_SEL.G PP") field(LNK8, "SBTL:SBPM:SL22:UOFF_SEL.H PP") field(LNK9, "SBTL:SBPM:SL22:UOFF_SEL.I PP") field(LNKA, "SBTL:SBPM:SL22:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL22:UOFF_SEL") field(OUTA, "SBTL:SBPM:SL22:U.AOFF CA") field(OUTB, "SBTL:SBPM:SL22:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL22:UOFF_CTRL") { field(INPA, "SBTL:SBPM:SL22:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL22:VOFF") field(DOL2, "SBTL:SBPM:SL22:VOFF") field(DOL3, "SBTL:SBPM:SL22:VOFF") field(DOL4, "SBTL:SBPM:SL22:VOFF") field(DOL5, "SBTL:SBPM:SL22:VOFF") field(DOL6, "SBTL:SBPM:SL22:VOFF") field(DOL7, "SBTL:SBPM:SL22:VOFF") field(DOL8, "SBTL:SBPM:SL22:VOFF") field(DOL9, "SBTL:SBPM:SL22:VOFF") field(DOLA, "SBTL:SBPM:SL22:VOFF") field(LNK1, "SBTL:SBPM:SL22:VOFF_SEL.A PP") field(LNK2, "SBTL:SBPM:SL22:VOFF_SEL.B PP") field(LNK3, "SBTL:SBPM:SL22:VOFF_SEL.C PP") field(LNK4, "SBTL:SBPM:SL22:VOFF_SEL.D PP") field(LNK5, "SBTL:SBPM:SL22:VOFF_SEL.E PP") field(LNK6, "SBTL:SBPM:SL22:VOFF_SEL.F PP") field(LNK7, "SBTL:SBPM:SL22:VOFF_SEL.G PP") field(LNK8, "SBTL:SBPM:SL22:VOFF_SEL.H PP") field(LNK9, "SBTL:SBPM:SL22:VOFF_SEL.I PP") field(LNKA, "SBTL:SBPM:SL22:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL22:VOFF_SEL") field(OUTA, "SBTL:SBPM:SL22:V.AOFF CA") field(OUTB, "SBTL:SBPM:SL22:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL22:VOFF_CTRL") { field(INPA, "SBTL:SBPM:SL22:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL22:USCL") field(DOL2, "SBTL:SBPM:SL22:USCL") field(DOL3, "SBTL:SBPM:SL22:USCL") field(DOL4, "SBTL:SBPM:SL22:USCL") field(DOL5, "SBTL:SBPM:SL22:USCL") field(DOL6, "SBTL:SBPM:SL22:USCL") field(DOL7, "SBTL:SBPM:SL22:USCL") field(DOL8, "SBTL:SBPM:SL22:USCL") field(DOL9, "SBTL:SBPM:SL22:USCL") field(DOLA, "SBTL:SBPM:SL22:USCL") field(LNK1, "SBTL:SBPM:SL22:USCL_SEL.A PP") field(LNK2, "SBTL:SBPM:SL22:USCL_SEL.B PP") field(LNK3, "SBTL:SBPM:SL22:USCL_SEL.C PP") field(LNK4, "SBTL:SBPM:SL22:USCL_SEL.D PP") field(LNK5, "SBTL:SBPM:SL22:USCL_SEL.E PP") field(LNK6, "SBTL:SBPM:SL22:USCL_SEL.F PP") field(LNK7, "SBTL:SBPM:SL22:USCL_SEL.G PP") field(LNK8, "SBTL:SBPM:SL22:USCL_SEL.H PP") field(LNK9, "SBTL:SBPM:SL22:USCL_SEL.I PP") field(LNKA, "SBTL:SBPM:SL22:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL22:USCL_SEL") field(OUTA, "SBTL:SBPM:SL22:U.ASLO CA") field(OUTB, "SBTL:SBPM:SL22:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL22:USCL_CTRL") { field(INPA, "SBTL:SBPM:SL22:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL22:VSCL") field(DOL2, "SBTL:SBPM:SL22:VSCL") field(DOL3, "SBTL:SBPM:SL22:VSCL") field(DOL4, "SBTL:SBPM:SL22:VSCL") field(DOL5, "SBTL:SBPM:SL22:VSCL") field(DOL6, "SBTL:SBPM:SL22:VSCL") field(DOL7, "SBTL:SBPM:SL22:VSCL") field(DOL8, "SBTL:SBPM:SL22:VSCL") field(DOL9, "SBTL:SBPM:SL22:VSCL") field(DOLA, "SBTL:SBPM:SL22:VSCL") field(LNK1, "SBTL:SBPM:SL22:VSCL_SEL.A PP") field(LNK2, "SBTL:SBPM:SL22:VSCL_SEL.B PP") field(LNK3, "SBTL:SBPM:SL22:VSCL_SEL.C PP") field(LNK4, "SBTL:SBPM:SL22:VSCL_SEL.D PP") field(LNK5, "SBTL:SBPM:SL22:VSCL_SEL.E PP") field(LNK6, "SBTL:SBPM:SL22:VSCL_SEL.F PP") field(LNK7, "SBTL:SBPM:SL22:VSCL_SEL.G PP") field(LNK8, "SBTL:SBPM:SL22:VSCL_SEL.H PP") field(LNK9, "SBTL:SBPM:SL22:VSCL_SEL.I PP") field(LNKA, "SBTL:SBPM:SL22:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL22:VSCL_SEL") field(OUTA, "SBTL:SBPM:SL22:V.ASLO CA") field(OUTB, "SBTL:SBPM:SL22:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL22:VSCL_CTRL") { field(INPA, "SBTL:SBPM:SL22:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL22:PHI") field(DOL2, "SBTL:SBPM:SL22:PHI") field(DOL3, "SBTL:SBPM:SL22:PHI") field(DOL4, "SBTL:SBPM:SL22:PHI") field(DOL5, "SBTL:SBPM:SL22:PHI") field(DOL6, "SBTL:SBPM:SL22:PHI") field(DOL7, "SBTL:SBPM:SL22:PHI") field(DOL8, "SBTL:SBPM:SL22:PHI") field(DOL9, "SBTL:SBPM:SL22:PHI") field(DOLA, "SBTL:SBPM:SL22:PHI") field(LNK1, "SBTL:SBPM:SL22:PHI_SEL.A PP") field(LNK2, "SBTL:SBPM:SL22:PHI_SEL.B PP") field(LNK3, "SBTL:SBPM:SL22:PHI_SEL.C PP") field(LNK4, "SBTL:SBPM:SL22:PHI_SEL.D PP") field(LNK5, "SBTL:SBPM:SL22:PHI_SEL.E PP") field(LNK6, "SBTL:SBPM:SL22:PHI_SEL.F PP") field(LNK7, "SBTL:SBPM:SL22:PHI_SEL.G PP") field(LNK8, "SBTL:SBPM:SL22:PHI_SEL.H PP") field(LNK9, "SBTL:SBPM:SL22:PHI_SEL.I PP") field(LNKA, "SBTL:SBPM:SL22:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL22:PHI_SEL") field(OUTA, "SBTL:SBPM:SL22:CALC.E CA") field(OUTB, "SBTL:SBPM:SL22:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL22:PHI_CTRL") { field(INPA, "SBTL:SBPM:SL22:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL22:PSI") field(DOL2, "SBTL:SBPM:SL22:PSI") field(DOL3, "SBTL:SBPM:SL22:PSI") field(DOL4, "SBTL:SBPM:SL22:PSI") field(DOL5, "SBTL:SBPM:SL22:PSI") field(DOL6, "SBTL:SBPM:SL22:PSI") field(DOL7, "SBTL:SBPM:SL22:PSI") field(DOL8, "SBTL:SBPM:SL22:PSI") field(DOL9, "SBTL:SBPM:SL22:PSI") field(DOLA, "SBTL:SBPM:SL22:PSI") field(LNK1, "SBTL:SBPM:SL22:PSI_SEL.A PP") field(LNK2, "SBTL:SBPM:SL22:PSI_SEL.B PP") field(LNK3, "SBTL:SBPM:SL22:PSI_SEL.C PP") field(LNK4, "SBTL:SBPM:SL22:PSI_SEL.D PP") field(LNK5, "SBTL:SBPM:SL22:PSI_SEL.E PP") field(LNK6, "SBTL:SBPM:SL22:PSI_SEL.F PP") field(LNK7, "SBTL:SBPM:SL22:PSI_SEL.G PP") field(LNK8, "SBTL:SBPM:SL22:PSI_SEL.H PP") field(LNK9, "SBTL:SBPM:SL22:PSI_SEL.I PP") field(LNKA, "SBTL:SBPM:SL22:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL22:PSI_SEL") field(OUTA, "SBTL:SBPM:SL22:CALC.F CA") field(OUTB, "SBTL:SBPM:SL22:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL22:PSI_CTRL") { field(INPA, "SBTL:SBPM:SL22:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL22:PSI_SEL.L PP") } record(longout, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL23:GRN") { field(DESC, "GRN Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C8 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, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:RED") { field(DESC, "RED Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C8 S1") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:BLU") { field(DESC, "BLU Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C8 S2") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:YLO") { field(DESC, "YLO Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C8 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, "SBTL:SBPM:SL23:REDW") { field(DESC, "Raw CAL RED Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C8 S1") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "SBTL:SBPM:SL23:GRNW") { field(DESC, "Raw CAL GRN Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C8 S2") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "SBTL:SBPM:SL23: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, "#C8 S7") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "SBTL:SBPM:SL23:REDDBG") { field(DESC, "Raw CAL RED Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C8 S8 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "SBTL:SBPM:SL23:GRNDBG") { field(DESC, "Raw CAL GRN Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C8 S9 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(ai, "SBTL:SBPM:SL23:GRUV") { field(DESC, "CAL Gain GRN/RED") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C8 S0") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") } record(ai, "SBTL:SBPM:SL23:GRU") { field(DESC, "CAL Gain GRN/BLU") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C8 S1") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "SBTL:SBPM:SL23:GRV") { field(DESC, "CAL Gain RED/YLO") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C8 S2") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "SBTL:SBPM:SL23: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, "#C8 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, "SBTL:SBPM:SL23: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, "#C8 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, "SBTL:SBPM:SL23: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, "#C8 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, "SBTL:SBPM:SL23: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, "#C8 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(bo, "SBTL:SBPM:SL23:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL23:CALC.K NPP MS") field(ZNAM, "Off") field(ONAM, "On") field(VAL, "0") 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, "SBTL:SBPM:SL23:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "SBTL:SBPM:SL23:ATT1 CP") field(INPC, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "SBTL:SBPM:SL23:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL23:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL23:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "SBTL:SBPM:SL23:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL23:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL23:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "SBTL:SBPM:SL23:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "SBTL:SBPM:SL23:RSTA.SEVR MS NPP") field(INPB, "SBTL:SBPM:SL23:TMIT.SEVR MS NPP") field(INPC, "SBTL:SBPM:SL23:Y.SEVR MS NPP") field(INPD, "SBTL:SBPM:SL23:X.SEVR MS NPP") field(INPE, "SBTL:SBPM:SL23:TGRN.SEVR MS NPP") field(INPF, "SBTL:SBPM:SL23:TRED.SEVR MS NPP") field(INPG, "SBTL:SBPM:SL23:TBLU.SEVR MS NPP") field(INPH, "SBTL:SBPM:SL23:TYLO.SEVR MS NPP") field(INPI, "SBTL:SBPM:SL23:GRU.SEVR MS NPP") field(INPJ, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "SBTL:SBPM:SL23:RSTA_ALH.SEVR MS NPP") field(INPB, "SBTL:SBPM:SL23:GRU.SEVR MS NPP") field(INPC, "SBTL:SBPM:SL23:GRV.SEVR MS NPP") field(INPD, "SBTL:SBPM:SL23:CHK.SEVR MS NPP") # for optional additional alarm input: field(INPE, "") } # snapshot PV for the bpm values display record(ai, "SBTL:SBPM:SL23:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "SBTL:SBPM:SL23:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SBTL:SBPM:SL23:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "SBTL:SBPM:SL23:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "8") field(SCAN, "Passive") } record(bo, "SBTL:SBPM:SL23:PINC_ENA") { field(DESC, "Simple Pincushion Alg") field(DTYP, "BusAddress") field(OUT, "#C0S2@drvBpmStriplPincEna,m32") field(MASK, "256") field(ZNAM, "DISABLED") field(ONAM, "ENABLED") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } record(ao, "SBTL:SBPM:SL23:UDR_THRES") { field(DESC, "Detection Underrange Threshold") field(DTYP, "Bpm Parameters") field(OUT, "#C8S0") 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, "SBTL:SBPM:SL23:X") { field(DESC, "X Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C8 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, "SBTL:SBPM:SL23:Y") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SBTL:SBPM:SL23:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C8 S12") field(FLNK, "SBTL:SBPM:SL23:TMIT") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "SBTL:SBPM:SL23:TMIT") { field(DESC, "Charge Estimate") field(DTYP, "Raw Bpm Signal") field(INP, "#C8 S13") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") # FLINK into BSA field(FLNK, "SBTL:SBPM:SL23:EFX.PROC") field(ASG, "") field(TSE, "-2") 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, "SBTL:SBPM:SL23:RWAV") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C8 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, "SBTL:SBPM:SL23:U") { field(DESC, "Raw U Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C8 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, "SBTL:SBPM:SL23:V") } record(ai, "SBTL:SBPM:SL23:V") { field(DESC, "Raw V Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C8 S9") field(SCAN, "Passive") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "SBTL:SBPM:SL23:PINC") } record(ai, "SBTL:SBPM:SL23:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C8 S10") field(SCAN, "Passive") } record(longin, "SBTL:SBPM:SL23:RSTA") { field(DESC, "Status of Raw Processor") field(DTYP, "Bpm Raw Status") field(INP, "#C8S0") field(SCAN, "1 second") field(LOLO, "-1") field(HIHI, "+1") field(HHSV, "INVALID") field(LLSV, "INVALID") field(FLNK, "SBTL:SBPM:SL23:RSTA_ALH") } record(calc, "SBTL:SBPM:SL23:RSTA_ALH") { field(CALC, "A & B") field(INPA, "SBTL:SBPM:SL23:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:PHI_SEQ") } record(ao, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:PSI_SEQ") } #record(dfanout, "SBTL:SBPM:SL23:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "SBTL:SBPM:SL23:USCL PP MS") # field(OUTB, "SBTL:SBPM:SL23:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:UOFF_SEQ") } record(ao, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:VOFF_SEQ") } record(ao, "SBTL:SBPM:SL23:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SBTL:SBPM:SL23:USCL_SEQ") } record(ao, "SBTL:SBPM:SL23:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "SBTL:SBPM:SL23:VSCL_SEQ") } record(mbbo, "SBTL:SBPM:SL23:ACCESS") { field(DESC, "BPM On Line") field(DTYP, "StreamSwitch") field(OUT, "#C8 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, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMSL23") field(PINI, "YES") } record(stringin, "SBPMSL23:NAME") { field(DESC, "BPM Name") field(VAL, "SBTL:SBPM:SL23") field(PINI, "YES") } record(ai, "SBTL:SBPM:SL23:X_SLOW") { #alias("SBTL:SBPM:SL23:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SL23:X MS") field(FLNK, "SBTL:SBPM:SL23:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SL23:Y_SLOW") { #alias("SBTL:SBPM:SL23:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SL23:Y NPP MS") field(FLNK, "SBTL:SBPM:SL23:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SL23:TMIT_SLOW") { #alias("SBTL:SBPM:SL23:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "SBTL:SBPM:SL23:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } # Slowly updating PVs for displays # May point to either SW- or FW-calculated # values, depending on architecture # Set dispsuffix macro to "F" to use FW values record(ai, "SBTL:SBPM:SL23:XDISP") { field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SL23:X_SLOW MS CA") field(FLNK, "SBTL:SBPM:SL23:YDISP") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SL23:YDISP") { field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "SBTL:SBPM:SL23:Y_SLOW MS CA") field(FLNK, "SBTL:SBPM:SL23:TMITDISP") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "SBTL:SBPM:SL23:TMITDISP") { field(DESC, "TMIT snapshot for display") field(INP, "SBTL:SBPM:SL23:TMIT_SLOW MS CA") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "SBTL:SBPM:SL23:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "SBTL:SBPM:SL23:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "SBTL:SBPM:SL23:SIMC PP") } record(calcout, "SBTL:SBPM:SL23:SIM") { field(DESC, "BPM Pos. Simulation") field(DTYP, "Strip Signal Simulator") field(OUT, "8") #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, "SBTL:SBPM:SL23:USCL") field(INPL, "0") } # Switch simulation record SBTL:SBPM:SL23:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "SBTL:SBPM:SL23:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL23:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SBTL:SBPM:SL23:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL23:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "SBTL:SBPM:SL23:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL23:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "SBTL:SBPM:SL23:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "SBTL:SBPM:SL23:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "SBTL:SBPM:SL23:DIGISIMW") { field(DESC, "VME Digi Sim. Waveform") field(DTYP, "VmeDigi Sim Wav") field(OUT, "#C8 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, "SBTL:SBPM:SL23:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "SBTL:SBPM:SL23:MPSBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C0S2@bpmMPS+0,m32") field(MASK, "256") 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, "SBTL:SBPM:SL23:MPSLTBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C1S2@bpmMPS+0,m32") field(MASK, "256") 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, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL23:UOFF") field(DOL2, "SBTL:SBPM:SL23:UOFF") field(DOL3, "SBTL:SBPM:SL23:UOFF") field(DOL4, "SBTL:SBPM:SL23:UOFF") field(DOL5, "SBTL:SBPM:SL23:UOFF") field(DOL6, "SBTL:SBPM:SL23:UOFF") field(DOL7, "SBTL:SBPM:SL23:UOFF") field(DOL8, "SBTL:SBPM:SL23:UOFF") field(DOL9, "SBTL:SBPM:SL23:UOFF") field(DOLA, "SBTL:SBPM:SL23:UOFF") field(LNK1, "SBTL:SBPM:SL23:UOFF_SEL.A PP") field(LNK2, "SBTL:SBPM:SL23:UOFF_SEL.B PP") field(LNK3, "SBTL:SBPM:SL23:UOFF_SEL.C PP") field(LNK4, "SBTL:SBPM:SL23:UOFF_SEL.D PP") field(LNK5, "SBTL:SBPM:SL23:UOFF_SEL.E PP") field(LNK6, "SBTL:SBPM:SL23:UOFF_SEL.F PP") field(LNK7, "SBTL:SBPM:SL23:UOFF_SEL.G PP") field(LNK8, "SBTL:SBPM:SL23:UOFF_SEL.H PP") field(LNK9, "SBTL:SBPM:SL23:UOFF_SEL.I PP") field(LNKA, "SBTL:SBPM:SL23:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL23:UOFF_SEL") field(OUTA, "SBTL:SBPM:SL23:U.AOFF CA") field(OUTB, "SBTL:SBPM:SL23:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL23:UOFF_CTRL") { field(INPA, "SBTL:SBPM:SL23:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL23:VOFF") field(DOL2, "SBTL:SBPM:SL23:VOFF") field(DOL3, "SBTL:SBPM:SL23:VOFF") field(DOL4, "SBTL:SBPM:SL23:VOFF") field(DOL5, "SBTL:SBPM:SL23:VOFF") field(DOL6, "SBTL:SBPM:SL23:VOFF") field(DOL7, "SBTL:SBPM:SL23:VOFF") field(DOL8, "SBTL:SBPM:SL23:VOFF") field(DOL9, "SBTL:SBPM:SL23:VOFF") field(DOLA, "SBTL:SBPM:SL23:VOFF") field(LNK1, "SBTL:SBPM:SL23:VOFF_SEL.A PP") field(LNK2, "SBTL:SBPM:SL23:VOFF_SEL.B PP") field(LNK3, "SBTL:SBPM:SL23:VOFF_SEL.C PP") field(LNK4, "SBTL:SBPM:SL23:VOFF_SEL.D PP") field(LNK5, "SBTL:SBPM:SL23:VOFF_SEL.E PP") field(LNK6, "SBTL:SBPM:SL23:VOFF_SEL.F PP") field(LNK7, "SBTL:SBPM:SL23:VOFF_SEL.G PP") field(LNK8, "SBTL:SBPM:SL23:VOFF_SEL.H PP") field(LNK9, "SBTL:SBPM:SL23:VOFF_SEL.I PP") field(LNKA, "SBTL:SBPM:SL23:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL23:VOFF_SEL") field(OUTA, "SBTL:SBPM:SL23:V.AOFF CA") field(OUTB, "SBTL:SBPM:SL23:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL23:VOFF_CTRL") { field(INPA, "SBTL:SBPM:SL23:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL23:USCL") field(DOL2, "SBTL:SBPM:SL23:USCL") field(DOL3, "SBTL:SBPM:SL23:USCL") field(DOL4, "SBTL:SBPM:SL23:USCL") field(DOL5, "SBTL:SBPM:SL23:USCL") field(DOL6, "SBTL:SBPM:SL23:USCL") field(DOL7, "SBTL:SBPM:SL23:USCL") field(DOL8, "SBTL:SBPM:SL23:USCL") field(DOL9, "SBTL:SBPM:SL23:USCL") field(DOLA, "SBTL:SBPM:SL23:USCL") field(LNK1, "SBTL:SBPM:SL23:USCL_SEL.A PP") field(LNK2, "SBTL:SBPM:SL23:USCL_SEL.B PP") field(LNK3, "SBTL:SBPM:SL23:USCL_SEL.C PP") field(LNK4, "SBTL:SBPM:SL23:USCL_SEL.D PP") field(LNK5, "SBTL:SBPM:SL23:USCL_SEL.E PP") field(LNK6, "SBTL:SBPM:SL23:USCL_SEL.F PP") field(LNK7, "SBTL:SBPM:SL23:USCL_SEL.G PP") field(LNK8, "SBTL:SBPM:SL23:USCL_SEL.H PP") field(LNK9, "SBTL:SBPM:SL23:USCL_SEL.I PP") field(LNKA, "SBTL:SBPM:SL23:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL23:USCL_SEL") field(OUTA, "SBTL:SBPM:SL23:U.ASLO CA") field(OUTB, "SBTL:SBPM:SL23:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL23:USCL_CTRL") { field(INPA, "SBTL:SBPM:SL23:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL23:VSCL") field(DOL2, "SBTL:SBPM:SL23:VSCL") field(DOL3, "SBTL:SBPM:SL23:VSCL") field(DOL4, "SBTL:SBPM:SL23:VSCL") field(DOL5, "SBTL:SBPM:SL23:VSCL") field(DOL6, "SBTL:SBPM:SL23:VSCL") field(DOL7, "SBTL:SBPM:SL23:VSCL") field(DOL8, "SBTL:SBPM:SL23:VSCL") field(DOL9, "SBTL:SBPM:SL23:VSCL") field(DOLA, "SBTL:SBPM:SL23:VSCL") field(LNK1, "SBTL:SBPM:SL23:VSCL_SEL.A PP") field(LNK2, "SBTL:SBPM:SL23:VSCL_SEL.B PP") field(LNK3, "SBTL:SBPM:SL23:VSCL_SEL.C PP") field(LNK4, "SBTL:SBPM:SL23:VSCL_SEL.D PP") field(LNK5, "SBTL:SBPM:SL23:VSCL_SEL.E PP") field(LNK6, "SBTL:SBPM:SL23:VSCL_SEL.F PP") field(LNK7, "SBTL:SBPM:SL23:VSCL_SEL.G PP") field(LNK8, "SBTL:SBPM:SL23:VSCL_SEL.H PP") field(LNK9, "SBTL:SBPM:SL23:VSCL_SEL.I PP") field(LNKA, "SBTL:SBPM:SL23:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL23:VSCL_SEL") field(OUTA, "SBTL:SBPM:SL23:V.ASLO CA") field(OUTB, "SBTL:SBPM:SL23:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL23:VSCL_CTRL") { field(INPA, "SBTL:SBPM:SL23:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL23:PHI") field(DOL2, "SBTL:SBPM:SL23:PHI") field(DOL3, "SBTL:SBPM:SL23:PHI") field(DOL4, "SBTL:SBPM:SL23:PHI") field(DOL5, "SBTL:SBPM:SL23:PHI") field(DOL6, "SBTL:SBPM:SL23:PHI") field(DOL7, "SBTL:SBPM:SL23:PHI") field(DOL8, "SBTL:SBPM:SL23:PHI") field(DOL9, "SBTL:SBPM:SL23:PHI") field(DOLA, "SBTL:SBPM:SL23:PHI") field(LNK1, "SBTL:SBPM:SL23:PHI_SEL.A PP") field(LNK2, "SBTL:SBPM:SL23:PHI_SEL.B PP") field(LNK3, "SBTL:SBPM:SL23:PHI_SEL.C PP") field(LNK4, "SBTL:SBPM:SL23:PHI_SEL.D PP") field(LNK5, "SBTL:SBPM:SL23:PHI_SEL.E PP") field(LNK6, "SBTL:SBPM:SL23:PHI_SEL.F PP") field(LNK7, "SBTL:SBPM:SL23:PHI_SEL.G PP") field(LNK8, "SBTL:SBPM:SL23:PHI_SEL.H PP") field(LNK9, "SBTL:SBPM:SL23:PHI_SEL.I PP") field(LNKA, "SBTL:SBPM:SL23:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL23:PHI_SEL") field(OUTA, "SBTL:SBPM:SL23:CALC.E CA") field(OUTB, "SBTL:SBPM:SL23:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL23:PHI_CTRL") { field(INPA, "SBTL:SBPM:SL23:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "SBTL:SBPM:SL23:PSI") field(DOL2, "SBTL:SBPM:SL23:PSI") field(DOL3, "SBTL:SBPM:SL23:PSI") field(DOL4, "SBTL:SBPM:SL23:PSI") field(DOL5, "SBTL:SBPM:SL23:PSI") field(DOL6, "SBTL:SBPM:SL23:PSI") field(DOL7, "SBTL:SBPM:SL23:PSI") field(DOL8, "SBTL:SBPM:SL23:PSI") field(DOL9, "SBTL:SBPM:SL23:PSI") field(DOLA, "SBTL:SBPM:SL23:PSI") field(LNK1, "SBTL:SBPM:SL23:PSI_SEL.A PP") field(LNK2, "SBTL:SBPM:SL23:PSI_SEL.B PP") field(LNK3, "SBTL:SBPM:SL23:PSI_SEL.C PP") field(LNK4, "SBTL:SBPM:SL23:PSI_SEL.D PP") field(LNK5, "SBTL:SBPM:SL23:PSI_SEL.E PP") field(LNK6, "SBTL:SBPM:SL23:PSI_SEL.F PP") field(LNK7, "SBTL:SBPM:SL23:PSI_SEL.G PP") field(LNK8, "SBTL:SBPM:SL23:PSI_SEL.H PP") field(LNK9, "SBTL:SBPM:SL23:PSI_SEL.I PP") field(LNKA, "SBTL:SBPM:SL23:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "SBTL:SBPM:SL23:PSI_SEL") field(OUTA, "SBTL:SBPM:SL23:CALC.F CA") field(OUTB, "SBTL:SBPM:SL23:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "SBTL:SBPM:SL23:PSI_CTRL") { field(INPA, "SBTL:SBPM:SL23:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "SBTL:SBPM:SL23:PSI_SEL.L PP") } record(longout, "SBTL:SBPM:SL23: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. # SL3:SBPM:SL16:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # SL3:SBPM:SL16:ACTL.DOL <---- SL3:SBPM:SL16:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SL3:SBPM:SL16:ATTOL.DOL<---- SL3:SBPM:SL16:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SL3:SBPM:SL16:CLAOL.DOL<---- SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:ATTINIT") } record(longout, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE0+6,qspiAfe") } record(mbbo, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "SL3:SBPM:SL16:VERS") field(FTVA, "LONG") field(OUTA, "SL3:SBPM:SL16:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "SL3:SBPM:SL16:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "SL3:SBPM:SL16:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "SL3:SBPM:SL16:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "SL3:SBPM:SL16:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "SL3:SBPM:SL16:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "SL3:SBPM:SL16:ATT.VAL") field(FTVH, "LONG") field(OUTH, "SL3:SBPM:SL16:ATTC.D") field(FTVI, "LONG") field(OUTI, "SL3:SBPM:SL16:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "SL3:SBPM:SL16:ATTC.F") field(FTVK, "LONG") field(OUTK, "SL3:SBPM:SL16:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "SL3:SBPM:SL16:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "SL3:SBPM:SL16:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "SL3:SBPM:SL16:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "SL3:SBPM:SL16:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "SL3:SBPM:SL16:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "SL3:SBPM:SL16:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "SL3:SBPM:SL16:CLAO.HOPR") field(FLNK, "SL3:SBPM:SL16:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "SL3:SBPM:SL16:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "SL3:SBPM:SL16:ATTC.A PP") field(DRVL, "0") field(DRVH, "30") field(LOPR, "0") field(HOPR, "30") field(EGU, "dB") field(DOL, "VIOC:GUN:BPM: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: # SL3:SBPM:SL16:ATT1 = A1 # SL3:SBPM:SL16:ATT2 = A2 # SL3:SBPM:SL16:CALA = CA # record(sub, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL16:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL16:ATTO CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL16:ATTC.B PP") field(EGU, "dB") } record(longout, "SL3:SBPM:SL16:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL16:CLAO CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL16:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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. # SL3:SBPM:SL17:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # SL3:SBPM:SL17:ACTL.DOL <---- SL3:SBPM:SL17:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SL3:SBPM:SL17:ATTOL.DOL<---- SL3:SBPM:SL17:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SL3:SBPM:SL17:CLAOL.DOL<---- SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:ATTINIT") } record(longout, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE1+6,qspiAfe") } record(mbbo, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "SL3:SBPM:SL17:VERS") field(FTVA, "LONG") field(OUTA, "SL3:SBPM:SL17:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "SL3:SBPM:SL17:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "SL3:SBPM:SL17:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "SL3:SBPM:SL17:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "SL3:SBPM:SL17:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "SL3:SBPM:SL17:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "SL3:SBPM:SL17:ATT.VAL") field(FTVH, "LONG") field(OUTH, "SL3:SBPM:SL17:ATTC.D") field(FTVI, "LONG") field(OUTI, "SL3:SBPM:SL17:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "SL3:SBPM:SL17:ATTC.F") field(FTVK, "LONG") field(OUTK, "SL3:SBPM:SL17:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "SL3:SBPM:SL17:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "SL3:SBPM:SL17:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "SL3:SBPM:SL17:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "SL3:SBPM:SL17:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "SL3:SBPM:SL17:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "SL3:SBPM:SL17:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "SL3:SBPM:SL17:CLAO.HOPR") field(FLNK, "SL3:SBPM:SL17:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "SL3:SBPM:SL17:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "SL3:SBPM:SL17:ATTC.A PP") field(DRVL, "0") field(DRVH, "30") field(LOPR, "0") field(HOPR, "30") field(EGU, "dB") field(DOL, "VIOC:GUN:BPM: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: # SL3:SBPM:SL17:ATT1 = A1 # SL3:SBPM:SL17:ATT2 = A2 # SL3:SBPM:SL17:CALA = CA # record(sub, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL17:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL17:ATTO CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL17:ATTC.B PP") field(EGU, "dB") } record(longout, "SL3:SBPM:SL17:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL17:CLAO CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL17:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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") } # 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. # SL3:SBPM:SL18:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # SL3:SBPM:SL18:ACTL.DOL <---- SL3:SBPM:SL18:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SL3:SBPM:SL18:ATTOL.DOL<---- SL3:SBPM:SL18:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SL3:SBPM:SL18:CLAOL.DOL<---- SL3:SBPM:SL18: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, "SL3:SBPM:SL18:CALA") { field(DESC, "AFE Cal. Att.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE2+1,qspiAfe") field(LOPR, "0") field(HOPR, "31") field(DRVL, "6") field(DRVH, "31") field(EGU, "dB") } record(longout, "SL3:SBPM:SL18:ATT1") { field(DESC, "AFE Att. 1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE2+2,qspiAfe") field(LOPR, "0") field(HOPR, "15") field(DRVL, "0") field(DRVH, "15") field(EGU, "dB") } record(longout, "SL3:SBPM:SL18:ATT2") { field(DESC, "AFE Att. 2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE2+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, "SL3:SBPM:SL18:VERS") { field(DESC, "AFE Firmware Vers.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(INP, "#C0S0@AFE2+5,qspiAfe") field(LOLO, "3") field(LLSV, "MAJOR") field(PINI, "YES") field(FLNK, "SL3:SBPM:SL18:ATTINIT") } record(longout, "SL3:SBPM:SL18:AODL") { field(DESC, "Delay Trig -> AMP On") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE2+0x10,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SL3:SBPM:SL18:R1DL") { field(DESC, "Delay AMP On -> RF1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE2+0x11,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SL3:SBPM:SL18:RFWD") { field(DESC, "RF Pulse Width") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE2+0x13,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") info(autosaveFields, "VAL") } record(longout, "SL3:SBPM:SL18:OFFT") { field(DESC, "Delay RF Off -> Ctrl Sw.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE2+0x14,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SL3:SBPM:SL18:R2DL") { field(DESC, "Ctrl Sw. -> RF2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE2+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, "SL3:SBPM:SL18:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE2+6,qspiAfe") } record(mbbo, "SL3:SBPM:SL18:CALM") { field(DESC, "AFE Cal. Mode") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE2+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, "SL3:SBPM:SL18:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "SL3:SBPM:SL18:VERS") field(FTVA, "LONG") field(OUTA, "SL3:SBPM:SL18:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "SL3:SBPM:SL18:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "SL3:SBPM:SL18:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "SL3:SBPM:SL18:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "SL3:SBPM:SL18:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "SL3:SBPM:SL18:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "SL3:SBPM:SL18:ATT.VAL") field(FTVH, "LONG") field(OUTH, "SL3:SBPM:SL18:ATTC.D") field(FTVI, "LONG") field(OUTI, "SL3:SBPM:SL18:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "SL3:SBPM:SL18:ATTC.F") field(FTVK, "LONG") field(OUTK, "SL3:SBPM:SL18:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "SL3:SBPM:SL18:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "SL3:SBPM:SL18:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "SL3:SBPM:SL18:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "SL3:SBPM:SL18:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "SL3:SBPM:SL18:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "SL3:SBPM:SL18:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "SL3:SBPM:SL18:CLAO.HOPR") field(FLNK, "SL3:SBPM:SL18:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "SL3:SBPM:SL18:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "SL3:SBPM:SL18:ATTC.A PP") field(DRVL, "0") field(DRVH, "30") field(LOPR, "0") field(HOPR, "30") field(EGU, "dB") field(DOL, "VIOC:GUN:BPM: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: # SL3:SBPM:SL18:ATT1 = A1 # SL3:SBPM:SL18:ATT2 = A2 # SL3:SBPM:SL18:CALA = CA # record(sub, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL18:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL18: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, "SL3:SBPM:SL18:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL18:ATTO CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL18:ATTC.B PP") field(EGU, "dB") } record(longout, "SL3:SBPM:SL18:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL18:CLAO CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL18:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "SL3:SBPM:SL18:TRIG2BEAM") { field(DESC, "Trigger -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE2+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, "SL3:SBPM:SL18:RF2RED") { field(DESC, "Red RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE2+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, "SL3:SBPM:SL18:RF2GRN") { field(DESC, "Grn RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE2+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. # SL3:SBPM:SL19:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # SL3:SBPM:SL19:ACTL.DOL <---- SL3:SBPM:SL19:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SL3:SBPM:SL19:ATTOL.DOL<---- SL3:SBPM:SL19:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SL3:SBPM:SL19:CLAOL.DOL<---- SL3:SBPM:SL19: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, "SL3:SBPM:SL19:CALA") { field(DESC, "AFE Cal. Att.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE3+1,qspiAfe") field(LOPR, "0") field(HOPR, "31") field(DRVL, "6") field(DRVH, "31") field(EGU, "dB") } record(longout, "SL3:SBPM:SL19:ATT1") { field(DESC, "AFE Att. 1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE3+2,qspiAfe") field(LOPR, "0") field(HOPR, "15") field(DRVL, "0") field(DRVH, "15") field(EGU, "dB") } record(longout, "SL3:SBPM:SL19:ATT2") { field(DESC, "AFE Att. 2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE3+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, "SL3:SBPM:SL19:VERS") { field(DESC, "AFE Firmware Vers.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(INP, "#C0S0@AFE3+5,qspiAfe") field(LOLO, "3") field(LLSV, "MAJOR") field(PINI, "YES") field(FLNK, "SL3:SBPM:SL19:ATTINIT") } record(longout, "SL3:SBPM:SL19:AODL") { field(DESC, "Delay Trig -> AMP On") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE3+0x10,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SL3:SBPM:SL19:R1DL") { field(DESC, "Delay AMP On -> RF1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE3+0x11,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SL3:SBPM:SL19:RFWD") { field(DESC, "RF Pulse Width") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE3+0x13,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") info(autosaveFields, "VAL") } record(longout, "SL3:SBPM:SL19:OFFT") { field(DESC, "Delay RF Off -> Ctrl Sw.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE3+0x14,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SL3:SBPM:SL19:R2DL") { field(DESC, "Ctrl Sw. -> RF2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE3+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, "SL3:SBPM:SL19:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE3+6,qspiAfe") } record(mbbo, "SL3:SBPM:SL19:CALM") { field(DESC, "AFE Cal. Mode") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE3+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, "SL3:SBPM:SL19:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "SL3:SBPM:SL19:VERS") field(FTVA, "LONG") field(OUTA, "SL3:SBPM:SL19:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "SL3:SBPM:SL19:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "SL3:SBPM:SL19:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "SL3:SBPM:SL19:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "SL3:SBPM:SL19:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "SL3:SBPM:SL19:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "SL3:SBPM:SL19:ATT.VAL") field(FTVH, "LONG") field(OUTH, "SL3:SBPM:SL19:ATTC.D") field(FTVI, "LONG") field(OUTI, "SL3:SBPM:SL19:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "SL3:SBPM:SL19:ATTC.F") field(FTVK, "LONG") field(OUTK, "SL3:SBPM:SL19:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "SL3:SBPM:SL19:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "SL3:SBPM:SL19:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "SL3:SBPM:SL19:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "SL3:SBPM:SL19:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "SL3:SBPM:SL19:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "SL3:SBPM:SL19:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "SL3:SBPM:SL19:CLAO.HOPR") field(FLNK, "SL3:SBPM:SL19:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "SL3:SBPM:SL19:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "SL3:SBPM:SL19:ATTC.A PP") field(DRVL, "0") field(DRVH, "30") field(LOPR, "0") field(HOPR, "30") field(EGU, "dB") field(DOL, "VIOC:GUN:BPM: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: # SL3:SBPM:SL19:ATT1 = A1 # SL3:SBPM:SL19:ATT2 = A2 # SL3:SBPM:SL19:CALA = CA # record(sub, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL19:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL19: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, "SL3:SBPM:SL19:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL19:ATTO CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL19:ATTC.B PP") field(EGU, "dB") } record(longout, "SL3:SBPM:SL19:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "SL3:SBPM:SL19:CLAO CP") field(OMSL, "closed_loop") field(OUT, "SL3:SBPM:SL19:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "SL3:SBPM:SL19:TRIG2BEAM") { field(DESC, "Trigger -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE3+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, "SL3:SBPM:SL19:RF2RED") { field(DESC, "Red RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE3+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, "SL3:SBPM:SL19:RF2GRN") { field(DESC, "Grn RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE3+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. # SBTL:SBPM:SB01:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # SBTL:SBPM:SB01:ACTL.DOL <---- SBTL:SBPM:SB01:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SBTL:SBPM:SB01:ATTOL.DOL<---- SBTL:SBPM:SB01:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SBTL:SBPM:SB01:CLAOL.DOL<---- SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:CALA") { field(DESC, "AFE Cal. Att.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE4+1,qspiAfe") field(LOPR, "0") field(HOPR, "31") field(DRVL, "6") field(DRVH, "31") field(EGU, "dB") } record(longout, "SBTL:SBPM:SB01:ATT1") { field(DESC, "AFE Att. 1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE4+2,qspiAfe") field(LOPR, "0") field(HOPR, "15") field(DRVL, "0") field(DRVH, "15") field(EGU, "dB") } record(longout, "SBTL:SBPM:SB01:ATT2") { field(DESC, "AFE Att. 2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE4+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, "SBTL:SBPM:SB01:VERS") { field(DESC, "AFE Firmware Vers.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(INP, "#C0S0@AFE4+5,qspiAfe") field(LOLO, "3") field(LLSV, "MAJOR") field(PINI, "YES") field(FLNK, "SBTL:SBPM:SB01:ATTINIT") } record(longout, "SBTL:SBPM:SB01:AODL") { field(DESC, "Delay Trig -> AMP On") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE4+0x10,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SBTL:SBPM:SB01:R1DL") { field(DESC, "Delay AMP On -> RF1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE4+0x11,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SBTL:SBPM:SB01:RFWD") { field(DESC, "RF Pulse Width") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE4+0x13,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") info(autosaveFields, "VAL") } record(longout, "SBTL:SBPM:SB01:OFFT") { field(DESC, "Delay RF Off -> Ctrl Sw.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE4+0x14,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SBTL:SBPM:SB01:R2DL") { field(DESC, "Ctrl Sw. -> RF2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE4+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, "SBTL:SBPM:SB01:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE4+6,qspiAfe") } record(mbbo, "SBTL:SBPM:SB01:CALM") { field(DESC, "AFE Cal. Mode") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE4+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, "SBTL:SBPM:SB01:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "SBTL:SBPM:SB01:VERS") field(FTVA, "LONG") field(OUTA, "SBTL:SBPM:SB01:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "SBTL:SBPM:SB01:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "SBTL:SBPM:SB01:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "SBTL:SBPM:SB01:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "SBTL:SBPM:SB01:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "SBTL:SBPM:SB01:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "SBTL:SBPM:SB01:ATT.VAL") field(FTVH, "LONG") field(OUTH, "SBTL:SBPM:SB01:ATTC.D") field(FTVI, "LONG") field(OUTI, "SBTL:SBPM:SB01:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "SBTL:SBPM:SB01:ATTC.F") field(FTVK, "LONG") field(OUTK, "SBTL:SBPM:SB01:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "SBTL:SBPM:SB01:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "SBTL:SBPM:SB01:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "SBTL:SBPM:SB01:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "SBTL:SBPM:SB01:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "SBTL:SBPM:SB01:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "SBTL:SBPM:SB01:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "SBTL:SBPM:SB01:CLAO.HOPR") field(FLNK, "SBTL:SBPM:SB01:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "SBTL:SBPM:SB01:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "SBTL:SBPM:SB01:ATTC.A PP") field(DRVL, "0") field(DRVH, "30") field(LOPR, "0") field(HOPR, "30") field(EGU, "dB") field(DOL, "VIOC:GUN:BPM: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: # SBTL:SBPM:SB01:ATT1 = A1 # SBTL:SBPM:SB01:ATT2 = A2 # SBTL:SBPM:SB01:CALA = CA # record(sub, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SB01:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SB01: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, "SBTL:SBPM:SB01:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SB01:ATTO CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SB01:ATTC.B PP") field(EGU, "dB") } record(longout, "SBTL:SBPM:SB01:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SB01:CLAO CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SB01:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "SBTL:SBPM:SB01:TRIG2BEAM") { field(DESC, "Trigger -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE4+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, "SBTL:SBPM:SB01:RF2RED") { field(DESC, "Red RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE4+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, "SBTL:SBPM:SB01:RF2GRN") { field(DESC, "Grn RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE4+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. # SBTL:SBPM:SL20:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # SBTL:SBPM:SL20:ACTL.DOL <---- SBTL:SBPM:SL20:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SBTL:SBPM:SL20:ATTOL.DOL<---- SBTL:SBPM:SL20:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SBTL:SBPM:SL20:CLAOL.DOL<---- SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:CALA") { field(DESC, "AFE Cal. Att.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE5+1,qspiAfe") field(LOPR, "0") field(HOPR, "31") field(DRVL, "6") field(DRVH, "31") field(EGU, "dB") } record(longout, "SBTL:SBPM:SL20:ATT1") { field(DESC, "AFE Att. 1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE5+2,qspiAfe") field(LOPR, "0") field(HOPR, "15") field(DRVL, "0") field(DRVH, "15") field(EGU, "dB") } record(longout, "SBTL:SBPM:SL20:ATT2") { field(DESC, "AFE Att. 2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE5+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, "SBTL:SBPM:SL20:VERS") { field(DESC, "AFE Firmware Vers.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(INP, "#C0S0@AFE5+5,qspiAfe") field(LOLO, "3") field(LLSV, "MAJOR") field(PINI, "YES") field(FLNK, "SBTL:SBPM:SL20:ATTINIT") } record(longout, "SBTL:SBPM:SL20:AODL") { field(DESC, "Delay Trig -> AMP On") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE5+0x10,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SBTL:SBPM:SL20:R1DL") { field(DESC, "Delay AMP On -> RF1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE5+0x11,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SBTL:SBPM:SL20:RFWD") { field(DESC, "RF Pulse Width") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE5+0x13,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") info(autosaveFields, "VAL") } record(longout, "SBTL:SBPM:SL20:OFFT") { field(DESC, "Delay RF Off -> Ctrl Sw.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE5+0x14,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SBTL:SBPM:SL20:R2DL") { field(DESC, "Ctrl Sw. -> RF2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE5+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, "SBTL:SBPM:SL20:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE5+6,qspiAfe") } record(mbbo, "SBTL:SBPM:SL20:CALM") { field(DESC, "AFE Cal. Mode") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE5+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, "SBTL:SBPM:SL20:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "SBTL:SBPM:SL20:VERS") field(FTVA, "LONG") field(OUTA, "SBTL:SBPM:SL20:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "SBTL:SBPM:SL20:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "SBTL:SBPM:SL20:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "SBTL:SBPM:SL20:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "SBTL:SBPM:SL20:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "SBTL:SBPM:SL20:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "SBTL:SBPM:SL20:ATT.VAL") field(FTVH, "LONG") field(OUTH, "SBTL:SBPM:SL20:ATTC.D") field(FTVI, "LONG") field(OUTI, "SBTL:SBPM:SL20:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "SBTL:SBPM:SL20:ATTC.F") field(FTVK, "LONG") field(OUTK, "SBTL:SBPM:SL20:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "SBTL:SBPM:SL20:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "SBTL:SBPM:SL20:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "SBTL:SBPM:SL20:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "SBTL:SBPM:SL20:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "SBTL:SBPM:SL20:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "SBTL:SBPM:SL20:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "SBTL:SBPM:SL20:CLAO.HOPR") field(FLNK, "SBTL:SBPM:SL20:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "SBTL:SBPM:SL20:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "SBTL:SBPM:SL20:ATTC.A PP") field(DRVL, "0") field(DRVH, "30") field(LOPR, "0") field(HOPR, "30") field(EGU, "dB") field(DOL, "VIOC:GUN:BPM: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: # SBTL:SBPM:SL20:ATT1 = A1 # SBTL:SBPM:SL20:ATT2 = A2 # SBTL:SBPM:SL20:CALA = CA # record(sub, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL20:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL20: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, "SBTL:SBPM:SL20:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL20:ATTO CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL20:ATTC.B PP") field(EGU, "dB") } record(longout, "SBTL:SBPM:SL20:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL20:CLAO CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL20:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "SBTL:SBPM:SL20:TRIG2BEAM") { field(DESC, "Trigger -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE5+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, "SBTL:SBPM:SL20:RF2RED") { field(DESC, "Red RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE5+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, "SBTL:SBPM:SL20:RF2GRN") { field(DESC, "Grn RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE5+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. # SBTL:SBPM:SL21:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # SBTL:SBPM:SL21:ACTL.DOL <---- SBTL:SBPM:SL21:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SBTL:SBPM:SL21:ATTOL.DOL<---- SBTL:SBPM:SL21:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SBTL:SBPM:SL21:CLAOL.DOL<---- SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:CALA") { field(DESC, "AFE Cal. Att.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE6+1,qspiAfe") field(LOPR, "0") field(HOPR, "31") field(DRVL, "6") field(DRVH, "31") field(EGU, "dB") } record(longout, "SBTL:SBPM:SL21:ATT1") { field(DESC, "AFE Att. 1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE6+2,qspiAfe") field(LOPR, "0") field(HOPR, "15") field(DRVL, "0") field(DRVH, "15") field(EGU, "dB") } record(longout, "SBTL:SBPM:SL21:ATT2") { field(DESC, "AFE Att. 2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE6+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, "SBTL:SBPM:SL21:VERS") { field(DESC, "AFE Firmware Vers.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(INP, "#C0S0@AFE6+5,qspiAfe") field(LOLO, "3") field(LLSV, "MAJOR") field(PINI, "YES") field(FLNK, "SBTL:SBPM:SL21:ATTINIT") } record(longout, "SBTL:SBPM:SL21:AODL") { field(DESC, "Delay Trig -> AMP On") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE6+0x10,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SBTL:SBPM:SL21:R1DL") { field(DESC, "Delay AMP On -> RF1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE6+0x11,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SBTL:SBPM:SL21:RFWD") { field(DESC, "RF Pulse Width") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE6+0x13,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") info(autosaveFields, "VAL") } record(longout, "SBTL:SBPM:SL21:OFFT") { field(DESC, "Delay RF Off -> Ctrl Sw.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE6+0x14,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SBTL:SBPM:SL21:R2DL") { field(DESC, "Ctrl Sw. -> RF2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE6+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, "SBTL:SBPM:SL21:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE6+6,qspiAfe") } record(mbbo, "SBTL:SBPM:SL21:CALM") { field(DESC, "AFE Cal. Mode") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE6+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, "SBTL:SBPM:SL21:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "SBTL:SBPM:SL21:VERS") field(FTVA, "LONG") field(OUTA, "SBTL:SBPM:SL21:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "SBTL:SBPM:SL21:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "SBTL:SBPM:SL21:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "SBTL:SBPM:SL21:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "SBTL:SBPM:SL21:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "SBTL:SBPM:SL21:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "SBTL:SBPM:SL21:ATT.VAL") field(FTVH, "LONG") field(OUTH, "SBTL:SBPM:SL21:ATTC.D") field(FTVI, "LONG") field(OUTI, "SBTL:SBPM:SL21:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "SBTL:SBPM:SL21:ATTC.F") field(FTVK, "LONG") field(OUTK, "SBTL:SBPM:SL21:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "SBTL:SBPM:SL21:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "SBTL:SBPM:SL21:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "SBTL:SBPM:SL21:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "SBTL:SBPM:SL21:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "SBTL:SBPM:SL21:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "SBTL:SBPM:SL21:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "SBTL:SBPM:SL21:CLAO.HOPR") field(FLNK, "SBTL:SBPM:SL21:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "SBTL:SBPM:SL21:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "SBTL:SBPM:SL21:ATTC.A PP") field(DRVL, "0") field(DRVH, "30") field(LOPR, "0") field(HOPR, "30") field(EGU, "dB") field(DOL, "VIOC:GUN:BPM: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: # SBTL:SBPM:SL21:ATT1 = A1 # SBTL:SBPM:SL21:ATT2 = A2 # SBTL:SBPM:SL21:CALA = CA # record(sub, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL21:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL21: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, "SBTL:SBPM:SL21:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL21:ATTO CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL21:ATTC.B PP") field(EGU, "dB") } record(longout, "SBTL:SBPM:SL21:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL21:CLAO CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL21:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "SBTL:SBPM:SL21:TRIG2BEAM") { field(DESC, "Trigger -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE6+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, "SBTL:SBPM:SL21:RF2RED") { field(DESC, "Red RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE6+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, "SBTL:SBPM:SL21:RF2GRN") { field(DESC, "Grn RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE6+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. # SBTL:SBPM:SL22:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # SBTL:SBPM:SL22:ACTL.DOL <---- SBTL:SBPM:SL22:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SBTL:SBPM:SL22:ATTOL.DOL<---- SBTL:SBPM:SL22:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SBTL:SBPM:SL22:CLAOL.DOL<---- SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:CALA") { field(DESC, "AFE Cal. Att.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE7+1,qspiAfe") field(LOPR, "0") field(HOPR, "31") field(DRVL, "6") field(DRVH, "31") field(EGU, "dB") } record(longout, "SBTL:SBPM:SL22:ATT1") { field(DESC, "AFE Att. 1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE7+2,qspiAfe") field(LOPR, "0") field(HOPR, "15") field(DRVL, "0") field(DRVH, "15") field(EGU, "dB") } record(longout, "SBTL:SBPM:SL22:ATT2") { field(DESC, "AFE Att. 2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE7+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, "SBTL:SBPM:SL22:VERS") { field(DESC, "AFE Firmware Vers.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(INP, "#C0S0@AFE7+5,qspiAfe") field(LOLO, "3") field(LLSV, "MAJOR") field(PINI, "YES") field(FLNK, "SBTL:SBPM:SL22:ATTINIT") } record(longout, "SBTL:SBPM:SL22:AODL") { field(DESC, "Delay Trig -> AMP On") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE7+0x10,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SBTL:SBPM:SL22:R1DL") { field(DESC, "Delay AMP On -> RF1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE7+0x11,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SBTL:SBPM:SL22:RFWD") { field(DESC, "RF Pulse Width") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE7+0x13,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") info(autosaveFields, "VAL") } record(longout, "SBTL:SBPM:SL22:OFFT") { field(DESC, "Delay RF Off -> Ctrl Sw.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE7+0x14,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SBTL:SBPM:SL22:R2DL") { field(DESC, "Ctrl Sw. -> RF2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE7+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, "SBTL:SBPM:SL22:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE7+6,qspiAfe") } record(mbbo, "SBTL:SBPM:SL22:CALM") { field(DESC, "AFE Cal. Mode") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE7+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, "SBTL:SBPM:SL22:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "SBTL:SBPM:SL22:VERS") field(FTVA, "LONG") field(OUTA, "SBTL:SBPM:SL22:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "SBTL:SBPM:SL22:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "SBTL:SBPM:SL22:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "SBTL:SBPM:SL22:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "SBTL:SBPM:SL22:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "SBTL:SBPM:SL22:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "SBTL:SBPM:SL22:ATT.VAL") field(FTVH, "LONG") field(OUTH, "SBTL:SBPM:SL22:ATTC.D") field(FTVI, "LONG") field(OUTI, "SBTL:SBPM:SL22:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "SBTL:SBPM:SL22:ATTC.F") field(FTVK, "LONG") field(OUTK, "SBTL:SBPM:SL22:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "SBTL:SBPM:SL22:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "SBTL:SBPM:SL22:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "SBTL:SBPM:SL22:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "SBTL:SBPM:SL22:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "SBTL:SBPM:SL22:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "SBTL:SBPM:SL22:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "SBTL:SBPM:SL22:CLAO.HOPR") field(FLNK, "SBTL:SBPM:SL22:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "SBTL:SBPM:SL22:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "SBTL:SBPM:SL22:ATTC.A PP") field(DRVL, "0") field(DRVH, "30") field(LOPR, "0") field(HOPR, "30") field(EGU, "dB") field(DOL, "VIOC:GUN:BPM: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: # SBTL:SBPM:SL22:ATT1 = A1 # SBTL:SBPM:SL22:ATT2 = A2 # SBTL:SBPM:SL22:CALA = CA # record(sub, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL22:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL22: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, "SBTL:SBPM:SL22:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL22:ATTO CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL22:ATTC.B PP") field(EGU, "dB") } record(longout, "SBTL:SBPM:SL22:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL22:CLAO CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL22:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "SBTL:SBPM:SL22:TRIG2BEAM") { field(DESC, "Trigger -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE7+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, "SBTL:SBPM:SL22:RF2RED") { field(DESC, "Red RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE7+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, "SBTL:SBPM:SL22:RF2GRN") { field(DESC, "Grn RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE7+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. # SBTL:SBPM:SL23:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # SBTL:SBPM:SL23:ACTL.DOL <---- SBTL:SBPM:SL23:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SBTL:SBPM:SL23:ATTOL.DOL<---- SBTL:SBPM:SL23:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # SBTL:SBPM:SL23:CLAOL.DOL<---- SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:CALA") { field(DESC, "AFE Cal. Att.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE8+1,qspiAfe") field(LOPR, "0") field(HOPR, "31") field(DRVL, "6") field(DRVH, "31") field(EGU, "dB") } record(longout, "SBTL:SBPM:SL23:ATT1") { field(DESC, "AFE Att. 1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE8+2,qspiAfe") field(LOPR, "0") field(HOPR, "15") field(DRVL, "0") field(DRVH, "15") field(EGU, "dB") } record(longout, "SBTL:SBPM:SL23:ATT2") { field(DESC, "AFE Att. 2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE8+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, "SBTL:SBPM:SL23:VERS") { field(DESC, "AFE Firmware Vers.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(INP, "#C0S0@AFE8+5,qspiAfe") field(LOLO, "3") field(LLSV, "MAJOR") field(PINI, "YES") field(FLNK, "SBTL:SBPM:SL23:ATTINIT") } record(longout, "SBTL:SBPM:SL23:AODL") { field(DESC, "Delay Trig -> AMP On") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE8+0x10,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SBTL:SBPM:SL23:R1DL") { field(DESC, "Delay AMP On -> RF1") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE8+0x11,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SBTL:SBPM:SL23:RFWD") { field(DESC, "RF Pulse Width") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE8+0x13,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") info(autosaveFields, "VAL") } record(longout, "SBTL:SBPM:SL23:OFFT") { field(DESC, "Delay RF Off -> Ctrl Sw.") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE8+0x14,qspiAfe") field(EGU, "33ns") field(LOPR, "1") field(DRVL, "1") field(HOPR, "255") field(DRVL, "255") } record(longout, "SBTL:SBPM:SL23:R2DL") { field(DESC, "Ctrl Sw. -> RF2") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE8+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, "SBTL:SBPM:SL23:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE8+6,qspiAfe") } record(mbbo, "SBTL:SBPM:SL23:CALM") { field(DESC, "AFE Cal. Mode") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE8+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, "SBTL:SBPM:SL23:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "SBTL:SBPM:SL23:VERS") field(FTVA, "LONG") field(OUTA, "SBTL:SBPM:SL23:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "SBTL:SBPM:SL23:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "SBTL:SBPM:SL23:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "SBTL:SBPM:SL23:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "SBTL:SBPM:SL23:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "SBTL:SBPM:SL23:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "SBTL:SBPM:SL23:ATT.VAL") field(FTVH, "LONG") field(OUTH, "SBTL:SBPM:SL23:ATTC.D") field(FTVI, "LONG") field(OUTI, "SBTL:SBPM:SL23:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "SBTL:SBPM:SL23:ATTC.F") field(FTVK, "LONG") field(OUTK, "SBTL:SBPM:SL23:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "SBTL:SBPM:SL23:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "SBTL:SBPM:SL23:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "SBTL:SBPM:SL23:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "SBTL:SBPM:SL23:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "SBTL:SBPM:SL23:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "SBTL:SBPM:SL23:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "SBTL:SBPM:SL23:CLAO.HOPR") field(FLNK, "SBTL:SBPM:SL23:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "SBTL:SBPM:SL23:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "SBTL:SBPM:SL23:ATTC.A PP") field(DRVL, "0") field(DRVH, "30") field(LOPR, "0") field(HOPR, "30") field(EGU, "dB") field(DOL, "VIOC:GUN:BPM: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: # SBTL:SBPM:SL23:ATT1 = A1 # SBTL:SBPM:SL23:ATT2 = A2 # SBTL:SBPM:SL23:CALA = CA # record(sub, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL23:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL23: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, "SBTL:SBPM:SL23:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL23:ATTO CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL23:ATTC.B PP") field(EGU, "dB") } record(longout, "SBTL:SBPM:SL23:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "SBTL:SBPM:SL23:CLAO CP") field(OMSL, "closed_loop") field(OUT, "SBTL:SBPM:SL23:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "SBTL:SBPM:SL23:TRIG2BEAM") { field(DESC, "Trigger -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE8+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, "SBTL:SBPM:SL23:RF2RED") { field(DESC, "Red RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE8+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, "SBTL:SBPM:SL23:RF2GRN") { field(DESC, "Grn RF -> ADC trig") field(DTYP, "BusAddress") field(OUT, "#C0S0@AFE8+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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL16: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17: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, "SL3:SBPM:SL17:SUBSYS") { field(DESC, "Subsystem type") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C1S0@0x4FC(8)") field(PINI, "YES") } # Registers on Struck AMC # Digitizer AMC FW version record(stringin, "SL3:SBPM:SL18:DIGIVERS") { field(DESC, "Digitizer Firmware Vers.") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C2S0@0x4F8(8)") field(PINI, "YES") } # Firmware date record(stringin, "SL3:SBPM:SL18:DIGIVERS_DATE") { field(DESC, "Firmware Vers. Date") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C2S0@0x4FE(8)") field(PINI, "YES") } # System ID record(stringin, "SL3:SBPM:SL18:DIGI_SYSID") { field(DESC, "Digitizer System ID") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C2S0@0x4FA(8)") field(PINI, "YES") } # Sub Type record(stringin, "SL3:SBPM:SL18:SUBSYS") { field(DESC, "Subsystem type") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C2S0@0x4FC(8)") field(PINI, "YES") } # Registers on Struck AMC # Digitizer AMC FW version record(stringin, "SL3:SBPM:SL19:DIGIVERS") { field(DESC, "Digitizer Firmware Vers.") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C3S0@0x4F8(8)") field(PINI, "YES") } # Firmware date record(stringin, "SL3:SBPM:SL19:DIGIVERS_DATE") { field(DESC, "Firmware Vers. Date") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C3S0@0x4FE(8)") field(PINI, "YES") } # System ID record(stringin, "SL3:SBPM:SL19:DIGI_SYSID") { field(DESC, "Digitizer System ID") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C3S0@0x4FA(8)") field(PINI, "YES") } # Sub Type record(stringin, "SL3:SBPM:SL19:SUBSYS") { field(DESC, "Subsystem type") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C3S0@0x4FC(8)") field(PINI, "YES") } # Registers on Struck AMC # Digitizer AMC FW version record(stringin, "SBTL:SBPM:SB01:DIGIVERS") { field(DESC, "Digitizer Firmware Vers.") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C4S0@0x4F8(8)") field(PINI, "YES") } # Firmware date record(stringin, "SBTL:SBPM:SB01:DIGIVERS_DATE") { field(DESC, "Firmware Vers. Date") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C4S0@0x4FE(8)") field(PINI, "YES") } # System ID record(stringin, "SBTL:SBPM:SB01:DIGI_SYSID") { field(DESC, "Digitizer System ID") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C4S0@0x4FA(8)") field(PINI, "YES") } # Sub Type record(stringin, "SBTL:SBPM:SB01:SUBSYS") { field(DESC, "Subsystem type") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C4S0@0x4FC(8)") field(PINI, "YES") } # Registers on Struck AMC # Digitizer AMC FW version record(stringin, "SBTL:SBPM:SL20:DIGIVERS") { field(DESC, "Digitizer Firmware Vers.") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C5S0@0x4F8(8)") field(PINI, "YES") } # Firmware date record(stringin, "SBTL:SBPM:SL20:DIGIVERS_DATE") { field(DESC, "Firmware Vers. Date") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C5S0@0x4FE(8)") field(PINI, "YES") } # System ID record(stringin, "SBTL:SBPM:SL20:DIGI_SYSID") { field(DESC, "Digitizer System ID") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C5S0@0x4FA(8)") field(PINI, "YES") } # Sub Type record(stringin, "SBTL:SBPM:SL20:SUBSYS") { field(DESC, "Subsystem type") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C5S0@0x4FC(8)") field(PINI, "YES") } # Registers on Struck AMC # Digitizer AMC FW version record(stringin, "SBTL:SBPM:SL21:DIGIVERS") { field(DESC, "Digitizer Firmware Vers.") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C6S0@0x4F8(8)") field(PINI, "YES") } # Firmware date record(stringin, "SBTL:SBPM:SL21:DIGIVERS_DATE") { field(DESC, "Firmware Vers. Date") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C6S0@0x4FE(8)") field(PINI, "YES") } # System ID record(stringin, "SBTL:SBPM:SL21:DIGI_SYSID") { field(DESC, "Digitizer System ID") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C6S0@0x4FA(8)") field(PINI, "YES") } # Sub Type record(stringin, "SBTL:SBPM:SL21:SUBSYS") { field(DESC, "Subsystem type") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C6S0@0x4FC(8)") field(PINI, "YES") } # Registers on Struck AMC # Digitizer AMC FW version record(stringin, "SBTL:SBPM:SL22:DIGIVERS") { field(DESC, "Digitizer Firmware Vers.") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C7S0@0x4F8(8)") field(PINI, "YES") } # Firmware date record(stringin, "SBTL:SBPM:SL22:DIGIVERS_DATE") { field(DESC, "Firmware Vers. Date") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C7S0@0x4FE(8)") field(PINI, "YES") } # System ID record(stringin, "SBTL:SBPM:SL22:DIGI_SYSID") { field(DESC, "Digitizer System ID") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C7S0@0x4FA(8)") field(PINI, "YES") } # Sub Type record(stringin, "SBTL:SBPM:SL22:SUBSYS") { field(DESC, "Subsystem type") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C7S0@0x4FC(8)") field(PINI, "YES") } # Registers on Struck AMC # Digitizer AMC FW version record(stringin, "SBTL:SBPM:SL23:DIGIVERS") { field(DESC, "Digitizer Firmware Vers.") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C8S0@0x4F8(8)") field(PINI, "YES") } # Firmware date record(stringin, "SBTL:SBPM:SL23:DIGIVERS_DATE") { field(DESC, "Firmware Vers. Date") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C8S0@0x4FE(8)") field(PINI, "YES") } # System ID record(stringin, "SBTL:SBPM:SL23:DIGI_SYSID") { field(DESC, "Digitizer System ID") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C8S0@0x4FA(8)") field(PINI, "YES") } # Sub Type record(stringin, "SBTL:SBPM:SL23:SUBSYS") { field(DESC, "Subsystem type") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C8S0@0x4FC(8)") field(PINI, "YES") }