# per IOC database for stripline BPMs #record(sub, "VIOC:HSBL:BPM:FIDP") { # field(DESC, "BPM Fiducial Processing") # field(SNAM, "bpmEvrFidProcess") # #This tells us if there is beam during this cycle... # field(INPA, "VIOC:HSBL:BPM:MODIFIER5.R") #} #record(mbbo, "VIOC:HSBL:BPM:PATTERNSIM") { # field(DESC, "Pattern Simulation") # field(ZRST, "Off") # field(ONST, "Soft") # field(TWST, "Raw") # field(DOL, "0") # field(PINI, "YES") #} record(sub, "VIOC:HSBL: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "HL3A:SBPM:HB03:ATT1 CP") field(INPC, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "HL3A:SBPM:HB03:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3A:SBPM:HB03:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "HL3A:SBPM:HB03:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "HL3A:SBPM:HB03:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3A:SBPM:HB03:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3A:SBPM:HB03:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "HL3A:SBPM:HB03:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "HL3A:SBPM:HB03:RSTA.SEVR MS NPP") field(INPB, "HL3A:SBPM:HB03:TMIT.SEVR MS NPP") field(INPC, "HL3A:SBPM:HB03:Y.SEVR MS NPP") field(INPD, "HL3A:SBPM:HB03:X.SEVR MS NPP") field(INPE, "HL3A:SBPM:HB03:TGRN.SEVR MS NPP") field(INPF, "HL3A:SBPM:HB03:TRED.SEVR MS NPP") field(INPG, "HL3A:SBPM:HB03:TBLU.SEVR MS NPP") field(INPH, "HL3A:SBPM:HB03:TYLO.SEVR MS NPP") field(INPI, "HL3A:SBPM:HB03:GRU.SEVR MS NPP") field(INPJ, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "HL3A:SBPM:HB03:RSTA_ALH.SEVR MS NPP") field(INPB, "HL3A:SBPM:HB03:GRU.SEVR MS NPP") field(INPC, "HL3A:SBPM:HB03:GRV.SEVR MS NPP") field(INPD, "HL3A:SBPM:HB03:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "HL3A:SBPM:HB03:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "HL3A:SBPM:HB03:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "HL3A:SBPM:HB03:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "HL3A:SBPM:HB03:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "0") field(SCAN, "Passive") } record(bo, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S12") field(FLNK, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:V") } record(ai, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:PINC") } record(ai, "HL3A:SBPM:HB03:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S10") field(SCAN, "Passive") } record(longin, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:RSTA_ALH") } record(calc, "HL3A:SBPM:HB03:RSTA_ALH") { field(CALC, "A & B") field(INPA, "HL3A:SBPM:HB03:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:PHI_SEQ") } record(ao, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:PSI_SEQ") } #record(dfanout, "HL3A:SBPM:HB03:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "HL3A:SBPM:HB03:USCL PP MS") # field(OUTB, "HL3A:SBPM:HB03:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:UOFF_SEQ") } record(ao, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:VOFF_SEQ") } record(ao, "HL3A:SBPM:HB03:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "HL3A:SBPM:HB03:USCL_SEQ") } record(ao, "HL3A:SBPM:HB03:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "HL3A:SBPM:HB03:VSCL_SEQ") } record(mbbo, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMHB03") field(PINI, "YES") } record(stringin, "SBPMHB03:NAME") { field(DESC, "BPM Name") field(VAL, "HL3A:SBPM:HB03") field(PINI, "YES") } record(ai, "HL3A:SBPM:HB03:X_SLOW") { #alias("HL3A:SBPM:HB03:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "HL3A:SBPM:HB03:X MS") field(FLNK, "HL3A:SBPM:HB03:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "HL3A:SBPM:HB03:Y_SLOW") { #alias("HL3A:SBPM:HB03:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "HL3A:SBPM:HB03:Y NPP MS") field(FLNK, "HL3A:SBPM:HB03:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "HL3A:SBPM:HB03:TMIT_SLOW") { #alias("HL3A:SBPM:HB03:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "HL3A:SBPM:HB03:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "HL3A:SBPM:HB03:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "HL3A:SBPM:HB03:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "HL3A:SBPM:HB03:SIMC PP") } record(calcout, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:USCL") field(INPL, "0") } # Switch simulation record HL3A:SBPM:HB03:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "HL3A:SBPM:HB03:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3A:SBPM:HB03:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "HL3A:SBPM:HB03:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3A:SBPM:HB03:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "HL3A:SBPM:HB03:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3A:SBPM:HB03:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "HL3A:SBPM:HB03:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3A:SBPM:HB03:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3A:SBPM:HB03:UOFF") field(DOL2, "HL3A:SBPM:HB03:UOFF") field(DOL3, "HL3A:SBPM:HB03:UOFF") field(DOL4, "HL3A:SBPM:HB03:UOFF") field(DOL5, "HL3A:SBPM:HB03:UOFF") field(DOL6, "HL3A:SBPM:HB03:UOFF") field(DOL7, "HL3A:SBPM:HB03:UOFF") field(DOL8, "HL3A:SBPM:HB03:UOFF") field(DOL9, "HL3A:SBPM:HB03:UOFF") field(DOLA, "HL3A:SBPM:HB03:UOFF") field(LNK1, "HL3A:SBPM:HB03:UOFF_SEL.A PP") field(LNK2, "HL3A:SBPM:HB03:UOFF_SEL.B PP") field(LNK3, "HL3A:SBPM:HB03:UOFF_SEL.C PP") field(LNK4, "HL3A:SBPM:HB03:UOFF_SEL.D PP") field(LNK5, "HL3A:SBPM:HB03:UOFF_SEL.E PP") field(LNK6, "HL3A:SBPM:HB03:UOFF_SEL.F PP") field(LNK7, "HL3A:SBPM:HB03:UOFF_SEL.G PP") field(LNK8, "HL3A:SBPM:HB03:UOFF_SEL.H PP") field(LNK9, "HL3A:SBPM:HB03:UOFF_SEL.I PP") field(LNKA, "HL3A:SBPM:HB03:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3A:SBPM:HB03:UOFF_SEL") field(OUTA, "HL3A:SBPM:HB03:U.AOFF CA") field(OUTB, "HL3A:SBPM:HB03:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3A:SBPM:HB03:UOFF_CTRL") { field(INPA, "HL3A:SBPM:HB03:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3A:SBPM:HB03:VOFF") field(DOL2, "HL3A:SBPM:HB03:VOFF") field(DOL3, "HL3A:SBPM:HB03:VOFF") field(DOL4, "HL3A:SBPM:HB03:VOFF") field(DOL5, "HL3A:SBPM:HB03:VOFF") field(DOL6, "HL3A:SBPM:HB03:VOFF") field(DOL7, "HL3A:SBPM:HB03:VOFF") field(DOL8, "HL3A:SBPM:HB03:VOFF") field(DOL9, "HL3A:SBPM:HB03:VOFF") field(DOLA, "HL3A:SBPM:HB03:VOFF") field(LNK1, "HL3A:SBPM:HB03:VOFF_SEL.A PP") field(LNK2, "HL3A:SBPM:HB03:VOFF_SEL.B PP") field(LNK3, "HL3A:SBPM:HB03:VOFF_SEL.C PP") field(LNK4, "HL3A:SBPM:HB03:VOFF_SEL.D PP") field(LNK5, "HL3A:SBPM:HB03:VOFF_SEL.E PP") field(LNK6, "HL3A:SBPM:HB03:VOFF_SEL.F PP") field(LNK7, "HL3A:SBPM:HB03:VOFF_SEL.G PP") field(LNK8, "HL3A:SBPM:HB03:VOFF_SEL.H PP") field(LNK9, "HL3A:SBPM:HB03:VOFF_SEL.I PP") field(LNKA, "HL3A:SBPM:HB03:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3A:SBPM:HB03:VOFF_SEL") field(OUTA, "HL3A:SBPM:HB03:V.AOFF CA") field(OUTB, "HL3A:SBPM:HB03:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3A:SBPM:HB03:VOFF_CTRL") { field(INPA, "HL3A:SBPM:HB03:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3A:SBPM:HB03:USCL") field(DOL2, "HL3A:SBPM:HB03:USCL") field(DOL3, "HL3A:SBPM:HB03:USCL") field(DOL4, "HL3A:SBPM:HB03:USCL") field(DOL5, "HL3A:SBPM:HB03:USCL") field(DOL6, "HL3A:SBPM:HB03:USCL") field(DOL7, "HL3A:SBPM:HB03:USCL") field(DOL8, "HL3A:SBPM:HB03:USCL") field(DOL9, "HL3A:SBPM:HB03:USCL") field(DOLA, "HL3A:SBPM:HB03:USCL") field(LNK1, "HL3A:SBPM:HB03:USCL_SEL.A PP") field(LNK2, "HL3A:SBPM:HB03:USCL_SEL.B PP") field(LNK3, "HL3A:SBPM:HB03:USCL_SEL.C PP") field(LNK4, "HL3A:SBPM:HB03:USCL_SEL.D PP") field(LNK5, "HL3A:SBPM:HB03:USCL_SEL.E PP") field(LNK6, "HL3A:SBPM:HB03:USCL_SEL.F PP") field(LNK7, "HL3A:SBPM:HB03:USCL_SEL.G PP") field(LNK8, "HL3A:SBPM:HB03:USCL_SEL.H PP") field(LNK9, "HL3A:SBPM:HB03:USCL_SEL.I PP") field(LNKA, "HL3A:SBPM:HB03:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3A:SBPM:HB03:USCL_SEL") field(OUTA, "HL3A:SBPM:HB03:U.ASLO CA") field(OUTB, "HL3A:SBPM:HB03:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3A:SBPM:HB03:USCL_CTRL") { field(INPA, "HL3A:SBPM:HB03:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3A:SBPM:HB03:VSCL") field(DOL2, "HL3A:SBPM:HB03:VSCL") field(DOL3, "HL3A:SBPM:HB03:VSCL") field(DOL4, "HL3A:SBPM:HB03:VSCL") field(DOL5, "HL3A:SBPM:HB03:VSCL") field(DOL6, "HL3A:SBPM:HB03:VSCL") field(DOL7, "HL3A:SBPM:HB03:VSCL") field(DOL8, "HL3A:SBPM:HB03:VSCL") field(DOL9, "HL3A:SBPM:HB03:VSCL") field(DOLA, "HL3A:SBPM:HB03:VSCL") field(LNK1, "HL3A:SBPM:HB03:VSCL_SEL.A PP") field(LNK2, "HL3A:SBPM:HB03:VSCL_SEL.B PP") field(LNK3, "HL3A:SBPM:HB03:VSCL_SEL.C PP") field(LNK4, "HL3A:SBPM:HB03:VSCL_SEL.D PP") field(LNK5, "HL3A:SBPM:HB03:VSCL_SEL.E PP") field(LNK6, "HL3A:SBPM:HB03:VSCL_SEL.F PP") field(LNK7, "HL3A:SBPM:HB03:VSCL_SEL.G PP") field(LNK8, "HL3A:SBPM:HB03:VSCL_SEL.H PP") field(LNK9, "HL3A:SBPM:HB03:VSCL_SEL.I PP") field(LNKA, "HL3A:SBPM:HB03:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3A:SBPM:HB03:VSCL_SEL") field(OUTA, "HL3A:SBPM:HB03:V.ASLO CA") field(OUTB, "HL3A:SBPM:HB03:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3A:SBPM:HB03:VSCL_CTRL") { field(INPA, "HL3A:SBPM:HB03:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3A:SBPM:HB03:PHI") field(DOL2, "HL3A:SBPM:HB03:PHI") field(DOL3, "HL3A:SBPM:HB03:PHI") field(DOL4, "HL3A:SBPM:HB03:PHI") field(DOL5, "HL3A:SBPM:HB03:PHI") field(DOL6, "HL3A:SBPM:HB03:PHI") field(DOL7, "HL3A:SBPM:HB03:PHI") field(DOL8, "HL3A:SBPM:HB03:PHI") field(DOL9, "HL3A:SBPM:HB03:PHI") field(DOLA, "HL3A:SBPM:HB03:PHI") field(LNK1, "HL3A:SBPM:HB03:PHI_SEL.A PP") field(LNK2, "HL3A:SBPM:HB03:PHI_SEL.B PP") field(LNK3, "HL3A:SBPM:HB03:PHI_SEL.C PP") field(LNK4, "HL3A:SBPM:HB03:PHI_SEL.D PP") field(LNK5, "HL3A:SBPM:HB03:PHI_SEL.E PP") field(LNK6, "HL3A:SBPM:HB03:PHI_SEL.F PP") field(LNK7, "HL3A:SBPM:HB03:PHI_SEL.G PP") field(LNK8, "HL3A:SBPM:HB03:PHI_SEL.H PP") field(LNK9, "HL3A:SBPM:HB03:PHI_SEL.I PP") field(LNKA, "HL3A:SBPM:HB03:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3A:SBPM:HB03:PHI_SEL") field(OUTA, "HL3A:SBPM:HB03:CALC.E CA") field(OUTB, "HL3A:SBPM:HB03:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3A:SBPM:HB03:PHI_CTRL") { field(INPA, "HL3A:SBPM:HB03:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3A:SBPM:HB03:PSI") field(DOL2, "HL3A:SBPM:HB03:PSI") field(DOL3, "HL3A:SBPM:HB03:PSI") field(DOL4, "HL3A:SBPM:HB03:PSI") field(DOL5, "HL3A:SBPM:HB03:PSI") field(DOL6, "HL3A:SBPM:HB03:PSI") field(DOL7, "HL3A:SBPM:HB03:PSI") field(DOL8, "HL3A:SBPM:HB03:PSI") field(DOL9, "HL3A:SBPM:HB03:PSI") field(DOLA, "HL3A:SBPM:HB03:PSI") field(LNK1, "HL3A:SBPM:HB03:PSI_SEL.A PP") field(LNK2, "HL3A:SBPM:HB03:PSI_SEL.B PP") field(LNK3, "HL3A:SBPM:HB03:PSI_SEL.C PP") field(LNK4, "HL3A:SBPM:HB03:PSI_SEL.D PP") field(LNK5, "HL3A:SBPM:HB03:PSI_SEL.E PP") field(LNK6, "HL3A:SBPM:HB03:PSI_SEL.F PP") field(LNK7, "HL3A:SBPM:HB03:PSI_SEL.G PP") field(LNK8, "HL3A:SBPM:HB03:PSI_SEL.H PP") field(LNK9, "HL3A:SBPM:HB03:PSI_SEL.I PP") field(LNKA, "HL3A:SBPM:HB03:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3A:SBPM:HB03:PSI_SEL") field(OUTA, "HL3A:SBPM:HB03:CALC.F CA") field(OUTB, "HL3A:SBPM:HB03:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3A:SBPM:HB03:PSI_CTRL") { field(INPA, "HL3A:SBPM:HB03:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3A:SBPM:HB03:PSI_SEL.L PP") } record(longout, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "HL3A:SBPM:HL44:ATT1 CP") field(INPC, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "HL3A:SBPM:HL44:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3A:SBPM:HL44:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "HL3A:SBPM:HL44:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "HL3A:SBPM:HL44:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3A:SBPM:HL44:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3A:SBPM:HL44:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "HL3A:SBPM:HL44:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "HL3A:SBPM:HL44:RSTA.SEVR MS NPP") field(INPB, "HL3A:SBPM:HL44:TMIT.SEVR MS NPP") field(INPC, "HL3A:SBPM:HL44:Y.SEVR MS NPP") field(INPD, "HL3A:SBPM:HL44:X.SEVR MS NPP") field(INPE, "HL3A:SBPM:HL44:TGRN.SEVR MS NPP") field(INPF, "HL3A:SBPM:HL44:TRED.SEVR MS NPP") field(INPG, "HL3A:SBPM:HL44:TBLU.SEVR MS NPP") field(INPH, "HL3A:SBPM:HL44:TYLO.SEVR MS NPP") field(INPI, "HL3A:SBPM:HL44:GRU.SEVR MS NPP") field(INPJ, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "HL3A:SBPM:HL44:RSTA_ALH.SEVR MS NPP") field(INPB, "HL3A:SBPM:HL44:GRU.SEVR MS NPP") field(INPC, "HL3A:SBPM:HL44:GRV.SEVR MS NPP") field(INPD, "HL3A:SBPM:HL44:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "HL3A:SBPM:HL44:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "HL3A:SBPM:HL44:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "HL3A:SBPM:HL44:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "HL3A:SBPM:HL44:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "1") field(SCAN, "Passive") } record(bo, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S12") field(FLNK, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:V") } record(ai, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:PINC") } record(ai, "HL3A:SBPM:HL44:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S10") field(SCAN, "Passive") } record(longin, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:RSTA_ALH") } record(calc, "HL3A:SBPM:HL44:RSTA_ALH") { field(CALC, "A & B") field(INPA, "HL3A:SBPM:HL44:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:PHI_SEQ") } record(ao, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:PSI_SEQ") } #record(dfanout, "HL3A:SBPM:HL44:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "HL3A:SBPM:HL44:USCL PP MS") # field(OUTB, "HL3A:SBPM:HL44:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:UOFF_SEQ") } record(ao, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:VOFF_SEQ") } record(ao, "HL3A:SBPM:HL44:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "HL3A:SBPM:HL44:USCL_SEQ") } record(ao, "HL3A:SBPM:HL44:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "HL3A:SBPM:HL44:VSCL_SEQ") } record(mbbo, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMHL44") field(PINI, "YES") } record(stringin, "SBPMHL44:NAME") { field(DESC, "BPM Name") field(VAL, "HL3A:SBPM:HL44") field(PINI, "YES") } record(ai, "HL3A:SBPM:HL44:X_SLOW") { #alias("HL3A:SBPM:HL44:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "HL3A:SBPM:HL44:X MS") field(FLNK, "HL3A:SBPM:HL44:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "HL3A:SBPM:HL44:Y_SLOW") { #alias("HL3A:SBPM:HL44:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "HL3A:SBPM:HL44:Y NPP MS") field(FLNK, "HL3A:SBPM:HL44:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "HL3A:SBPM:HL44:TMIT_SLOW") { #alias("HL3A:SBPM:HL44:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "HL3A:SBPM:HL44:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "HL3A:SBPM:HL44:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "HL3A:SBPM:HL44:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "HL3A:SBPM:HL44:SIMC PP") } record(calcout, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:USCL") field(INPL, "0") } # Switch simulation record HL3A:SBPM:HL44:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "HL3A:SBPM:HL44:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3A:SBPM:HL44:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "HL3A:SBPM:HL44:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3A:SBPM:HL44:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "HL3A:SBPM:HL44:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3A:SBPM:HL44:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "HL3A:SBPM:HL44:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3A:SBPM:HL44:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3A:SBPM:HL44:UOFF") field(DOL2, "HL3A:SBPM:HL44:UOFF") field(DOL3, "HL3A:SBPM:HL44:UOFF") field(DOL4, "HL3A:SBPM:HL44:UOFF") field(DOL5, "HL3A:SBPM:HL44:UOFF") field(DOL6, "HL3A:SBPM:HL44:UOFF") field(DOL7, "HL3A:SBPM:HL44:UOFF") field(DOL8, "HL3A:SBPM:HL44:UOFF") field(DOL9, "HL3A:SBPM:HL44:UOFF") field(DOLA, "HL3A:SBPM:HL44:UOFF") field(LNK1, "HL3A:SBPM:HL44:UOFF_SEL.A PP") field(LNK2, "HL3A:SBPM:HL44:UOFF_SEL.B PP") field(LNK3, "HL3A:SBPM:HL44:UOFF_SEL.C PP") field(LNK4, "HL3A:SBPM:HL44:UOFF_SEL.D PP") field(LNK5, "HL3A:SBPM:HL44:UOFF_SEL.E PP") field(LNK6, "HL3A:SBPM:HL44:UOFF_SEL.F PP") field(LNK7, "HL3A:SBPM:HL44:UOFF_SEL.G PP") field(LNK8, "HL3A:SBPM:HL44:UOFF_SEL.H PP") field(LNK9, "HL3A:SBPM:HL44:UOFF_SEL.I PP") field(LNKA, "HL3A:SBPM:HL44:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3A:SBPM:HL44:UOFF_SEL") field(OUTA, "HL3A:SBPM:HL44:U.AOFF CA") field(OUTB, "HL3A:SBPM:HL44:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3A:SBPM:HL44:UOFF_CTRL") { field(INPA, "HL3A:SBPM:HL44:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3A:SBPM:HL44:VOFF") field(DOL2, "HL3A:SBPM:HL44:VOFF") field(DOL3, "HL3A:SBPM:HL44:VOFF") field(DOL4, "HL3A:SBPM:HL44:VOFF") field(DOL5, "HL3A:SBPM:HL44:VOFF") field(DOL6, "HL3A:SBPM:HL44:VOFF") field(DOL7, "HL3A:SBPM:HL44:VOFF") field(DOL8, "HL3A:SBPM:HL44:VOFF") field(DOL9, "HL3A:SBPM:HL44:VOFF") field(DOLA, "HL3A:SBPM:HL44:VOFF") field(LNK1, "HL3A:SBPM:HL44:VOFF_SEL.A PP") field(LNK2, "HL3A:SBPM:HL44:VOFF_SEL.B PP") field(LNK3, "HL3A:SBPM:HL44:VOFF_SEL.C PP") field(LNK4, "HL3A:SBPM:HL44:VOFF_SEL.D PP") field(LNK5, "HL3A:SBPM:HL44:VOFF_SEL.E PP") field(LNK6, "HL3A:SBPM:HL44:VOFF_SEL.F PP") field(LNK7, "HL3A:SBPM:HL44:VOFF_SEL.G PP") field(LNK8, "HL3A:SBPM:HL44:VOFF_SEL.H PP") field(LNK9, "HL3A:SBPM:HL44:VOFF_SEL.I PP") field(LNKA, "HL3A:SBPM:HL44:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3A:SBPM:HL44:VOFF_SEL") field(OUTA, "HL3A:SBPM:HL44:V.AOFF CA") field(OUTB, "HL3A:SBPM:HL44:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3A:SBPM:HL44:VOFF_CTRL") { field(INPA, "HL3A:SBPM:HL44:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3A:SBPM:HL44:USCL") field(DOL2, "HL3A:SBPM:HL44:USCL") field(DOL3, "HL3A:SBPM:HL44:USCL") field(DOL4, "HL3A:SBPM:HL44:USCL") field(DOL5, "HL3A:SBPM:HL44:USCL") field(DOL6, "HL3A:SBPM:HL44:USCL") field(DOL7, "HL3A:SBPM:HL44:USCL") field(DOL8, "HL3A:SBPM:HL44:USCL") field(DOL9, "HL3A:SBPM:HL44:USCL") field(DOLA, "HL3A:SBPM:HL44:USCL") field(LNK1, "HL3A:SBPM:HL44:USCL_SEL.A PP") field(LNK2, "HL3A:SBPM:HL44:USCL_SEL.B PP") field(LNK3, "HL3A:SBPM:HL44:USCL_SEL.C PP") field(LNK4, "HL3A:SBPM:HL44:USCL_SEL.D PP") field(LNK5, "HL3A:SBPM:HL44:USCL_SEL.E PP") field(LNK6, "HL3A:SBPM:HL44:USCL_SEL.F PP") field(LNK7, "HL3A:SBPM:HL44:USCL_SEL.G PP") field(LNK8, "HL3A:SBPM:HL44:USCL_SEL.H PP") field(LNK9, "HL3A:SBPM:HL44:USCL_SEL.I PP") field(LNKA, "HL3A:SBPM:HL44:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3A:SBPM:HL44:USCL_SEL") field(OUTA, "HL3A:SBPM:HL44:U.ASLO CA") field(OUTB, "HL3A:SBPM:HL44:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3A:SBPM:HL44:USCL_CTRL") { field(INPA, "HL3A:SBPM:HL44:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3A:SBPM:HL44:VSCL") field(DOL2, "HL3A:SBPM:HL44:VSCL") field(DOL3, "HL3A:SBPM:HL44:VSCL") field(DOL4, "HL3A:SBPM:HL44:VSCL") field(DOL5, "HL3A:SBPM:HL44:VSCL") field(DOL6, "HL3A:SBPM:HL44:VSCL") field(DOL7, "HL3A:SBPM:HL44:VSCL") field(DOL8, "HL3A:SBPM:HL44:VSCL") field(DOL9, "HL3A:SBPM:HL44:VSCL") field(DOLA, "HL3A:SBPM:HL44:VSCL") field(LNK1, "HL3A:SBPM:HL44:VSCL_SEL.A PP") field(LNK2, "HL3A:SBPM:HL44:VSCL_SEL.B PP") field(LNK3, "HL3A:SBPM:HL44:VSCL_SEL.C PP") field(LNK4, "HL3A:SBPM:HL44:VSCL_SEL.D PP") field(LNK5, "HL3A:SBPM:HL44:VSCL_SEL.E PP") field(LNK6, "HL3A:SBPM:HL44:VSCL_SEL.F PP") field(LNK7, "HL3A:SBPM:HL44:VSCL_SEL.G PP") field(LNK8, "HL3A:SBPM:HL44:VSCL_SEL.H PP") field(LNK9, "HL3A:SBPM:HL44:VSCL_SEL.I PP") field(LNKA, "HL3A:SBPM:HL44:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3A:SBPM:HL44:VSCL_SEL") field(OUTA, "HL3A:SBPM:HL44:V.ASLO CA") field(OUTB, "HL3A:SBPM:HL44:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3A:SBPM:HL44:VSCL_CTRL") { field(INPA, "HL3A:SBPM:HL44:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3A:SBPM:HL44:PHI") field(DOL2, "HL3A:SBPM:HL44:PHI") field(DOL3, "HL3A:SBPM:HL44:PHI") field(DOL4, "HL3A:SBPM:HL44:PHI") field(DOL5, "HL3A:SBPM:HL44:PHI") field(DOL6, "HL3A:SBPM:HL44:PHI") field(DOL7, "HL3A:SBPM:HL44:PHI") field(DOL8, "HL3A:SBPM:HL44:PHI") field(DOL9, "HL3A:SBPM:HL44:PHI") field(DOLA, "HL3A:SBPM:HL44:PHI") field(LNK1, "HL3A:SBPM:HL44:PHI_SEL.A PP") field(LNK2, "HL3A:SBPM:HL44:PHI_SEL.B PP") field(LNK3, "HL3A:SBPM:HL44:PHI_SEL.C PP") field(LNK4, "HL3A:SBPM:HL44:PHI_SEL.D PP") field(LNK5, "HL3A:SBPM:HL44:PHI_SEL.E PP") field(LNK6, "HL3A:SBPM:HL44:PHI_SEL.F PP") field(LNK7, "HL3A:SBPM:HL44:PHI_SEL.G PP") field(LNK8, "HL3A:SBPM:HL44:PHI_SEL.H PP") field(LNK9, "HL3A:SBPM:HL44:PHI_SEL.I PP") field(LNKA, "HL3A:SBPM:HL44:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3A:SBPM:HL44:PHI_SEL") field(OUTA, "HL3A:SBPM:HL44:CALC.E CA") field(OUTB, "HL3A:SBPM:HL44:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3A:SBPM:HL44:PHI_CTRL") { field(INPA, "HL3A:SBPM:HL44:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3A:SBPM:HL44:PSI") field(DOL2, "HL3A:SBPM:HL44:PSI") field(DOL3, "HL3A:SBPM:HL44:PSI") field(DOL4, "HL3A:SBPM:HL44:PSI") field(DOL5, "HL3A:SBPM:HL44:PSI") field(DOL6, "HL3A:SBPM:HL44:PSI") field(DOL7, "HL3A:SBPM:HL44:PSI") field(DOL8, "HL3A:SBPM:HL44:PSI") field(DOL9, "HL3A:SBPM:HL44:PSI") field(DOLA, "HL3A:SBPM:HL44:PSI") field(LNK1, "HL3A:SBPM:HL44:PSI_SEL.A PP") field(LNK2, "HL3A:SBPM:HL44:PSI_SEL.B PP") field(LNK3, "HL3A:SBPM:HL44:PSI_SEL.C PP") field(LNK4, "HL3A:SBPM:HL44:PSI_SEL.D PP") field(LNK5, "HL3A:SBPM:HL44:PSI_SEL.E PP") field(LNK6, "HL3A:SBPM:HL44:PSI_SEL.F PP") field(LNK7, "HL3A:SBPM:HL44:PSI_SEL.G PP") field(LNK8, "HL3A:SBPM:HL44:PSI_SEL.H PP") field(LNK9, "HL3A:SBPM:HL44:PSI_SEL.I PP") field(LNKA, "HL3A:SBPM:HL44:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3A:SBPM:HL44:PSI_SEL") field(OUTA, "HL3A:SBPM:HL44:CALC.F CA") field(OUTB, "HL3A:SBPM:HL44:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3A:SBPM:HL44:PSI_CTRL") { field(INPA, "HL3A:SBPM:HL44:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3A:SBPM:HL44:PSI_SEL.L PP") } record(longout, "HL3A:SBPM:HL44: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "HL3B:SBPM:HL45:ATT1 CP") field(INPC, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "HL3B:SBPM:HL45:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL45:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL45:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "HL3B:SBPM:HL45:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL45:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL45:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "HL3B:SBPM:HL45:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "HL3B:SBPM:HL45:RSTA.SEVR MS NPP") field(INPB, "HL3B:SBPM:HL45:TMIT.SEVR MS NPP") field(INPC, "HL3B:SBPM:HL45:Y.SEVR MS NPP") field(INPD, "HL3B:SBPM:HL45:X.SEVR MS NPP") field(INPE, "HL3B:SBPM:HL45:TGRN.SEVR MS NPP") field(INPF, "HL3B:SBPM:HL45:TRED.SEVR MS NPP") field(INPG, "HL3B:SBPM:HL45:TBLU.SEVR MS NPP") field(INPH, "HL3B:SBPM:HL45:TYLO.SEVR MS NPP") field(INPI, "HL3B:SBPM:HL45:GRU.SEVR MS NPP") field(INPJ, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "HL3B:SBPM:HL45:RSTA_ALH.SEVR MS NPP") field(INPB, "HL3B:SBPM:HL45:GRU.SEVR MS NPP") field(INPC, "HL3B:SBPM:HL45:GRV.SEVR MS NPP") field(INPD, "HL3B:SBPM:HL45:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "HL3B:SBPM:HL45:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "HL3B:SBPM:HL45:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "HL3B:SBPM:HL45:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "HL3B:SBPM:HL45:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "2") field(SCAN, "Passive") } record(bo, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C2 S12") field(FLNK, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:V") } record(ai, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:PINC") } record(ai, "HL3B:SBPM:HL45:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C2 S10") field(SCAN, "Passive") } record(longin, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:RSTA_ALH") } record(calc, "HL3B:SBPM:HL45:RSTA_ALH") { field(CALC, "A & B") field(INPA, "HL3B:SBPM:HL45:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:PHI_SEQ") } record(ao, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:PSI_SEQ") } #record(dfanout, "HL3B:SBPM:HL45:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "HL3B:SBPM:HL45:USCL PP MS") # field(OUTB, "HL3B:SBPM:HL45:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:UOFF_SEQ") } record(ao, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:VOFF_SEQ") } record(ao, "HL3B:SBPM:HL45:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "HL3B:SBPM:HL45:USCL_SEQ") } record(ao, "HL3B:SBPM:HL45:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "HL3B:SBPM:HL45:VSCL_SEQ") } record(mbbo, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMHL45") field(PINI, "YES") } record(stringin, "SBPMHL45:NAME") { field(DESC, "BPM Name") field(VAL, "HL3B:SBPM:HL45") field(PINI, "YES") } record(ai, "HL3B:SBPM:HL45:X_SLOW") { #alias("HL3B:SBPM:HL45:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "HL3B:SBPM:HL45:X MS") field(FLNK, "HL3B:SBPM:HL45:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "HL3B:SBPM:HL45:Y_SLOW") { #alias("HL3B:SBPM:HL45:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "HL3B:SBPM:HL45:Y NPP MS") field(FLNK, "HL3B:SBPM:HL45:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "HL3B:SBPM:HL45:TMIT_SLOW") { #alias("HL3B:SBPM:HL45:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "HL3B:SBPM:HL45:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "HL3B:SBPM:HL45:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "HL3B:SBPM:HL45:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "HL3B:SBPM:HL45:SIMC PP") } record(calcout, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:USCL") field(INPL, "0") } # Switch simulation record HL3B:SBPM:HL45:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "HL3B:SBPM:HL45:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL45:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "HL3B:SBPM:HL45:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL45:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "HL3B:SBPM:HL45:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL45:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "HL3B:SBPM:HL45:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL45:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL45:UOFF") field(DOL2, "HL3B:SBPM:HL45:UOFF") field(DOL3, "HL3B:SBPM:HL45:UOFF") field(DOL4, "HL3B:SBPM:HL45:UOFF") field(DOL5, "HL3B:SBPM:HL45:UOFF") field(DOL6, "HL3B:SBPM:HL45:UOFF") field(DOL7, "HL3B:SBPM:HL45:UOFF") field(DOL8, "HL3B:SBPM:HL45:UOFF") field(DOL9, "HL3B:SBPM:HL45:UOFF") field(DOLA, "HL3B:SBPM:HL45:UOFF") field(LNK1, "HL3B:SBPM:HL45:UOFF_SEL.A PP") field(LNK2, "HL3B:SBPM:HL45:UOFF_SEL.B PP") field(LNK3, "HL3B:SBPM:HL45:UOFF_SEL.C PP") field(LNK4, "HL3B:SBPM:HL45:UOFF_SEL.D PP") field(LNK5, "HL3B:SBPM:HL45:UOFF_SEL.E PP") field(LNK6, "HL3B:SBPM:HL45:UOFF_SEL.F PP") field(LNK7, "HL3B:SBPM:HL45:UOFF_SEL.G PP") field(LNK8, "HL3B:SBPM:HL45:UOFF_SEL.H PP") field(LNK9, "HL3B:SBPM:HL45:UOFF_SEL.I PP") field(LNKA, "HL3B:SBPM:HL45:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL45:UOFF_SEL") field(OUTA, "HL3B:SBPM:HL45:U.AOFF CA") field(OUTB, "HL3B:SBPM:HL45:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL45:UOFF_CTRL") { field(INPA, "HL3B:SBPM:HL45:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL45:VOFF") field(DOL2, "HL3B:SBPM:HL45:VOFF") field(DOL3, "HL3B:SBPM:HL45:VOFF") field(DOL4, "HL3B:SBPM:HL45:VOFF") field(DOL5, "HL3B:SBPM:HL45:VOFF") field(DOL6, "HL3B:SBPM:HL45:VOFF") field(DOL7, "HL3B:SBPM:HL45:VOFF") field(DOL8, "HL3B:SBPM:HL45:VOFF") field(DOL9, "HL3B:SBPM:HL45:VOFF") field(DOLA, "HL3B:SBPM:HL45:VOFF") field(LNK1, "HL3B:SBPM:HL45:VOFF_SEL.A PP") field(LNK2, "HL3B:SBPM:HL45:VOFF_SEL.B PP") field(LNK3, "HL3B:SBPM:HL45:VOFF_SEL.C PP") field(LNK4, "HL3B:SBPM:HL45:VOFF_SEL.D PP") field(LNK5, "HL3B:SBPM:HL45:VOFF_SEL.E PP") field(LNK6, "HL3B:SBPM:HL45:VOFF_SEL.F PP") field(LNK7, "HL3B:SBPM:HL45:VOFF_SEL.G PP") field(LNK8, "HL3B:SBPM:HL45:VOFF_SEL.H PP") field(LNK9, "HL3B:SBPM:HL45:VOFF_SEL.I PP") field(LNKA, "HL3B:SBPM:HL45:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL45:VOFF_SEL") field(OUTA, "HL3B:SBPM:HL45:V.AOFF CA") field(OUTB, "HL3B:SBPM:HL45:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL45:VOFF_CTRL") { field(INPA, "HL3B:SBPM:HL45:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL45:USCL") field(DOL2, "HL3B:SBPM:HL45:USCL") field(DOL3, "HL3B:SBPM:HL45:USCL") field(DOL4, "HL3B:SBPM:HL45:USCL") field(DOL5, "HL3B:SBPM:HL45:USCL") field(DOL6, "HL3B:SBPM:HL45:USCL") field(DOL7, "HL3B:SBPM:HL45:USCL") field(DOL8, "HL3B:SBPM:HL45:USCL") field(DOL9, "HL3B:SBPM:HL45:USCL") field(DOLA, "HL3B:SBPM:HL45:USCL") field(LNK1, "HL3B:SBPM:HL45:USCL_SEL.A PP") field(LNK2, "HL3B:SBPM:HL45:USCL_SEL.B PP") field(LNK3, "HL3B:SBPM:HL45:USCL_SEL.C PP") field(LNK4, "HL3B:SBPM:HL45:USCL_SEL.D PP") field(LNK5, "HL3B:SBPM:HL45:USCL_SEL.E PP") field(LNK6, "HL3B:SBPM:HL45:USCL_SEL.F PP") field(LNK7, "HL3B:SBPM:HL45:USCL_SEL.G PP") field(LNK8, "HL3B:SBPM:HL45:USCL_SEL.H PP") field(LNK9, "HL3B:SBPM:HL45:USCL_SEL.I PP") field(LNKA, "HL3B:SBPM:HL45:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL45:USCL_SEL") field(OUTA, "HL3B:SBPM:HL45:U.ASLO CA") field(OUTB, "HL3B:SBPM:HL45:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL45:USCL_CTRL") { field(INPA, "HL3B:SBPM:HL45:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL45:VSCL") field(DOL2, "HL3B:SBPM:HL45:VSCL") field(DOL3, "HL3B:SBPM:HL45:VSCL") field(DOL4, "HL3B:SBPM:HL45:VSCL") field(DOL5, "HL3B:SBPM:HL45:VSCL") field(DOL6, "HL3B:SBPM:HL45:VSCL") field(DOL7, "HL3B:SBPM:HL45:VSCL") field(DOL8, "HL3B:SBPM:HL45:VSCL") field(DOL9, "HL3B:SBPM:HL45:VSCL") field(DOLA, "HL3B:SBPM:HL45:VSCL") field(LNK1, "HL3B:SBPM:HL45:VSCL_SEL.A PP") field(LNK2, "HL3B:SBPM:HL45:VSCL_SEL.B PP") field(LNK3, "HL3B:SBPM:HL45:VSCL_SEL.C PP") field(LNK4, "HL3B:SBPM:HL45:VSCL_SEL.D PP") field(LNK5, "HL3B:SBPM:HL45:VSCL_SEL.E PP") field(LNK6, "HL3B:SBPM:HL45:VSCL_SEL.F PP") field(LNK7, "HL3B:SBPM:HL45:VSCL_SEL.G PP") field(LNK8, "HL3B:SBPM:HL45:VSCL_SEL.H PP") field(LNK9, "HL3B:SBPM:HL45:VSCL_SEL.I PP") field(LNKA, "HL3B:SBPM:HL45:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL45:VSCL_SEL") field(OUTA, "HL3B:SBPM:HL45:V.ASLO CA") field(OUTB, "HL3B:SBPM:HL45:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL45:VSCL_CTRL") { field(INPA, "HL3B:SBPM:HL45:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL45:PHI") field(DOL2, "HL3B:SBPM:HL45:PHI") field(DOL3, "HL3B:SBPM:HL45:PHI") field(DOL4, "HL3B:SBPM:HL45:PHI") field(DOL5, "HL3B:SBPM:HL45:PHI") field(DOL6, "HL3B:SBPM:HL45:PHI") field(DOL7, "HL3B:SBPM:HL45:PHI") field(DOL8, "HL3B:SBPM:HL45:PHI") field(DOL9, "HL3B:SBPM:HL45:PHI") field(DOLA, "HL3B:SBPM:HL45:PHI") field(LNK1, "HL3B:SBPM:HL45:PHI_SEL.A PP") field(LNK2, "HL3B:SBPM:HL45:PHI_SEL.B PP") field(LNK3, "HL3B:SBPM:HL45:PHI_SEL.C PP") field(LNK4, "HL3B:SBPM:HL45:PHI_SEL.D PP") field(LNK5, "HL3B:SBPM:HL45:PHI_SEL.E PP") field(LNK6, "HL3B:SBPM:HL45:PHI_SEL.F PP") field(LNK7, "HL3B:SBPM:HL45:PHI_SEL.G PP") field(LNK8, "HL3B:SBPM:HL45:PHI_SEL.H PP") field(LNK9, "HL3B:SBPM:HL45:PHI_SEL.I PP") field(LNKA, "HL3B:SBPM:HL45:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL45:PHI_SEL") field(OUTA, "HL3B:SBPM:HL45:CALC.E CA") field(OUTB, "HL3B:SBPM:HL45:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL45:PHI_CTRL") { field(INPA, "HL3B:SBPM:HL45:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL45:PSI") field(DOL2, "HL3B:SBPM:HL45:PSI") field(DOL3, "HL3B:SBPM:HL45:PSI") field(DOL4, "HL3B:SBPM:HL45:PSI") field(DOL5, "HL3B:SBPM:HL45:PSI") field(DOL6, "HL3B:SBPM:HL45:PSI") field(DOL7, "HL3B:SBPM:HL45:PSI") field(DOL8, "HL3B:SBPM:HL45:PSI") field(DOL9, "HL3B:SBPM:HL45:PSI") field(DOLA, "HL3B:SBPM:HL45:PSI") field(LNK1, "HL3B:SBPM:HL45:PSI_SEL.A PP") field(LNK2, "HL3B:SBPM:HL45:PSI_SEL.B PP") field(LNK3, "HL3B:SBPM:HL45:PSI_SEL.C PP") field(LNK4, "HL3B:SBPM:HL45:PSI_SEL.D PP") field(LNK5, "HL3B:SBPM:HL45:PSI_SEL.E PP") field(LNK6, "HL3B:SBPM:HL45:PSI_SEL.F PP") field(LNK7, "HL3B:SBPM:HL45:PSI_SEL.G PP") field(LNK8, "HL3B:SBPM:HL45:PSI_SEL.H PP") field(LNK9, "HL3B:SBPM:HL45:PSI_SEL.I PP") field(LNKA, "HL3B:SBPM:HL45:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL45:PSI_SEL") field(OUTA, "HL3B:SBPM:HL45:CALC.F CA") field(OUTB, "HL3B:SBPM:HL45:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL45:PSI_CTRL") { field(INPA, "HL3B:SBPM:HL45:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL45:PSI_SEL.L PP") } record(longout, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "HL3B:SBPM:HL46:ATT1 CP") field(INPC, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "HL3B:SBPM:HL46:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL46:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL46:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "HL3B:SBPM:HL46:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL46:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL46:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "HL3B:SBPM:HL46:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "HL3B:SBPM:HL46:RSTA.SEVR MS NPP") field(INPB, "HL3B:SBPM:HL46:TMIT.SEVR MS NPP") field(INPC, "HL3B:SBPM:HL46:Y.SEVR MS NPP") field(INPD, "HL3B:SBPM:HL46:X.SEVR MS NPP") field(INPE, "HL3B:SBPM:HL46:TGRN.SEVR MS NPP") field(INPF, "HL3B:SBPM:HL46:TRED.SEVR MS NPP") field(INPG, "HL3B:SBPM:HL46:TBLU.SEVR MS NPP") field(INPH, "HL3B:SBPM:HL46:TYLO.SEVR MS NPP") field(INPI, "HL3B:SBPM:HL46:GRU.SEVR MS NPP") field(INPJ, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "HL3B:SBPM:HL46:RSTA_ALH.SEVR MS NPP") field(INPB, "HL3B:SBPM:HL46:GRU.SEVR MS NPP") field(INPC, "HL3B:SBPM:HL46:GRV.SEVR MS NPP") field(INPD, "HL3B:SBPM:HL46:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "HL3B:SBPM:HL46:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "HL3B:SBPM:HL46:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "HL3B:SBPM:HL46:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "HL3B:SBPM:HL46:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "3") field(SCAN, "Passive") } record(bo, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C3 S12") field(FLNK, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:V") } record(ai, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:PINC") } record(ai, "HL3B:SBPM:HL46:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C3 S10") field(SCAN, "Passive") } record(longin, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:RSTA_ALH") } record(calc, "HL3B:SBPM:HL46:RSTA_ALH") { field(CALC, "A & B") field(INPA, "HL3B:SBPM:HL46:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:PHI_SEQ") } record(ao, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:PSI_SEQ") } #record(dfanout, "HL3B:SBPM:HL46:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "HL3B:SBPM:HL46:USCL PP MS") # field(OUTB, "HL3B:SBPM:HL46:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:UOFF_SEQ") } record(ao, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:VOFF_SEQ") } record(ao, "HL3B:SBPM:HL46:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "HL3B:SBPM:HL46:USCL_SEQ") } record(ao, "HL3B:SBPM:HL46:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "HL3B:SBPM:HL46:VSCL_SEQ") } record(mbbo, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMHL46") field(PINI, "YES") } record(stringin, "SBPMHL46:NAME") { field(DESC, "BPM Name") field(VAL, "HL3B:SBPM:HL46") field(PINI, "YES") } record(ai, "HL3B:SBPM:HL46:X_SLOW") { #alias("HL3B:SBPM:HL46:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "HL3B:SBPM:HL46:X MS") field(FLNK, "HL3B:SBPM:HL46:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "HL3B:SBPM:HL46:Y_SLOW") { #alias("HL3B:SBPM:HL46:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "HL3B:SBPM:HL46:Y NPP MS") field(FLNK, "HL3B:SBPM:HL46:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "HL3B:SBPM:HL46:TMIT_SLOW") { #alias("HL3B:SBPM:HL46:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "HL3B:SBPM:HL46:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "HL3B:SBPM:HL46:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "HL3B:SBPM:HL46:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "HL3B:SBPM:HL46:SIMC PP") } record(calcout, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:USCL") field(INPL, "0") } # Switch simulation record HL3B:SBPM:HL46:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "HL3B:SBPM:HL46:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL46:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "HL3B:SBPM:HL46:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL46:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "HL3B:SBPM:HL46:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL46:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "HL3B:SBPM:HL46:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL46:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL46:UOFF") field(DOL2, "HL3B:SBPM:HL46:UOFF") field(DOL3, "HL3B:SBPM:HL46:UOFF") field(DOL4, "HL3B:SBPM:HL46:UOFF") field(DOL5, "HL3B:SBPM:HL46:UOFF") field(DOL6, "HL3B:SBPM:HL46:UOFF") field(DOL7, "HL3B:SBPM:HL46:UOFF") field(DOL8, "HL3B:SBPM:HL46:UOFF") field(DOL9, "HL3B:SBPM:HL46:UOFF") field(DOLA, "HL3B:SBPM:HL46:UOFF") field(LNK1, "HL3B:SBPM:HL46:UOFF_SEL.A PP") field(LNK2, "HL3B:SBPM:HL46:UOFF_SEL.B PP") field(LNK3, "HL3B:SBPM:HL46:UOFF_SEL.C PP") field(LNK4, "HL3B:SBPM:HL46:UOFF_SEL.D PP") field(LNK5, "HL3B:SBPM:HL46:UOFF_SEL.E PP") field(LNK6, "HL3B:SBPM:HL46:UOFF_SEL.F PP") field(LNK7, "HL3B:SBPM:HL46:UOFF_SEL.G PP") field(LNK8, "HL3B:SBPM:HL46:UOFF_SEL.H PP") field(LNK9, "HL3B:SBPM:HL46:UOFF_SEL.I PP") field(LNKA, "HL3B:SBPM:HL46:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL46:UOFF_SEL") field(OUTA, "HL3B:SBPM:HL46:U.AOFF CA") field(OUTB, "HL3B:SBPM:HL46:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL46:UOFF_CTRL") { field(INPA, "HL3B:SBPM:HL46:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL46:VOFF") field(DOL2, "HL3B:SBPM:HL46:VOFF") field(DOL3, "HL3B:SBPM:HL46:VOFF") field(DOL4, "HL3B:SBPM:HL46:VOFF") field(DOL5, "HL3B:SBPM:HL46:VOFF") field(DOL6, "HL3B:SBPM:HL46:VOFF") field(DOL7, "HL3B:SBPM:HL46:VOFF") field(DOL8, "HL3B:SBPM:HL46:VOFF") field(DOL9, "HL3B:SBPM:HL46:VOFF") field(DOLA, "HL3B:SBPM:HL46:VOFF") field(LNK1, "HL3B:SBPM:HL46:VOFF_SEL.A PP") field(LNK2, "HL3B:SBPM:HL46:VOFF_SEL.B PP") field(LNK3, "HL3B:SBPM:HL46:VOFF_SEL.C PP") field(LNK4, "HL3B:SBPM:HL46:VOFF_SEL.D PP") field(LNK5, "HL3B:SBPM:HL46:VOFF_SEL.E PP") field(LNK6, "HL3B:SBPM:HL46:VOFF_SEL.F PP") field(LNK7, "HL3B:SBPM:HL46:VOFF_SEL.G PP") field(LNK8, "HL3B:SBPM:HL46:VOFF_SEL.H PP") field(LNK9, "HL3B:SBPM:HL46:VOFF_SEL.I PP") field(LNKA, "HL3B:SBPM:HL46:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL46:VOFF_SEL") field(OUTA, "HL3B:SBPM:HL46:V.AOFF CA") field(OUTB, "HL3B:SBPM:HL46:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL46:VOFF_CTRL") { field(INPA, "HL3B:SBPM:HL46:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL46:USCL") field(DOL2, "HL3B:SBPM:HL46:USCL") field(DOL3, "HL3B:SBPM:HL46:USCL") field(DOL4, "HL3B:SBPM:HL46:USCL") field(DOL5, "HL3B:SBPM:HL46:USCL") field(DOL6, "HL3B:SBPM:HL46:USCL") field(DOL7, "HL3B:SBPM:HL46:USCL") field(DOL8, "HL3B:SBPM:HL46:USCL") field(DOL9, "HL3B:SBPM:HL46:USCL") field(DOLA, "HL3B:SBPM:HL46:USCL") field(LNK1, "HL3B:SBPM:HL46:USCL_SEL.A PP") field(LNK2, "HL3B:SBPM:HL46:USCL_SEL.B PP") field(LNK3, "HL3B:SBPM:HL46:USCL_SEL.C PP") field(LNK4, "HL3B:SBPM:HL46:USCL_SEL.D PP") field(LNK5, "HL3B:SBPM:HL46:USCL_SEL.E PP") field(LNK6, "HL3B:SBPM:HL46:USCL_SEL.F PP") field(LNK7, "HL3B:SBPM:HL46:USCL_SEL.G PP") field(LNK8, "HL3B:SBPM:HL46:USCL_SEL.H PP") field(LNK9, "HL3B:SBPM:HL46:USCL_SEL.I PP") field(LNKA, "HL3B:SBPM:HL46:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL46:USCL_SEL") field(OUTA, "HL3B:SBPM:HL46:U.ASLO CA") field(OUTB, "HL3B:SBPM:HL46:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL46:USCL_CTRL") { field(INPA, "HL3B:SBPM:HL46:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL46:VSCL") field(DOL2, "HL3B:SBPM:HL46:VSCL") field(DOL3, "HL3B:SBPM:HL46:VSCL") field(DOL4, "HL3B:SBPM:HL46:VSCL") field(DOL5, "HL3B:SBPM:HL46:VSCL") field(DOL6, "HL3B:SBPM:HL46:VSCL") field(DOL7, "HL3B:SBPM:HL46:VSCL") field(DOL8, "HL3B:SBPM:HL46:VSCL") field(DOL9, "HL3B:SBPM:HL46:VSCL") field(DOLA, "HL3B:SBPM:HL46:VSCL") field(LNK1, "HL3B:SBPM:HL46:VSCL_SEL.A PP") field(LNK2, "HL3B:SBPM:HL46:VSCL_SEL.B PP") field(LNK3, "HL3B:SBPM:HL46:VSCL_SEL.C PP") field(LNK4, "HL3B:SBPM:HL46:VSCL_SEL.D PP") field(LNK5, "HL3B:SBPM:HL46:VSCL_SEL.E PP") field(LNK6, "HL3B:SBPM:HL46:VSCL_SEL.F PP") field(LNK7, "HL3B:SBPM:HL46:VSCL_SEL.G PP") field(LNK8, "HL3B:SBPM:HL46:VSCL_SEL.H PP") field(LNK9, "HL3B:SBPM:HL46:VSCL_SEL.I PP") field(LNKA, "HL3B:SBPM:HL46:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL46:VSCL_SEL") field(OUTA, "HL3B:SBPM:HL46:V.ASLO CA") field(OUTB, "HL3B:SBPM:HL46:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL46:VSCL_CTRL") { field(INPA, "HL3B:SBPM:HL46:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL46:PHI") field(DOL2, "HL3B:SBPM:HL46:PHI") field(DOL3, "HL3B:SBPM:HL46:PHI") field(DOL4, "HL3B:SBPM:HL46:PHI") field(DOL5, "HL3B:SBPM:HL46:PHI") field(DOL6, "HL3B:SBPM:HL46:PHI") field(DOL7, "HL3B:SBPM:HL46:PHI") field(DOL8, "HL3B:SBPM:HL46:PHI") field(DOL9, "HL3B:SBPM:HL46:PHI") field(DOLA, "HL3B:SBPM:HL46:PHI") field(LNK1, "HL3B:SBPM:HL46:PHI_SEL.A PP") field(LNK2, "HL3B:SBPM:HL46:PHI_SEL.B PP") field(LNK3, "HL3B:SBPM:HL46:PHI_SEL.C PP") field(LNK4, "HL3B:SBPM:HL46:PHI_SEL.D PP") field(LNK5, "HL3B:SBPM:HL46:PHI_SEL.E PP") field(LNK6, "HL3B:SBPM:HL46:PHI_SEL.F PP") field(LNK7, "HL3B:SBPM:HL46:PHI_SEL.G PP") field(LNK8, "HL3B:SBPM:HL46:PHI_SEL.H PP") field(LNK9, "HL3B:SBPM:HL46:PHI_SEL.I PP") field(LNKA, "HL3B:SBPM:HL46:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL46:PHI_SEL") field(OUTA, "HL3B:SBPM:HL46:CALC.E CA") field(OUTB, "HL3B:SBPM:HL46:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL46:PHI_CTRL") { field(INPA, "HL3B:SBPM:HL46:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL46:PSI") field(DOL2, "HL3B:SBPM:HL46:PSI") field(DOL3, "HL3B:SBPM:HL46:PSI") field(DOL4, "HL3B:SBPM:HL46:PSI") field(DOL5, "HL3B:SBPM:HL46:PSI") field(DOL6, "HL3B:SBPM:HL46:PSI") field(DOL7, "HL3B:SBPM:HL46:PSI") field(DOL8, "HL3B:SBPM:HL46:PSI") field(DOL9, "HL3B:SBPM:HL46:PSI") field(DOLA, "HL3B:SBPM:HL46:PSI") field(LNK1, "HL3B:SBPM:HL46:PSI_SEL.A PP") field(LNK2, "HL3B:SBPM:HL46:PSI_SEL.B PP") field(LNK3, "HL3B:SBPM:HL46:PSI_SEL.C PP") field(LNK4, "HL3B:SBPM:HL46:PSI_SEL.D PP") field(LNK5, "HL3B:SBPM:HL46:PSI_SEL.E PP") field(LNK6, "HL3B:SBPM:HL46:PSI_SEL.F PP") field(LNK7, "HL3B:SBPM:HL46:PSI_SEL.G PP") field(LNK8, "HL3B:SBPM:HL46:PSI_SEL.H PP") field(LNK9, "HL3B:SBPM:HL46:PSI_SEL.I PP") field(LNKA, "HL3B:SBPM:HL46:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL46:PSI_SEL") field(OUTA, "HL3B:SBPM:HL46:CALC.F CA") field(OUTB, "HL3B:SBPM:HL46:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL46:PSI_CTRL") { field(INPA, "HL3B:SBPM:HL46:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL46:PSI_SEL.L PP") } record(longout, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "HL3B:SBPM:HL47:ATT1 CP") field(INPC, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "HL3B:SBPM:HL47:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL47:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL47:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "HL3B:SBPM:HL47:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL47:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL47:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "HL3B:SBPM:HL47:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "HL3B:SBPM:HL47:RSTA.SEVR MS NPP") field(INPB, "HL3B:SBPM:HL47:TMIT.SEVR MS NPP") field(INPC, "HL3B:SBPM:HL47:Y.SEVR MS NPP") field(INPD, "HL3B:SBPM:HL47:X.SEVR MS NPP") field(INPE, "HL3B:SBPM:HL47:TGRN.SEVR MS NPP") field(INPF, "HL3B:SBPM:HL47:TRED.SEVR MS NPP") field(INPG, "HL3B:SBPM:HL47:TBLU.SEVR MS NPP") field(INPH, "HL3B:SBPM:HL47:TYLO.SEVR MS NPP") field(INPI, "HL3B:SBPM:HL47:GRU.SEVR MS NPP") field(INPJ, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "HL3B:SBPM:HL47:RSTA_ALH.SEVR MS NPP") field(INPB, "HL3B:SBPM:HL47:GRU.SEVR MS NPP") field(INPC, "HL3B:SBPM:HL47:GRV.SEVR MS NPP") field(INPD, "HL3B:SBPM:HL47:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "HL3B:SBPM:HL47:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "HL3B:SBPM:HL47:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "HL3B:SBPM:HL47:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "HL3B:SBPM:HL47:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "4") field(SCAN, "Passive") } record(bo, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C4 S12") field(FLNK, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:V") } record(ai, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:PINC") } record(ai, "HL3B:SBPM:HL47:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C4 S10") field(SCAN, "Passive") } record(longin, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:RSTA_ALH") } record(calc, "HL3B:SBPM:HL47:RSTA_ALH") { field(CALC, "A & B") field(INPA, "HL3B:SBPM:HL47:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:PHI_SEQ") } record(ao, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:PSI_SEQ") } #record(dfanout, "HL3B:SBPM:HL47:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "HL3B:SBPM:HL47:USCL PP MS") # field(OUTB, "HL3B:SBPM:HL47:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:UOFF_SEQ") } record(ao, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:VOFF_SEQ") } record(ao, "HL3B:SBPM:HL47:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "HL3B:SBPM:HL47:USCL_SEQ") } record(ao, "HL3B:SBPM:HL47:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "HL3B:SBPM:HL47:VSCL_SEQ") } record(mbbo, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMHL47") field(PINI, "YES") } record(stringin, "SBPMHL47:NAME") { field(DESC, "BPM Name") field(VAL, "HL3B:SBPM:HL47") field(PINI, "YES") } record(ai, "HL3B:SBPM:HL47:X_SLOW") { #alias("HL3B:SBPM:HL47:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "HL3B:SBPM:HL47:X MS") field(FLNK, "HL3B:SBPM:HL47:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "HL3B:SBPM:HL47:Y_SLOW") { #alias("HL3B:SBPM:HL47:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "HL3B:SBPM:HL47:Y NPP MS") field(FLNK, "HL3B:SBPM:HL47:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "HL3B:SBPM:HL47:TMIT_SLOW") { #alias("HL3B:SBPM:HL47:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "HL3B:SBPM:HL47:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "HL3B:SBPM:HL47:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "HL3B:SBPM:HL47:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "HL3B:SBPM:HL47:SIMC PP") } record(calcout, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:USCL") field(INPL, "0") } # Switch simulation record HL3B:SBPM:HL47:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "HL3B:SBPM:HL47:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL47:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "HL3B:SBPM:HL47:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL47:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "HL3B:SBPM:HL47:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL47:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "HL3B:SBPM:HL47:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL47:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL47:UOFF") field(DOL2, "HL3B:SBPM:HL47:UOFF") field(DOL3, "HL3B:SBPM:HL47:UOFF") field(DOL4, "HL3B:SBPM:HL47:UOFF") field(DOL5, "HL3B:SBPM:HL47:UOFF") field(DOL6, "HL3B:SBPM:HL47:UOFF") field(DOL7, "HL3B:SBPM:HL47:UOFF") field(DOL8, "HL3B:SBPM:HL47:UOFF") field(DOL9, "HL3B:SBPM:HL47:UOFF") field(DOLA, "HL3B:SBPM:HL47:UOFF") field(LNK1, "HL3B:SBPM:HL47:UOFF_SEL.A PP") field(LNK2, "HL3B:SBPM:HL47:UOFF_SEL.B PP") field(LNK3, "HL3B:SBPM:HL47:UOFF_SEL.C PP") field(LNK4, "HL3B:SBPM:HL47:UOFF_SEL.D PP") field(LNK5, "HL3B:SBPM:HL47:UOFF_SEL.E PP") field(LNK6, "HL3B:SBPM:HL47:UOFF_SEL.F PP") field(LNK7, "HL3B:SBPM:HL47:UOFF_SEL.G PP") field(LNK8, "HL3B:SBPM:HL47:UOFF_SEL.H PP") field(LNK9, "HL3B:SBPM:HL47:UOFF_SEL.I PP") field(LNKA, "HL3B:SBPM:HL47:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL47:UOFF_SEL") field(OUTA, "HL3B:SBPM:HL47:U.AOFF CA") field(OUTB, "HL3B:SBPM:HL47:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL47:UOFF_CTRL") { field(INPA, "HL3B:SBPM:HL47:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL47:VOFF") field(DOL2, "HL3B:SBPM:HL47:VOFF") field(DOL3, "HL3B:SBPM:HL47:VOFF") field(DOL4, "HL3B:SBPM:HL47:VOFF") field(DOL5, "HL3B:SBPM:HL47:VOFF") field(DOL6, "HL3B:SBPM:HL47:VOFF") field(DOL7, "HL3B:SBPM:HL47:VOFF") field(DOL8, "HL3B:SBPM:HL47:VOFF") field(DOL9, "HL3B:SBPM:HL47:VOFF") field(DOLA, "HL3B:SBPM:HL47:VOFF") field(LNK1, "HL3B:SBPM:HL47:VOFF_SEL.A PP") field(LNK2, "HL3B:SBPM:HL47:VOFF_SEL.B PP") field(LNK3, "HL3B:SBPM:HL47:VOFF_SEL.C PP") field(LNK4, "HL3B:SBPM:HL47:VOFF_SEL.D PP") field(LNK5, "HL3B:SBPM:HL47:VOFF_SEL.E PP") field(LNK6, "HL3B:SBPM:HL47:VOFF_SEL.F PP") field(LNK7, "HL3B:SBPM:HL47:VOFF_SEL.G PP") field(LNK8, "HL3B:SBPM:HL47:VOFF_SEL.H PP") field(LNK9, "HL3B:SBPM:HL47:VOFF_SEL.I PP") field(LNKA, "HL3B:SBPM:HL47:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL47:VOFF_SEL") field(OUTA, "HL3B:SBPM:HL47:V.AOFF CA") field(OUTB, "HL3B:SBPM:HL47:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL47:VOFF_CTRL") { field(INPA, "HL3B:SBPM:HL47:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL47:USCL") field(DOL2, "HL3B:SBPM:HL47:USCL") field(DOL3, "HL3B:SBPM:HL47:USCL") field(DOL4, "HL3B:SBPM:HL47:USCL") field(DOL5, "HL3B:SBPM:HL47:USCL") field(DOL6, "HL3B:SBPM:HL47:USCL") field(DOL7, "HL3B:SBPM:HL47:USCL") field(DOL8, "HL3B:SBPM:HL47:USCL") field(DOL9, "HL3B:SBPM:HL47:USCL") field(DOLA, "HL3B:SBPM:HL47:USCL") field(LNK1, "HL3B:SBPM:HL47:USCL_SEL.A PP") field(LNK2, "HL3B:SBPM:HL47:USCL_SEL.B PP") field(LNK3, "HL3B:SBPM:HL47:USCL_SEL.C PP") field(LNK4, "HL3B:SBPM:HL47:USCL_SEL.D PP") field(LNK5, "HL3B:SBPM:HL47:USCL_SEL.E PP") field(LNK6, "HL3B:SBPM:HL47:USCL_SEL.F PP") field(LNK7, "HL3B:SBPM:HL47:USCL_SEL.G PP") field(LNK8, "HL3B:SBPM:HL47:USCL_SEL.H PP") field(LNK9, "HL3B:SBPM:HL47:USCL_SEL.I PP") field(LNKA, "HL3B:SBPM:HL47:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL47:USCL_SEL") field(OUTA, "HL3B:SBPM:HL47:U.ASLO CA") field(OUTB, "HL3B:SBPM:HL47:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL47:USCL_CTRL") { field(INPA, "HL3B:SBPM:HL47:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL47:VSCL") field(DOL2, "HL3B:SBPM:HL47:VSCL") field(DOL3, "HL3B:SBPM:HL47:VSCL") field(DOL4, "HL3B:SBPM:HL47:VSCL") field(DOL5, "HL3B:SBPM:HL47:VSCL") field(DOL6, "HL3B:SBPM:HL47:VSCL") field(DOL7, "HL3B:SBPM:HL47:VSCL") field(DOL8, "HL3B:SBPM:HL47:VSCL") field(DOL9, "HL3B:SBPM:HL47:VSCL") field(DOLA, "HL3B:SBPM:HL47:VSCL") field(LNK1, "HL3B:SBPM:HL47:VSCL_SEL.A PP") field(LNK2, "HL3B:SBPM:HL47:VSCL_SEL.B PP") field(LNK3, "HL3B:SBPM:HL47:VSCL_SEL.C PP") field(LNK4, "HL3B:SBPM:HL47:VSCL_SEL.D PP") field(LNK5, "HL3B:SBPM:HL47:VSCL_SEL.E PP") field(LNK6, "HL3B:SBPM:HL47:VSCL_SEL.F PP") field(LNK7, "HL3B:SBPM:HL47:VSCL_SEL.G PP") field(LNK8, "HL3B:SBPM:HL47:VSCL_SEL.H PP") field(LNK9, "HL3B:SBPM:HL47:VSCL_SEL.I PP") field(LNKA, "HL3B:SBPM:HL47:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL47:VSCL_SEL") field(OUTA, "HL3B:SBPM:HL47:V.ASLO CA") field(OUTB, "HL3B:SBPM:HL47:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL47:VSCL_CTRL") { field(INPA, "HL3B:SBPM:HL47:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL47:PHI") field(DOL2, "HL3B:SBPM:HL47:PHI") field(DOL3, "HL3B:SBPM:HL47:PHI") field(DOL4, "HL3B:SBPM:HL47:PHI") field(DOL5, "HL3B:SBPM:HL47:PHI") field(DOL6, "HL3B:SBPM:HL47:PHI") field(DOL7, "HL3B:SBPM:HL47:PHI") field(DOL8, "HL3B:SBPM:HL47:PHI") field(DOL9, "HL3B:SBPM:HL47:PHI") field(DOLA, "HL3B:SBPM:HL47:PHI") field(LNK1, "HL3B:SBPM:HL47:PHI_SEL.A PP") field(LNK2, "HL3B:SBPM:HL47:PHI_SEL.B PP") field(LNK3, "HL3B:SBPM:HL47:PHI_SEL.C PP") field(LNK4, "HL3B:SBPM:HL47:PHI_SEL.D PP") field(LNK5, "HL3B:SBPM:HL47:PHI_SEL.E PP") field(LNK6, "HL3B:SBPM:HL47:PHI_SEL.F PP") field(LNK7, "HL3B:SBPM:HL47:PHI_SEL.G PP") field(LNK8, "HL3B:SBPM:HL47:PHI_SEL.H PP") field(LNK9, "HL3B:SBPM:HL47:PHI_SEL.I PP") field(LNKA, "HL3B:SBPM:HL47:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL47:PHI_SEL") field(OUTA, "HL3B:SBPM:HL47:CALC.E CA") field(OUTB, "HL3B:SBPM:HL47:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL47:PHI_CTRL") { field(INPA, "HL3B:SBPM:HL47:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL47:PSI") field(DOL2, "HL3B:SBPM:HL47:PSI") field(DOL3, "HL3B:SBPM:HL47:PSI") field(DOL4, "HL3B:SBPM:HL47:PSI") field(DOL5, "HL3B:SBPM:HL47:PSI") field(DOL6, "HL3B:SBPM:HL47:PSI") field(DOL7, "HL3B:SBPM:HL47:PSI") field(DOL8, "HL3B:SBPM:HL47:PSI") field(DOL9, "HL3B:SBPM:HL47:PSI") field(DOLA, "HL3B:SBPM:HL47:PSI") field(LNK1, "HL3B:SBPM:HL47:PSI_SEL.A PP") field(LNK2, "HL3B:SBPM:HL47:PSI_SEL.B PP") field(LNK3, "HL3B:SBPM:HL47:PSI_SEL.C PP") field(LNK4, "HL3B:SBPM:HL47:PSI_SEL.D PP") field(LNK5, "HL3B:SBPM:HL47:PSI_SEL.E PP") field(LNK6, "HL3B:SBPM:HL47:PSI_SEL.F PP") field(LNK7, "HL3B:SBPM:HL47:PSI_SEL.G PP") field(LNK8, "HL3B:SBPM:HL47:PSI_SEL.H PP") field(LNK9, "HL3B:SBPM:HL47:PSI_SEL.I PP") field(LNKA, "HL3B:SBPM:HL47:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL47:PSI_SEL") field(OUTA, "HL3B:SBPM:HL47:CALC.F CA") field(OUTB, "HL3B:SBPM:HL47:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL47:PSI_CTRL") { field(INPA, "HL3B:SBPM:HL47:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL47:PSI_SEL.L PP") } record(longout, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "HL3B:SBPM:HL48:ATT1 CP") field(INPC, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "HL3B:SBPM:HL48:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL48:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL48:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "HL3B:SBPM:HL48:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL48:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL48:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "HL3B:SBPM:HL48:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "HL3B:SBPM:HL48:RSTA.SEVR MS NPP") field(INPB, "HL3B:SBPM:HL48:TMIT.SEVR MS NPP") field(INPC, "HL3B:SBPM:HL48:Y.SEVR MS NPP") field(INPD, "HL3B:SBPM:HL48:X.SEVR MS NPP") field(INPE, "HL3B:SBPM:HL48:TGRN.SEVR MS NPP") field(INPF, "HL3B:SBPM:HL48:TRED.SEVR MS NPP") field(INPG, "HL3B:SBPM:HL48:TBLU.SEVR MS NPP") field(INPH, "HL3B:SBPM:HL48:TYLO.SEVR MS NPP") field(INPI, "HL3B:SBPM:HL48:GRU.SEVR MS NPP") field(INPJ, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "HL3B:SBPM:HL48:RSTA_ALH.SEVR MS NPP") field(INPB, "HL3B:SBPM:HL48:GRU.SEVR MS NPP") field(INPC, "HL3B:SBPM:HL48:GRV.SEVR MS NPP") field(INPD, "HL3B:SBPM:HL48:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "HL3B:SBPM:HL48:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "HL3B:SBPM:HL48:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "HL3B:SBPM:HL48:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "HL3B:SBPM:HL48:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "5") field(SCAN, "Passive") } record(bo, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C5 S12") field(FLNK, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:V") } record(ai, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:PINC") } record(ai, "HL3B:SBPM:HL48:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C5 S10") field(SCAN, "Passive") } record(longin, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:RSTA_ALH") } record(calc, "HL3B:SBPM:HL48:RSTA_ALH") { field(CALC, "A & B") field(INPA, "HL3B:SBPM:HL48:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:PHI_SEQ") } record(ao, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:PSI_SEQ") } #record(dfanout, "HL3B:SBPM:HL48:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "HL3B:SBPM:HL48:USCL PP MS") # field(OUTB, "HL3B:SBPM:HL48:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:UOFF_SEQ") } record(ao, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:VOFF_SEQ") } record(ao, "HL3B:SBPM:HL48:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "HL3B:SBPM:HL48:USCL_SEQ") } record(ao, "HL3B:SBPM:HL48:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "HL3B:SBPM:HL48:VSCL_SEQ") } record(mbbo, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMHL48") field(PINI, "YES") } record(stringin, "SBPMHL48:NAME") { field(DESC, "BPM Name") field(VAL, "HL3B:SBPM:HL48") field(PINI, "YES") } record(ai, "HL3B:SBPM:HL48:X_SLOW") { #alias("HL3B:SBPM:HL48:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "HL3B:SBPM:HL48:X MS") field(FLNK, "HL3B:SBPM:HL48:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "HL3B:SBPM:HL48:Y_SLOW") { #alias("HL3B:SBPM:HL48:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "HL3B:SBPM:HL48:Y NPP MS") field(FLNK, "HL3B:SBPM:HL48:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "HL3B:SBPM:HL48:TMIT_SLOW") { #alias("HL3B:SBPM:HL48:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "HL3B:SBPM:HL48:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "HL3B:SBPM:HL48:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "HL3B:SBPM:HL48:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "HL3B:SBPM:HL48:SIMC PP") } record(calcout, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:USCL") field(INPL, "0") } # Switch simulation record HL3B:SBPM:HL48:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "HL3B:SBPM:HL48:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL48:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "HL3B:SBPM:HL48:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL48:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "HL3B:SBPM:HL48:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL48:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "HL3B:SBPM:HL48:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL48:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL48:UOFF") field(DOL2, "HL3B:SBPM:HL48:UOFF") field(DOL3, "HL3B:SBPM:HL48:UOFF") field(DOL4, "HL3B:SBPM:HL48:UOFF") field(DOL5, "HL3B:SBPM:HL48:UOFF") field(DOL6, "HL3B:SBPM:HL48:UOFF") field(DOL7, "HL3B:SBPM:HL48:UOFF") field(DOL8, "HL3B:SBPM:HL48:UOFF") field(DOL9, "HL3B:SBPM:HL48:UOFF") field(DOLA, "HL3B:SBPM:HL48:UOFF") field(LNK1, "HL3B:SBPM:HL48:UOFF_SEL.A PP") field(LNK2, "HL3B:SBPM:HL48:UOFF_SEL.B PP") field(LNK3, "HL3B:SBPM:HL48:UOFF_SEL.C PP") field(LNK4, "HL3B:SBPM:HL48:UOFF_SEL.D PP") field(LNK5, "HL3B:SBPM:HL48:UOFF_SEL.E PP") field(LNK6, "HL3B:SBPM:HL48:UOFF_SEL.F PP") field(LNK7, "HL3B:SBPM:HL48:UOFF_SEL.G PP") field(LNK8, "HL3B:SBPM:HL48:UOFF_SEL.H PP") field(LNK9, "HL3B:SBPM:HL48:UOFF_SEL.I PP") field(LNKA, "HL3B:SBPM:HL48:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL48:UOFF_SEL") field(OUTA, "HL3B:SBPM:HL48:U.AOFF CA") field(OUTB, "HL3B:SBPM:HL48:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL48:UOFF_CTRL") { field(INPA, "HL3B:SBPM:HL48:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL48:VOFF") field(DOL2, "HL3B:SBPM:HL48:VOFF") field(DOL3, "HL3B:SBPM:HL48:VOFF") field(DOL4, "HL3B:SBPM:HL48:VOFF") field(DOL5, "HL3B:SBPM:HL48:VOFF") field(DOL6, "HL3B:SBPM:HL48:VOFF") field(DOL7, "HL3B:SBPM:HL48:VOFF") field(DOL8, "HL3B:SBPM:HL48:VOFF") field(DOL9, "HL3B:SBPM:HL48:VOFF") field(DOLA, "HL3B:SBPM:HL48:VOFF") field(LNK1, "HL3B:SBPM:HL48:VOFF_SEL.A PP") field(LNK2, "HL3B:SBPM:HL48:VOFF_SEL.B PP") field(LNK3, "HL3B:SBPM:HL48:VOFF_SEL.C PP") field(LNK4, "HL3B:SBPM:HL48:VOFF_SEL.D PP") field(LNK5, "HL3B:SBPM:HL48:VOFF_SEL.E PP") field(LNK6, "HL3B:SBPM:HL48:VOFF_SEL.F PP") field(LNK7, "HL3B:SBPM:HL48:VOFF_SEL.G PP") field(LNK8, "HL3B:SBPM:HL48:VOFF_SEL.H PP") field(LNK9, "HL3B:SBPM:HL48:VOFF_SEL.I PP") field(LNKA, "HL3B:SBPM:HL48:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL48:VOFF_SEL") field(OUTA, "HL3B:SBPM:HL48:V.AOFF CA") field(OUTB, "HL3B:SBPM:HL48:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL48:VOFF_CTRL") { field(INPA, "HL3B:SBPM:HL48:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL48:USCL") field(DOL2, "HL3B:SBPM:HL48:USCL") field(DOL3, "HL3B:SBPM:HL48:USCL") field(DOL4, "HL3B:SBPM:HL48:USCL") field(DOL5, "HL3B:SBPM:HL48:USCL") field(DOL6, "HL3B:SBPM:HL48:USCL") field(DOL7, "HL3B:SBPM:HL48:USCL") field(DOL8, "HL3B:SBPM:HL48:USCL") field(DOL9, "HL3B:SBPM:HL48:USCL") field(DOLA, "HL3B:SBPM:HL48:USCL") field(LNK1, "HL3B:SBPM:HL48:USCL_SEL.A PP") field(LNK2, "HL3B:SBPM:HL48:USCL_SEL.B PP") field(LNK3, "HL3B:SBPM:HL48:USCL_SEL.C PP") field(LNK4, "HL3B:SBPM:HL48:USCL_SEL.D PP") field(LNK5, "HL3B:SBPM:HL48:USCL_SEL.E PP") field(LNK6, "HL3B:SBPM:HL48:USCL_SEL.F PP") field(LNK7, "HL3B:SBPM:HL48:USCL_SEL.G PP") field(LNK8, "HL3B:SBPM:HL48:USCL_SEL.H PP") field(LNK9, "HL3B:SBPM:HL48:USCL_SEL.I PP") field(LNKA, "HL3B:SBPM:HL48:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL48:USCL_SEL") field(OUTA, "HL3B:SBPM:HL48:U.ASLO CA") field(OUTB, "HL3B:SBPM:HL48:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL48:USCL_CTRL") { field(INPA, "HL3B:SBPM:HL48:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL48:VSCL") field(DOL2, "HL3B:SBPM:HL48:VSCL") field(DOL3, "HL3B:SBPM:HL48:VSCL") field(DOL4, "HL3B:SBPM:HL48:VSCL") field(DOL5, "HL3B:SBPM:HL48:VSCL") field(DOL6, "HL3B:SBPM:HL48:VSCL") field(DOL7, "HL3B:SBPM:HL48:VSCL") field(DOL8, "HL3B:SBPM:HL48:VSCL") field(DOL9, "HL3B:SBPM:HL48:VSCL") field(DOLA, "HL3B:SBPM:HL48:VSCL") field(LNK1, "HL3B:SBPM:HL48:VSCL_SEL.A PP") field(LNK2, "HL3B:SBPM:HL48:VSCL_SEL.B PP") field(LNK3, "HL3B:SBPM:HL48:VSCL_SEL.C PP") field(LNK4, "HL3B:SBPM:HL48:VSCL_SEL.D PP") field(LNK5, "HL3B:SBPM:HL48:VSCL_SEL.E PP") field(LNK6, "HL3B:SBPM:HL48:VSCL_SEL.F PP") field(LNK7, "HL3B:SBPM:HL48:VSCL_SEL.G PP") field(LNK8, "HL3B:SBPM:HL48:VSCL_SEL.H PP") field(LNK9, "HL3B:SBPM:HL48:VSCL_SEL.I PP") field(LNKA, "HL3B:SBPM:HL48:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL48:VSCL_SEL") field(OUTA, "HL3B:SBPM:HL48:V.ASLO CA") field(OUTB, "HL3B:SBPM:HL48:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL48:VSCL_CTRL") { field(INPA, "HL3B:SBPM:HL48:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL48:PHI") field(DOL2, "HL3B:SBPM:HL48:PHI") field(DOL3, "HL3B:SBPM:HL48:PHI") field(DOL4, "HL3B:SBPM:HL48:PHI") field(DOL5, "HL3B:SBPM:HL48:PHI") field(DOL6, "HL3B:SBPM:HL48:PHI") field(DOL7, "HL3B:SBPM:HL48:PHI") field(DOL8, "HL3B:SBPM:HL48:PHI") field(DOL9, "HL3B:SBPM:HL48:PHI") field(DOLA, "HL3B:SBPM:HL48:PHI") field(LNK1, "HL3B:SBPM:HL48:PHI_SEL.A PP") field(LNK2, "HL3B:SBPM:HL48:PHI_SEL.B PP") field(LNK3, "HL3B:SBPM:HL48:PHI_SEL.C PP") field(LNK4, "HL3B:SBPM:HL48:PHI_SEL.D PP") field(LNK5, "HL3B:SBPM:HL48:PHI_SEL.E PP") field(LNK6, "HL3B:SBPM:HL48:PHI_SEL.F PP") field(LNK7, "HL3B:SBPM:HL48:PHI_SEL.G PP") field(LNK8, "HL3B:SBPM:HL48:PHI_SEL.H PP") field(LNK9, "HL3B:SBPM:HL48:PHI_SEL.I PP") field(LNKA, "HL3B:SBPM:HL48:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL48:PHI_SEL") field(OUTA, "HL3B:SBPM:HL48:CALC.E CA") field(OUTB, "HL3B:SBPM:HL48:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL48:PHI_CTRL") { field(INPA, "HL3B:SBPM:HL48:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL48:PSI") field(DOL2, "HL3B:SBPM:HL48:PSI") field(DOL3, "HL3B:SBPM:HL48:PSI") field(DOL4, "HL3B:SBPM:HL48:PSI") field(DOL5, "HL3B:SBPM:HL48:PSI") field(DOL6, "HL3B:SBPM:HL48:PSI") field(DOL7, "HL3B:SBPM:HL48:PSI") field(DOL8, "HL3B:SBPM:HL48:PSI") field(DOL9, "HL3B:SBPM:HL48:PSI") field(DOLA, "HL3B:SBPM:HL48:PSI") field(LNK1, "HL3B:SBPM:HL48:PSI_SEL.A PP") field(LNK2, "HL3B:SBPM:HL48:PSI_SEL.B PP") field(LNK3, "HL3B:SBPM:HL48:PSI_SEL.C PP") field(LNK4, "HL3B:SBPM:HL48:PSI_SEL.D PP") field(LNK5, "HL3B:SBPM:HL48:PSI_SEL.E PP") field(LNK6, "HL3B:SBPM:HL48:PSI_SEL.F PP") field(LNK7, "HL3B:SBPM:HL48:PSI_SEL.G PP") field(LNK8, "HL3B:SBPM:HL48:PSI_SEL.H PP") field(LNK9, "HL3B:SBPM:HL48:PSI_SEL.I PP") field(LNKA, "HL3B:SBPM:HL48:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL48:PSI_SEL") field(OUTA, "HL3B:SBPM:HL48:CALC.F CA") field(OUTB, "HL3B:SBPM:HL48:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL48:PSI_CTRL") { field(INPA, "HL3B:SBPM:HL48:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL48:PSI_SEL.L PP") } record(longout, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "HL3B:SBPM:HL49:ATT1 CP") field(INPC, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "HL3B:SBPM:HL49:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL49:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL49:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "HL3B:SBPM:HL49:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL49:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL49:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "HL3B:SBPM:HL49:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "HL3B:SBPM:HL49:RSTA.SEVR MS NPP") field(INPB, "HL3B:SBPM:HL49:TMIT.SEVR MS NPP") field(INPC, "HL3B:SBPM:HL49:Y.SEVR MS NPP") field(INPD, "HL3B:SBPM:HL49:X.SEVR MS NPP") field(INPE, "HL3B:SBPM:HL49:TGRN.SEVR MS NPP") field(INPF, "HL3B:SBPM:HL49:TRED.SEVR MS NPP") field(INPG, "HL3B:SBPM:HL49:TBLU.SEVR MS NPP") field(INPH, "HL3B:SBPM:HL49:TYLO.SEVR MS NPP") field(INPI, "HL3B:SBPM:HL49:GRU.SEVR MS NPP") field(INPJ, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "HL3B:SBPM:HL49:RSTA_ALH.SEVR MS NPP") field(INPB, "HL3B:SBPM:HL49:GRU.SEVR MS NPP") field(INPC, "HL3B:SBPM:HL49:GRV.SEVR MS NPP") field(INPD, "HL3B:SBPM:HL49:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "HL3B:SBPM:HL49:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "HL3B:SBPM:HL49:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "HL3B:SBPM:HL49:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "HL3B:SBPM:HL49:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "6") field(SCAN, "Passive") } record(bo, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C6 S12") field(FLNK, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:V") } record(ai, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:PINC") } record(ai, "HL3B:SBPM:HL49:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C6 S10") field(SCAN, "Passive") } record(longin, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:RSTA_ALH") } record(calc, "HL3B:SBPM:HL49:RSTA_ALH") { field(CALC, "A & B") field(INPA, "HL3B:SBPM:HL49:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:PHI_SEQ") } record(ao, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:PSI_SEQ") } #record(dfanout, "HL3B:SBPM:HL49:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "HL3B:SBPM:HL49:USCL PP MS") # field(OUTB, "HL3B:SBPM:HL49:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:UOFF_SEQ") } record(ao, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:VOFF_SEQ") } record(ao, "HL3B:SBPM:HL49:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "HL3B:SBPM:HL49:USCL_SEQ") } record(ao, "HL3B:SBPM:HL49:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "HL3B:SBPM:HL49:VSCL_SEQ") } record(mbbo, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMHL49") field(PINI, "YES") } record(stringin, "SBPMHL49:NAME") { field(DESC, "BPM Name") field(VAL, "HL3B:SBPM:HL49") field(PINI, "YES") } record(ai, "HL3B:SBPM:HL49:X_SLOW") { #alias("HL3B:SBPM:HL49:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "HL3B:SBPM:HL49:X MS") field(FLNK, "HL3B:SBPM:HL49:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "HL3B:SBPM:HL49:Y_SLOW") { #alias("HL3B:SBPM:HL49:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "HL3B:SBPM:HL49:Y NPP MS") field(FLNK, "HL3B:SBPM:HL49:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "HL3B:SBPM:HL49:TMIT_SLOW") { #alias("HL3B:SBPM:HL49:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "HL3B:SBPM:HL49:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "HL3B:SBPM:HL49:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "HL3B:SBPM:HL49:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "HL3B:SBPM:HL49:SIMC PP") } record(calcout, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:USCL") field(INPL, "0") } # Switch simulation record HL3B:SBPM:HL49:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "HL3B:SBPM:HL49:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL49:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "HL3B:SBPM:HL49:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL49:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "HL3B:SBPM:HL49:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL49:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "HL3B:SBPM:HL49:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL49:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL49:UOFF") field(DOL2, "HL3B:SBPM:HL49:UOFF") field(DOL3, "HL3B:SBPM:HL49:UOFF") field(DOL4, "HL3B:SBPM:HL49:UOFF") field(DOL5, "HL3B:SBPM:HL49:UOFF") field(DOL6, "HL3B:SBPM:HL49:UOFF") field(DOL7, "HL3B:SBPM:HL49:UOFF") field(DOL8, "HL3B:SBPM:HL49:UOFF") field(DOL9, "HL3B:SBPM:HL49:UOFF") field(DOLA, "HL3B:SBPM:HL49:UOFF") field(LNK1, "HL3B:SBPM:HL49:UOFF_SEL.A PP") field(LNK2, "HL3B:SBPM:HL49:UOFF_SEL.B PP") field(LNK3, "HL3B:SBPM:HL49:UOFF_SEL.C PP") field(LNK4, "HL3B:SBPM:HL49:UOFF_SEL.D PP") field(LNK5, "HL3B:SBPM:HL49:UOFF_SEL.E PP") field(LNK6, "HL3B:SBPM:HL49:UOFF_SEL.F PP") field(LNK7, "HL3B:SBPM:HL49:UOFF_SEL.G PP") field(LNK8, "HL3B:SBPM:HL49:UOFF_SEL.H PP") field(LNK9, "HL3B:SBPM:HL49:UOFF_SEL.I PP") field(LNKA, "HL3B:SBPM:HL49:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL49:UOFF_SEL") field(OUTA, "HL3B:SBPM:HL49:U.AOFF CA") field(OUTB, "HL3B:SBPM:HL49:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL49:UOFF_CTRL") { field(INPA, "HL3B:SBPM:HL49:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL49:VOFF") field(DOL2, "HL3B:SBPM:HL49:VOFF") field(DOL3, "HL3B:SBPM:HL49:VOFF") field(DOL4, "HL3B:SBPM:HL49:VOFF") field(DOL5, "HL3B:SBPM:HL49:VOFF") field(DOL6, "HL3B:SBPM:HL49:VOFF") field(DOL7, "HL3B:SBPM:HL49:VOFF") field(DOL8, "HL3B:SBPM:HL49:VOFF") field(DOL9, "HL3B:SBPM:HL49:VOFF") field(DOLA, "HL3B:SBPM:HL49:VOFF") field(LNK1, "HL3B:SBPM:HL49:VOFF_SEL.A PP") field(LNK2, "HL3B:SBPM:HL49:VOFF_SEL.B PP") field(LNK3, "HL3B:SBPM:HL49:VOFF_SEL.C PP") field(LNK4, "HL3B:SBPM:HL49:VOFF_SEL.D PP") field(LNK5, "HL3B:SBPM:HL49:VOFF_SEL.E PP") field(LNK6, "HL3B:SBPM:HL49:VOFF_SEL.F PP") field(LNK7, "HL3B:SBPM:HL49:VOFF_SEL.G PP") field(LNK8, "HL3B:SBPM:HL49:VOFF_SEL.H PP") field(LNK9, "HL3B:SBPM:HL49:VOFF_SEL.I PP") field(LNKA, "HL3B:SBPM:HL49:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL49:VOFF_SEL") field(OUTA, "HL3B:SBPM:HL49:V.AOFF CA") field(OUTB, "HL3B:SBPM:HL49:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL49:VOFF_CTRL") { field(INPA, "HL3B:SBPM:HL49:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL49:USCL") field(DOL2, "HL3B:SBPM:HL49:USCL") field(DOL3, "HL3B:SBPM:HL49:USCL") field(DOL4, "HL3B:SBPM:HL49:USCL") field(DOL5, "HL3B:SBPM:HL49:USCL") field(DOL6, "HL3B:SBPM:HL49:USCL") field(DOL7, "HL3B:SBPM:HL49:USCL") field(DOL8, "HL3B:SBPM:HL49:USCL") field(DOL9, "HL3B:SBPM:HL49:USCL") field(DOLA, "HL3B:SBPM:HL49:USCL") field(LNK1, "HL3B:SBPM:HL49:USCL_SEL.A PP") field(LNK2, "HL3B:SBPM:HL49:USCL_SEL.B PP") field(LNK3, "HL3B:SBPM:HL49:USCL_SEL.C PP") field(LNK4, "HL3B:SBPM:HL49:USCL_SEL.D PP") field(LNK5, "HL3B:SBPM:HL49:USCL_SEL.E PP") field(LNK6, "HL3B:SBPM:HL49:USCL_SEL.F PP") field(LNK7, "HL3B:SBPM:HL49:USCL_SEL.G PP") field(LNK8, "HL3B:SBPM:HL49:USCL_SEL.H PP") field(LNK9, "HL3B:SBPM:HL49:USCL_SEL.I PP") field(LNKA, "HL3B:SBPM:HL49:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL49:USCL_SEL") field(OUTA, "HL3B:SBPM:HL49:U.ASLO CA") field(OUTB, "HL3B:SBPM:HL49:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL49:USCL_CTRL") { field(INPA, "HL3B:SBPM:HL49:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL49:VSCL") field(DOL2, "HL3B:SBPM:HL49:VSCL") field(DOL3, "HL3B:SBPM:HL49:VSCL") field(DOL4, "HL3B:SBPM:HL49:VSCL") field(DOL5, "HL3B:SBPM:HL49:VSCL") field(DOL6, "HL3B:SBPM:HL49:VSCL") field(DOL7, "HL3B:SBPM:HL49:VSCL") field(DOL8, "HL3B:SBPM:HL49:VSCL") field(DOL9, "HL3B:SBPM:HL49:VSCL") field(DOLA, "HL3B:SBPM:HL49:VSCL") field(LNK1, "HL3B:SBPM:HL49:VSCL_SEL.A PP") field(LNK2, "HL3B:SBPM:HL49:VSCL_SEL.B PP") field(LNK3, "HL3B:SBPM:HL49:VSCL_SEL.C PP") field(LNK4, "HL3B:SBPM:HL49:VSCL_SEL.D PP") field(LNK5, "HL3B:SBPM:HL49:VSCL_SEL.E PP") field(LNK6, "HL3B:SBPM:HL49:VSCL_SEL.F PP") field(LNK7, "HL3B:SBPM:HL49:VSCL_SEL.G PP") field(LNK8, "HL3B:SBPM:HL49:VSCL_SEL.H PP") field(LNK9, "HL3B:SBPM:HL49:VSCL_SEL.I PP") field(LNKA, "HL3B:SBPM:HL49:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL49:VSCL_SEL") field(OUTA, "HL3B:SBPM:HL49:V.ASLO CA") field(OUTB, "HL3B:SBPM:HL49:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL49:VSCL_CTRL") { field(INPA, "HL3B:SBPM:HL49:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL49:PHI") field(DOL2, "HL3B:SBPM:HL49:PHI") field(DOL3, "HL3B:SBPM:HL49:PHI") field(DOL4, "HL3B:SBPM:HL49:PHI") field(DOL5, "HL3B:SBPM:HL49:PHI") field(DOL6, "HL3B:SBPM:HL49:PHI") field(DOL7, "HL3B:SBPM:HL49:PHI") field(DOL8, "HL3B:SBPM:HL49:PHI") field(DOL9, "HL3B:SBPM:HL49:PHI") field(DOLA, "HL3B:SBPM:HL49:PHI") field(LNK1, "HL3B:SBPM:HL49:PHI_SEL.A PP") field(LNK2, "HL3B:SBPM:HL49:PHI_SEL.B PP") field(LNK3, "HL3B:SBPM:HL49:PHI_SEL.C PP") field(LNK4, "HL3B:SBPM:HL49:PHI_SEL.D PP") field(LNK5, "HL3B:SBPM:HL49:PHI_SEL.E PP") field(LNK6, "HL3B:SBPM:HL49:PHI_SEL.F PP") field(LNK7, "HL3B:SBPM:HL49:PHI_SEL.G PP") field(LNK8, "HL3B:SBPM:HL49:PHI_SEL.H PP") field(LNK9, "HL3B:SBPM:HL49:PHI_SEL.I PP") field(LNKA, "HL3B:SBPM:HL49:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL49:PHI_SEL") field(OUTA, "HL3B:SBPM:HL49:CALC.E CA") field(OUTB, "HL3B:SBPM:HL49:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL49:PHI_CTRL") { field(INPA, "HL3B:SBPM:HL49:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL49:PSI") field(DOL2, "HL3B:SBPM:HL49:PSI") field(DOL3, "HL3B:SBPM:HL49:PSI") field(DOL4, "HL3B:SBPM:HL49:PSI") field(DOL5, "HL3B:SBPM:HL49:PSI") field(DOL6, "HL3B:SBPM:HL49:PSI") field(DOL7, "HL3B:SBPM:HL49:PSI") field(DOL8, "HL3B:SBPM:HL49:PSI") field(DOL9, "HL3B:SBPM:HL49:PSI") field(DOLA, "HL3B:SBPM:HL49:PSI") field(LNK1, "HL3B:SBPM:HL49:PSI_SEL.A PP") field(LNK2, "HL3B:SBPM:HL49:PSI_SEL.B PP") field(LNK3, "HL3B:SBPM:HL49:PSI_SEL.C PP") field(LNK4, "HL3B:SBPM:HL49:PSI_SEL.D PP") field(LNK5, "HL3B:SBPM:HL49:PSI_SEL.E PP") field(LNK6, "HL3B:SBPM:HL49:PSI_SEL.F PP") field(LNK7, "HL3B:SBPM:HL49:PSI_SEL.G PP") field(LNK8, "HL3B:SBPM:HL49:PSI_SEL.H PP") field(LNK9, "HL3B:SBPM:HL49:PSI_SEL.I PP") field(LNKA, "HL3B:SBPM:HL49:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL49:PSI_SEL") field(OUTA, "HL3B:SBPM:HL49:CALC.F CA") field(OUTB, "HL3B:SBPM:HL49:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL49:PSI_CTRL") { field(INPA, "HL3B:SBPM:HL49:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL49:PSI_SEL.L PP") } record(longout, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "HL3B:SBPM:HL50:ATT1 CP") field(INPC, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "HL3B:SBPM:HL50:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL50:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL50:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "HL3B:SBPM:HL50:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL50:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL50:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "HL3B:SBPM:HL50:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "HL3B:SBPM:HL50:RSTA.SEVR MS NPP") field(INPB, "HL3B:SBPM:HL50:TMIT.SEVR MS NPP") field(INPC, "HL3B:SBPM:HL50:Y.SEVR MS NPP") field(INPD, "HL3B:SBPM:HL50:X.SEVR MS NPP") field(INPE, "HL3B:SBPM:HL50:TGRN.SEVR MS NPP") field(INPF, "HL3B:SBPM:HL50:TRED.SEVR MS NPP") field(INPG, "HL3B:SBPM:HL50:TBLU.SEVR MS NPP") field(INPH, "HL3B:SBPM:HL50:TYLO.SEVR MS NPP") field(INPI, "HL3B:SBPM:HL50:GRU.SEVR MS NPP") field(INPJ, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "HL3B:SBPM:HL50:RSTA_ALH.SEVR MS NPP") field(INPB, "HL3B:SBPM:HL50:GRU.SEVR MS NPP") field(INPC, "HL3B:SBPM:HL50:GRV.SEVR MS NPP") field(INPD, "HL3B:SBPM:HL50:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "HL3B:SBPM:HL50:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "HL3B:SBPM:HL50:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "HL3B:SBPM:HL50:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "HL3B:SBPM:HL50:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "7") field(SCAN, "Passive") } record(bo, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C7 S12") field(FLNK, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:V") } record(ai, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:PINC") } record(ai, "HL3B:SBPM:HL50:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C7 S10") field(SCAN, "Passive") } record(longin, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:RSTA_ALH") } record(calc, "HL3B:SBPM:HL50:RSTA_ALH") { field(CALC, "A & B") field(INPA, "HL3B:SBPM:HL50:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:PHI_SEQ") } record(ao, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:PSI_SEQ") } #record(dfanout, "HL3B:SBPM:HL50:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "HL3B:SBPM:HL50:USCL PP MS") # field(OUTB, "HL3B:SBPM:HL50:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:UOFF_SEQ") } record(ao, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:VOFF_SEQ") } record(ao, "HL3B:SBPM:HL50:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "HL3B:SBPM:HL50:USCL_SEQ") } record(ao, "HL3B:SBPM:HL50:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "HL3B:SBPM:HL50:VSCL_SEQ") } record(mbbo, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:MADN") { field(DESC, "MAD Name") field(VAL, "SBPMHL50") field(PINI, "YES") } record(stringin, "SBPMHL50:NAME") { field(DESC, "BPM Name") field(VAL, "HL3B:SBPM:HL50") field(PINI, "YES") } record(ai, "HL3B:SBPM:HL50:X_SLOW") { #alias("HL3B:SBPM:HL50:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "HL3B:SBPM:HL50:X MS") field(FLNK, "HL3B:SBPM:HL50:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "HL3B:SBPM:HL50:Y_SLOW") { #alias("HL3B:SBPM:HL50:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "HL3B:SBPM:HL50:Y NPP MS") field(FLNK, "HL3B:SBPM:HL50:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "HL3B:SBPM:HL50:TMIT_SLOW") { #alias("HL3B:SBPM:HL50:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "HL3B:SBPM:HL50:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "HL3B:SBPM:HL50:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "HL3B:SBPM:HL50:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "HL3B:SBPM:HL50:SIMC PP") } record(calcout, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:USCL") field(INPL, "0") } # Switch simulation record HL3B:SBPM:HL50:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "HL3B:SBPM:HL50:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL50:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "HL3B:SBPM:HL50:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL50:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "HL3B:SBPM:HL50:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL50:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "HL3B:SBPM:HL50:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "HL3B:SBPM:HL50:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL50:UOFF") field(DOL2, "HL3B:SBPM:HL50:UOFF") field(DOL3, "HL3B:SBPM:HL50:UOFF") field(DOL4, "HL3B:SBPM:HL50:UOFF") field(DOL5, "HL3B:SBPM:HL50:UOFF") field(DOL6, "HL3B:SBPM:HL50:UOFF") field(DOL7, "HL3B:SBPM:HL50:UOFF") field(DOL8, "HL3B:SBPM:HL50:UOFF") field(DOL9, "HL3B:SBPM:HL50:UOFF") field(DOLA, "HL3B:SBPM:HL50:UOFF") field(LNK1, "HL3B:SBPM:HL50:UOFF_SEL.A PP") field(LNK2, "HL3B:SBPM:HL50:UOFF_SEL.B PP") field(LNK3, "HL3B:SBPM:HL50:UOFF_SEL.C PP") field(LNK4, "HL3B:SBPM:HL50:UOFF_SEL.D PP") field(LNK5, "HL3B:SBPM:HL50:UOFF_SEL.E PP") field(LNK6, "HL3B:SBPM:HL50:UOFF_SEL.F PP") field(LNK7, "HL3B:SBPM:HL50:UOFF_SEL.G PP") field(LNK8, "HL3B:SBPM:HL50:UOFF_SEL.H PP") field(LNK9, "HL3B:SBPM:HL50:UOFF_SEL.I PP") field(LNKA, "HL3B:SBPM:HL50:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL50:UOFF_SEL") field(OUTA, "HL3B:SBPM:HL50:U.AOFF CA") field(OUTB, "HL3B:SBPM:HL50:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL50:UOFF_CTRL") { field(INPA, "HL3B:SBPM:HL50:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL50:VOFF") field(DOL2, "HL3B:SBPM:HL50:VOFF") field(DOL3, "HL3B:SBPM:HL50:VOFF") field(DOL4, "HL3B:SBPM:HL50:VOFF") field(DOL5, "HL3B:SBPM:HL50:VOFF") field(DOL6, "HL3B:SBPM:HL50:VOFF") field(DOL7, "HL3B:SBPM:HL50:VOFF") field(DOL8, "HL3B:SBPM:HL50:VOFF") field(DOL9, "HL3B:SBPM:HL50:VOFF") field(DOLA, "HL3B:SBPM:HL50:VOFF") field(LNK1, "HL3B:SBPM:HL50:VOFF_SEL.A PP") field(LNK2, "HL3B:SBPM:HL50:VOFF_SEL.B PP") field(LNK3, "HL3B:SBPM:HL50:VOFF_SEL.C PP") field(LNK4, "HL3B:SBPM:HL50:VOFF_SEL.D PP") field(LNK5, "HL3B:SBPM:HL50:VOFF_SEL.E PP") field(LNK6, "HL3B:SBPM:HL50:VOFF_SEL.F PP") field(LNK7, "HL3B:SBPM:HL50:VOFF_SEL.G PP") field(LNK8, "HL3B:SBPM:HL50:VOFF_SEL.H PP") field(LNK9, "HL3B:SBPM:HL50:VOFF_SEL.I PP") field(LNKA, "HL3B:SBPM:HL50:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL50:VOFF_SEL") field(OUTA, "HL3B:SBPM:HL50:V.AOFF CA") field(OUTB, "HL3B:SBPM:HL50:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL50:VOFF_CTRL") { field(INPA, "HL3B:SBPM:HL50:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL50:USCL") field(DOL2, "HL3B:SBPM:HL50:USCL") field(DOL3, "HL3B:SBPM:HL50:USCL") field(DOL4, "HL3B:SBPM:HL50:USCL") field(DOL5, "HL3B:SBPM:HL50:USCL") field(DOL6, "HL3B:SBPM:HL50:USCL") field(DOL7, "HL3B:SBPM:HL50:USCL") field(DOL8, "HL3B:SBPM:HL50:USCL") field(DOL9, "HL3B:SBPM:HL50:USCL") field(DOLA, "HL3B:SBPM:HL50:USCL") field(LNK1, "HL3B:SBPM:HL50:USCL_SEL.A PP") field(LNK2, "HL3B:SBPM:HL50:USCL_SEL.B PP") field(LNK3, "HL3B:SBPM:HL50:USCL_SEL.C PP") field(LNK4, "HL3B:SBPM:HL50:USCL_SEL.D PP") field(LNK5, "HL3B:SBPM:HL50:USCL_SEL.E PP") field(LNK6, "HL3B:SBPM:HL50:USCL_SEL.F PP") field(LNK7, "HL3B:SBPM:HL50:USCL_SEL.G PP") field(LNK8, "HL3B:SBPM:HL50:USCL_SEL.H PP") field(LNK9, "HL3B:SBPM:HL50:USCL_SEL.I PP") field(LNKA, "HL3B:SBPM:HL50:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL50:USCL_SEL") field(OUTA, "HL3B:SBPM:HL50:U.ASLO CA") field(OUTB, "HL3B:SBPM:HL50:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL50:USCL_CTRL") { field(INPA, "HL3B:SBPM:HL50:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL50:VSCL") field(DOL2, "HL3B:SBPM:HL50:VSCL") field(DOL3, "HL3B:SBPM:HL50:VSCL") field(DOL4, "HL3B:SBPM:HL50:VSCL") field(DOL5, "HL3B:SBPM:HL50:VSCL") field(DOL6, "HL3B:SBPM:HL50:VSCL") field(DOL7, "HL3B:SBPM:HL50:VSCL") field(DOL8, "HL3B:SBPM:HL50:VSCL") field(DOL9, "HL3B:SBPM:HL50:VSCL") field(DOLA, "HL3B:SBPM:HL50:VSCL") field(LNK1, "HL3B:SBPM:HL50:VSCL_SEL.A PP") field(LNK2, "HL3B:SBPM:HL50:VSCL_SEL.B PP") field(LNK3, "HL3B:SBPM:HL50:VSCL_SEL.C PP") field(LNK4, "HL3B:SBPM:HL50:VSCL_SEL.D PP") field(LNK5, "HL3B:SBPM:HL50:VSCL_SEL.E PP") field(LNK6, "HL3B:SBPM:HL50:VSCL_SEL.F PP") field(LNK7, "HL3B:SBPM:HL50:VSCL_SEL.G PP") field(LNK8, "HL3B:SBPM:HL50:VSCL_SEL.H PP") field(LNK9, "HL3B:SBPM:HL50:VSCL_SEL.I PP") field(LNKA, "HL3B:SBPM:HL50:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL50:VSCL_SEL") field(OUTA, "HL3B:SBPM:HL50:V.ASLO CA") field(OUTB, "HL3B:SBPM:HL50:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL50:VSCL_CTRL") { field(INPA, "HL3B:SBPM:HL50:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL50:PHI") field(DOL2, "HL3B:SBPM:HL50:PHI") field(DOL3, "HL3B:SBPM:HL50:PHI") field(DOL4, "HL3B:SBPM:HL50:PHI") field(DOL5, "HL3B:SBPM:HL50:PHI") field(DOL6, "HL3B:SBPM:HL50:PHI") field(DOL7, "HL3B:SBPM:HL50:PHI") field(DOL8, "HL3B:SBPM:HL50:PHI") field(DOL9, "HL3B:SBPM:HL50:PHI") field(DOLA, "HL3B:SBPM:HL50:PHI") field(LNK1, "HL3B:SBPM:HL50:PHI_SEL.A PP") field(LNK2, "HL3B:SBPM:HL50:PHI_SEL.B PP") field(LNK3, "HL3B:SBPM:HL50:PHI_SEL.C PP") field(LNK4, "HL3B:SBPM:HL50:PHI_SEL.D PP") field(LNK5, "HL3B:SBPM:HL50:PHI_SEL.E PP") field(LNK6, "HL3B:SBPM:HL50:PHI_SEL.F PP") field(LNK7, "HL3B:SBPM:HL50:PHI_SEL.G PP") field(LNK8, "HL3B:SBPM:HL50:PHI_SEL.H PP") field(LNK9, "HL3B:SBPM:HL50:PHI_SEL.I PP") field(LNKA, "HL3B:SBPM:HL50:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL50:PHI_SEL") field(OUTA, "HL3B:SBPM:HL50:CALC.E CA") field(OUTB, "HL3B:SBPM:HL50:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL50:PHI_CTRL") { field(INPA, "HL3B:SBPM:HL50:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "HL3B:SBPM:HL50:PSI") field(DOL2, "HL3B:SBPM:HL50:PSI") field(DOL3, "HL3B:SBPM:HL50:PSI") field(DOL4, "HL3B:SBPM:HL50:PSI") field(DOL5, "HL3B:SBPM:HL50:PSI") field(DOL6, "HL3B:SBPM:HL50:PSI") field(DOL7, "HL3B:SBPM:HL50:PSI") field(DOL8, "HL3B:SBPM:HL50:PSI") field(DOL9, "HL3B:SBPM:HL50:PSI") field(DOLA, "HL3B:SBPM:HL50:PSI") field(LNK1, "HL3B:SBPM:HL50:PSI_SEL.A PP") field(LNK2, "HL3B:SBPM:HL50:PSI_SEL.B PP") field(LNK3, "HL3B:SBPM:HL50:PSI_SEL.C PP") field(LNK4, "HL3B:SBPM:HL50:PSI_SEL.D PP") field(LNK5, "HL3B:SBPM:HL50:PSI_SEL.E PP") field(LNK6, "HL3B:SBPM:HL50:PSI_SEL.F PP") field(LNK7, "HL3B:SBPM:HL50:PSI_SEL.G PP") field(LNK8, "HL3B:SBPM:HL50:PSI_SEL.H PP") field(LNK9, "HL3B:SBPM:HL50:PSI_SEL.I PP") field(LNKA, "HL3B:SBPM:HL50:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "HL3B:SBPM:HL50:PSI_SEL") field(OUTA, "HL3B:SBPM:HL50:CALC.F CA") field(OUTB, "HL3B:SBPM:HL50:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "HL3B:SBPM:HL50:PSI_CTRL") { field(INPA, "HL3B:SBPM:HL50:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "HL3B:SBPM:HL50:PSI_SEL.L PP") } record(longout, "HL3B:SBPM:HL50: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. # HL3A:SBPM:HB03:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # HL3A:SBPM:HB03:ACTL.DOL <---- HL3A:SBPM:HB03:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # HL3A:SBPM:HB03:ATTOL.DOL<---- HL3A:SBPM:HB03:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # HL3A:SBPM:HB03:CLAOL.DOL<---- HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:ATTINIT") } record(longout, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE0+6,qspiAfe") } record(mbbo, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "HL3A:SBPM:HB03:VERS") field(FTVA, "LONG") field(OUTA, "HL3A:SBPM:HB03:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "HL3A:SBPM:HB03:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "HL3A:SBPM:HB03:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "HL3A:SBPM:HB03:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "HL3A:SBPM:HB03:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "HL3A:SBPM:HB03:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "HL3A:SBPM:HB03:ATT.VAL") field(FTVH, "LONG") field(OUTH, "HL3A:SBPM:HB03:ATTC.D") field(FTVI, "LONG") field(OUTI, "HL3A:SBPM:HB03:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "HL3A:SBPM:HB03:ATTC.F") field(FTVK, "LONG") field(OUTK, "HL3A:SBPM:HB03:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "HL3A:SBPM:HB03:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "HL3A:SBPM:HB03:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "HL3A:SBPM:HB03:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "HL3A:SBPM:HB03:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "HL3A:SBPM:HB03:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "HL3A:SBPM:HB03:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "HL3A:SBPM:HB03:CLAO.HOPR") field(FLNK, "HL3A:SBPM:HB03:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "HL3A:SBPM:HB03:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "HL3A:SBPM:HB03: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: # HL3A:SBPM:HB03:ATT1 = A1 # HL3A:SBPM:HB03:ATT2 = A2 # HL3A:SBPM:HB03:CALA = CA # record(sub, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "HL3A:SBPM:HB03:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3A:SBPM:HB03:ATTO CP") field(OMSL, "closed_loop") field(OUT, "HL3A:SBPM:HB03:ATTC.B PP") field(EGU, "dB") } record(longout, "HL3A:SBPM:HB03:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3A:SBPM:HB03:CLAO CP") field(OMSL, "closed_loop") field(OUT, "HL3A:SBPM:HB03:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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. # HL3A:SBPM:HL44:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # HL3A:SBPM:HL44:ACTL.DOL <---- HL3A:SBPM:HL44:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # HL3A:SBPM:HL44:ATTOL.DOL<---- HL3A:SBPM:HL44:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # HL3A:SBPM:HL44:CLAOL.DOL<---- HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:ATTINIT") } record(longout, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE1+6,qspiAfe") } record(mbbo, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "HL3A:SBPM:HL44:VERS") field(FTVA, "LONG") field(OUTA, "HL3A:SBPM:HL44:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "HL3A:SBPM:HL44:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "HL3A:SBPM:HL44:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "HL3A:SBPM:HL44:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "HL3A:SBPM:HL44:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "HL3A:SBPM:HL44:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "HL3A:SBPM:HL44:ATT.VAL") field(FTVH, "LONG") field(OUTH, "HL3A:SBPM:HL44:ATTC.D") field(FTVI, "LONG") field(OUTI, "HL3A:SBPM:HL44:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "HL3A:SBPM:HL44:ATTC.F") field(FTVK, "LONG") field(OUTK, "HL3A:SBPM:HL44:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "HL3A:SBPM:HL44:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "HL3A:SBPM:HL44:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "HL3A:SBPM:HL44:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "HL3A:SBPM:HL44:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "HL3A:SBPM:HL44:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "HL3A:SBPM:HL44:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "HL3A:SBPM:HL44:CLAO.HOPR") field(FLNK, "HL3A:SBPM:HL44:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "HL3A:SBPM:HL44:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "HL3A:SBPM:HL44: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: # HL3A:SBPM:HL44:ATT1 = A1 # HL3A:SBPM:HL44:ATT2 = A2 # HL3A:SBPM:HL44:CALA = CA # record(sub, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "HL3A:SBPM:HL44:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3A:SBPM:HL44:ATTO CP") field(OMSL, "closed_loop") field(OUT, "HL3A:SBPM:HL44:ATTC.B PP") field(EGU, "dB") } record(longout, "HL3A:SBPM:HL44:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3A:SBPM:HL44:CLAO CP") field(OMSL, "closed_loop") field(OUT, "HL3A:SBPM:HL44:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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. # HL3B:SBPM:HL45:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # HL3B:SBPM:HL45:ACTL.DOL <---- HL3B:SBPM:HL45:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # HL3B:SBPM:HL45:ATTOL.DOL<---- HL3B:SBPM:HL45:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # HL3B:SBPM:HL45:CLAOL.DOL<---- HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:ATTINIT") } record(longout, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE2+6,qspiAfe") } record(mbbo, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "HL3B:SBPM:HL45:VERS") field(FTVA, "LONG") field(OUTA, "HL3B:SBPM:HL45:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "HL3B:SBPM:HL45:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "HL3B:SBPM:HL45:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "HL3B:SBPM:HL45:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "HL3B:SBPM:HL45:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "HL3B:SBPM:HL45:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "HL3B:SBPM:HL45:ATT.VAL") field(FTVH, "LONG") field(OUTH, "HL3B:SBPM:HL45:ATTC.D") field(FTVI, "LONG") field(OUTI, "HL3B:SBPM:HL45:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "HL3B:SBPM:HL45:ATTC.F") field(FTVK, "LONG") field(OUTK, "HL3B:SBPM:HL45:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "HL3B:SBPM:HL45:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "HL3B:SBPM:HL45:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "HL3B:SBPM:HL45:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "HL3B:SBPM:HL45:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "HL3B:SBPM:HL45:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "HL3B:SBPM:HL45:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "HL3B:SBPM:HL45:CLAO.HOPR") field(FLNK, "HL3B:SBPM:HL45:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "HL3B:SBPM:HL45:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "HL3B:SBPM:HL45: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: # HL3B:SBPM:HL45:ATT1 = A1 # HL3B:SBPM:HL45:ATT2 = A2 # HL3B:SBPM:HL45:CALA = CA # record(sub, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL45:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL45:ATTO CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL45:ATTC.B PP") field(EGU, "dB") } record(longout, "HL3B:SBPM:HL45:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL45:CLAO CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL45:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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. # HL3B:SBPM:HL46:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # HL3B:SBPM:HL46:ACTL.DOL <---- HL3B:SBPM:HL46:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # HL3B:SBPM:HL46:ATTOL.DOL<---- HL3B:SBPM:HL46:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # HL3B:SBPM:HL46:CLAOL.DOL<---- HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:ATTINIT") } record(longout, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE3+6,qspiAfe") } record(mbbo, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "HL3B:SBPM:HL46:VERS") field(FTVA, "LONG") field(OUTA, "HL3B:SBPM:HL46:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "HL3B:SBPM:HL46:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "HL3B:SBPM:HL46:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "HL3B:SBPM:HL46:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "HL3B:SBPM:HL46:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "HL3B:SBPM:HL46:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "HL3B:SBPM:HL46:ATT.VAL") field(FTVH, "LONG") field(OUTH, "HL3B:SBPM:HL46:ATTC.D") field(FTVI, "LONG") field(OUTI, "HL3B:SBPM:HL46:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "HL3B:SBPM:HL46:ATTC.F") field(FTVK, "LONG") field(OUTK, "HL3B:SBPM:HL46:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "HL3B:SBPM:HL46:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "HL3B:SBPM:HL46:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "HL3B:SBPM:HL46:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "HL3B:SBPM:HL46:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "HL3B:SBPM:HL46:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "HL3B:SBPM:HL46:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "HL3B:SBPM:HL46:CLAO.HOPR") field(FLNK, "HL3B:SBPM:HL46:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "HL3B:SBPM:HL46:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "HL3B:SBPM:HL46: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: # HL3B:SBPM:HL46:ATT1 = A1 # HL3B:SBPM:HL46:ATT2 = A2 # HL3B:SBPM:HL46:CALA = CA # record(sub, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL46:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL46:ATTO CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL46:ATTC.B PP") field(EGU, "dB") } record(longout, "HL3B:SBPM:HL46:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL46:CLAO CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL46:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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. # HL3B:SBPM:HL47:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # HL3B:SBPM:HL47:ACTL.DOL <---- HL3B:SBPM:HL47:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # HL3B:SBPM:HL47:ATTOL.DOL<---- HL3B:SBPM:HL47:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # HL3B:SBPM:HL47:CLAOL.DOL<---- HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:ATTINIT") } record(longout, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE4+6,qspiAfe") } record(mbbo, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "HL3B:SBPM:HL47:VERS") field(FTVA, "LONG") field(OUTA, "HL3B:SBPM:HL47:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "HL3B:SBPM:HL47:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "HL3B:SBPM:HL47:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "HL3B:SBPM:HL47:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "HL3B:SBPM:HL47:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "HL3B:SBPM:HL47:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "HL3B:SBPM:HL47:ATT.VAL") field(FTVH, "LONG") field(OUTH, "HL3B:SBPM:HL47:ATTC.D") field(FTVI, "LONG") field(OUTI, "HL3B:SBPM:HL47:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "HL3B:SBPM:HL47:ATTC.F") field(FTVK, "LONG") field(OUTK, "HL3B:SBPM:HL47:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "HL3B:SBPM:HL47:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "HL3B:SBPM:HL47:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "HL3B:SBPM:HL47:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "HL3B:SBPM:HL47:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "HL3B:SBPM:HL47:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "HL3B:SBPM:HL47:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "HL3B:SBPM:HL47:CLAO.HOPR") field(FLNK, "HL3B:SBPM:HL47:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "HL3B:SBPM:HL47:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "HL3B:SBPM:HL47: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: # HL3B:SBPM:HL47:ATT1 = A1 # HL3B:SBPM:HL47:ATT2 = A2 # HL3B:SBPM:HL47:CALA = CA # record(sub, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL47:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL47:ATTO CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL47:ATTC.B PP") field(EGU, "dB") } record(longout, "HL3B:SBPM:HL47:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL47:CLAO CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL47:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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. # HL3B:SBPM:HL48:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # HL3B:SBPM:HL48:ACTL.DOL <---- HL3B:SBPM:HL48:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # HL3B:SBPM:HL48:ATTOL.DOL<---- HL3B:SBPM:HL48:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # HL3B:SBPM:HL48:CLAOL.DOL<---- HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:ATTINIT") } record(longout, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE5+6,qspiAfe") } record(mbbo, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "HL3B:SBPM:HL48:VERS") field(FTVA, "LONG") field(OUTA, "HL3B:SBPM:HL48:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "HL3B:SBPM:HL48:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "HL3B:SBPM:HL48:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "HL3B:SBPM:HL48:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "HL3B:SBPM:HL48:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "HL3B:SBPM:HL48:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "HL3B:SBPM:HL48:ATT.VAL") field(FTVH, "LONG") field(OUTH, "HL3B:SBPM:HL48:ATTC.D") field(FTVI, "LONG") field(OUTI, "HL3B:SBPM:HL48:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "HL3B:SBPM:HL48:ATTC.F") field(FTVK, "LONG") field(OUTK, "HL3B:SBPM:HL48:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "HL3B:SBPM:HL48:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "HL3B:SBPM:HL48:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "HL3B:SBPM:HL48:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "HL3B:SBPM:HL48:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "HL3B:SBPM:HL48:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "HL3B:SBPM:HL48:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "HL3B:SBPM:HL48:CLAO.HOPR") field(FLNK, "HL3B:SBPM:HL48:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "HL3B:SBPM:HL48:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "HL3B:SBPM:HL48: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: # HL3B:SBPM:HL48:ATT1 = A1 # HL3B:SBPM:HL48:ATT2 = A2 # HL3B:SBPM:HL48:CALA = CA # record(sub, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL48:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL48:ATTO CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL48:ATTC.B PP") field(EGU, "dB") } record(longout, "HL3B:SBPM:HL48:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL48:CLAO CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL48:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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. # HL3B:SBPM:HL49:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # HL3B:SBPM:HL49:ACTL.DOL <---- HL3B:SBPM:HL49:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # HL3B:SBPM:HL49:ATTOL.DOL<---- HL3B:SBPM:HL49:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # HL3B:SBPM:HL49:CLAOL.DOL<---- HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:ATTINIT") } record(longout, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE6+6,qspiAfe") } record(mbbo, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "HL3B:SBPM:HL49:VERS") field(FTVA, "LONG") field(OUTA, "HL3B:SBPM:HL49:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "HL3B:SBPM:HL49:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "HL3B:SBPM:HL49:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "HL3B:SBPM:HL49:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "HL3B:SBPM:HL49:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "HL3B:SBPM:HL49:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "HL3B:SBPM:HL49:ATT.VAL") field(FTVH, "LONG") field(OUTH, "HL3B:SBPM:HL49:ATTC.D") field(FTVI, "LONG") field(OUTI, "HL3B:SBPM:HL49:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "HL3B:SBPM:HL49:ATTC.F") field(FTVK, "LONG") field(OUTK, "HL3B:SBPM:HL49:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "HL3B:SBPM:HL49:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "HL3B:SBPM:HL49:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "HL3B:SBPM:HL49:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "HL3B:SBPM:HL49:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "HL3B:SBPM:HL49:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "HL3B:SBPM:HL49:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "HL3B:SBPM:HL49:CLAO.HOPR") field(FLNK, "HL3B:SBPM:HL49:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "HL3B:SBPM:HL49:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "HL3B:SBPM:HL49: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: # HL3B:SBPM:HL49:ATT1 = A1 # HL3B:SBPM:HL49:ATT2 = A2 # HL3B:SBPM:HL49:CALA = CA # record(sub, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL49:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL49:ATTO CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL49:ATTC.B PP") field(EGU, "dB") } record(longout, "HL3B:SBPM:HL49:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL49:CLAO CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL49:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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. # HL3B:SBPM:HL50:ATT.DOL <---- VIOC:GUN:BPM:ATTR CPP // DEFINED IN: [depends on 'chrg' macro substitution]. # HL3B:SBPM:HL50:ACTL.DOL <---- HL3B:SBPM:HL50:ACCESS.RVAL CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # HL3B:SBPM:HL50:ATTOL.DOL<---- HL3B:SBPM:HL50:ATTO CP // DEFINED IN: associated main IOC database 'IOC--BPbpm.db' # HL3B:SBPM:HL50:CLAOL.DOL<---- HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:ATTINIT") } record(longout, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:CALT") { field(DESC, "AFE CAL Soft Trigger") field(DTYP, "BusAddress") # address is chip-select << 8 + register field(OUT, "#C0S0@AFE7+6,qspiAfe") } record(mbbo, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:ATTINIT") { field(DESC, "Set up AFE att limits") field(SNAM, "subAttSetup") field(FTA, "LONG") field(INPA, "HL3B:SBPM:HL50:VERS") field(FTVA, "LONG") field(OUTA, "HL3B:SBPM:HL50:ATT1.HOPR") field(FTVB, "LONG") field(OUTB, "HL3B:SBPM:HL50:ATT1.DRVH") field(FTVC, "LONG") field(OUTC, "HL3B:SBPM:HL50:ATT2.HOPR") field(FTVD, "LONG") field(OUTD, "HL3B:SBPM:HL50:ATT2.DRVH") field(FTVE, "LONG") field(OUTE, "HL3B:SBPM:HL50:ATT.HOPR") field(FTVF, "LONG") field(OUTF, "HL3B:SBPM:HL50:ATT.DRVH") field(FTVG, "LONG") field(OUTG, "HL3B:SBPM:HL50:ATT.VAL") field(FTVH, "LONG") field(OUTH, "HL3B:SBPM:HL50:ATTC.D") field(FTVI, "LONG") field(OUTI, "HL3B:SBPM:HL50:ATTC.E") field(FTVJ, "LONG") field(OUTJ, "HL3B:SBPM:HL50:ATTC.F") field(FTVK, "LONG") field(OUTK, "HL3B:SBPM:HL50:ATTO.DRVL") field(FTVL, "LONG") field(OUTL, "HL3B:SBPM:HL50:ATTO.LOPR") field(FTVM, "LONG") field(OUTM, "HL3B:SBPM:HL50:ATTO.DRVH") field(FTVN, "LONG") field(OUTN, "HL3B:SBPM:HL50:ATTO.HOPR") field(FTVO, "LONG") field(OUTO, "HL3B:SBPM:HL50:CLAO.DRVL") field(FTVP, "LONG") field(OUTP, "HL3B:SBPM:HL50:CLAO.LOPR") field(FTVQ, "LONG") field(OUTQ, "HL3B:SBPM:HL50:CLAO.DRVH") field(FTVR, "LONG") field(OUTR, "HL3B:SBPM:HL50:CLAO.HOPR") field(FLNK, "HL3B:SBPM:HL50:ATT") } # Total attenuation (but ATTO is still added to this) record(longout, "HL3B:SBPM:HL50:ATT") { field(DESC, "AFE Total Attenuation") field(OUT, "HL3B:SBPM:HL50: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: # HL3B:SBPM:HL50:ATT1 = A1 # HL3B:SBPM:HL50:ATT2 = A2 # HL3B:SBPM:HL50:CALA = CA # record(sub, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:ACTL") { field(DESC, "ATT OMSL Ctrl") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL50:ACCESS.RVAL CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:ATTOL") { field(DESC, "ATTO Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL50:ATTO CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL50:ATTC.B PP") field(EGU, "dB") } record(longout, "HL3B:SBPM:HL50:CLAOL") { field(DESC, "CLAO Propagator") field(DTYP, "Soft Channel") field(DOL, "HL3B:SBPM:HL50:CLAO CP") field(OMSL, "closed_loop") field(OUT, "HL3B:SBPM:HL50:ATTC.C PP") field(EGU, "dB") } # Records only needed for RTM AFE record(longout, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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") } # Registers on Struck AMC # Digitizer AMC FW version record(stringin, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HB03: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3A:SBPM:HL44: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL45: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL46: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL47: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL48: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL49: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50: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, "HL3B:SBPM:HL50:SUBSYS") { field(DESC, "Subsystem type") field(DTYP, "sis8300Digi") # address is digitizer base address + register field(INP, "#C7S0@0x4FC(8)") field(PINI, "YES") }