#! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ############################################## # This is the head of the main processing chain # that runs at the highest priority. ############################################## ############################################# # This is the head of the processing chain for # diagnostics. ############################################## record(ai, "BPMS:IN20:525:GRN") { field(DESC, "GRN Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C0 S0") field(EGU, "raw") #TODO set HOPR/LOPR, alarm limits field(SCAN, "I/O Intr") # The priority determines what scan list we are being # put on (see drvPadUdpComm.c) field(PRIO, "LOW") field(FLNK, "BPMS:IN20:525:RED") # HOPR for the energy algorithm is determined as follows: # # inf inf # 1) Fourier relation / h^2 dt = / |H|^2 df = 2 B # 0 -inf # # 1a) It can be shown that the maximum of the impuls response # ha is ~ 2 B # # 2) The digitizer produces the numbers # # Ai = 2^s (hi/ha) # # where ha is the maximum of the impuls response # and 2^s is a scale factor. # # 3) 'Energy algorithm' calculates S = sum( Ai^2 ) # # inf # 4) S = (2^s / ha)^2 sum(hi^2) = K sum(hi^2) Dt ~ K / h^2 dt # 0 # # with K = (2^s / ha)^2 fs # # 5) From 4) and 1a) -> S ~ K ha and therefore # # 6) S = 2^(2s) fs/ha = 2^(2s) fs/(2 B) # # 7) The strip signals are sqrt(S); hence HOPR is about # # HOPR ~ 2^s sqrt( fs/2/B ) # # with 2^s = 32768, fs=120MHz, B=10MHz it follows # that HOPR ~ 1E5; we add some margin... field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:525:RED") { field(DESC, "RED Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C0 S1") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:525:BLU") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:525:BLU") { field(DESC, "BLU Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C0 S2") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:525:YLO") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:525:YLO") { field(DESC, "YLO Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C0 S3") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } ############################################## # Slowly-scanned diagnostics ############################################## # record(waveform, "BPMS:IN20:525:REDW") { field(DESC, "Raw CAL RED Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C0 S1") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "BPMS:IN20:525:GRNW") { field(DESC, "Raw CAL GRN Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C0 S2") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "BPMS:IN20:525:RAWDBG") { field(DESC, "Raw BEAM Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' # do not 'wbscan' for now since e.g., an underrange # condition on the real signal can happen. field(INP, "#C0 S7") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "BPMS:IN20:525:REDDBG") { field(DESC, "Raw CAL RED Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C0 S8 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "BPMS:IN20:525:GRNDBG") { field(DESC, "Raw CAL GRN Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C0 S9 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(ai, "BPMS:IN20:525:GRUV") { field(DESC, "CAL Gain GRN/RED") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C0 S0") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") } record(ai, "BPMS:IN20:525:GRU") { field(DESC, "CAL Gain GRN/BLU") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C0 S1") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "BPMS:IN20:525:GRV") { field(DESC, "CAL Gain RED/YLO") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C0 S2") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "BPMS:IN20:525:TGRN") { field(DESC, "Green arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C0 S4") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:IN20:525:TRED") { field(DESC, "Red arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C0 S5") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:IN20:525:TBLU") { field(DESC, "Blue arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C0 S6") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:IN20:525:TYLO") { field(DESC, "Yellow arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C0 S7") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ao, "BPMS:IN20:525:PINC_ADJ") { field(DESC, "Adjust Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:525:CALC.K PP MS") field(VAL, "0") field(DRVL, "0") field(DRVH, "2") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:IN20:525:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:525:QSCA.A PP MS") # 5.0E-6 / 1.6E-10 [nC/e-] field(VAL, "31250") field(EGU, "Nel") field(PREC, "3") field(PINI, "YES") info(autosaveFields, "VAL") } # Adjust TMIT scale for AFE attenuation record(calcout, "BPMS:IN20:525:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:IN20:525:ATT1 CP") field(INPC, "BPMS:IN20:525:ATT2 CP") field(CALC, "A*10^((B+C+D)/20)") # use CA link to deposit into TMIT.ASLO so # that TMIT is not forced into linkset # of this record field(OUT, "BPMS:IN20:525:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:IN20:525:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:525:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:525:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:IN20:525:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:525:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:525:ASIM.C PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } # Attenuate charge either by # real attenuator settings or # by fake ones. # If B, C >= 0 then their # values will be used instead # of ATT1, ATT2 record(calcout, "BPMS:IN20:525:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:525:QSIM.ESLO PP") # ATT1SIM puts value into A # set to -1 to use real attenuator settings # and >=0 to use B instead field(B, "-1") # ATT2SIM puts value into C # set to -1 to use real attenuator settings # and >=0 to use D instead field(D, "-1") field(CALC, "10^(((B>=0?B:A)+(D>=0?D:C))/20)") field(PINI, "YES") } record(ao, "BPMS:IN20:525:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:525:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "BPMS:IN20:525:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:IN20:525:RSTA.SEVR MS NPP") field(INPB, "BPMS:IN20:525:TMIT.SEVR MS NPP") field(INPC, "BPMS:IN20:525:Y.SEVR MS NPP") field(INPD, "BPMS:IN20:525:X.SEVR MS NPP") field(INPE, "BPMS:IN20:525:TGRN.SEVR MS NPP") field(INPF, "BPMS:IN20:525:TRED.SEVR MS NPP") field(INPG, "BPMS:IN20:525:TBLU.SEVR MS NPP") field(INPH, "BPMS:IN20:525:TYLO.SEVR MS NPP") field(INPI, "BPMS:IN20:525:GRU.SEVR MS NPP") field(INPJ, "BPMS:IN20:525:GRV.SEVR MS NPP") field(SCAN, "1 second") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:525:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:525:ATTC.B PP") field(DRVL, "-10") field(DRVH, "30") field(LOPR, "-10") field(HOPR, "30") field(EGU, "dB") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:525:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:525:ATTC.C PP") field(DRVL, "-20") field(DRVH, "20") field(LOPR, "-20") field(HOPR, "20") field(EGU, "dB") field(VAL, "40") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } record(calc, "BPMS:IN20:525:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:IN20:525:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:IN20:525:GRU.SEVR MS NPP") field(INPC, "BPMS:IN20:525:GRV.SEVR MS NPP") field(INPD, "BPMS:IN20:525:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:IN20:525:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:IN20:525:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:IN20:525:RED_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:525:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:525:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:525:BLU_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:525:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:525:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:525:YLO_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:525:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:IN20:525:YLO NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(sub, "BPMS:IN20:525:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "0") field(SCAN, "Passive") } record(bo, "BPMS:IN20:525:PINC_ENA") { field(DESC, "Simple Pincushion Alg") field(DTYP, "BusAddress") field(OUT, "#C0S2@drvBpmStriplPincEna,m32") field(MASK, "1") field(ZNAM, "DISABLED") field(ONAM, "ENABLED") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } record(ao, "BPMS:IN20:525:UDR_THRES") { field(DESC, "Detection Underrange Threshold") field(DTYP, "Bpm Parameters") field(OUT, "#C0S0") field(EGU, "ADC Ticks") field(DOL, "45.26") field(PINI, "YES") field(DRVL, "0") field(DRVH, "32767") info(autosaveFields, "VAL") } #! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ###################################### # HEAD of main processing chain ###################################### record(ai, "BPMS:IN20:525:X") { field(DESC, "X Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S11") field(SCAN, "I/O Intr") # The priority determines what scan list we are being # put on (see drvPadUdpComm.c) field(PRIO, "HIGH") field(FLNK, "BPMS:IN20:525: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, "BPMS:IN20:525:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S12") field(FLNK, "BPMS:IN20:525: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, "BPMS:IN20:525:TMIT") { field(DESC, "Charge Estimate") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S13") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") # FLINK into BSA field(FLNK, "BPMS:IN20:525: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, "BPMS:IN20:525:RWAV") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C0 S0") field(SCAN, "I/O Intr") # use LOW or HIGH to end up on the 'diagnostic' # scan list (see drvPadUdpComm.c) field(PRIO, "LOW") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") } record(ai, "BPMS:IN20:525:U") { field(DESC, "Raw U Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S8") field(SCAN, "I/O Intr") # use LOW or HIGH to end up on the 'diagnostic' # scan list (see drvPadUdpComm.c) field(PRIO, "LOW") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "BPMS:IN20:525:V") } record(ai, "BPMS:IN20:525:V") { field(DESC, "Raw V Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S9") field(SCAN, "Passive") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "BPMS:IN20:525:PINC") } record(ai, "BPMS:IN20:525:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S10") field(SCAN, "Passive") } record(longin, "BPMS:IN20:525:RSTA") { field(DESC, "Status of Raw Processor") field(DTYP, "Bpm Raw Status") field(INP, "#C0S0") field(SCAN, "1 second") field(LOLO, "-1") field(HIHI, "+1") field(HHSV, "INVALID") field(LLSV, "INVALID") field(FLNK, "BPMS:IN20:525:RSTA_ALH") } record(calc, "BPMS:IN20:525:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:IN20:525:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:IN20:525:PHI") { field(DESC, "Rot Angle") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "deg") field(PREC, "1") field(LOPR, "-180") field(HOPR, "+180") field(FLNK, "BPMS:IN20:525:PHI_SEQ") } record(ao, "BPMS:IN20:525:PSI") { field(DESC, "Axis Sep. Angle") field(DTYP, "Soft Channel") field(VAL, "90") field(EGU, "deg") field(PREC, "1") field(LOPR, "0") field(HOPR, "+180") field(FLNK, "BPMS:IN20:525:PSI_SEQ") } #record(dfanout, "BPMS:IN20:525:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:IN20:525:USCL PP MS") # field(OUTB, "BPMS:IN20:525:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:IN20:525:UOFF") { field(DESC, "BPM U Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:525:UOFF_SEQ") } record(ao, "BPMS:IN20:525:VOFF") { field(DESC, "BPM V Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:525:VOFF_SEQ") } record(ao, "BPMS:IN20:525:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:525:USCL_SEQ") } record(ao, "BPMS:IN20:525:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:525:VSCL_SEQ") } record(mbbo, "BPMS:IN20:525:ACCESS") { field(DESC, "BPM On Line") field(DTYP, "StreamSwitch") field(OUT, "#C0 S0") field(ZRVL, "1") field(ZRST, "Running") field(ZRSV, "NO_ALARM") field(ONVL, "1") field(ONST, "Maintenance") field(ONSV, "MINOR") field(TWVL, "1") field(TWST, "Test") field(TWSV, "MINOR") field(THVL, "0") field(THST, "OFFLINE") field(THSV, "MAJOR") # set both, rval and val to get it right # regardless of whether devsup does conversion # or not. field(RVAL, "0") field(VAL, "0") field(PINI, "YES") field(FLNK, "BPMS:IN20:525:SIMOFF") info(autosaveFields, "RVAL") } # # Used by higher level software to determine if a PV is in feedback or not. # May also be used by actuator (magnet and RF) IOC applications to # switch output records to "closed_loop" to prevent outside programs from # changing setpoints when an actuator device is in feedback. # record(mbbo, "BPMS:IN20:525:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") field(OMSL, "supervisory") field(VAL, "0") field(ZRVL, "0") field(ONVL, "1") field(TWVL, "2") # Off - this device can be used in feedback but all feedback loops # using it are off. field(ZRST, "Off") # On - this device is being used by one or more feedback loops. field(ONST, "On") # Unavailable - this device is not used by any feedback loop. field(TWST, "Unavailable") info(autosaveFields, "VAL") } # Convenience record holding the MAD name record(stringin, "BPMS:IN20:525:MADN") { field(DESC, "MAD Name") field(VAL, "BPM9") field(PINI, "YES") } record(stringin, "BPM9:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:IN20:525") field(PINI, "YES") } record(ai, "BPMS:IN20:525:X_SLOW") { #alias("BPMS:IN20:525:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:525:X MS") field(FLNK, "BPMS:IN20:525:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:525:Y_SLOW") { #alias("BPMS:IN20:525:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:525:Y NPP MS") field(FLNK, "BPMS:IN20:525:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:525:TMIT_SLOW") { #alias("BPMS:IN20:525:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "BPMS:IN20:525:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "BPMS:IN20:525:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:IN20:525:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:IN20:525:SIMC PP") } record(calcout, "BPMS:IN20:525:SIM") { field(DESC, "BPM Pos. Simulation") field(DTYP, "Strip Signal Simulator") field(OUT, "0") #CALC & VAL unused; the real calculation is done # in device support. The reason this is a # calcout rather than sub is that we want # to use the OUT link... field(CALC, "A") field(INPA, "BPMS:IN20:525:USCL") field(INPL, "0") } # Switch simulation record BPMS:IN20:525:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:IN20:525:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:525:SIMCSEQ.SELN PP") field(ZRST, "OFF") field(ZRVL, "0x0f") field(ONST, "ON") field(ONVL, "0x1c0") field(TWST, "SOFT") field(TWVL, "0x030") field(MASK, "-1") field(NOBT, "16") field(VAL, "0") field(RVAL, "0x0f") field(PINI, "YES") } record(ao, "BPMS:IN20:525:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:525:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:525:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:525:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:525:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:525:SIM.D PP") field(EGU, "Nel") field(ASLO, "6000") #ESLO is used to add attenuation field(LINR, "LINEAR") field(VAL, "1E9") field(PINI, "YES") field(PREC, "4") field(LOPR, "0") field(HOPR, "1E11") } record(ao, "BPMS:IN20:525:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:525:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:IN20:525:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:525:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:IN20:525:DIGISIMW") { field(DESC, "VME Digi Sim. Waveform") field(DTYP, "VmeDigi Sim Wav") field(OUT, "#C0 S0") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32678") field(LOPR, "-32768") # 16384 samples/channel * 4 channels field(NELM, "65536") field(PINI, "NO") } #Used by model/database folks to verify BPM record(ao, "BPMS:IN20:525:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:IN20:525:MPSBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C0S2@bpmMPS+0,m32") field(MASK, "1") field(ZNAM, "BYPASSED") field(ONAM, "NOT_BYPASSED") field(ZSV, "MAJOR") field(OSV, "NO_ALARM") field(VAL, "0") field(PINI, "YES") field(ASG, "") info(autosaveFields, "VAL") } record(bo, "BPMS:IN20:525:MPSLTBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C1S2@bpmMPS+0,m32") field(MASK, "1") field(ZNAM, "BYPASSED") field(ONAM, "NOT_BYPASSED") field(ZSV, "NO_ALARM") field(OSV, "NO_ALARM") field(VAL, "0") field(PINI, "YES") field(ASG, "") info(autosaveFields, "VAL") } record(calc, "BPMS:IN20:525:MPSIGNRCALC") { field(DESC, "MPS ignore if TMIT too low") field(CALC, "A $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:525:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:525:UOFF") field(DOL2, "BPMS:IN20:525:UOFF") field(DOL3, "BPMS:IN20:525:UOFF") field(DOL4, "BPMS:IN20:525:UOFF") field(DOL5, "BPMS:IN20:525:UOFF") field(DOL6, "BPMS:IN20:525:UOFF") field(DOL7, "BPMS:IN20:525:UOFF") field(DOL8, "BPMS:IN20:525:UOFF") field(DOL9, "BPMS:IN20:525:UOFF") field(DOLA, "BPMS:IN20:525:UOFF") field(LNK1, "BPMS:IN20:525:UOFF_SEL.A PP") field(LNK2, "BPMS:IN20:525:UOFF_SEL.B PP") field(LNK3, "BPMS:IN20:525:UOFF_SEL.C PP") field(LNK4, "BPMS:IN20:525:UOFF_SEL.D PP") field(LNK5, "BPMS:IN20:525:UOFF_SEL.E PP") field(LNK6, "BPMS:IN20:525:UOFF_SEL.F PP") field(LNK7, "BPMS:IN20:525:UOFF_SEL.G PP") field(LNK8, "BPMS:IN20:525:UOFF_SEL.H PP") field(LNK9, "BPMS:IN20:525:UOFF_SEL.I PP") field(LNKA, "BPMS:IN20:525:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:525:UOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:525:UOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:525:UOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:525:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:525:UOFF_SEL") field(OUTA, "BPMS:IN20:525:U.AOFF CA") field(OUTB, "BPMS:IN20:525:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:525:UOFF_CTRL") { field(INPA, "BPMS:IN20:525:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:525:UOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:525:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:525:VOFF") field(DOL2, "BPMS:IN20:525:VOFF") field(DOL3, "BPMS:IN20:525:VOFF") field(DOL4, "BPMS:IN20:525:VOFF") field(DOL5, "BPMS:IN20:525:VOFF") field(DOL6, "BPMS:IN20:525:VOFF") field(DOL7, "BPMS:IN20:525:VOFF") field(DOL8, "BPMS:IN20:525:VOFF") field(DOL9, "BPMS:IN20:525:VOFF") field(DOLA, "BPMS:IN20:525:VOFF") field(LNK1, "BPMS:IN20:525:VOFF_SEL.A PP") field(LNK2, "BPMS:IN20:525:VOFF_SEL.B PP") field(LNK3, "BPMS:IN20:525:VOFF_SEL.C PP") field(LNK4, "BPMS:IN20:525:VOFF_SEL.D PP") field(LNK5, "BPMS:IN20:525:VOFF_SEL.E PP") field(LNK6, "BPMS:IN20:525:VOFF_SEL.F PP") field(LNK7, "BPMS:IN20:525:VOFF_SEL.G PP") field(LNK8, "BPMS:IN20:525:VOFF_SEL.H PP") field(LNK9, "BPMS:IN20:525:VOFF_SEL.I PP") field(LNKA, "BPMS:IN20:525:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:525:VOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:525:VOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:525:VOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:525:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:525:VOFF_SEL") field(OUTA, "BPMS:IN20:525:V.AOFF CA") field(OUTB, "BPMS:IN20:525:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:525:VOFF_CTRL") { field(INPA, "BPMS:IN20:525:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:525:VOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:525:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:525:USCL") field(DOL2, "BPMS:IN20:525:USCL") field(DOL3, "BPMS:IN20:525:USCL") field(DOL4, "BPMS:IN20:525:USCL") field(DOL5, "BPMS:IN20:525:USCL") field(DOL6, "BPMS:IN20:525:USCL") field(DOL7, "BPMS:IN20:525:USCL") field(DOL8, "BPMS:IN20:525:USCL") field(DOL9, "BPMS:IN20:525:USCL") field(DOLA, "BPMS:IN20:525:USCL") field(LNK1, "BPMS:IN20:525:USCL_SEL.A PP") field(LNK2, "BPMS:IN20:525:USCL_SEL.B PP") field(LNK3, "BPMS:IN20:525:USCL_SEL.C PP") field(LNK4, "BPMS:IN20:525:USCL_SEL.D PP") field(LNK5, "BPMS:IN20:525:USCL_SEL.E PP") field(LNK6, "BPMS:IN20:525:USCL_SEL.F PP") field(LNK7, "BPMS:IN20:525:USCL_SEL.G PP") field(LNK8, "BPMS:IN20:525:USCL_SEL.H PP") field(LNK9, "BPMS:IN20:525:USCL_SEL.I PP") field(LNKA, "BPMS:IN20:525:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:525:USCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:525:USCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:525:USCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:525:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:525:USCL_SEL") field(OUTA, "BPMS:IN20:525:U.ASLO CA") field(OUTB, "BPMS:IN20:525:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:525:USCL_CTRL") { field(INPA, "BPMS:IN20:525:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:525:USCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:525:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:525:VSCL") field(DOL2, "BPMS:IN20:525:VSCL") field(DOL3, "BPMS:IN20:525:VSCL") field(DOL4, "BPMS:IN20:525:VSCL") field(DOL5, "BPMS:IN20:525:VSCL") field(DOL6, "BPMS:IN20:525:VSCL") field(DOL7, "BPMS:IN20:525:VSCL") field(DOL8, "BPMS:IN20:525:VSCL") field(DOL9, "BPMS:IN20:525:VSCL") field(DOLA, "BPMS:IN20:525:VSCL") field(LNK1, "BPMS:IN20:525:VSCL_SEL.A PP") field(LNK2, "BPMS:IN20:525:VSCL_SEL.B PP") field(LNK3, "BPMS:IN20:525:VSCL_SEL.C PP") field(LNK4, "BPMS:IN20:525:VSCL_SEL.D PP") field(LNK5, "BPMS:IN20:525:VSCL_SEL.E PP") field(LNK6, "BPMS:IN20:525:VSCL_SEL.F PP") field(LNK7, "BPMS:IN20:525:VSCL_SEL.G PP") field(LNK8, "BPMS:IN20:525:VSCL_SEL.H PP") field(LNK9, "BPMS:IN20:525:VSCL_SEL.I PP") field(LNKA, "BPMS:IN20:525:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:525:VSCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:525:VSCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:525:VSCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:525:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:525:VSCL_SEL") field(OUTA, "BPMS:IN20:525:V.ASLO CA") field(OUTB, "BPMS:IN20:525:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:525:VSCL_CTRL") { field(INPA, "BPMS:IN20:525:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:525:VSCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:525:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:525:PHI") field(DOL2, "BPMS:IN20:525:PHI") field(DOL3, "BPMS:IN20:525:PHI") field(DOL4, "BPMS:IN20:525:PHI") field(DOL5, "BPMS:IN20:525:PHI") field(DOL6, "BPMS:IN20:525:PHI") field(DOL7, "BPMS:IN20:525:PHI") field(DOL8, "BPMS:IN20:525:PHI") field(DOL9, "BPMS:IN20:525:PHI") field(DOLA, "BPMS:IN20:525:PHI") field(LNK1, "BPMS:IN20:525:PHI_SEL.A PP") field(LNK2, "BPMS:IN20:525:PHI_SEL.B PP") field(LNK3, "BPMS:IN20:525:PHI_SEL.C PP") field(LNK4, "BPMS:IN20:525:PHI_SEL.D PP") field(LNK5, "BPMS:IN20:525:PHI_SEL.E PP") field(LNK6, "BPMS:IN20:525:PHI_SEL.F PP") field(LNK7, "BPMS:IN20:525:PHI_SEL.G PP") field(LNK8, "BPMS:IN20:525:PHI_SEL.H PP") field(LNK9, "BPMS:IN20:525:PHI_SEL.I PP") field(LNKA, "BPMS:IN20:525:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:525:PHI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:525:PHI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:525:PHI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:525:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:525:PHI_SEL") field(OUTA, "BPMS:IN20:525:CALC.E CA") field(OUTB, "BPMS:IN20:525:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:525:PHI_CTRL") { field(INPA, "BPMS:IN20:525:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:525:PHI_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:525:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:525:PSI") field(DOL2, "BPMS:IN20:525:PSI") field(DOL3, "BPMS:IN20:525:PSI") field(DOL4, "BPMS:IN20:525:PSI") field(DOL5, "BPMS:IN20:525:PSI") field(DOL6, "BPMS:IN20:525:PSI") field(DOL7, "BPMS:IN20:525:PSI") field(DOL8, "BPMS:IN20:525:PSI") field(DOL9, "BPMS:IN20:525:PSI") field(DOLA, "BPMS:IN20:525:PSI") field(LNK1, "BPMS:IN20:525:PSI_SEL.A PP") field(LNK2, "BPMS:IN20:525:PSI_SEL.B PP") field(LNK3, "BPMS:IN20:525:PSI_SEL.C PP") field(LNK4, "BPMS:IN20:525:PSI_SEL.D PP") field(LNK5, "BPMS:IN20:525:PSI_SEL.E PP") field(LNK6, "BPMS:IN20:525:PSI_SEL.F PP") field(LNK7, "BPMS:IN20:525:PSI_SEL.G PP") field(LNK8, "BPMS:IN20:525:PSI_SEL.H PP") field(LNK9, "BPMS:IN20:525:PSI_SEL.I PP") field(LNKA, "BPMS:IN20:525:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:525:PSI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:525:PSI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "90") field(B, "90") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:525:PSI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:525:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:525:PSI_SEL") field(OUTA, "BPMS:IN20:525:CALC.F CA") field(OUTB, "BPMS:IN20:525:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:525:PSI_CTRL") { field(INPA, "BPMS:IN20:525:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:525:PSI_SEL.L PP") } record(longout, "BPMS:IN20:525:PARMSEL") { field(VAL, "0") field(PINI, "YES") } #! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ############################################## # This is the head of the main processing chain # that runs at the highest priority. ############################################## ############################################# # This is the head of the processing chain for # diagnostics. ############################################## record(ai, "BPMS:IN20:581:GRN") { field(DESC, "GRN Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C1 S0") field(EGU, "raw") #TODO set HOPR/LOPR, alarm limits field(SCAN, "I/O Intr") # The priority determines what scan list we are being # put on (see drvPadUdpComm.c) field(PRIO, "LOW") field(FLNK, "BPMS:IN20:581:RED") # HOPR for the energy algorithm is determined as follows: # # inf inf # 1) Fourier relation / h^2 dt = / |H|^2 df = 2 B # 0 -inf # # 1a) It can be shown that the maximum of the impuls response # ha is ~ 2 B # # 2) The digitizer produces the numbers # # Ai = 2^s (hi/ha) # # where ha is the maximum of the impuls response # and 2^s is a scale factor. # # 3) 'Energy algorithm' calculates S = sum( Ai^2 ) # # inf # 4) S = (2^s / ha)^2 sum(hi^2) = K sum(hi^2) Dt ~ K / h^2 dt # 0 # # with K = (2^s / ha)^2 fs # # 5) From 4) and 1a) -> S ~ K ha and therefore # # 6) S = 2^(2s) fs/ha = 2^(2s) fs/(2 B) # # 7) The strip signals are sqrt(S); hence HOPR is about # # HOPR ~ 2^s sqrt( fs/2/B ) # # with 2^s = 32768, fs=120MHz, B=10MHz it follows # that HOPR ~ 1E5; we add some margin... field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:581:RED") { field(DESC, "RED Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C1 S1") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:581:BLU") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:581:BLU") { field(DESC, "BLU Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C1 S2") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:581:YLO") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:581:YLO") { field(DESC, "YLO Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C1 S3") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } ############################################## # Slowly-scanned diagnostics ############################################## # record(waveform, "BPMS:IN20:581:REDW") { field(DESC, "Raw CAL RED Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C1 S1") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "BPMS:IN20:581:GRNW") { field(DESC, "Raw CAL GRN Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C1 S2") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "BPMS:IN20:581:RAWDBG") { field(DESC, "Raw BEAM Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' # do not 'wbscan' for now since e.g., an underrange # condition on the real signal can happen. field(INP, "#C1 S7") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "BPMS:IN20:581:REDDBG") { field(DESC, "Raw CAL RED Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C1 S8 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "BPMS:IN20:581:GRNDBG") { field(DESC, "Raw CAL GRN Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C1 S9 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(ai, "BPMS:IN20:581:GRUV") { field(DESC, "CAL Gain GRN/RED") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C1 S0") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") } record(ai, "BPMS:IN20:581:GRU") { field(DESC, "CAL Gain GRN/BLU") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C1 S1") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "BPMS:IN20:581:GRV") { field(DESC, "CAL Gain RED/YLO") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C1 S2") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "BPMS:IN20:581:TGRN") { field(DESC, "Green arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C1 S4") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:IN20:581:TRED") { field(DESC, "Red arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C1 S5") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:IN20:581:TBLU") { field(DESC, "Blue arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C1 S6") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:IN20:581:TYLO") { field(DESC, "Yellow arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C1 S7") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ao, "BPMS:IN20:581:PINC_ADJ") { field(DESC, "Adjust Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:581:CALC.K PP MS") field(VAL, "0") field(DRVL, "0") field(DRVH, "2") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:IN20:581:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:581:QSCA.A PP MS") # 5.0E-6 / 1.6E-10 [nC/e-] field(VAL, "31250") field(EGU, "Nel") field(PREC, "3") field(PINI, "YES") info(autosaveFields, "VAL") } # Adjust TMIT scale for AFE attenuation record(calcout, "BPMS:IN20:581:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:IN20:581:ATT1 CP") field(INPC, "BPMS:IN20:581:ATT2 CP") field(CALC, "A*10^((B+C+D)/20)") # use CA link to deposit into TMIT.ASLO so # that TMIT is not forced into linkset # of this record field(OUT, "BPMS:IN20:581:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:IN20:581:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:581:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:581:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:IN20:581:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:581:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:581:ASIM.C PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } # Attenuate charge either by # real attenuator settings or # by fake ones. # If B, C >= 0 then their # values will be used instead # of ATT1, ATT2 record(calcout, "BPMS:IN20:581:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:581:QSIM.ESLO PP") # ATT1SIM puts value into A # set to -1 to use real attenuator settings # and >=0 to use B instead field(B, "-1") # ATT2SIM puts value into C # set to -1 to use real attenuator settings # and >=0 to use D instead field(D, "-1") field(CALC, "10^(((B>=0?B:A)+(D>=0?D:C))/20)") field(PINI, "YES") } record(ao, "BPMS:IN20:581:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:581:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "BPMS:IN20:581:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:IN20:581:RSTA.SEVR MS NPP") field(INPB, "BPMS:IN20:581:TMIT.SEVR MS NPP") field(INPC, "BPMS:IN20:581:Y.SEVR MS NPP") field(INPD, "BPMS:IN20:581:X.SEVR MS NPP") field(INPE, "BPMS:IN20:581:TGRN.SEVR MS NPP") field(INPF, "BPMS:IN20:581:TRED.SEVR MS NPP") field(INPG, "BPMS:IN20:581:TBLU.SEVR MS NPP") field(INPH, "BPMS:IN20:581:TYLO.SEVR MS NPP") field(INPI, "BPMS:IN20:581:GRU.SEVR MS NPP") field(INPJ, "BPMS:IN20:581:GRV.SEVR MS NPP") field(SCAN, "1 second") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:581:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:581:ATTC.B PP") field(DRVL, "-10") field(DRVH, "30") field(LOPR, "-10") field(HOPR, "30") field(EGU, "dB") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:581:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:581:ATTC.C PP") field(DRVL, "-20") field(DRVH, "20") field(LOPR, "-20") field(HOPR, "20") field(EGU, "dB") field(VAL, "40") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } record(calc, "BPMS:IN20:581:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:IN20:581:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:IN20:581:GRU.SEVR MS NPP") field(INPC, "BPMS:IN20:581:GRV.SEVR MS NPP") field(INPD, "BPMS:IN20:581:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:IN20:581:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:IN20:581:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:IN20:581:RED_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:581:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:581:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:581:BLU_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:581:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:581:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:581:YLO_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:581:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:IN20:581:YLO NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(sub, "BPMS:IN20:581:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "1") field(SCAN, "Passive") } record(bo, "BPMS:IN20:581:PINC_ENA") { field(DESC, "Simple Pincushion Alg") field(DTYP, "BusAddress") field(OUT, "#C0S2@drvBpmStriplPincEna,m32") field(MASK, "2") field(ZNAM, "DISABLED") field(ONAM, "ENABLED") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } record(ao, "BPMS:IN20:581:UDR_THRES") { field(DESC, "Detection Underrange Threshold") field(DTYP, "Bpm Parameters") field(OUT, "#C1S0") field(EGU, "ADC Ticks") field(DOL, "45.26") field(PINI, "YES") field(DRVL, "0") field(DRVH, "32767") info(autosaveFields, "VAL") } #! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ###################################### # HEAD of main processing chain ###################################### record(ai, "BPMS:IN20:581:X") { field(DESC, "X Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S11") field(SCAN, "I/O Intr") # The priority determines what scan list we are being # put on (see drvPadUdpComm.c) field(PRIO, "HIGH") field(FLNK, "BPMS:IN20:581: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, "BPMS:IN20:581:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S12") field(FLNK, "BPMS:IN20:581: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, "BPMS:IN20:581:TMIT") { field(DESC, "Charge Estimate") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S13") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") # FLINK into BSA field(FLNK, "BPMS:IN20:581: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, "BPMS:IN20:581:RWAV") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C1 S0") field(SCAN, "I/O Intr") # use LOW or HIGH to end up on the 'diagnostic' # scan list (see drvPadUdpComm.c) field(PRIO, "LOW") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") } record(ai, "BPMS:IN20:581:U") { field(DESC, "Raw U Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S8") field(SCAN, "I/O Intr") # use LOW or HIGH to end up on the 'diagnostic' # scan list (see drvPadUdpComm.c) field(PRIO, "LOW") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "BPMS:IN20:581:V") } record(ai, "BPMS:IN20:581:V") { field(DESC, "Raw V Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S9") field(SCAN, "Passive") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "BPMS:IN20:581:PINC") } record(ai, "BPMS:IN20:581:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S10") field(SCAN, "Passive") } record(longin, "BPMS:IN20:581:RSTA") { field(DESC, "Status of Raw Processor") field(DTYP, "Bpm Raw Status") field(INP, "#C1S0") field(SCAN, "1 second") field(LOLO, "-1") field(HIHI, "+1") field(HHSV, "INVALID") field(LLSV, "INVALID") field(FLNK, "BPMS:IN20:581:RSTA_ALH") } record(calc, "BPMS:IN20:581:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:IN20:581:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:IN20:581:PHI") { field(DESC, "Rot Angle") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "deg") field(PREC, "1") field(LOPR, "-180") field(HOPR, "+180") field(FLNK, "BPMS:IN20:581:PHI_SEQ") } record(ao, "BPMS:IN20:581:PSI") { field(DESC, "Axis Sep. Angle") field(DTYP, "Soft Channel") field(VAL, "90") field(EGU, "deg") field(PREC, "1") field(LOPR, "0") field(HOPR, "+180") field(FLNK, "BPMS:IN20:581:PSI_SEQ") } #record(dfanout, "BPMS:IN20:581:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:IN20:581:USCL PP MS") # field(OUTB, "BPMS:IN20:581:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:IN20:581:UOFF") { field(DESC, "BPM U Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:581:UOFF_SEQ") } record(ao, "BPMS:IN20:581:VOFF") { field(DESC, "BPM V Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:581:VOFF_SEQ") } record(ao, "BPMS:IN20:581:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:581:USCL_SEQ") } record(ao, "BPMS:IN20:581:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:581:VSCL_SEQ") } record(mbbo, "BPMS:IN20:581:ACCESS") { field(DESC, "BPM On Line") field(DTYP, "StreamSwitch") field(OUT, "#C1 S0") field(ZRVL, "1") field(ZRST, "Running") field(ZRSV, "NO_ALARM") field(ONVL, "1") field(ONST, "Maintenance") field(ONSV, "MINOR") field(TWVL, "1") field(TWST, "Test") field(TWSV, "MINOR") field(THVL, "0") field(THST, "OFFLINE") field(THSV, "MAJOR") # set both, rval and val to get it right # regardless of whether devsup does conversion # or not. field(RVAL, "0") field(VAL, "0") field(PINI, "YES") field(FLNK, "BPMS:IN20:581:SIMOFF") info(autosaveFields, "RVAL") } # # Used by higher level software to determine if a PV is in feedback or not. # May also be used by actuator (magnet and RF) IOC applications to # switch output records to "closed_loop" to prevent outside programs from # changing setpoints when an actuator device is in feedback. # record(mbbo, "BPMS:IN20:581:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") field(OMSL, "supervisory") field(VAL, "0") field(ZRVL, "0") field(ONVL, "1") field(TWVL, "2") # Off - this device can be used in feedback but all feedback loops # using it are off. field(ZRST, "Off") # On - this device is being used by one or more feedback loops. field(ONST, "On") # Unavailable - this device is not used by any feedback loop. field(TWST, "Unavailable") info(autosaveFields, "VAL") } # Convenience record holding the MAD name record(stringin, "BPMS:IN20:581:MADN") { field(DESC, "MAD Name") field(VAL, "BPM10") field(PINI, "YES") } record(stringin, "BPM10:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:IN20:581") field(PINI, "YES") } record(ai, "BPMS:IN20:581:X_SLOW") { #alias("BPMS:IN20:581:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:581:X MS") field(FLNK, "BPMS:IN20:581:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:581:Y_SLOW") { #alias("BPMS:IN20:581:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:581:Y NPP MS") field(FLNK, "BPMS:IN20:581:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:581:TMIT_SLOW") { #alias("BPMS:IN20:581:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "BPMS:IN20:581:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "BPMS:IN20:581:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:IN20:581:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:IN20:581:SIMC PP") } record(calcout, "BPMS:IN20:581:SIM") { field(DESC, "BPM Pos. Simulation") field(DTYP, "Strip Signal Simulator") field(OUT, "1") #CALC & VAL unused; the real calculation is done # in device support. The reason this is a # calcout rather than sub is that we want # to use the OUT link... field(CALC, "A") field(INPA, "BPMS:IN20:581:USCL") field(INPL, "0") } # Switch simulation record BPMS:IN20:581:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:IN20:581:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:581:SIMCSEQ.SELN PP") field(ZRST, "OFF") field(ZRVL, "0x0f") field(ONST, "ON") field(ONVL, "0x1c0") field(TWST, "SOFT") field(TWVL, "0x030") field(MASK, "-1") field(NOBT, "16") field(VAL, "0") field(RVAL, "0x0f") field(PINI, "YES") } record(ao, "BPMS:IN20:581:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:581:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:581:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:581:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:581:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:581:SIM.D PP") field(EGU, "Nel") field(ASLO, "6000") #ESLO is used to add attenuation field(LINR, "LINEAR") field(VAL, "1E9") field(PINI, "YES") field(PREC, "4") field(LOPR, "0") field(HOPR, "1E11") } record(ao, "BPMS:IN20:581:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:581:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:IN20:581:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:581:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:IN20:581:DIGISIMW") { field(DESC, "VME Digi Sim. Waveform") field(DTYP, "VmeDigi Sim Wav") field(OUT, "#C1 S0") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32678") field(LOPR, "-32768") # 16384 samples/channel * 4 channels field(NELM, "65536") field(PINI, "NO") } #Used by model/database folks to verify BPM record(ao, "BPMS:IN20:581:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:IN20:581:MPSBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C0S2@bpmMPS+0,m32") field(MASK, "2") field(ZNAM, "BYPASSED") field(ONAM, "NOT_BYPASSED") field(ZSV, "MAJOR") field(OSV, "NO_ALARM") field(VAL, "0") field(PINI, "YES") field(ASG, "") info(autosaveFields, "VAL") } record(bo, "BPMS:IN20:581:MPSLTBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C1S2@bpmMPS+0,m32") field(MASK, "2") field(ZNAM, "BYPASSED") field(ONAM, "NOT_BYPASSED") field(ZSV, "NO_ALARM") field(OSV, "NO_ALARM") field(VAL, "0") field(PINI, "YES") field(ASG, "") info(autosaveFields, "VAL") } record(calc, "BPMS:IN20:581:MPSIGNRCALC") { field(DESC, "MPS ignore if TMIT too low") field(CALC, "A $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:581:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:581:UOFF") field(DOL2, "BPMS:IN20:581:UOFF") field(DOL3, "BPMS:IN20:581:UOFF") field(DOL4, "BPMS:IN20:581:UOFF") field(DOL5, "BPMS:IN20:581:UOFF") field(DOL6, "BPMS:IN20:581:UOFF") field(DOL7, "BPMS:IN20:581:UOFF") field(DOL8, "BPMS:IN20:581:UOFF") field(DOL9, "BPMS:IN20:581:UOFF") field(DOLA, "BPMS:IN20:581:UOFF") field(LNK1, "BPMS:IN20:581:UOFF_SEL.A PP") field(LNK2, "BPMS:IN20:581:UOFF_SEL.B PP") field(LNK3, "BPMS:IN20:581:UOFF_SEL.C PP") field(LNK4, "BPMS:IN20:581:UOFF_SEL.D PP") field(LNK5, "BPMS:IN20:581:UOFF_SEL.E PP") field(LNK6, "BPMS:IN20:581:UOFF_SEL.F PP") field(LNK7, "BPMS:IN20:581:UOFF_SEL.G PP") field(LNK8, "BPMS:IN20:581:UOFF_SEL.H PP") field(LNK9, "BPMS:IN20:581:UOFF_SEL.I PP") field(LNKA, "BPMS:IN20:581:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:581:UOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:581:UOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:581:UOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:581:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:581:UOFF_SEL") field(OUTA, "BPMS:IN20:581:U.AOFF CA") field(OUTB, "BPMS:IN20:581:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:581:UOFF_CTRL") { field(INPA, "BPMS:IN20:581:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:581:UOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:581:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:581:VOFF") field(DOL2, "BPMS:IN20:581:VOFF") field(DOL3, "BPMS:IN20:581:VOFF") field(DOL4, "BPMS:IN20:581:VOFF") field(DOL5, "BPMS:IN20:581:VOFF") field(DOL6, "BPMS:IN20:581:VOFF") field(DOL7, "BPMS:IN20:581:VOFF") field(DOL8, "BPMS:IN20:581:VOFF") field(DOL9, "BPMS:IN20:581:VOFF") field(DOLA, "BPMS:IN20:581:VOFF") field(LNK1, "BPMS:IN20:581:VOFF_SEL.A PP") field(LNK2, "BPMS:IN20:581:VOFF_SEL.B PP") field(LNK3, "BPMS:IN20:581:VOFF_SEL.C PP") field(LNK4, "BPMS:IN20:581:VOFF_SEL.D PP") field(LNK5, "BPMS:IN20:581:VOFF_SEL.E PP") field(LNK6, "BPMS:IN20:581:VOFF_SEL.F PP") field(LNK7, "BPMS:IN20:581:VOFF_SEL.G PP") field(LNK8, "BPMS:IN20:581:VOFF_SEL.H PP") field(LNK9, "BPMS:IN20:581:VOFF_SEL.I PP") field(LNKA, "BPMS:IN20:581:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:581:VOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:581:VOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:581:VOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:581:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:581:VOFF_SEL") field(OUTA, "BPMS:IN20:581:V.AOFF CA") field(OUTB, "BPMS:IN20:581:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:581:VOFF_CTRL") { field(INPA, "BPMS:IN20:581:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:581:VOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:581:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:581:USCL") field(DOL2, "BPMS:IN20:581:USCL") field(DOL3, "BPMS:IN20:581:USCL") field(DOL4, "BPMS:IN20:581:USCL") field(DOL5, "BPMS:IN20:581:USCL") field(DOL6, "BPMS:IN20:581:USCL") field(DOL7, "BPMS:IN20:581:USCL") field(DOL8, "BPMS:IN20:581:USCL") field(DOL9, "BPMS:IN20:581:USCL") field(DOLA, "BPMS:IN20:581:USCL") field(LNK1, "BPMS:IN20:581:USCL_SEL.A PP") field(LNK2, "BPMS:IN20:581:USCL_SEL.B PP") field(LNK3, "BPMS:IN20:581:USCL_SEL.C PP") field(LNK4, "BPMS:IN20:581:USCL_SEL.D PP") field(LNK5, "BPMS:IN20:581:USCL_SEL.E PP") field(LNK6, "BPMS:IN20:581:USCL_SEL.F PP") field(LNK7, "BPMS:IN20:581:USCL_SEL.G PP") field(LNK8, "BPMS:IN20:581:USCL_SEL.H PP") field(LNK9, "BPMS:IN20:581:USCL_SEL.I PP") field(LNKA, "BPMS:IN20:581:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:581:USCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:581:USCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:581:USCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:581:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:581:USCL_SEL") field(OUTA, "BPMS:IN20:581:U.ASLO CA") field(OUTB, "BPMS:IN20:581:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:581:USCL_CTRL") { field(INPA, "BPMS:IN20:581:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:581:USCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:581:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:581:VSCL") field(DOL2, "BPMS:IN20:581:VSCL") field(DOL3, "BPMS:IN20:581:VSCL") field(DOL4, "BPMS:IN20:581:VSCL") field(DOL5, "BPMS:IN20:581:VSCL") field(DOL6, "BPMS:IN20:581:VSCL") field(DOL7, "BPMS:IN20:581:VSCL") field(DOL8, "BPMS:IN20:581:VSCL") field(DOL9, "BPMS:IN20:581:VSCL") field(DOLA, "BPMS:IN20:581:VSCL") field(LNK1, "BPMS:IN20:581:VSCL_SEL.A PP") field(LNK2, "BPMS:IN20:581:VSCL_SEL.B PP") field(LNK3, "BPMS:IN20:581:VSCL_SEL.C PP") field(LNK4, "BPMS:IN20:581:VSCL_SEL.D PP") field(LNK5, "BPMS:IN20:581:VSCL_SEL.E PP") field(LNK6, "BPMS:IN20:581:VSCL_SEL.F PP") field(LNK7, "BPMS:IN20:581:VSCL_SEL.G PP") field(LNK8, "BPMS:IN20:581:VSCL_SEL.H PP") field(LNK9, "BPMS:IN20:581:VSCL_SEL.I PP") field(LNKA, "BPMS:IN20:581:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:581:VSCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:581:VSCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:581:VSCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:581:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:581:VSCL_SEL") field(OUTA, "BPMS:IN20:581:V.ASLO CA") field(OUTB, "BPMS:IN20:581:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:581:VSCL_CTRL") { field(INPA, "BPMS:IN20:581:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:581:VSCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:581:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:581:PHI") field(DOL2, "BPMS:IN20:581:PHI") field(DOL3, "BPMS:IN20:581:PHI") field(DOL4, "BPMS:IN20:581:PHI") field(DOL5, "BPMS:IN20:581:PHI") field(DOL6, "BPMS:IN20:581:PHI") field(DOL7, "BPMS:IN20:581:PHI") field(DOL8, "BPMS:IN20:581:PHI") field(DOL9, "BPMS:IN20:581:PHI") field(DOLA, "BPMS:IN20:581:PHI") field(LNK1, "BPMS:IN20:581:PHI_SEL.A PP") field(LNK2, "BPMS:IN20:581:PHI_SEL.B PP") field(LNK3, "BPMS:IN20:581:PHI_SEL.C PP") field(LNK4, "BPMS:IN20:581:PHI_SEL.D PP") field(LNK5, "BPMS:IN20:581:PHI_SEL.E PP") field(LNK6, "BPMS:IN20:581:PHI_SEL.F PP") field(LNK7, "BPMS:IN20:581:PHI_SEL.G PP") field(LNK8, "BPMS:IN20:581:PHI_SEL.H PP") field(LNK9, "BPMS:IN20:581:PHI_SEL.I PP") field(LNKA, "BPMS:IN20:581:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:581:PHI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:581:PHI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:581:PHI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:581:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:581:PHI_SEL") field(OUTA, "BPMS:IN20:581:CALC.E CA") field(OUTB, "BPMS:IN20:581:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:581:PHI_CTRL") { field(INPA, "BPMS:IN20:581:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:581:PHI_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:581:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:581:PSI") field(DOL2, "BPMS:IN20:581:PSI") field(DOL3, "BPMS:IN20:581:PSI") field(DOL4, "BPMS:IN20:581:PSI") field(DOL5, "BPMS:IN20:581:PSI") field(DOL6, "BPMS:IN20:581:PSI") field(DOL7, "BPMS:IN20:581:PSI") field(DOL8, "BPMS:IN20:581:PSI") field(DOL9, "BPMS:IN20:581:PSI") field(DOLA, "BPMS:IN20:581:PSI") field(LNK1, "BPMS:IN20:581:PSI_SEL.A PP") field(LNK2, "BPMS:IN20:581:PSI_SEL.B PP") field(LNK3, "BPMS:IN20:581:PSI_SEL.C PP") field(LNK4, "BPMS:IN20:581:PSI_SEL.D PP") field(LNK5, "BPMS:IN20:581:PSI_SEL.E PP") field(LNK6, "BPMS:IN20:581:PSI_SEL.F PP") field(LNK7, "BPMS:IN20:581:PSI_SEL.G PP") field(LNK8, "BPMS:IN20:581:PSI_SEL.H PP") field(LNK9, "BPMS:IN20:581:PSI_SEL.I PP") field(LNKA, "BPMS:IN20:581:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:581:PSI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:581:PSI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "90") field(B, "90") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:581:PSI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:581:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:581:PSI_SEL") field(OUTA, "BPMS:IN20:581:CALC.F CA") field(OUTB, "BPMS:IN20:581:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:581:PSI_CTRL") { field(INPA, "BPMS:IN20:581:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:581:PSI_SEL.L PP") } record(longout, "BPMS:IN20:581:PARMSEL") { field(VAL, "0") field(PINI, "YES") } #! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ############################################## # This is the head of the main processing chain # that runs at the highest priority. ############################################## ############################################# # This is the head of the processing chain for # diagnostics. ############################################## record(ai, "BPMS:IN20:631: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, "BPMS:IN20:631:RED") # HOPR for the energy algorithm is determined as follows: # # inf inf # 1) Fourier relation / h^2 dt = / |H|^2 df = 2 B # 0 -inf # # 1a) It can be shown that the maximum of the impuls response # ha is ~ 2 B # # 2) The digitizer produces the numbers # # Ai = 2^s (hi/ha) # # where ha is the maximum of the impuls response # and 2^s is a scale factor. # # 3) 'Energy algorithm' calculates S = sum( Ai^2 ) # # inf # 4) S = (2^s / ha)^2 sum(hi^2) = K sum(hi^2) Dt ~ K / h^2 dt # 0 # # with K = (2^s / ha)^2 fs # # 5) From 4) and 1a) -> S ~ K ha and therefore # # 6) S = 2^(2s) fs/ha = 2^(2s) fs/(2 B) # # 7) The strip signals are sqrt(S); hence HOPR is about # # HOPR ~ 2^s sqrt( fs/2/B ) # # with 2^s = 32768, fs=120MHz, B=10MHz it follows # that HOPR ~ 1E5; we add some margin... field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:631: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, "BPMS:IN20:631:BLU") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:631: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, "BPMS:IN20:631:YLO") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631: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(ao, "BPMS:IN20:631:PINC_ADJ") { field(DESC, "Adjust Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:631:CALC.K PP MS") field(VAL, "0") field(DRVL, "0") field(DRVH, "2") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:IN20:631:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:631:QSCA.A PP MS") # 5.0E-6 / 1.6E-10 [nC/e-] field(VAL, "31250") field(EGU, "Nel") field(PREC, "3") field(PINI, "YES") info(autosaveFields, "VAL") } # Adjust TMIT scale for AFE attenuation record(calcout, "BPMS:IN20:631:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:IN20:631:ATT1 CP") field(INPC, "BPMS:IN20:631:ATT2 CP") field(CALC, "A*10^((B+C+D)/20)") # use CA link to deposit into TMIT.ASLO so # that TMIT is not forced into linkset # of this record field(OUT, "BPMS:IN20:631:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:IN20:631:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:631:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:631:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:IN20:631:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:631:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:631:ASIM.C PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } # Attenuate charge either by # real attenuator settings or # by fake ones. # If B, C >= 0 then their # values will be used instead # of ATT1, ATT2 record(calcout, "BPMS:IN20:631:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:631:QSIM.ESLO PP") # ATT1SIM puts value into A # set to -1 to use real attenuator settings # and >=0 to use B instead field(B, "-1") # ATT2SIM puts value into C # set to -1 to use real attenuator settings # and >=0 to use D instead field(D, "-1") field(CALC, "10^(((B>=0?B:A)+(D>=0?D:C))/20)") field(PINI, "YES") } record(ao, "BPMS:IN20:631:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:631:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "BPMS:IN20:631:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:IN20:631:RSTA.SEVR MS NPP") field(INPB, "BPMS:IN20:631:TMIT.SEVR MS NPP") field(INPC, "BPMS:IN20:631:Y.SEVR MS NPP") field(INPD, "BPMS:IN20:631:X.SEVR MS NPP") field(INPE, "BPMS:IN20:631:TGRN.SEVR MS NPP") field(INPF, "BPMS:IN20:631:TRED.SEVR MS NPP") field(INPG, "BPMS:IN20:631:TBLU.SEVR MS NPP") field(INPH, "BPMS:IN20:631:TYLO.SEVR MS NPP") field(INPI, "BPMS:IN20:631:GRU.SEVR MS NPP") field(INPJ, "BPMS:IN20:631:GRV.SEVR MS NPP") field(SCAN, "1 second") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:631:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:631:ATTC.B PP") field(DRVL, "-10") field(DRVH, "30") field(LOPR, "-10") field(HOPR, "30") field(EGU, "dB") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:631:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:631:ATTC.C PP") field(DRVL, "-20") field(DRVH, "20") field(LOPR, "-20") field(HOPR, "20") field(EGU, "dB") field(VAL, "40") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } record(calc, "BPMS:IN20:631:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:IN20:631:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:IN20:631:GRU.SEVR MS NPP") field(INPC, "BPMS:IN20:631:GRV.SEVR MS NPP") field(INPD, "BPMS:IN20:631:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:IN20:631:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:IN20:631:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:IN20:631:RED_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:631:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:631:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:631:BLU_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:631:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:631:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:631:YLO_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:631:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:IN20:631:YLO NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(sub, "BPMS:IN20:631:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "2") field(SCAN, "Passive") } record(bo, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C2 S12") field(FLNK, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631:V") } record(ai, "BPMS:IN20:631: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, "BPMS:IN20:631:PINC") } record(ai, "BPMS:IN20:631:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C2 S10") field(SCAN, "Passive") } record(longin, "BPMS:IN20:631: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, "BPMS:IN20:631:RSTA_ALH") } record(calc, "BPMS:IN20:631:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:IN20:631:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:IN20:631:PHI") { field(DESC, "Rot Angle") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "deg") field(PREC, "1") field(LOPR, "-180") field(HOPR, "+180") field(FLNK, "BPMS:IN20:631:PHI_SEQ") } record(ao, "BPMS:IN20:631:PSI") { field(DESC, "Axis Sep. Angle") field(DTYP, "Soft Channel") field(VAL, "90") field(EGU, "deg") field(PREC, "1") field(LOPR, "0") field(HOPR, "+180") field(FLNK, "BPMS:IN20:631:PSI_SEQ") } #record(dfanout, "BPMS:IN20:631:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:IN20:631:USCL PP MS") # field(OUTB, "BPMS:IN20:631:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:IN20:631:UOFF") { field(DESC, "BPM U Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:631:UOFF_SEQ") } record(ao, "BPMS:IN20:631:VOFF") { field(DESC, "BPM V Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:631:VOFF_SEQ") } record(ao, "BPMS:IN20:631:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:631:USCL_SEQ") } record(ao, "BPMS:IN20:631:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:631:VSCL_SEQ") } record(mbbo, "BPMS:IN20:631: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, "BPMS:IN20:631:SIMOFF") info(autosaveFields, "RVAL") } # # Used by higher level software to determine if a PV is in feedback or not. # May also be used by actuator (magnet and RF) IOC applications to # switch output records to "closed_loop" to prevent outside programs from # changing setpoints when an actuator device is in feedback. # record(mbbo, "BPMS:IN20:631:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") field(OMSL, "supervisory") field(VAL, "0") field(ZRVL, "0") field(ONVL, "1") field(TWVL, "2") # Off - this device can be used in feedback but all feedback loops # using it are off. field(ZRST, "Off") # On - this device is being used by one or more feedback loops. field(ONST, "On") # Unavailable - this device is not used by any feedback loop. field(TWST, "Unavailable") info(autosaveFields, "VAL") } # Convenience record holding the MAD name record(stringin, "BPMS:IN20:631:MADN") { field(DESC, "MAD Name") field(VAL, "BPM11") field(PINI, "YES") } record(stringin, "BPM11:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:IN20:631") field(PINI, "YES") } record(ai, "BPMS:IN20:631:X_SLOW") { #alias("BPMS:IN20:631:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:631:X MS") field(FLNK, "BPMS:IN20:631:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:631:Y_SLOW") { #alias("BPMS:IN20:631:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:631:Y NPP MS") field(FLNK, "BPMS:IN20:631:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:631:TMIT_SLOW") { #alias("BPMS:IN20:631:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "BPMS:IN20:631:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "BPMS:IN20:631:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:IN20:631:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:IN20:631:SIMC PP") } record(calcout, "BPMS:IN20:631: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, "BPMS:IN20:631:USCL") field(INPL, "0") } # Switch simulation record BPMS:IN20:631:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:IN20:631:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:631:SIMCSEQ.SELN PP") field(ZRST, "OFF") field(ZRVL, "0x0f") field(ONST, "ON") field(ONVL, "0x1c0") field(TWST, "SOFT") field(TWVL, "0x030") field(MASK, "-1") field(NOBT, "16") field(VAL, "0") field(RVAL, "0x0f") field(PINI, "YES") } record(ao, "BPMS:IN20:631:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:631:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:631:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:631:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:631:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:631:SIM.D PP") field(EGU, "Nel") field(ASLO, "6000") #ESLO is used to add attenuation field(LINR, "LINEAR") field(VAL, "1E9") field(PINI, "YES") field(PREC, "4") field(LOPR, "0") field(HOPR, "1E11") } record(ao, "BPMS:IN20:631:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:631:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:IN20:631:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:631:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:IN20:631: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, "BPMS:IN20:631:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:IN20:631: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, "BPMS:IN20:631: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, "BPMS:IN20:631:MPSIGNRCALC") { field(DESC, "MPS ignore if TMIT too low") field(CALC, "A $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:631:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:631:UOFF") field(DOL2, "BPMS:IN20:631:UOFF") field(DOL3, "BPMS:IN20:631:UOFF") field(DOL4, "BPMS:IN20:631:UOFF") field(DOL5, "BPMS:IN20:631:UOFF") field(DOL6, "BPMS:IN20:631:UOFF") field(DOL7, "BPMS:IN20:631:UOFF") field(DOL8, "BPMS:IN20:631:UOFF") field(DOL9, "BPMS:IN20:631:UOFF") field(DOLA, "BPMS:IN20:631:UOFF") field(LNK1, "BPMS:IN20:631:UOFF_SEL.A PP") field(LNK2, "BPMS:IN20:631:UOFF_SEL.B PP") field(LNK3, "BPMS:IN20:631:UOFF_SEL.C PP") field(LNK4, "BPMS:IN20:631:UOFF_SEL.D PP") field(LNK5, "BPMS:IN20:631:UOFF_SEL.E PP") field(LNK6, "BPMS:IN20:631:UOFF_SEL.F PP") field(LNK7, "BPMS:IN20:631:UOFF_SEL.G PP") field(LNK8, "BPMS:IN20:631:UOFF_SEL.H PP") field(LNK9, "BPMS:IN20:631:UOFF_SEL.I PP") field(LNKA, "BPMS:IN20:631:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:631:UOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:631:UOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:631:UOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:631:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:631:UOFF_SEL") field(OUTA, "BPMS:IN20:631:U.AOFF CA") field(OUTB, "BPMS:IN20:631:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:631:UOFF_CTRL") { field(INPA, "BPMS:IN20:631:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:631:UOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:631:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:631:VOFF") field(DOL2, "BPMS:IN20:631:VOFF") field(DOL3, "BPMS:IN20:631:VOFF") field(DOL4, "BPMS:IN20:631:VOFF") field(DOL5, "BPMS:IN20:631:VOFF") field(DOL6, "BPMS:IN20:631:VOFF") field(DOL7, "BPMS:IN20:631:VOFF") field(DOL8, "BPMS:IN20:631:VOFF") field(DOL9, "BPMS:IN20:631:VOFF") field(DOLA, "BPMS:IN20:631:VOFF") field(LNK1, "BPMS:IN20:631:VOFF_SEL.A PP") field(LNK2, "BPMS:IN20:631:VOFF_SEL.B PP") field(LNK3, "BPMS:IN20:631:VOFF_SEL.C PP") field(LNK4, "BPMS:IN20:631:VOFF_SEL.D PP") field(LNK5, "BPMS:IN20:631:VOFF_SEL.E PP") field(LNK6, "BPMS:IN20:631:VOFF_SEL.F PP") field(LNK7, "BPMS:IN20:631:VOFF_SEL.G PP") field(LNK8, "BPMS:IN20:631:VOFF_SEL.H PP") field(LNK9, "BPMS:IN20:631:VOFF_SEL.I PP") field(LNKA, "BPMS:IN20:631:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:631:VOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:631:VOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:631:VOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:631:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:631:VOFF_SEL") field(OUTA, "BPMS:IN20:631:V.AOFF CA") field(OUTB, "BPMS:IN20:631:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:631:VOFF_CTRL") { field(INPA, "BPMS:IN20:631:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:631:VOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:631:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:631:USCL") field(DOL2, "BPMS:IN20:631:USCL") field(DOL3, "BPMS:IN20:631:USCL") field(DOL4, "BPMS:IN20:631:USCL") field(DOL5, "BPMS:IN20:631:USCL") field(DOL6, "BPMS:IN20:631:USCL") field(DOL7, "BPMS:IN20:631:USCL") field(DOL8, "BPMS:IN20:631:USCL") field(DOL9, "BPMS:IN20:631:USCL") field(DOLA, "BPMS:IN20:631:USCL") field(LNK1, "BPMS:IN20:631:USCL_SEL.A PP") field(LNK2, "BPMS:IN20:631:USCL_SEL.B PP") field(LNK3, "BPMS:IN20:631:USCL_SEL.C PP") field(LNK4, "BPMS:IN20:631:USCL_SEL.D PP") field(LNK5, "BPMS:IN20:631:USCL_SEL.E PP") field(LNK6, "BPMS:IN20:631:USCL_SEL.F PP") field(LNK7, "BPMS:IN20:631:USCL_SEL.G PP") field(LNK8, "BPMS:IN20:631:USCL_SEL.H PP") field(LNK9, "BPMS:IN20:631:USCL_SEL.I PP") field(LNKA, "BPMS:IN20:631:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:631:USCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:631:USCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:631:USCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:631:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:631:USCL_SEL") field(OUTA, "BPMS:IN20:631:U.ASLO CA") field(OUTB, "BPMS:IN20:631:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:631:USCL_CTRL") { field(INPA, "BPMS:IN20:631:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:631:USCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:631:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:631:VSCL") field(DOL2, "BPMS:IN20:631:VSCL") field(DOL3, "BPMS:IN20:631:VSCL") field(DOL4, "BPMS:IN20:631:VSCL") field(DOL5, "BPMS:IN20:631:VSCL") field(DOL6, "BPMS:IN20:631:VSCL") field(DOL7, "BPMS:IN20:631:VSCL") field(DOL8, "BPMS:IN20:631:VSCL") field(DOL9, "BPMS:IN20:631:VSCL") field(DOLA, "BPMS:IN20:631:VSCL") field(LNK1, "BPMS:IN20:631:VSCL_SEL.A PP") field(LNK2, "BPMS:IN20:631:VSCL_SEL.B PP") field(LNK3, "BPMS:IN20:631:VSCL_SEL.C PP") field(LNK4, "BPMS:IN20:631:VSCL_SEL.D PP") field(LNK5, "BPMS:IN20:631:VSCL_SEL.E PP") field(LNK6, "BPMS:IN20:631:VSCL_SEL.F PP") field(LNK7, "BPMS:IN20:631:VSCL_SEL.G PP") field(LNK8, "BPMS:IN20:631:VSCL_SEL.H PP") field(LNK9, "BPMS:IN20:631:VSCL_SEL.I PP") field(LNKA, "BPMS:IN20:631:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:631:VSCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:631:VSCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:631:VSCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:631:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:631:VSCL_SEL") field(OUTA, "BPMS:IN20:631:V.ASLO CA") field(OUTB, "BPMS:IN20:631:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:631:VSCL_CTRL") { field(INPA, "BPMS:IN20:631:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:631:VSCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:631:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:631:PHI") field(DOL2, "BPMS:IN20:631:PHI") field(DOL3, "BPMS:IN20:631:PHI") field(DOL4, "BPMS:IN20:631:PHI") field(DOL5, "BPMS:IN20:631:PHI") field(DOL6, "BPMS:IN20:631:PHI") field(DOL7, "BPMS:IN20:631:PHI") field(DOL8, "BPMS:IN20:631:PHI") field(DOL9, "BPMS:IN20:631:PHI") field(DOLA, "BPMS:IN20:631:PHI") field(LNK1, "BPMS:IN20:631:PHI_SEL.A PP") field(LNK2, "BPMS:IN20:631:PHI_SEL.B PP") field(LNK3, "BPMS:IN20:631:PHI_SEL.C PP") field(LNK4, "BPMS:IN20:631:PHI_SEL.D PP") field(LNK5, "BPMS:IN20:631:PHI_SEL.E PP") field(LNK6, "BPMS:IN20:631:PHI_SEL.F PP") field(LNK7, "BPMS:IN20:631:PHI_SEL.G PP") field(LNK8, "BPMS:IN20:631:PHI_SEL.H PP") field(LNK9, "BPMS:IN20:631:PHI_SEL.I PP") field(LNKA, "BPMS:IN20:631:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:631:PHI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:631:PHI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:631:PHI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:631:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:631:PHI_SEL") field(OUTA, "BPMS:IN20:631:CALC.E CA") field(OUTB, "BPMS:IN20:631:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:631:PHI_CTRL") { field(INPA, "BPMS:IN20:631:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:631:PHI_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:631:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:631:PSI") field(DOL2, "BPMS:IN20:631:PSI") field(DOL3, "BPMS:IN20:631:PSI") field(DOL4, "BPMS:IN20:631:PSI") field(DOL5, "BPMS:IN20:631:PSI") field(DOL6, "BPMS:IN20:631:PSI") field(DOL7, "BPMS:IN20:631:PSI") field(DOL8, "BPMS:IN20:631:PSI") field(DOL9, "BPMS:IN20:631:PSI") field(DOLA, "BPMS:IN20:631:PSI") field(LNK1, "BPMS:IN20:631:PSI_SEL.A PP") field(LNK2, "BPMS:IN20:631:PSI_SEL.B PP") field(LNK3, "BPMS:IN20:631:PSI_SEL.C PP") field(LNK4, "BPMS:IN20:631:PSI_SEL.D PP") field(LNK5, "BPMS:IN20:631:PSI_SEL.E PP") field(LNK6, "BPMS:IN20:631:PSI_SEL.F PP") field(LNK7, "BPMS:IN20:631:PSI_SEL.G PP") field(LNK8, "BPMS:IN20:631:PSI_SEL.H PP") field(LNK9, "BPMS:IN20:631:PSI_SEL.I PP") field(LNKA, "BPMS:IN20:631:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:631:PSI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:631:PSI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "90") field(B, "90") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:631:PSI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:631:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:631:PSI_SEL") field(OUTA, "BPMS:IN20:631:CALC.F CA") field(OUTB, "BPMS:IN20:631:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:631:PSI_CTRL") { field(INPA, "BPMS:IN20:631:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:631:PSI_SEL.L PP") } record(longout, "BPMS:IN20:631:PARMSEL") { field(VAL, "0") field(PINI, "YES") } #! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ############################################## # This is the head of the main processing chain # that runs at the highest priority. ############################################## ############################################# # This is the head of the processing chain for # diagnostics. ############################################## record(ai, "BPMS:IN20:651: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, "BPMS:IN20:651:RED") # HOPR for the energy algorithm is determined as follows: # # inf inf # 1) Fourier relation / h^2 dt = / |H|^2 df = 2 B # 0 -inf # # 1a) It can be shown that the maximum of the impuls response # ha is ~ 2 B # # 2) The digitizer produces the numbers # # Ai = 2^s (hi/ha) # # where ha is the maximum of the impuls response # and 2^s is a scale factor. # # 3) 'Energy algorithm' calculates S = sum( Ai^2 ) # # inf # 4) S = (2^s / ha)^2 sum(hi^2) = K sum(hi^2) Dt ~ K / h^2 dt # 0 # # with K = (2^s / ha)^2 fs # # 5) From 4) and 1a) -> S ~ K ha and therefore # # 6) S = 2^(2s) fs/ha = 2^(2s) fs/(2 B) # # 7) The strip signals are sqrt(S); hence HOPR is about # # HOPR ~ 2^s sqrt( fs/2/B ) # # with 2^s = 32768, fs=120MHz, B=10MHz it follows # that HOPR ~ 1E5; we add some margin... field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:651: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, "BPMS:IN20:651:BLU") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:651: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, "BPMS:IN20:651:YLO") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651: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(ao, "BPMS:IN20:651:PINC_ADJ") { field(DESC, "Adjust Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:651:CALC.K PP MS") field(VAL, "0") field(DRVL, "0") field(DRVH, "2") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:IN20:651:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:651:QSCA.A PP MS") # 5.0E-6 / 1.6E-10 [nC/e-] field(VAL, "31250") field(EGU, "Nel") field(PREC, "3") field(PINI, "YES") info(autosaveFields, "VAL") } # Adjust TMIT scale for AFE attenuation record(calcout, "BPMS:IN20:651:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:IN20:651:ATT1 CP") field(INPC, "BPMS:IN20:651:ATT2 CP") field(CALC, "A*10^((B+C+D)/20)") # use CA link to deposit into TMIT.ASLO so # that TMIT is not forced into linkset # of this record field(OUT, "BPMS:IN20:651:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:IN20:651:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:651:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:651:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:IN20:651:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:651:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:651:ASIM.C PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } # Attenuate charge either by # real attenuator settings or # by fake ones. # If B, C >= 0 then their # values will be used instead # of ATT1, ATT2 record(calcout, "BPMS:IN20:651:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:651:QSIM.ESLO PP") # ATT1SIM puts value into A # set to -1 to use real attenuator settings # and >=0 to use B instead field(B, "-1") # ATT2SIM puts value into C # set to -1 to use real attenuator settings # and >=0 to use D instead field(D, "-1") field(CALC, "10^(((B>=0?B:A)+(D>=0?D:C))/20)") field(PINI, "YES") } record(ao, "BPMS:IN20:651:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:651:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "BPMS:IN20:651:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:IN20:651:RSTA.SEVR MS NPP") field(INPB, "BPMS:IN20:651:TMIT.SEVR MS NPP") field(INPC, "BPMS:IN20:651:Y.SEVR MS NPP") field(INPD, "BPMS:IN20:651:X.SEVR MS NPP") field(INPE, "BPMS:IN20:651:TGRN.SEVR MS NPP") field(INPF, "BPMS:IN20:651:TRED.SEVR MS NPP") field(INPG, "BPMS:IN20:651:TBLU.SEVR MS NPP") field(INPH, "BPMS:IN20:651:TYLO.SEVR MS NPP") field(INPI, "BPMS:IN20:651:GRU.SEVR MS NPP") field(INPJ, "BPMS:IN20:651:GRV.SEVR MS NPP") field(SCAN, "1 second") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:651:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:651:ATTC.B PP") field(DRVL, "-10") field(DRVH, "30") field(LOPR, "-10") field(HOPR, "30") field(EGU, "dB") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:651:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:651:ATTC.C PP") field(DRVL, "-20") field(DRVH, "20") field(LOPR, "-20") field(HOPR, "20") field(EGU, "dB") field(VAL, "40") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } record(calc, "BPMS:IN20:651:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:IN20:651:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:IN20:651:GRU.SEVR MS NPP") field(INPC, "BPMS:IN20:651:GRV.SEVR MS NPP") field(INPD, "BPMS:IN20:651:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:IN20:651:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:IN20:651:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:IN20:651:RED_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:651:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:651:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:651:BLU_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:651:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:651:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:651:YLO_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:651:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:IN20:651:YLO NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(sub, "BPMS:IN20:651:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "3") field(SCAN, "Passive") } record(bo, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C3 S12") field(FLNK, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651:V") } record(ai, "BPMS:IN20:651: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, "BPMS:IN20:651:PINC") } record(ai, "BPMS:IN20:651:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C3 S10") field(SCAN, "Passive") } record(longin, "BPMS:IN20:651: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, "BPMS:IN20:651:RSTA_ALH") } record(calc, "BPMS:IN20:651:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:IN20:651:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:IN20:651:PHI") { field(DESC, "Rot Angle") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "deg") field(PREC, "1") field(LOPR, "-180") field(HOPR, "+180") field(FLNK, "BPMS:IN20:651:PHI_SEQ") } record(ao, "BPMS:IN20:651:PSI") { field(DESC, "Axis Sep. Angle") field(DTYP, "Soft Channel") field(VAL, "90") field(EGU, "deg") field(PREC, "1") field(LOPR, "0") field(HOPR, "+180") field(FLNK, "BPMS:IN20:651:PSI_SEQ") } #record(dfanout, "BPMS:IN20:651:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:IN20:651:USCL PP MS") # field(OUTB, "BPMS:IN20:651:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:IN20:651:UOFF") { field(DESC, "BPM U Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:651:UOFF_SEQ") } record(ao, "BPMS:IN20:651:VOFF") { field(DESC, "BPM V Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:651:VOFF_SEQ") } record(ao, "BPMS:IN20:651:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:651:USCL_SEQ") } record(ao, "BPMS:IN20:651:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:651:VSCL_SEQ") } record(mbbo, "BPMS:IN20:651: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, "BPMS:IN20:651:SIMOFF") info(autosaveFields, "RVAL") } # # Used by higher level software to determine if a PV is in feedback or not. # May also be used by actuator (magnet and RF) IOC applications to # switch output records to "closed_loop" to prevent outside programs from # changing setpoints when an actuator device is in feedback. # record(mbbo, "BPMS:IN20:651:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") field(OMSL, "supervisory") field(VAL, "0") field(ZRVL, "0") field(ONVL, "1") field(TWVL, "2") # Off - this device can be used in feedback but all feedback loops # using it are off. field(ZRST, "Off") # On - this device is being used by one or more feedback loops. field(ONST, "On") # Unavailable - this device is not used by any feedback loop. field(TWST, "Unavailable") info(autosaveFields, "VAL") } # Convenience record holding the MAD name record(stringin, "BPMS:IN20:651:MADN") { field(DESC, "MAD Name") field(VAL, "BPM12") field(PINI, "YES") } record(stringin, "BPM12:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:IN20:651") field(PINI, "YES") } record(ai, "BPMS:IN20:651:X_SLOW") { #alias("BPMS:IN20:651:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:651:X MS") field(FLNK, "BPMS:IN20:651:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:651:Y_SLOW") { #alias("BPMS:IN20:651:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:651:Y NPP MS") field(FLNK, "BPMS:IN20:651:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:651:TMIT_SLOW") { #alias("BPMS:IN20:651:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "BPMS:IN20:651:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "BPMS:IN20:651:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:IN20:651:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:IN20:651:SIMC PP") } record(calcout, "BPMS:IN20:651: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, "BPMS:IN20:651:USCL") field(INPL, "0") } # Switch simulation record BPMS:IN20:651:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:IN20:651:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:651:SIMCSEQ.SELN PP") field(ZRST, "OFF") field(ZRVL, "0x0f") field(ONST, "ON") field(ONVL, "0x1c0") field(TWST, "SOFT") field(TWVL, "0x030") field(MASK, "-1") field(NOBT, "16") field(VAL, "0") field(RVAL, "0x0f") field(PINI, "YES") } record(ao, "BPMS:IN20:651:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:651:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:651:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:651:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:651:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:651:SIM.D PP") field(EGU, "Nel") field(ASLO, "6000") #ESLO is used to add attenuation field(LINR, "LINEAR") field(VAL, "1E9") field(PINI, "YES") field(PREC, "4") field(LOPR, "0") field(HOPR, "1E11") } record(ao, "BPMS:IN20:651:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:651:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:IN20:651:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:651:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:IN20:651: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, "BPMS:IN20:651:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:IN20:651: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, "BPMS:IN20:651: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, "BPMS:IN20:651:MPSIGNRCALC") { field(DESC, "MPS ignore if TMIT too low") field(CALC, "A $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:651:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:651:UOFF") field(DOL2, "BPMS:IN20:651:UOFF") field(DOL3, "BPMS:IN20:651:UOFF") field(DOL4, "BPMS:IN20:651:UOFF") field(DOL5, "BPMS:IN20:651:UOFF") field(DOL6, "BPMS:IN20:651:UOFF") field(DOL7, "BPMS:IN20:651:UOFF") field(DOL8, "BPMS:IN20:651:UOFF") field(DOL9, "BPMS:IN20:651:UOFF") field(DOLA, "BPMS:IN20:651:UOFF") field(LNK1, "BPMS:IN20:651:UOFF_SEL.A PP") field(LNK2, "BPMS:IN20:651:UOFF_SEL.B PP") field(LNK3, "BPMS:IN20:651:UOFF_SEL.C PP") field(LNK4, "BPMS:IN20:651:UOFF_SEL.D PP") field(LNK5, "BPMS:IN20:651:UOFF_SEL.E PP") field(LNK6, "BPMS:IN20:651:UOFF_SEL.F PP") field(LNK7, "BPMS:IN20:651:UOFF_SEL.G PP") field(LNK8, "BPMS:IN20:651:UOFF_SEL.H PP") field(LNK9, "BPMS:IN20:651:UOFF_SEL.I PP") field(LNKA, "BPMS:IN20:651:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:651:UOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:651:UOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:651:UOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:651:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:651:UOFF_SEL") field(OUTA, "BPMS:IN20:651:U.AOFF CA") field(OUTB, "BPMS:IN20:651:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:651:UOFF_CTRL") { field(INPA, "BPMS:IN20:651:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:651:UOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:651:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:651:VOFF") field(DOL2, "BPMS:IN20:651:VOFF") field(DOL3, "BPMS:IN20:651:VOFF") field(DOL4, "BPMS:IN20:651:VOFF") field(DOL5, "BPMS:IN20:651:VOFF") field(DOL6, "BPMS:IN20:651:VOFF") field(DOL7, "BPMS:IN20:651:VOFF") field(DOL8, "BPMS:IN20:651:VOFF") field(DOL9, "BPMS:IN20:651:VOFF") field(DOLA, "BPMS:IN20:651:VOFF") field(LNK1, "BPMS:IN20:651:VOFF_SEL.A PP") field(LNK2, "BPMS:IN20:651:VOFF_SEL.B PP") field(LNK3, "BPMS:IN20:651:VOFF_SEL.C PP") field(LNK4, "BPMS:IN20:651:VOFF_SEL.D PP") field(LNK5, "BPMS:IN20:651:VOFF_SEL.E PP") field(LNK6, "BPMS:IN20:651:VOFF_SEL.F PP") field(LNK7, "BPMS:IN20:651:VOFF_SEL.G PP") field(LNK8, "BPMS:IN20:651:VOFF_SEL.H PP") field(LNK9, "BPMS:IN20:651:VOFF_SEL.I PP") field(LNKA, "BPMS:IN20:651:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:651:VOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:651:VOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:651:VOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:651:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:651:VOFF_SEL") field(OUTA, "BPMS:IN20:651:V.AOFF CA") field(OUTB, "BPMS:IN20:651:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:651:VOFF_CTRL") { field(INPA, "BPMS:IN20:651:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:651:VOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:651:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:651:USCL") field(DOL2, "BPMS:IN20:651:USCL") field(DOL3, "BPMS:IN20:651:USCL") field(DOL4, "BPMS:IN20:651:USCL") field(DOL5, "BPMS:IN20:651:USCL") field(DOL6, "BPMS:IN20:651:USCL") field(DOL7, "BPMS:IN20:651:USCL") field(DOL8, "BPMS:IN20:651:USCL") field(DOL9, "BPMS:IN20:651:USCL") field(DOLA, "BPMS:IN20:651:USCL") field(LNK1, "BPMS:IN20:651:USCL_SEL.A PP") field(LNK2, "BPMS:IN20:651:USCL_SEL.B PP") field(LNK3, "BPMS:IN20:651:USCL_SEL.C PP") field(LNK4, "BPMS:IN20:651:USCL_SEL.D PP") field(LNK5, "BPMS:IN20:651:USCL_SEL.E PP") field(LNK6, "BPMS:IN20:651:USCL_SEL.F PP") field(LNK7, "BPMS:IN20:651:USCL_SEL.G PP") field(LNK8, "BPMS:IN20:651:USCL_SEL.H PP") field(LNK9, "BPMS:IN20:651:USCL_SEL.I PP") field(LNKA, "BPMS:IN20:651:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:651:USCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:651:USCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:651:USCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:651:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:651:USCL_SEL") field(OUTA, "BPMS:IN20:651:U.ASLO CA") field(OUTB, "BPMS:IN20:651:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:651:USCL_CTRL") { field(INPA, "BPMS:IN20:651:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:651:USCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:651:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:651:VSCL") field(DOL2, "BPMS:IN20:651:VSCL") field(DOL3, "BPMS:IN20:651:VSCL") field(DOL4, "BPMS:IN20:651:VSCL") field(DOL5, "BPMS:IN20:651:VSCL") field(DOL6, "BPMS:IN20:651:VSCL") field(DOL7, "BPMS:IN20:651:VSCL") field(DOL8, "BPMS:IN20:651:VSCL") field(DOL9, "BPMS:IN20:651:VSCL") field(DOLA, "BPMS:IN20:651:VSCL") field(LNK1, "BPMS:IN20:651:VSCL_SEL.A PP") field(LNK2, "BPMS:IN20:651:VSCL_SEL.B PP") field(LNK3, "BPMS:IN20:651:VSCL_SEL.C PP") field(LNK4, "BPMS:IN20:651:VSCL_SEL.D PP") field(LNK5, "BPMS:IN20:651:VSCL_SEL.E PP") field(LNK6, "BPMS:IN20:651:VSCL_SEL.F PP") field(LNK7, "BPMS:IN20:651:VSCL_SEL.G PP") field(LNK8, "BPMS:IN20:651:VSCL_SEL.H PP") field(LNK9, "BPMS:IN20:651:VSCL_SEL.I PP") field(LNKA, "BPMS:IN20:651:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:651:VSCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:651:VSCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:651:VSCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:651:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:651:VSCL_SEL") field(OUTA, "BPMS:IN20:651:V.ASLO CA") field(OUTB, "BPMS:IN20:651:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:651:VSCL_CTRL") { field(INPA, "BPMS:IN20:651:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:651:VSCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:651:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:651:PHI") field(DOL2, "BPMS:IN20:651:PHI") field(DOL3, "BPMS:IN20:651:PHI") field(DOL4, "BPMS:IN20:651:PHI") field(DOL5, "BPMS:IN20:651:PHI") field(DOL6, "BPMS:IN20:651:PHI") field(DOL7, "BPMS:IN20:651:PHI") field(DOL8, "BPMS:IN20:651:PHI") field(DOL9, "BPMS:IN20:651:PHI") field(DOLA, "BPMS:IN20:651:PHI") field(LNK1, "BPMS:IN20:651:PHI_SEL.A PP") field(LNK2, "BPMS:IN20:651:PHI_SEL.B PP") field(LNK3, "BPMS:IN20:651:PHI_SEL.C PP") field(LNK4, "BPMS:IN20:651:PHI_SEL.D PP") field(LNK5, "BPMS:IN20:651:PHI_SEL.E PP") field(LNK6, "BPMS:IN20:651:PHI_SEL.F PP") field(LNK7, "BPMS:IN20:651:PHI_SEL.G PP") field(LNK8, "BPMS:IN20:651:PHI_SEL.H PP") field(LNK9, "BPMS:IN20:651:PHI_SEL.I PP") field(LNKA, "BPMS:IN20:651:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:651:PHI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:651:PHI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:651:PHI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:651:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:651:PHI_SEL") field(OUTA, "BPMS:IN20:651:CALC.E CA") field(OUTB, "BPMS:IN20:651:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:651:PHI_CTRL") { field(INPA, "BPMS:IN20:651:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:651:PHI_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:651:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:651:PSI") field(DOL2, "BPMS:IN20:651:PSI") field(DOL3, "BPMS:IN20:651:PSI") field(DOL4, "BPMS:IN20:651:PSI") field(DOL5, "BPMS:IN20:651:PSI") field(DOL6, "BPMS:IN20:651:PSI") field(DOL7, "BPMS:IN20:651:PSI") field(DOL8, "BPMS:IN20:651:PSI") field(DOL9, "BPMS:IN20:651:PSI") field(DOLA, "BPMS:IN20:651:PSI") field(LNK1, "BPMS:IN20:651:PSI_SEL.A PP") field(LNK2, "BPMS:IN20:651:PSI_SEL.B PP") field(LNK3, "BPMS:IN20:651:PSI_SEL.C PP") field(LNK4, "BPMS:IN20:651:PSI_SEL.D PP") field(LNK5, "BPMS:IN20:651:PSI_SEL.E PP") field(LNK6, "BPMS:IN20:651:PSI_SEL.F PP") field(LNK7, "BPMS:IN20:651:PSI_SEL.G PP") field(LNK8, "BPMS:IN20:651:PSI_SEL.H PP") field(LNK9, "BPMS:IN20:651:PSI_SEL.I PP") field(LNKA, "BPMS:IN20:651:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:651:PSI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:651:PSI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "90") field(B, "90") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:651:PSI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:651:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:651:PSI_SEL") field(OUTA, "BPMS:IN20:651:CALC.F CA") field(OUTB, "BPMS:IN20:651:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:651:PSI_CTRL") { field(INPA, "BPMS:IN20:651:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:651:PSI_SEL.L PP") } record(longout, "BPMS:IN20:651:PARMSEL") { field(VAL, "0") field(PINI, "YES") } #! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ############################################## # This is the head of the main processing chain # that runs at the highest priority. ############################################## ############################################# # This is the head of the processing chain for # diagnostics. ############################################## record(ai, "BPMS:IN20:731: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, "BPMS:IN20:731:RED") # HOPR for the energy algorithm is determined as follows: # # inf inf # 1) Fourier relation / h^2 dt = / |H|^2 df = 2 B # 0 -inf # # 1a) It can be shown that the maximum of the impuls response # ha is ~ 2 B # # 2) The digitizer produces the numbers # # Ai = 2^s (hi/ha) # # where ha is the maximum of the impuls response # and 2^s is a scale factor. # # 3) 'Energy algorithm' calculates S = sum( Ai^2 ) # # inf # 4) S = (2^s / ha)^2 sum(hi^2) = K sum(hi^2) Dt ~ K / h^2 dt # 0 # # with K = (2^s / ha)^2 fs # # 5) From 4) and 1a) -> S ~ K ha and therefore # # 6) S = 2^(2s) fs/ha = 2^(2s) fs/(2 B) # # 7) The strip signals are sqrt(S); hence HOPR is about # # HOPR ~ 2^s sqrt( fs/2/B ) # # with 2^s = 32768, fs=120MHz, B=10MHz it follows # that HOPR ~ 1E5; we add some margin... field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:731: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, "BPMS:IN20:731:BLU") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:731: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, "BPMS:IN20:731:YLO") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731: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(ao, "BPMS:IN20:731:PINC_ADJ") { field(DESC, "Adjust Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:731:CALC.K PP MS") field(VAL, "0") field(DRVL, "0") field(DRVH, "2") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:IN20:731:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:731:QSCA.A PP MS") # 5.0E-6 / 1.6E-10 [nC/e-] field(VAL, "31250") field(EGU, "Nel") field(PREC, "3") field(PINI, "YES") info(autosaveFields, "VAL") } # Adjust TMIT scale for AFE attenuation record(calcout, "BPMS:IN20:731:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:IN20:731:ATT1 CP") field(INPC, "BPMS:IN20:731:ATT2 CP") field(CALC, "A*10^((B+C+D)/20)") # use CA link to deposit into TMIT.ASLO so # that TMIT is not forced into linkset # of this record field(OUT, "BPMS:IN20:731:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:IN20:731:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:731:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:731:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:IN20:731:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:731:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:731:ASIM.C PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } # Attenuate charge either by # real attenuator settings or # by fake ones. # If B, C >= 0 then their # values will be used instead # of ATT1, ATT2 record(calcout, "BPMS:IN20:731:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:731:QSIM.ESLO PP") # ATT1SIM puts value into A # set to -1 to use real attenuator settings # and >=0 to use B instead field(B, "-1") # ATT2SIM puts value into C # set to -1 to use real attenuator settings # and >=0 to use D instead field(D, "-1") field(CALC, "10^(((B>=0?B:A)+(D>=0?D:C))/20)") field(PINI, "YES") } record(ao, "BPMS:IN20:731:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:731:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "BPMS:IN20:731:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:IN20:731:RSTA.SEVR MS NPP") field(INPB, "BPMS:IN20:731:TMIT.SEVR MS NPP") field(INPC, "BPMS:IN20:731:Y.SEVR MS NPP") field(INPD, "BPMS:IN20:731:X.SEVR MS NPP") field(INPE, "BPMS:IN20:731:TGRN.SEVR MS NPP") field(INPF, "BPMS:IN20:731:TRED.SEVR MS NPP") field(INPG, "BPMS:IN20:731:TBLU.SEVR MS NPP") field(INPH, "BPMS:IN20:731:TYLO.SEVR MS NPP") field(INPI, "BPMS:IN20:731:GRU.SEVR MS NPP") field(INPJ, "BPMS:IN20:731:GRV.SEVR MS NPP") field(SCAN, "1 second") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:731:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:731:ATTC.B PP") field(DRVL, "-10") field(DRVH, "30") field(LOPR, "-10") field(HOPR, "30") field(EGU, "dB") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:731:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:731:ATTC.C PP") field(DRVL, "-20") field(DRVH, "20") field(LOPR, "-20") field(HOPR, "20") field(EGU, "dB") field(VAL, "40") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } record(calc, "BPMS:IN20:731:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:IN20:731:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:IN20:731:GRU.SEVR MS NPP") field(INPC, "BPMS:IN20:731:GRV.SEVR MS NPP") field(INPD, "BPMS:IN20:731:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:IN20:731:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:IN20:731:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:IN20:731:RED_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:731:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:731:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:731:BLU_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:731:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:731:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:731:YLO_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:731:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:IN20:731:YLO NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(sub, "BPMS:IN20:731:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "4") field(SCAN, "Passive") } record(bo, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C4 S12") field(FLNK, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731:V") } record(ai, "BPMS:IN20:731: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, "BPMS:IN20:731:PINC") } record(ai, "BPMS:IN20:731:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C4 S10") field(SCAN, "Passive") } record(longin, "BPMS:IN20:731: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, "BPMS:IN20:731:RSTA_ALH") } record(calc, "BPMS:IN20:731:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:IN20:731:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:IN20:731:PHI") { field(DESC, "Rot Angle") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "deg") field(PREC, "1") field(LOPR, "-180") field(HOPR, "+180") field(FLNK, "BPMS:IN20:731:PHI_SEQ") } record(ao, "BPMS:IN20:731:PSI") { field(DESC, "Axis Sep. Angle") field(DTYP, "Soft Channel") field(VAL, "90") field(EGU, "deg") field(PREC, "1") field(LOPR, "0") field(HOPR, "+180") field(FLNK, "BPMS:IN20:731:PSI_SEQ") } #record(dfanout, "BPMS:IN20:731:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:IN20:731:USCL PP MS") # field(OUTB, "BPMS:IN20:731:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:IN20:731:UOFF") { field(DESC, "BPM U Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:731:UOFF_SEQ") } record(ao, "BPMS:IN20:731:VOFF") { field(DESC, "BPM V Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:731:VOFF_SEQ") } record(ao, "BPMS:IN20:731:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:731:USCL_SEQ") } record(ao, "BPMS:IN20:731:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:731:VSCL_SEQ") } record(mbbo, "BPMS:IN20:731: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, "BPMS:IN20:731:SIMOFF") info(autosaveFields, "RVAL") } # # Used by higher level software to determine if a PV is in feedback or not. # May also be used by actuator (magnet and RF) IOC applications to # switch output records to "closed_loop" to prevent outside programs from # changing setpoints when an actuator device is in feedback. # record(mbbo, "BPMS:IN20:731:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") field(OMSL, "supervisory") field(VAL, "0") field(ZRVL, "0") field(ONVL, "1") field(TWVL, "2") # Off - this device can be used in feedback but all feedback loops # using it are off. field(ZRST, "Off") # On - this device is being used by one or more feedback loops. field(ONST, "On") # Unavailable - this device is not used by any feedback loop. field(TWST, "Unavailable") info(autosaveFields, "VAL") } # Convenience record holding the MAD name record(stringin, "BPMS:IN20:731:MADN") { field(DESC, "MAD Name") field(VAL, "BPM13") field(PINI, "YES") } record(stringin, "BPM13:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:IN20:731") field(PINI, "YES") } record(ai, "BPMS:IN20:731:X_SLOW") { #alias("BPMS:IN20:731:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:731:X MS") field(FLNK, "BPMS:IN20:731:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:731:Y_SLOW") { #alias("BPMS:IN20:731:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:731:Y NPP MS") field(FLNK, "BPMS:IN20:731:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:731:TMIT_SLOW") { #alias("BPMS:IN20:731:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "BPMS:IN20:731:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "BPMS:IN20:731:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:IN20:731:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:IN20:731:SIMC PP") } record(calcout, "BPMS:IN20:731: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, "BPMS:IN20:731:USCL") field(INPL, "0") } # Switch simulation record BPMS:IN20:731:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:IN20:731:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:731:SIMCSEQ.SELN PP") field(ZRST, "OFF") field(ZRVL, "0x0f") field(ONST, "ON") field(ONVL, "0x1c0") field(TWST, "SOFT") field(TWVL, "0x030") field(MASK, "-1") field(NOBT, "16") field(VAL, "0") field(RVAL, "0x0f") field(PINI, "YES") } record(ao, "BPMS:IN20:731:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:731:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:731:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:731:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:731:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:731:SIM.D PP") field(EGU, "Nel") field(ASLO, "6000") #ESLO is used to add attenuation field(LINR, "LINEAR") field(VAL, "1E9") field(PINI, "YES") field(PREC, "4") field(LOPR, "0") field(HOPR, "1E11") } record(ao, "BPMS:IN20:731:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:731:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:IN20:731:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:731:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:IN20:731: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, "BPMS:IN20:731:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:IN20:731: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, "BPMS:IN20:731: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, "BPMS:IN20:731:MPSIGNRCALC") { field(DESC, "MPS ignore if TMIT too low") field(CALC, "A $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:731:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:731:UOFF") field(DOL2, "BPMS:IN20:731:UOFF") field(DOL3, "BPMS:IN20:731:UOFF") field(DOL4, "BPMS:IN20:731:UOFF") field(DOL5, "BPMS:IN20:731:UOFF") field(DOL6, "BPMS:IN20:731:UOFF") field(DOL7, "BPMS:IN20:731:UOFF") field(DOL8, "BPMS:IN20:731:UOFF") field(DOL9, "BPMS:IN20:731:UOFF") field(DOLA, "BPMS:IN20:731:UOFF") field(LNK1, "BPMS:IN20:731:UOFF_SEL.A PP") field(LNK2, "BPMS:IN20:731:UOFF_SEL.B PP") field(LNK3, "BPMS:IN20:731:UOFF_SEL.C PP") field(LNK4, "BPMS:IN20:731:UOFF_SEL.D PP") field(LNK5, "BPMS:IN20:731:UOFF_SEL.E PP") field(LNK6, "BPMS:IN20:731:UOFF_SEL.F PP") field(LNK7, "BPMS:IN20:731:UOFF_SEL.G PP") field(LNK8, "BPMS:IN20:731:UOFF_SEL.H PP") field(LNK9, "BPMS:IN20:731:UOFF_SEL.I PP") field(LNKA, "BPMS:IN20:731:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:731:UOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:731:UOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:731:UOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:731:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:731:UOFF_SEL") field(OUTA, "BPMS:IN20:731:U.AOFF CA") field(OUTB, "BPMS:IN20:731:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:731:UOFF_CTRL") { field(INPA, "BPMS:IN20:731:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:731:UOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:731:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:731:VOFF") field(DOL2, "BPMS:IN20:731:VOFF") field(DOL3, "BPMS:IN20:731:VOFF") field(DOL4, "BPMS:IN20:731:VOFF") field(DOL5, "BPMS:IN20:731:VOFF") field(DOL6, "BPMS:IN20:731:VOFF") field(DOL7, "BPMS:IN20:731:VOFF") field(DOL8, "BPMS:IN20:731:VOFF") field(DOL9, "BPMS:IN20:731:VOFF") field(DOLA, "BPMS:IN20:731:VOFF") field(LNK1, "BPMS:IN20:731:VOFF_SEL.A PP") field(LNK2, "BPMS:IN20:731:VOFF_SEL.B PP") field(LNK3, "BPMS:IN20:731:VOFF_SEL.C PP") field(LNK4, "BPMS:IN20:731:VOFF_SEL.D PP") field(LNK5, "BPMS:IN20:731:VOFF_SEL.E PP") field(LNK6, "BPMS:IN20:731:VOFF_SEL.F PP") field(LNK7, "BPMS:IN20:731:VOFF_SEL.G PP") field(LNK8, "BPMS:IN20:731:VOFF_SEL.H PP") field(LNK9, "BPMS:IN20:731:VOFF_SEL.I PP") field(LNKA, "BPMS:IN20:731:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:731:VOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:731:VOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:731:VOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:731:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:731:VOFF_SEL") field(OUTA, "BPMS:IN20:731:V.AOFF CA") field(OUTB, "BPMS:IN20:731:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:731:VOFF_CTRL") { field(INPA, "BPMS:IN20:731:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:731:VOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:731:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:731:USCL") field(DOL2, "BPMS:IN20:731:USCL") field(DOL3, "BPMS:IN20:731:USCL") field(DOL4, "BPMS:IN20:731:USCL") field(DOL5, "BPMS:IN20:731:USCL") field(DOL6, "BPMS:IN20:731:USCL") field(DOL7, "BPMS:IN20:731:USCL") field(DOL8, "BPMS:IN20:731:USCL") field(DOL9, "BPMS:IN20:731:USCL") field(DOLA, "BPMS:IN20:731:USCL") field(LNK1, "BPMS:IN20:731:USCL_SEL.A PP") field(LNK2, "BPMS:IN20:731:USCL_SEL.B PP") field(LNK3, "BPMS:IN20:731:USCL_SEL.C PP") field(LNK4, "BPMS:IN20:731:USCL_SEL.D PP") field(LNK5, "BPMS:IN20:731:USCL_SEL.E PP") field(LNK6, "BPMS:IN20:731:USCL_SEL.F PP") field(LNK7, "BPMS:IN20:731:USCL_SEL.G PP") field(LNK8, "BPMS:IN20:731:USCL_SEL.H PP") field(LNK9, "BPMS:IN20:731:USCL_SEL.I PP") field(LNKA, "BPMS:IN20:731:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:731:USCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:731:USCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:731:USCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:731:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:731:USCL_SEL") field(OUTA, "BPMS:IN20:731:U.ASLO CA") field(OUTB, "BPMS:IN20:731:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:731:USCL_CTRL") { field(INPA, "BPMS:IN20:731:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:731:USCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:731:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:731:VSCL") field(DOL2, "BPMS:IN20:731:VSCL") field(DOL3, "BPMS:IN20:731:VSCL") field(DOL4, "BPMS:IN20:731:VSCL") field(DOL5, "BPMS:IN20:731:VSCL") field(DOL6, "BPMS:IN20:731:VSCL") field(DOL7, "BPMS:IN20:731:VSCL") field(DOL8, "BPMS:IN20:731:VSCL") field(DOL9, "BPMS:IN20:731:VSCL") field(DOLA, "BPMS:IN20:731:VSCL") field(LNK1, "BPMS:IN20:731:VSCL_SEL.A PP") field(LNK2, "BPMS:IN20:731:VSCL_SEL.B PP") field(LNK3, "BPMS:IN20:731:VSCL_SEL.C PP") field(LNK4, "BPMS:IN20:731:VSCL_SEL.D PP") field(LNK5, "BPMS:IN20:731:VSCL_SEL.E PP") field(LNK6, "BPMS:IN20:731:VSCL_SEL.F PP") field(LNK7, "BPMS:IN20:731:VSCL_SEL.G PP") field(LNK8, "BPMS:IN20:731:VSCL_SEL.H PP") field(LNK9, "BPMS:IN20:731:VSCL_SEL.I PP") field(LNKA, "BPMS:IN20:731:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:731:VSCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:731:VSCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:731:VSCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:731:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:731:VSCL_SEL") field(OUTA, "BPMS:IN20:731:V.ASLO CA") field(OUTB, "BPMS:IN20:731:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:731:VSCL_CTRL") { field(INPA, "BPMS:IN20:731:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:731:VSCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:731:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:731:PHI") field(DOL2, "BPMS:IN20:731:PHI") field(DOL3, "BPMS:IN20:731:PHI") field(DOL4, "BPMS:IN20:731:PHI") field(DOL5, "BPMS:IN20:731:PHI") field(DOL6, "BPMS:IN20:731:PHI") field(DOL7, "BPMS:IN20:731:PHI") field(DOL8, "BPMS:IN20:731:PHI") field(DOL9, "BPMS:IN20:731:PHI") field(DOLA, "BPMS:IN20:731:PHI") field(LNK1, "BPMS:IN20:731:PHI_SEL.A PP") field(LNK2, "BPMS:IN20:731:PHI_SEL.B PP") field(LNK3, "BPMS:IN20:731:PHI_SEL.C PP") field(LNK4, "BPMS:IN20:731:PHI_SEL.D PP") field(LNK5, "BPMS:IN20:731:PHI_SEL.E PP") field(LNK6, "BPMS:IN20:731:PHI_SEL.F PP") field(LNK7, "BPMS:IN20:731:PHI_SEL.G PP") field(LNK8, "BPMS:IN20:731:PHI_SEL.H PP") field(LNK9, "BPMS:IN20:731:PHI_SEL.I PP") field(LNKA, "BPMS:IN20:731:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:731:PHI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:731:PHI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:731:PHI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:731:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:731:PHI_SEL") field(OUTA, "BPMS:IN20:731:CALC.E CA") field(OUTB, "BPMS:IN20:731:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:731:PHI_CTRL") { field(INPA, "BPMS:IN20:731:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:731:PHI_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:731:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:731:PSI") field(DOL2, "BPMS:IN20:731:PSI") field(DOL3, "BPMS:IN20:731:PSI") field(DOL4, "BPMS:IN20:731:PSI") field(DOL5, "BPMS:IN20:731:PSI") field(DOL6, "BPMS:IN20:731:PSI") field(DOL7, "BPMS:IN20:731:PSI") field(DOL8, "BPMS:IN20:731:PSI") field(DOL9, "BPMS:IN20:731:PSI") field(DOLA, "BPMS:IN20:731:PSI") field(LNK1, "BPMS:IN20:731:PSI_SEL.A PP") field(LNK2, "BPMS:IN20:731:PSI_SEL.B PP") field(LNK3, "BPMS:IN20:731:PSI_SEL.C PP") field(LNK4, "BPMS:IN20:731:PSI_SEL.D PP") field(LNK5, "BPMS:IN20:731:PSI_SEL.E PP") field(LNK6, "BPMS:IN20:731:PSI_SEL.F PP") field(LNK7, "BPMS:IN20:731:PSI_SEL.G PP") field(LNK8, "BPMS:IN20:731:PSI_SEL.H PP") field(LNK9, "BPMS:IN20:731:PSI_SEL.I PP") field(LNKA, "BPMS:IN20:731:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:731:PSI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:731:PSI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "90") field(B, "90") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:731:PSI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:731:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:731:PSI_SEL") field(OUTA, "BPMS:IN20:731:CALC.F CA") field(OUTB, "BPMS:IN20:731:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:731:PSI_CTRL") { field(INPA, "BPMS:IN20:731:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:731:PSI_SEL.L PP") } record(longout, "BPMS:IN20:731:PARMSEL") { field(VAL, "0") field(PINI, "YES") } #! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ############################################## # This is the head of the main processing chain # that runs at the highest priority. ############################################## ############################################# # This is the head of the processing chain for # diagnostics. ############################################## record(ai, "BPMS:IN20:771: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, "BPMS:IN20:771:RED") # HOPR for the energy algorithm is determined as follows: # # inf inf # 1) Fourier relation / h^2 dt = / |H|^2 df = 2 B # 0 -inf # # 1a) It can be shown that the maximum of the impuls response # ha is ~ 2 B # # 2) The digitizer produces the numbers # # Ai = 2^s (hi/ha) # # where ha is the maximum of the impuls response # and 2^s is a scale factor. # # 3) 'Energy algorithm' calculates S = sum( Ai^2 ) # # inf # 4) S = (2^s / ha)^2 sum(hi^2) = K sum(hi^2) Dt ~ K / h^2 dt # 0 # # with K = (2^s / ha)^2 fs # # 5) From 4) and 1a) -> S ~ K ha and therefore # # 6) S = 2^(2s) fs/ha = 2^(2s) fs/(2 B) # # 7) The strip signals are sqrt(S); hence HOPR is about # # HOPR ~ 2^s sqrt( fs/2/B ) # # with 2^s = 32768, fs=120MHz, B=10MHz it follows # that HOPR ~ 1E5; we add some margin... field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:771: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, "BPMS:IN20:771:BLU") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:771: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, "BPMS:IN20:771:YLO") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771: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(ao, "BPMS:IN20:771:PINC_ADJ") { field(DESC, "Adjust Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:771:CALC.K PP MS") field(VAL, "0") field(DRVL, "0") field(DRVH, "2") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:IN20:771:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:771:QSCA.A PP MS") # 5.0E-6 / 1.6E-10 [nC/e-] field(VAL, "31250") field(EGU, "Nel") field(PREC, "3") field(PINI, "YES") info(autosaveFields, "VAL") } # Adjust TMIT scale for AFE attenuation record(calcout, "BPMS:IN20:771:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:IN20:771:ATT1 CP") field(INPC, "BPMS:IN20:771:ATT2 CP") field(CALC, "A*10^((B+C+D)/20)") # use CA link to deposit into TMIT.ASLO so # that TMIT is not forced into linkset # of this record field(OUT, "BPMS:IN20:771:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:IN20:771:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:771:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:771:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:IN20:771:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:771:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:771:ASIM.C PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } # Attenuate charge either by # real attenuator settings or # by fake ones. # If B, C >= 0 then their # values will be used instead # of ATT1, ATT2 record(calcout, "BPMS:IN20:771:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:771:QSIM.ESLO PP") # ATT1SIM puts value into A # set to -1 to use real attenuator settings # and >=0 to use B instead field(B, "-1") # ATT2SIM puts value into C # set to -1 to use real attenuator settings # and >=0 to use D instead field(D, "-1") field(CALC, "10^(((B>=0?B:A)+(D>=0?D:C))/20)") field(PINI, "YES") } record(ao, "BPMS:IN20:771:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:771:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "BPMS:IN20:771:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:IN20:771:RSTA.SEVR MS NPP") field(INPB, "BPMS:IN20:771:TMIT.SEVR MS NPP") field(INPC, "BPMS:IN20:771:Y.SEVR MS NPP") field(INPD, "BPMS:IN20:771:X.SEVR MS NPP") field(INPE, "BPMS:IN20:771:TGRN.SEVR MS NPP") field(INPF, "BPMS:IN20:771:TRED.SEVR MS NPP") field(INPG, "BPMS:IN20:771:TBLU.SEVR MS NPP") field(INPH, "BPMS:IN20:771:TYLO.SEVR MS NPP") field(INPI, "BPMS:IN20:771:GRU.SEVR MS NPP") field(INPJ, "BPMS:IN20:771:GRV.SEVR MS NPP") field(SCAN, "1 second") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:771:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:771:ATTC.B PP") field(DRVL, "-10") field(DRVH, "30") field(LOPR, "-10") field(HOPR, "30") field(EGU, "dB") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:771:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:771:ATTC.C PP") field(DRVL, "-20") field(DRVH, "20") field(LOPR, "-20") field(HOPR, "20") field(EGU, "dB") field(VAL, "40") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } record(calc, "BPMS:IN20:771:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:IN20:771:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:IN20:771:GRU.SEVR MS NPP") field(INPC, "BPMS:IN20:771:GRV.SEVR MS NPP") field(INPD, "BPMS:IN20:771:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:IN20:771:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:IN20:771:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:IN20:771:RED_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:771:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:771:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:771:BLU_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:771:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:771:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:771:YLO_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:771:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:IN20:771:YLO NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(sub, "BPMS:IN20:771:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "5") field(SCAN, "Passive") } record(bo, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C5 S12") field(FLNK, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771:V") } record(ai, "BPMS:IN20:771: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, "BPMS:IN20:771:PINC") } record(ai, "BPMS:IN20:771:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C5 S10") field(SCAN, "Passive") } record(longin, "BPMS:IN20:771: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, "BPMS:IN20:771:RSTA_ALH") } record(calc, "BPMS:IN20:771:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:IN20:771:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:IN20:771:PHI") { field(DESC, "Rot Angle") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "deg") field(PREC, "1") field(LOPR, "-180") field(HOPR, "+180") field(FLNK, "BPMS:IN20:771:PHI_SEQ") } record(ao, "BPMS:IN20:771:PSI") { field(DESC, "Axis Sep. Angle") field(DTYP, "Soft Channel") field(VAL, "90") field(EGU, "deg") field(PREC, "1") field(LOPR, "0") field(HOPR, "+180") field(FLNK, "BPMS:IN20:771:PSI_SEQ") } #record(dfanout, "BPMS:IN20:771:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:IN20:771:USCL PP MS") # field(OUTB, "BPMS:IN20:771:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:IN20:771:UOFF") { field(DESC, "BPM U Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:771:UOFF_SEQ") } record(ao, "BPMS:IN20:771:VOFF") { field(DESC, "BPM V Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:771:VOFF_SEQ") } record(ao, "BPMS:IN20:771:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:771:USCL_SEQ") } record(ao, "BPMS:IN20:771:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:771:VSCL_SEQ") } record(mbbo, "BPMS:IN20:771: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, "BPMS:IN20:771:SIMOFF") info(autosaveFields, "RVAL") } # # Used by higher level software to determine if a PV is in feedback or not. # May also be used by actuator (magnet and RF) IOC applications to # switch output records to "closed_loop" to prevent outside programs from # changing setpoints when an actuator device is in feedback. # record(mbbo, "BPMS:IN20:771:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") field(OMSL, "supervisory") field(VAL, "0") field(ZRVL, "0") field(ONVL, "1") field(TWVL, "2") # Off - this device can be used in feedback but all feedback loops # using it are off. field(ZRST, "Off") # On - this device is being used by one or more feedback loops. field(ONST, "On") # Unavailable - this device is not used by any feedback loop. field(TWST, "Unavailable") info(autosaveFields, "VAL") } # Convenience record holding the MAD name record(stringin, "BPMS:IN20:771:MADN") { field(DESC, "MAD Name") field(VAL, "BPM14") field(PINI, "YES") } record(stringin, "BPM14:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:IN20:771") field(PINI, "YES") } record(ai, "BPMS:IN20:771:X_SLOW") { #alias("BPMS:IN20:771:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:771:X MS") field(FLNK, "BPMS:IN20:771:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:771:Y_SLOW") { #alias("BPMS:IN20:771:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:771:Y NPP MS") field(FLNK, "BPMS:IN20:771:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:771:TMIT_SLOW") { #alias("BPMS:IN20:771:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "BPMS:IN20:771:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "BPMS:IN20:771:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:IN20:771:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:IN20:771:SIMC PP") } record(calcout, "BPMS:IN20:771: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, "BPMS:IN20:771:USCL") field(INPL, "0") } # Switch simulation record BPMS:IN20:771:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:IN20:771:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:771:SIMCSEQ.SELN PP") field(ZRST, "OFF") field(ZRVL, "0x0f") field(ONST, "ON") field(ONVL, "0x1c0") field(TWST, "SOFT") field(TWVL, "0x030") field(MASK, "-1") field(NOBT, "16") field(VAL, "0") field(RVAL, "0x0f") field(PINI, "YES") } record(ao, "BPMS:IN20:771:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:771:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:771:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:771:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:771:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:771:SIM.D PP") field(EGU, "Nel") field(ASLO, "6000") #ESLO is used to add attenuation field(LINR, "LINEAR") field(VAL, "1E9") field(PINI, "YES") field(PREC, "4") field(LOPR, "0") field(HOPR, "1E11") } record(ao, "BPMS:IN20:771:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:771:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:IN20:771:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:771:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:IN20:771: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, "BPMS:IN20:771:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:IN20:771: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, "BPMS:IN20:771: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, "BPMS:IN20:771:MPSIGNRCALC") { field(DESC, "MPS ignore if TMIT too low") field(CALC, "A $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:771:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:771:UOFF") field(DOL2, "BPMS:IN20:771:UOFF") field(DOL3, "BPMS:IN20:771:UOFF") field(DOL4, "BPMS:IN20:771:UOFF") field(DOL5, "BPMS:IN20:771:UOFF") field(DOL6, "BPMS:IN20:771:UOFF") field(DOL7, "BPMS:IN20:771:UOFF") field(DOL8, "BPMS:IN20:771:UOFF") field(DOL9, "BPMS:IN20:771:UOFF") field(DOLA, "BPMS:IN20:771:UOFF") field(LNK1, "BPMS:IN20:771:UOFF_SEL.A PP") field(LNK2, "BPMS:IN20:771:UOFF_SEL.B PP") field(LNK3, "BPMS:IN20:771:UOFF_SEL.C PP") field(LNK4, "BPMS:IN20:771:UOFF_SEL.D PP") field(LNK5, "BPMS:IN20:771:UOFF_SEL.E PP") field(LNK6, "BPMS:IN20:771:UOFF_SEL.F PP") field(LNK7, "BPMS:IN20:771:UOFF_SEL.G PP") field(LNK8, "BPMS:IN20:771:UOFF_SEL.H PP") field(LNK9, "BPMS:IN20:771:UOFF_SEL.I PP") field(LNKA, "BPMS:IN20:771:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:771:UOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:771:UOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:771:UOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:771:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:771:UOFF_SEL") field(OUTA, "BPMS:IN20:771:U.AOFF CA") field(OUTB, "BPMS:IN20:771:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:771:UOFF_CTRL") { field(INPA, "BPMS:IN20:771:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:771:UOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:771:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:771:VOFF") field(DOL2, "BPMS:IN20:771:VOFF") field(DOL3, "BPMS:IN20:771:VOFF") field(DOL4, "BPMS:IN20:771:VOFF") field(DOL5, "BPMS:IN20:771:VOFF") field(DOL6, "BPMS:IN20:771:VOFF") field(DOL7, "BPMS:IN20:771:VOFF") field(DOL8, "BPMS:IN20:771:VOFF") field(DOL9, "BPMS:IN20:771:VOFF") field(DOLA, "BPMS:IN20:771:VOFF") field(LNK1, "BPMS:IN20:771:VOFF_SEL.A PP") field(LNK2, "BPMS:IN20:771:VOFF_SEL.B PP") field(LNK3, "BPMS:IN20:771:VOFF_SEL.C PP") field(LNK4, "BPMS:IN20:771:VOFF_SEL.D PP") field(LNK5, "BPMS:IN20:771:VOFF_SEL.E PP") field(LNK6, "BPMS:IN20:771:VOFF_SEL.F PP") field(LNK7, "BPMS:IN20:771:VOFF_SEL.G PP") field(LNK8, "BPMS:IN20:771:VOFF_SEL.H PP") field(LNK9, "BPMS:IN20:771:VOFF_SEL.I PP") field(LNKA, "BPMS:IN20:771:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:771:VOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:771:VOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:771:VOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:771:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:771:VOFF_SEL") field(OUTA, "BPMS:IN20:771:V.AOFF CA") field(OUTB, "BPMS:IN20:771:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:771:VOFF_CTRL") { field(INPA, "BPMS:IN20:771:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:771:VOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:771:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:771:USCL") field(DOL2, "BPMS:IN20:771:USCL") field(DOL3, "BPMS:IN20:771:USCL") field(DOL4, "BPMS:IN20:771:USCL") field(DOL5, "BPMS:IN20:771:USCL") field(DOL6, "BPMS:IN20:771:USCL") field(DOL7, "BPMS:IN20:771:USCL") field(DOL8, "BPMS:IN20:771:USCL") field(DOL9, "BPMS:IN20:771:USCL") field(DOLA, "BPMS:IN20:771:USCL") field(LNK1, "BPMS:IN20:771:USCL_SEL.A PP") field(LNK2, "BPMS:IN20:771:USCL_SEL.B PP") field(LNK3, "BPMS:IN20:771:USCL_SEL.C PP") field(LNK4, "BPMS:IN20:771:USCL_SEL.D PP") field(LNK5, "BPMS:IN20:771:USCL_SEL.E PP") field(LNK6, "BPMS:IN20:771:USCL_SEL.F PP") field(LNK7, "BPMS:IN20:771:USCL_SEL.G PP") field(LNK8, "BPMS:IN20:771:USCL_SEL.H PP") field(LNK9, "BPMS:IN20:771:USCL_SEL.I PP") field(LNKA, "BPMS:IN20:771:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:771:USCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:771:USCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:771:USCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:771:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:771:USCL_SEL") field(OUTA, "BPMS:IN20:771:U.ASLO CA") field(OUTB, "BPMS:IN20:771:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:771:USCL_CTRL") { field(INPA, "BPMS:IN20:771:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:771:USCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:771:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:771:VSCL") field(DOL2, "BPMS:IN20:771:VSCL") field(DOL3, "BPMS:IN20:771:VSCL") field(DOL4, "BPMS:IN20:771:VSCL") field(DOL5, "BPMS:IN20:771:VSCL") field(DOL6, "BPMS:IN20:771:VSCL") field(DOL7, "BPMS:IN20:771:VSCL") field(DOL8, "BPMS:IN20:771:VSCL") field(DOL9, "BPMS:IN20:771:VSCL") field(DOLA, "BPMS:IN20:771:VSCL") field(LNK1, "BPMS:IN20:771:VSCL_SEL.A PP") field(LNK2, "BPMS:IN20:771:VSCL_SEL.B PP") field(LNK3, "BPMS:IN20:771:VSCL_SEL.C PP") field(LNK4, "BPMS:IN20:771:VSCL_SEL.D PP") field(LNK5, "BPMS:IN20:771:VSCL_SEL.E PP") field(LNK6, "BPMS:IN20:771:VSCL_SEL.F PP") field(LNK7, "BPMS:IN20:771:VSCL_SEL.G PP") field(LNK8, "BPMS:IN20:771:VSCL_SEL.H PP") field(LNK9, "BPMS:IN20:771:VSCL_SEL.I PP") field(LNKA, "BPMS:IN20:771:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:771:VSCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:771:VSCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:771:VSCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:771:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:771:VSCL_SEL") field(OUTA, "BPMS:IN20:771:V.ASLO CA") field(OUTB, "BPMS:IN20:771:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:771:VSCL_CTRL") { field(INPA, "BPMS:IN20:771:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:771:VSCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:771:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:771:PHI") field(DOL2, "BPMS:IN20:771:PHI") field(DOL3, "BPMS:IN20:771:PHI") field(DOL4, "BPMS:IN20:771:PHI") field(DOL5, "BPMS:IN20:771:PHI") field(DOL6, "BPMS:IN20:771:PHI") field(DOL7, "BPMS:IN20:771:PHI") field(DOL8, "BPMS:IN20:771:PHI") field(DOL9, "BPMS:IN20:771:PHI") field(DOLA, "BPMS:IN20:771:PHI") field(LNK1, "BPMS:IN20:771:PHI_SEL.A PP") field(LNK2, "BPMS:IN20:771:PHI_SEL.B PP") field(LNK3, "BPMS:IN20:771:PHI_SEL.C PP") field(LNK4, "BPMS:IN20:771:PHI_SEL.D PP") field(LNK5, "BPMS:IN20:771:PHI_SEL.E PP") field(LNK6, "BPMS:IN20:771:PHI_SEL.F PP") field(LNK7, "BPMS:IN20:771:PHI_SEL.G PP") field(LNK8, "BPMS:IN20:771:PHI_SEL.H PP") field(LNK9, "BPMS:IN20:771:PHI_SEL.I PP") field(LNKA, "BPMS:IN20:771:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:771:PHI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:771:PHI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:771:PHI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:771:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:771:PHI_SEL") field(OUTA, "BPMS:IN20:771:CALC.E CA") field(OUTB, "BPMS:IN20:771:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:771:PHI_CTRL") { field(INPA, "BPMS:IN20:771:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:771:PHI_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:771:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:771:PSI") field(DOL2, "BPMS:IN20:771:PSI") field(DOL3, "BPMS:IN20:771:PSI") field(DOL4, "BPMS:IN20:771:PSI") field(DOL5, "BPMS:IN20:771:PSI") field(DOL6, "BPMS:IN20:771:PSI") field(DOL7, "BPMS:IN20:771:PSI") field(DOL8, "BPMS:IN20:771:PSI") field(DOL9, "BPMS:IN20:771:PSI") field(DOLA, "BPMS:IN20:771:PSI") field(LNK1, "BPMS:IN20:771:PSI_SEL.A PP") field(LNK2, "BPMS:IN20:771:PSI_SEL.B PP") field(LNK3, "BPMS:IN20:771:PSI_SEL.C PP") field(LNK4, "BPMS:IN20:771:PSI_SEL.D PP") field(LNK5, "BPMS:IN20:771:PSI_SEL.E PP") field(LNK6, "BPMS:IN20:771:PSI_SEL.F PP") field(LNK7, "BPMS:IN20:771:PSI_SEL.G PP") field(LNK8, "BPMS:IN20:771:PSI_SEL.H PP") field(LNK9, "BPMS:IN20:771:PSI_SEL.I PP") field(LNKA, "BPMS:IN20:771:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:771:PSI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:771:PSI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "90") field(B, "90") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:771:PSI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:771:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:771:PSI_SEL") field(OUTA, "BPMS:IN20:771:CALC.F CA") field(OUTB, "BPMS:IN20:771:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:771:PSI_CTRL") { field(INPA, "BPMS:IN20:771:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:771:PSI_SEL.L PP") } record(longout, "BPMS:IN20:771:PARMSEL") { field(VAL, "0") field(PINI, "YES") } #! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ############################################## # This is the head of the main processing chain # that runs at the highest priority. ############################################## ############################################# # This is the head of the processing chain for # diagnostics. ############################################## record(ai, "BPMS:IN20:781: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, "BPMS:IN20:781:RED") # HOPR for the energy algorithm is determined as follows: # # inf inf # 1) Fourier relation / h^2 dt = / |H|^2 df = 2 B # 0 -inf # # 1a) It can be shown that the maximum of the impuls response # ha is ~ 2 B # # 2) The digitizer produces the numbers # # Ai = 2^s (hi/ha) # # where ha is the maximum of the impuls response # and 2^s is a scale factor. # # 3) 'Energy algorithm' calculates S = sum( Ai^2 ) # # inf # 4) S = (2^s / ha)^2 sum(hi^2) = K sum(hi^2) Dt ~ K / h^2 dt # 0 # # with K = (2^s / ha)^2 fs # # 5) From 4) and 1a) -> S ~ K ha and therefore # # 6) S = 2^(2s) fs/ha = 2^(2s) fs/(2 B) # # 7) The strip signals are sqrt(S); hence HOPR is about # # HOPR ~ 2^s sqrt( fs/2/B ) # # with 2^s = 32768, fs=120MHz, B=10MHz it follows # that HOPR ~ 1E5; we add some margin... field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:781: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, "BPMS:IN20:781:BLU") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:781: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, "BPMS:IN20:781:YLO") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781: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(ao, "BPMS:IN20:781:PINC_ADJ") { field(DESC, "Adjust Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:781:CALC.K PP MS") field(VAL, "0") field(DRVL, "0") field(DRVH, "2") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:IN20:781:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:781:QSCA.A PP MS") # 5.0E-6 / 1.6E-10 [nC/e-] field(VAL, "31250") field(EGU, "Nel") field(PREC, "3") field(PINI, "YES") info(autosaveFields, "VAL") } # Adjust TMIT scale for AFE attenuation record(calcout, "BPMS:IN20:781:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:IN20:781:ATT1 CP") field(INPC, "BPMS:IN20:781:ATT2 CP") field(CALC, "A*10^((B+C+D)/20)") # use CA link to deposit into TMIT.ASLO so # that TMIT is not forced into linkset # of this record field(OUT, "BPMS:IN20:781:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:IN20:781:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:781:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:781:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:IN20:781:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:781:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:781:ASIM.C PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } # Attenuate charge either by # real attenuator settings or # by fake ones. # If B, C >= 0 then their # values will be used instead # of ATT1, ATT2 record(calcout, "BPMS:IN20:781:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:781:QSIM.ESLO PP") # ATT1SIM puts value into A # set to -1 to use real attenuator settings # and >=0 to use B instead field(B, "-1") # ATT2SIM puts value into C # set to -1 to use real attenuator settings # and >=0 to use D instead field(D, "-1") field(CALC, "10^(((B>=0?B:A)+(D>=0?D:C))/20)") field(PINI, "YES") } record(ao, "BPMS:IN20:781:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:781:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "BPMS:IN20:781:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:IN20:781:RSTA.SEVR MS NPP") field(INPB, "BPMS:IN20:781:TMIT.SEVR MS NPP") field(INPC, "BPMS:IN20:781:Y.SEVR MS NPP") field(INPD, "BPMS:IN20:781:X.SEVR MS NPP") field(INPE, "BPMS:IN20:781:TGRN.SEVR MS NPP") field(INPF, "BPMS:IN20:781:TRED.SEVR MS NPP") field(INPG, "BPMS:IN20:781:TBLU.SEVR MS NPP") field(INPH, "BPMS:IN20:781:TYLO.SEVR MS NPP") field(INPI, "BPMS:IN20:781:GRU.SEVR MS NPP") field(INPJ, "BPMS:IN20:781:GRV.SEVR MS NPP") field(SCAN, "1 second") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:781:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:781:ATTC.B PP") field(DRVL, "-10") field(DRVH, "30") field(LOPR, "-10") field(HOPR, "30") field(EGU, "dB") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:781:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:781:ATTC.C PP") field(DRVL, "-20") field(DRVH, "20") field(LOPR, "-20") field(HOPR, "20") field(EGU, "dB") field(VAL, "40") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } record(calc, "BPMS:IN20:781:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:IN20:781:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:IN20:781:GRU.SEVR MS NPP") field(INPC, "BPMS:IN20:781:GRV.SEVR MS NPP") field(INPD, "BPMS:IN20:781:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:IN20:781:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:IN20:781:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:IN20:781:RED_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:781:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:781:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:781:BLU_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:781:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:781:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:781:YLO_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:781:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:IN20:781:YLO NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(sub, "BPMS:IN20:781:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "6") field(SCAN, "Passive") } record(bo, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C6 S12") field(FLNK, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781:V") } record(ai, "BPMS:IN20:781: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, "BPMS:IN20:781:PINC") } record(ai, "BPMS:IN20:781:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C6 S10") field(SCAN, "Passive") } record(longin, "BPMS:IN20:781: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, "BPMS:IN20:781:RSTA_ALH") } record(calc, "BPMS:IN20:781:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:IN20:781:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:IN20:781:PHI") { field(DESC, "Rot Angle") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "deg") field(PREC, "1") field(LOPR, "-180") field(HOPR, "+180") field(FLNK, "BPMS:IN20:781:PHI_SEQ") } record(ao, "BPMS:IN20:781:PSI") { field(DESC, "Axis Sep. Angle") field(DTYP, "Soft Channel") field(VAL, "90") field(EGU, "deg") field(PREC, "1") field(LOPR, "0") field(HOPR, "+180") field(FLNK, "BPMS:IN20:781:PSI_SEQ") } #record(dfanout, "BPMS:IN20:781:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:IN20:781:USCL PP MS") # field(OUTB, "BPMS:IN20:781:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:IN20:781:UOFF") { field(DESC, "BPM U Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:781:UOFF_SEQ") } record(ao, "BPMS:IN20:781:VOFF") { field(DESC, "BPM V Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:781:VOFF_SEQ") } record(ao, "BPMS:IN20:781:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:781:USCL_SEQ") } record(ao, "BPMS:IN20:781:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:781:VSCL_SEQ") } record(mbbo, "BPMS:IN20:781: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, "BPMS:IN20:781:SIMOFF") info(autosaveFields, "RVAL") } # # Used by higher level software to determine if a PV is in feedback or not. # May also be used by actuator (magnet and RF) IOC applications to # switch output records to "closed_loop" to prevent outside programs from # changing setpoints when an actuator device is in feedback. # record(mbbo, "BPMS:IN20:781:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") field(OMSL, "supervisory") field(VAL, "0") field(ZRVL, "0") field(ONVL, "1") field(TWVL, "2") # Off - this device can be used in feedback but all feedback loops # using it are off. field(ZRST, "Off") # On - this device is being used by one or more feedback loops. field(ONST, "On") # Unavailable - this device is not used by any feedback loop. field(TWST, "Unavailable") info(autosaveFields, "VAL") } # Convenience record holding the MAD name record(stringin, "BPMS:IN20:781:MADN") { field(DESC, "MAD Name") field(VAL, "BPM15") field(PINI, "YES") } record(stringin, "BPM15:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:IN20:781") field(PINI, "YES") } record(ai, "BPMS:IN20:781:X_SLOW") { #alias("BPMS:IN20:781:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:781:X MS") field(FLNK, "BPMS:IN20:781:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:781:Y_SLOW") { #alias("BPMS:IN20:781:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:781:Y NPP MS") field(FLNK, "BPMS:IN20:781:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:781:TMIT_SLOW") { #alias("BPMS:IN20:781:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "BPMS:IN20:781:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "BPMS:IN20:781:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:IN20:781:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:IN20:781:SIMC PP") } record(calcout, "BPMS:IN20:781: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, "BPMS:IN20:781:USCL") field(INPL, "0") } # Switch simulation record BPMS:IN20:781:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:IN20:781:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:781:SIMCSEQ.SELN PP") field(ZRST, "OFF") field(ZRVL, "0x0f") field(ONST, "ON") field(ONVL, "0x1c0") field(TWST, "SOFT") field(TWVL, "0x030") field(MASK, "-1") field(NOBT, "16") field(VAL, "0") field(RVAL, "0x0f") field(PINI, "YES") } record(ao, "BPMS:IN20:781:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:781:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:781:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:781:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:781:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:781:SIM.D PP") field(EGU, "Nel") field(ASLO, "6000") #ESLO is used to add attenuation field(LINR, "LINEAR") field(VAL, "1E9") field(PINI, "YES") field(PREC, "4") field(LOPR, "0") field(HOPR, "1E11") } record(ao, "BPMS:IN20:781:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:781:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:IN20:781:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:781:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:IN20:781: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, "BPMS:IN20:781:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:IN20:781: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, "BPMS:IN20:781: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, "BPMS:IN20:781:MPSIGNRCALC") { field(DESC, "MPS ignore if TMIT too low") field(CALC, "A $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:781:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:781:UOFF") field(DOL2, "BPMS:IN20:781:UOFF") field(DOL3, "BPMS:IN20:781:UOFF") field(DOL4, "BPMS:IN20:781:UOFF") field(DOL5, "BPMS:IN20:781:UOFF") field(DOL6, "BPMS:IN20:781:UOFF") field(DOL7, "BPMS:IN20:781:UOFF") field(DOL8, "BPMS:IN20:781:UOFF") field(DOL9, "BPMS:IN20:781:UOFF") field(DOLA, "BPMS:IN20:781:UOFF") field(LNK1, "BPMS:IN20:781:UOFF_SEL.A PP") field(LNK2, "BPMS:IN20:781:UOFF_SEL.B PP") field(LNK3, "BPMS:IN20:781:UOFF_SEL.C PP") field(LNK4, "BPMS:IN20:781:UOFF_SEL.D PP") field(LNK5, "BPMS:IN20:781:UOFF_SEL.E PP") field(LNK6, "BPMS:IN20:781:UOFF_SEL.F PP") field(LNK7, "BPMS:IN20:781:UOFF_SEL.G PP") field(LNK8, "BPMS:IN20:781:UOFF_SEL.H PP") field(LNK9, "BPMS:IN20:781:UOFF_SEL.I PP") field(LNKA, "BPMS:IN20:781:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:781:UOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:781:UOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:781:UOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:781:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:781:UOFF_SEL") field(OUTA, "BPMS:IN20:781:U.AOFF CA") field(OUTB, "BPMS:IN20:781:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:781:UOFF_CTRL") { field(INPA, "BPMS:IN20:781:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:781:UOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:781:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:781:VOFF") field(DOL2, "BPMS:IN20:781:VOFF") field(DOL3, "BPMS:IN20:781:VOFF") field(DOL4, "BPMS:IN20:781:VOFF") field(DOL5, "BPMS:IN20:781:VOFF") field(DOL6, "BPMS:IN20:781:VOFF") field(DOL7, "BPMS:IN20:781:VOFF") field(DOL8, "BPMS:IN20:781:VOFF") field(DOL9, "BPMS:IN20:781:VOFF") field(DOLA, "BPMS:IN20:781:VOFF") field(LNK1, "BPMS:IN20:781:VOFF_SEL.A PP") field(LNK2, "BPMS:IN20:781:VOFF_SEL.B PP") field(LNK3, "BPMS:IN20:781:VOFF_SEL.C PP") field(LNK4, "BPMS:IN20:781:VOFF_SEL.D PP") field(LNK5, "BPMS:IN20:781:VOFF_SEL.E PP") field(LNK6, "BPMS:IN20:781:VOFF_SEL.F PP") field(LNK7, "BPMS:IN20:781:VOFF_SEL.G PP") field(LNK8, "BPMS:IN20:781:VOFF_SEL.H PP") field(LNK9, "BPMS:IN20:781:VOFF_SEL.I PP") field(LNKA, "BPMS:IN20:781:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:781:VOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:781:VOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:781:VOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:781:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:781:VOFF_SEL") field(OUTA, "BPMS:IN20:781:V.AOFF CA") field(OUTB, "BPMS:IN20:781:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:781:VOFF_CTRL") { field(INPA, "BPMS:IN20:781:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:781:VOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:781:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:781:USCL") field(DOL2, "BPMS:IN20:781:USCL") field(DOL3, "BPMS:IN20:781:USCL") field(DOL4, "BPMS:IN20:781:USCL") field(DOL5, "BPMS:IN20:781:USCL") field(DOL6, "BPMS:IN20:781:USCL") field(DOL7, "BPMS:IN20:781:USCL") field(DOL8, "BPMS:IN20:781:USCL") field(DOL9, "BPMS:IN20:781:USCL") field(DOLA, "BPMS:IN20:781:USCL") field(LNK1, "BPMS:IN20:781:USCL_SEL.A PP") field(LNK2, "BPMS:IN20:781:USCL_SEL.B PP") field(LNK3, "BPMS:IN20:781:USCL_SEL.C PP") field(LNK4, "BPMS:IN20:781:USCL_SEL.D PP") field(LNK5, "BPMS:IN20:781:USCL_SEL.E PP") field(LNK6, "BPMS:IN20:781:USCL_SEL.F PP") field(LNK7, "BPMS:IN20:781:USCL_SEL.G PP") field(LNK8, "BPMS:IN20:781:USCL_SEL.H PP") field(LNK9, "BPMS:IN20:781:USCL_SEL.I PP") field(LNKA, "BPMS:IN20:781:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:781:USCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:781:USCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:781:USCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:781:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:781:USCL_SEL") field(OUTA, "BPMS:IN20:781:U.ASLO CA") field(OUTB, "BPMS:IN20:781:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:781:USCL_CTRL") { field(INPA, "BPMS:IN20:781:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:781:USCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:781:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:781:VSCL") field(DOL2, "BPMS:IN20:781:VSCL") field(DOL3, "BPMS:IN20:781:VSCL") field(DOL4, "BPMS:IN20:781:VSCL") field(DOL5, "BPMS:IN20:781:VSCL") field(DOL6, "BPMS:IN20:781:VSCL") field(DOL7, "BPMS:IN20:781:VSCL") field(DOL8, "BPMS:IN20:781:VSCL") field(DOL9, "BPMS:IN20:781:VSCL") field(DOLA, "BPMS:IN20:781:VSCL") field(LNK1, "BPMS:IN20:781:VSCL_SEL.A PP") field(LNK2, "BPMS:IN20:781:VSCL_SEL.B PP") field(LNK3, "BPMS:IN20:781:VSCL_SEL.C PP") field(LNK4, "BPMS:IN20:781:VSCL_SEL.D PP") field(LNK5, "BPMS:IN20:781:VSCL_SEL.E PP") field(LNK6, "BPMS:IN20:781:VSCL_SEL.F PP") field(LNK7, "BPMS:IN20:781:VSCL_SEL.G PP") field(LNK8, "BPMS:IN20:781:VSCL_SEL.H PP") field(LNK9, "BPMS:IN20:781:VSCL_SEL.I PP") field(LNKA, "BPMS:IN20:781:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:781:VSCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:781:VSCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:781:VSCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:781:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:781:VSCL_SEL") field(OUTA, "BPMS:IN20:781:V.ASLO CA") field(OUTB, "BPMS:IN20:781:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:781:VSCL_CTRL") { field(INPA, "BPMS:IN20:781:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:781:VSCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:781:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:781:PHI") field(DOL2, "BPMS:IN20:781:PHI") field(DOL3, "BPMS:IN20:781:PHI") field(DOL4, "BPMS:IN20:781:PHI") field(DOL5, "BPMS:IN20:781:PHI") field(DOL6, "BPMS:IN20:781:PHI") field(DOL7, "BPMS:IN20:781:PHI") field(DOL8, "BPMS:IN20:781:PHI") field(DOL9, "BPMS:IN20:781:PHI") field(DOLA, "BPMS:IN20:781:PHI") field(LNK1, "BPMS:IN20:781:PHI_SEL.A PP") field(LNK2, "BPMS:IN20:781:PHI_SEL.B PP") field(LNK3, "BPMS:IN20:781:PHI_SEL.C PP") field(LNK4, "BPMS:IN20:781:PHI_SEL.D PP") field(LNK5, "BPMS:IN20:781:PHI_SEL.E PP") field(LNK6, "BPMS:IN20:781:PHI_SEL.F PP") field(LNK7, "BPMS:IN20:781:PHI_SEL.G PP") field(LNK8, "BPMS:IN20:781:PHI_SEL.H PP") field(LNK9, "BPMS:IN20:781:PHI_SEL.I PP") field(LNKA, "BPMS:IN20:781:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:781:PHI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:781:PHI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:781:PHI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:781:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:781:PHI_SEL") field(OUTA, "BPMS:IN20:781:CALC.E CA") field(OUTB, "BPMS:IN20:781:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:781:PHI_CTRL") { field(INPA, "BPMS:IN20:781:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:781:PHI_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:781:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:781:PSI") field(DOL2, "BPMS:IN20:781:PSI") field(DOL3, "BPMS:IN20:781:PSI") field(DOL4, "BPMS:IN20:781:PSI") field(DOL5, "BPMS:IN20:781:PSI") field(DOL6, "BPMS:IN20:781:PSI") field(DOL7, "BPMS:IN20:781:PSI") field(DOL8, "BPMS:IN20:781:PSI") field(DOL9, "BPMS:IN20:781:PSI") field(DOLA, "BPMS:IN20:781:PSI") field(LNK1, "BPMS:IN20:781:PSI_SEL.A PP") field(LNK2, "BPMS:IN20:781:PSI_SEL.B PP") field(LNK3, "BPMS:IN20:781:PSI_SEL.C PP") field(LNK4, "BPMS:IN20:781:PSI_SEL.D PP") field(LNK5, "BPMS:IN20:781:PSI_SEL.E PP") field(LNK6, "BPMS:IN20:781:PSI_SEL.F PP") field(LNK7, "BPMS:IN20:781:PSI_SEL.G PP") field(LNK8, "BPMS:IN20:781:PSI_SEL.H PP") field(LNK9, "BPMS:IN20:781:PSI_SEL.I PP") field(LNKA, "BPMS:IN20:781:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:781:PSI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:781:PSI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "90") field(B, "90") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:781:PSI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:781:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:781:PSI_SEL") field(OUTA, "BPMS:IN20:781:CALC.F CA") field(OUTB, "BPMS:IN20:781:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:781:PSI_CTRL") { field(INPA, "BPMS:IN20:781:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:781:PSI_SEL.L PP") } record(longout, "BPMS:IN20:781:PARMSEL") { field(VAL, "0") field(PINI, "YES") } #! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ############################################## # This is the head of the main processing chain # that runs at the highest priority. ############################################## ############################################# # This is the head of the processing chain for # diagnostics. ############################################## record(ai, "BPMS:IN20:925: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, "BPMS:IN20:925:RED") # HOPR for the energy algorithm is determined as follows: # # inf inf # 1) Fourier relation / h^2 dt = / |H|^2 df = 2 B # 0 -inf # # 1a) It can be shown that the maximum of the impuls response # ha is ~ 2 B # # 2) The digitizer produces the numbers # # Ai = 2^s (hi/ha) # # where ha is the maximum of the impuls response # and 2^s is a scale factor. # # 3) 'Energy algorithm' calculates S = sum( Ai^2 ) # # inf # 4) S = (2^s / ha)^2 sum(hi^2) = K sum(hi^2) Dt ~ K / h^2 dt # 0 # # with K = (2^s / ha)^2 fs # # 5) From 4) and 1a) -> S ~ K ha and therefore # # 6) S = 2^(2s) fs/ha = 2^(2s) fs/(2 B) # # 7) The strip signals are sqrt(S); hence HOPR is about # # HOPR ~ 2^s sqrt( fs/2/B ) # # with 2^s = 32768, fs=120MHz, B=10MHz it follows # that HOPR ~ 1E5; we add some margin... field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:925: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, "BPMS:IN20:925:BLU") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:925: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, "BPMS:IN20:925:YLO") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925: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(ao, "BPMS:IN20:925:PINC_ADJ") { field(DESC, "Adjust Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:925:CALC.K PP MS") field(VAL, "0") field(DRVL, "0") field(DRVH, "2") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:IN20:925:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:925:QSCA.A PP MS") # 5.0E-6 / 1.6E-10 [nC/e-] field(VAL, "31250") field(EGU, "Nel") field(PREC, "3") field(PINI, "YES") info(autosaveFields, "VAL") } # Adjust TMIT scale for AFE attenuation record(calcout, "BPMS:IN20:925:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:IN20:925:ATT1 CP") field(INPC, "BPMS:IN20:925:ATT2 CP") field(CALC, "A*10^((B+C+D)/20)") # use CA link to deposit into TMIT.ASLO so # that TMIT is not forced into linkset # of this record field(OUT, "BPMS:IN20:925:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:IN20:925:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:925:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:925:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:IN20:925:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:925:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:925:ASIM.C PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } # Attenuate charge either by # real attenuator settings or # by fake ones. # If B, C >= 0 then their # values will be used instead # of ATT1, ATT2 record(calcout, "BPMS:IN20:925:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:925:QSIM.ESLO PP") # ATT1SIM puts value into A # set to -1 to use real attenuator settings # and >=0 to use B instead field(B, "-1") # ATT2SIM puts value into C # set to -1 to use real attenuator settings # and >=0 to use D instead field(D, "-1") field(CALC, "10^(((B>=0?B:A)+(D>=0?D:C))/20)") field(PINI, "YES") } record(ao, "BPMS:IN20:925:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:925:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "BPMS:IN20:925:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:IN20:925:RSTA.SEVR MS NPP") field(INPB, "BPMS:IN20:925:TMIT.SEVR MS NPP") field(INPC, "BPMS:IN20:925:Y.SEVR MS NPP") field(INPD, "BPMS:IN20:925:X.SEVR MS NPP") field(INPE, "BPMS:IN20:925:TGRN.SEVR MS NPP") field(INPF, "BPMS:IN20:925:TRED.SEVR MS NPP") field(INPG, "BPMS:IN20:925:TBLU.SEVR MS NPP") field(INPH, "BPMS:IN20:925:TYLO.SEVR MS NPP") field(INPI, "BPMS:IN20:925:GRU.SEVR MS NPP") field(INPJ, "BPMS:IN20:925:GRV.SEVR MS NPP") field(SCAN, "1 second") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:925:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:925:ATTC.B PP") field(DRVL, "-10") field(DRVH, "30") field(LOPR, "-10") field(HOPR, "30") field(EGU, "dB") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:925:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:925:ATTC.C PP") field(DRVL, "-20") field(DRVH, "20") field(LOPR, "-20") field(HOPR, "20") field(EGU, "dB") field(VAL, "40") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } record(calc, "BPMS:IN20:925:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:IN20:925:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:IN20:925:GRU.SEVR MS NPP") field(INPC, "BPMS:IN20:925:GRV.SEVR MS NPP") field(INPD, "BPMS:IN20:925:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:IN20:925:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:IN20:925:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:IN20:925:RED_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:925:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:925:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:925:BLU_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:925:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:925:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:925:YLO_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:925:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:IN20:925:YLO NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(sub, "BPMS:IN20:925:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "7") field(SCAN, "Passive") } record(bo, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C7 S12") field(FLNK, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925:V") } record(ai, "BPMS:IN20:925: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, "BPMS:IN20:925:PINC") } record(ai, "BPMS:IN20:925:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C7 S10") field(SCAN, "Passive") } record(longin, "BPMS:IN20:925: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, "BPMS:IN20:925:RSTA_ALH") } record(calc, "BPMS:IN20:925:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:IN20:925:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:IN20:925:PHI") { field(DESC, "Rot Angle") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "deg") field(PREC, "1") field(LOPR, "-180") field(HOPR, "+180") field(FLNK, "BPMS:IN20:925:PHI_SEQ") } record(ao, "BPMS:IN20:925:PSI") { field(DESC, "Axis Sep. Angle") field(DTYP, "Soft Channel") field(VAL, "90") field(EGU, "deg") field(PREC, "1") field(LOPR, "0") field(HOPR, "+180") field(FLNK, "BPMS:IN20:925:PSI_SEQ") } #record(dfanout, "BPMS:IN20:925:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:IN20:925:USCL PP MS") # field(OUTB, "BPMS:IN20:925:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:IN20:925:UOFF") { field(DESC, "BPM U Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:925:UOFF_SEQ") } record(ao, "BPMS:IN20:925:VOFF") { field(DESC, "BPM V Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:925:VOFF_SEQ") } record(ao, "BPMS:IN20:925:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:925:USCL_SEQ") } record(ao, "BPMS:IN20:925:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:925:VSCL_SEQ") } record(mbbo, "BPMS:IN20:925: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, "BPMS:IN20:925:SIMOFF") info(autosaveFields, "RVAL") } # # Used by higher level software to determine if a PV is in feedback or not. # May also be used by actuator (magnet and RF) IOC applications to # switch output records to "closed_loop" to prevent outside programs from # changing setpoints when an actuator device is in feedback. # record(mbbo, "BPMS:IN20:925:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") field(OMSL, "supervisory") field(VAL, "0") field(ZRVL, "0") field(ONVL, "1") field(TWVL, "2") # Off - this device can be used in feedback but all feedback loops # using it are off. field(ZRST, "Off") # On - this device is being used by one or more feedback loops. field(ONST, "On") # Unavailable - this device is not used by any feedback loop. field(TWST, "Unavailable") info(autosaveFields, "VAL") } # Convenience record holding the MAD name record(stringin, "BPMS:IN20:925:MADN") { field(DESC, "MAD Name") field(VAL, "BPMS1") field(PINI, "YES") } record(stringin, "BPMS1:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:IN20:925") field(PINI, "YES") } record(ai, "BPMS:IN20:925:X_SLOW") { #alias("BPMS:IN20:925:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:925:X MS") field(FLNK, "BPMS:IN20:925:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:925:Y_SLOW") { #alias("BPMS:IN20:925:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:925:Y NPP MS") field(FLNK, "BPMS:IN20:925:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:925:TMIT_SLOW") { #alias("BPMS:IN20:925:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "BPMS:IN20:925:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "BPMS:IN20:925:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:IN20:925:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:IN20:925:SIMC PP") } record(calcout, "BPMS:IN20:925: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, "BPMS:IN20:925:USCL") field(INPL, "0") } # Switch simulation record BPMS:IN20:925:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:IN20:925:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:925:SIMCSEQ.SELN PP") field(ZRST, "OFF") field(ZRVL, "0x0f") field(ONST, "ON") field(ONVL, "0x1c0") field(TWST, "SOFT") field(TWVL, "0x030") field(MASK, "-1") field(NOBT, "16") field(VAL, "0") field(RVAL, "0x0f") field(PINI, "YES") } record(ao, "BPMS:IN20:925:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:925:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:925:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:925:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:925:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:925:SIM.D PP") field(EGU, "Nel") field(ASLO, "6000") #ESLO is used to add attenuation field(LINR, "LINEAR") field(VAL, "1E9") field(PINI, "YES") field(PREC, "4") field(LOPR, "0") field(HOPR, "1E11") } record(ao, "BPMS:IN20:925:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:925:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:IN20:925:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:925:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:IN20:925: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, "BPMS:IN20:925:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:IN20:925: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, "BPMS:IN20:925: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, "BPMS:IN20:925:MPSIGNRCALC") { field(DESC, "MPS ignore if TMIT too low") field(CALC, "A $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:925:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:925:UOFF") field(DOL2, "BPMS:IN20:925:UOFF") field(DOL3, "BPMS:IN20:925:UOFF") field(DOL4, "BPMS:IN20:925:UOFF") field(DOL5, "BPMS:IN20:925:UOFF") field(DOL6, "BPMS:IN20:925:UOFF") field(DOL7, "BPMS:IN20:925:UOFF") field(DOL8, "BPMS:IN20:925:UOFF") field(DOL9, "BPMS:IN20:925:UOFF") field(DOLA, "BPMS:IN20:925:UOFF") field(LNK1, "BPMS:IN20:925:UOFF_SEL.A PP") field(LNK2, "BPMS:IN20:925:UOFF_SEL.B PP") field(LNK3, "BPMS:IN20:925:UOFF_SEL.C PP") field(LNK4, "BPMS:IN20:925:UOFF_SEL.D PP") field(LNK5, "BPMS:IN20:925:UOFF_SEL.E PP") field(LNK6, "BPMS:IN20:925:UOFF_SEL.F PP") field(LNK7, "BPMS:IN20:925:UOFF_SEL.G PP") field(LNK8, "BPMS:IN20:925:UOFF_SEL.H PP") field(LNK9, "BPMS:IN20:925:UOFF_SEL.I PP") field(LNKA, "BPMS:IN20:925:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:925:UOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:925:UOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:925:UOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:925:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:925:UOFF_SEL") field(OUTA, "BPMS:IN20:925:U.AOFF CA") field(OUTB, "BPMS:IN20:925:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:925:UOFF_CTRL") { field(INPA, "BPMS:IN20:925:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:925:UOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:925:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:925:VOFF") field(DOL2, "BPMS:IN20:925:VOFF") field(DOL3, "BPMS:IN20:925:VOFF") field(DOL4, "BPMS:IN20:925:VOFF") field(DOL5, "BPMS:IN20:925:VOFF") field(DOL6, "BPMS:IN20:925:VOFF") field(DOL7, "BPMS:IN20:925:VOFF") field(DOL8, "BPMS:IN20:925:VOFF") field(DOL9, "BPMS:IN20:925:VOFF") field(DOLA, "BPMS:IN20:925:VOFF") field(LNK1, "BPMS:IN20:925:VOFF_SEL.A PP") field(LNK2, "BPMS:IN20:925:VOFF_SEL.B PP") field(LNK3, "BPMS:IN20:925:VOFF_SEL.C PP") field(LNK4, "BPMS:IN20:925:VOFF_SEL.D PP") field(LNK5, "BPMS:IN20:925:VOFF_SEL.E PP") field(LNK6, "BPMS:IN20:925:VOFF_SEL.F PP") field(LNK7, "BPMS:IN20:925:VOFF_SEL.G PP") field(LNK8, "BPMS:IN20:925:VOFF_SEL.H PP") field(LNK9, "BPMS:IN20:925:VOFF_SEL.I PP") field(LNKA, "BPMS:IN20:925:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:925:VOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:925:VOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:925:VOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:925:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:925:VOFF_SEL") field(OUTA, "BPMS:IN20:925:V.AOFF CA") field(OUTB, "BPMS:IN20:925:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:925:VOFF_CTRL") { field(INPA, "BPMS:IN20:925:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:925:VOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:925:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:925:USCL") field(DOL2, "BPMS:IN20:925:USCL") field(DOL3, "BPMS:IN20:925:USCL") field(DOL4, "BPMS:IN20:925:USCL") field(DOL5, "BPMS:IN20:925:USCL") field(DOL6, "BPMS:IN20:925:USCL") field(DOL7, "BPMS:IN20:925:USCL") field(DOL8, "BPMS:IN20:925:USCL") field(DOL9, "BPMS:IN20:925:USCL") field(DOLA, "BPMS:IN20:925:USCL") field(LNK1, "BPMS:IN20:925:USCL_SEL.A PP") field(LNK2, "BPMS:IN20:925:USCL_SEL.B PP") field(LNK3, "BPMS:IN20:925:USCL_SEL.C PP") field(LNK4, "BPMS:IN20:925:USCL_SEL.D PP") field(LNK5, "BPMS:IN20:925:USCL_SEL.E PP") field(LNK6, "BPMS:IN20:925:USCL_SEL.F PP") field(LNK7, "BPMS:IN20:925:USCL_SEL.G PP") field(LNK8, "BPMS:IN20:925:USCL_SEL.H PP") field(LNK9, "BPMS:IN20:925:USCL_SEL.I PP") field(LNKA, "BPMS:IN20:925:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:925:USCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:925:USCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:925:USCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:925:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:925:USCL_SEL") field(OUTA, "BPMS:IN20:925:U.ASLO CA") field(OUTB, "BPMS:IN20:925:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:925:USCL_CTRL") { field(INPA, "BPMS:IN20:925:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:925:USCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:925:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:925:VSCL") field(DOL2, "BPMS:IN20:925:VSCL") field(DOL3, "BPMS:IN20:925:VSCL") field(DOL4, "BPMS:IN20:925:VSCL") field(DOL5, "BPMS:IN20:925:VSCL") field(DOL6, "BPMS:IN20:925:VSCL") field(DOL7, "BPMS:IN20:925:VSCL") field(DOL8, "BPMS:IN20:925:VSCL") field(DOL9, "BPMS:IN20:925:VSCL") field(DOLA, "BPMS:IN20:925:VSCL") field(LNK1, "BPMS:IN20:925:VSCL_SEL.A PP") field(LNK2, "BPMS:IN20:925:VSCL_SEL.B PP") field(LNK3, "BPMS:IN20:925:VSCL_SEL.C PP") field(LNK4, "BPMS:IN20:925:VSCL_SEL.D PP") field(LNK5, "BPMS:IN20:925:VSCL_SEL.E PP") field(LNK6, "BPMS:IN20:925:VSCL_SEL.F PP") field(LNK7, "BPMS:IN20:925:VSCL_SEL.G PP") field(LNK8, "BPMS:IN20:925:VSCL_SEL.H PP") field(LNK9, "BPMS:IN20:925:VSCL_SEL.I PP") field(LNKA, "BPMS:IN20:925:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:925:VSCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:925:VSCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:925:VSCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:925:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:925:VSCL_SEL") field(OUTA, "BPMS:IN20:925:V.ASLO CA") field(OUTB, "BPMS:IN20:925:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:925:VSCL_CTRL") { field(INPA, "BPMS:IN20:925:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:925:VSCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:925:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:925:PHI") field(DOL2, "BPMS:IN20:925:PHI") field(DOL3, "BPMS:IN20:925:PHI") field(DOL4, "BPMS:IN20:925:PHI") field(DOL5, "BPMS:IN20:925:PHI") field(DOL6, "BPMS:IN20:925:PHI") field(DOL7, "BPMS:IN20:925:PHI") field(DOL8, "BPMS:IN20:925:PHI") field(DOL9, "BPMS:IN20:925:PHI") field(DOLA, "BPMS:IN20:925:PHI") field(LNK1, "BPMS:IN20:925:PHI_SEL.A PP") field(LNK2, "BPMS:IN20:925:PHI_SEL.B PP") field(LNK3, "BPMS:IN20:925:PHI_SEL.C PP") field(LNK4, "BPMS:IN20:925:PHI_SEL.D PP") field(LNK5, "BPMS:IN20:925:PHI_SEL.E PP") field(LNK6, "BPMS:IN20:925:PHI_SEL.F PP") field(LNK7, "BPMS:IN20:925:PHI_SEL.G PP") field(LNK8, "BPMS:IN20:925:PHI_SEL.H PP") field(LNK9, "BPMS:IN20:925:PHI_SEL.I PP") field(LNKA, "BPMS:IN20:925:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:925:PHI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:925:PHI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:925:PHI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:925:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:925:PHI_SEL") field(OUTA, "BPMS:IN20:925:CALC.E CA") field(OUTB, "BPMS:IN20:925:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:925:PHI_CTRL") { field(INPA, "BPMS:IN20:925:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:925:PHI_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:925:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:925:PSI") field(DOL2, "BPMS:IN20:925:PSI") field(DOL3, "BPMS:IN20:925:PSI") field(DOL4, "BPMS:IN20:925:PSI") field(DOL5, "BPMS:IN20:925:PSI") field(DOL6, "BPMS:IN20:925:PSI") field(DOL7, "BPMS:IN20:925:PSI") field(DOL8, "BPMS:IN20:925:PSI") field(DOL9, "BPMS:IN20:925:PSI") field(DOLA, "BPMS:IN20:925:PSI") field(LNK1, "BPMS:IN20:925:PSI_SEL.A PP") field(LNK2, "BPMS:IN20:925:PSI_SEL.B PP") field(LNK3, "BPMS:IN20:925:PSI_SEL.C PP") field(LNK4, "BPMS:IN20:925:PSI_SEL.D PP") field(LNK5, "BPMS:IN20:925:PSI_SEL.E PP") field(LNK6, "BPMS:IN20:925:PSI_SEL.F PP") field(LNK7, "BPMS:IN20:925:PSI_SEL.G PP") field(LNK8, "BPMS:IN20:925:PSI_SEL.H PP") field(LNK9, "BPMS:IN20:925:PSI_SEL.I PP") field(LNKA, "BPMS:IN20:925:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:925:PSI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:925:PSI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "90") field(B, "90") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:925:PSI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:925:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:925:PSI_SEL") field(OUTA, "BPMS:IN20:925:CALC.F CA") field(OUTB, "BPMS:IN20:925:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:925:PSI_CTRL") { field(INPA, "BPMS:IN20:925:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:925:PSI_SEL.L PP") } record(longout, "BPMS:IN20:925:PARMSEL") { field(VAL, "0") field(PINI, "YES") } #! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ############################################## # This is the head of the main processing chain # that runs at the highest priority. ############################################## ############################################# # This is the head of the processing chain for # diagnostics. ############################################## record(ai, "BPMS:IN20:945:GRN") { field(DESC, "GRN Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C8 S0") field(EGU, "raw") #TODO set HOPR/LOPR, alarm limits field(SCAN, "I/O Intr") # The priority determines what scan list we are being # put on (see drvPadUdpComm.c) field(PRIO, "LOW") field(FLNK, "BPMS:IN20:945:RED") # HOPR for the energy algorithm is determined as follows: # # inf inf # 1) Fourier relation / h^2 dt = / |H|^2 df = 2 B # 0 -inf # # 1a) It can be shown that the maximum of the impuls response # ha is ~ 2 B # # 2) The digitizer produces the numbers # # Ai = 2^s (hi/ha) # # where ha is the maximum of the impuls response # and 2^s is a scale factor. # # 3) 'Energy algorithm' calculates S = sum( Ai^2 ) # # inf # 4) S = (2^s / ha)^2 sum(hi^2) = K sum(hi^2) Dt ~ K / h^2 dt # 0 # # with K = (2^s / ha)^2 fs # # 5) From 4) and 1a) -> S ~ K ha and therefore # # 6) S = 2^(2s) fs/ha = 2^(2s) fs/(2 B) # # 7) The strip signals are sqrt(S); hence HOPR is about # # HOPR ~ 2^s sqrt( fs/2/B ) # # with 2^s = 32768, fs=120MHz, B=10MHz it follows # that HOPR ~ 1E5; we add some margin... field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:945:RED") { field(DESC, "RED Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C8 S1") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:945:BLU") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:945:BLU") { field(DESC, "BLU Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C8 S2") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:945:YLO") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:945:YLO") { field(DESC, "YLO Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C8 S3") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } ############################################## # Slowly-scanned diagnostics ############################################## # record(waveform, "BPMS:IN20:945:REDW") { field(DESC, "Raw CAL RED Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C8 S1") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "BPMS:IN20:945:GRNW") { field(DESC, "Raw CAL GRN Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C8 S2") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "BPMS:IN20:945:RAWDBG") { field(DESC, "Raw BEAM Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' # do not 'wbscan' for now since e.g., an underrange # condition on the real signal can happen. field(INP, "#C8 S7") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "BPMS:IN20:945:REDDBG") { field(DESC, "Raw CAL RED Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C8 S8 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "BPMS:IN20:945:GRNDBG") { field(DESC, "Raw CAL GRN Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C8 S9 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(ai, "BPMS:IN20:945:GRUV") { field(DESC, "CAL Gain GRN/RED") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C8 S0") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") } record(ai, "BPMS:IN20:945:GRU") { field(DESC, "CAL Gain GRN/BLU") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C8 S1") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "BPMS:IN20:945:GRV") { field(DESC, "CAL Gain RED/YLO") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C8 S2") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "BPMS:IN20:945:TGRN") { field(DESC, "Green arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C8 S4") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:IN20:945:TRED") { field(DESC, "Red arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C8 S5") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:IN20:945:TBLU") { field(DESC, "Blue arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C8 S6") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:IN20:945:TYLO") { field(DESC, "Yellow arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C8 S7") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ao, "BPMS:IN20:945:PINC_ADJ") { field(DESC, "Adjust Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:945:CALC.K PP MS") field(VAL, "0") field(DRVL, "0") field(DRVH, "2") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:IN20:945:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:945:QSCA.A PP MS") # 5.0E-6 / 1.6E-10 [nC/e-] field(VAL, "31250") field(EGU, "Nel") field(PREC, "3") field(PINI, "YES") info(autosaveFields, "VAL") } # Adjust TMIT scale for AFE attenuation record(calcout, "BPMS:IN20:945:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:IN20:945:ATT1 CP") field(INPC, "BPMS:IN20:945:ATT2 CP") field(CALC, "A*10^((B+C+D)/20)") # use CA link to deposit into TMIT.ASLO so # that TMIT is not forced into linkset # of this record field(OUT, "BPMS:IN20:945:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:IN20:945:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:945:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:945:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:IN20:945:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:945:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:945:ASIM.C PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } # Attenuate charge either by # real attenuator settings or # by fake ones. # If B, C >= 0 then their # values will be used instead # of ATT1, ATT2 record(calcout, "BPMS:IN20:945:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:945:QSIM.ESLO PP") # ATT1SIM puts value into A # set to -1 to use real attenuator settings # and >=0 to use B instead field(B, "-1") # ATT2SIM puts value into C # set to -1 to use real attenuator settings # and >=0 to use D instead field(D, "-1") field(CALC, "10^(((B>=0?B:A)+(D>=0?D:C))/20)") field(PINI, "YES") } record(ao, "BPMS:IN20:945:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:945:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "BPMS:IN20:945:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:IN20:945:RSTA.SEVR MS NPP") field(INPB, "BPMS:IN20:945:TMIT.SEVR MS NPP") field(INPC, "BPMS:IN20:945:Y.SEVR MS NPP") field(INPD, "BPMS:IN20:945:X.SEVR MS NPP") field(INPE, "BPMS:IN20:945:TGRN.SEVR MS NPP") field(INPF, "BPMS:IN20:945:TRED.SEVR MS NPP") field(INPG, "BPMS:IN20:945:TBLU.SEVR MS NPP") field(INPH, "BPMS:IN20:945:TYLO.SEVR MS NPP") field(INPI, "BPMS:IN20:945:GRU.SEVR MS NPP") field(INPJ, "BPMS:IN20:945:GRV.SEVR MS NPP") field(SCAN, "1 second") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:945:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:945:ATTC.B PP") field(DRVL, "-10") field(DRVH, "30") field(LOPR, "-10") field(HOPR, "30") field(EGU, "dB") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:945:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:945:ATTC.C PP") field(DRVL, "-20") field(DRVH, "20") field(LOPR, "-20") field(HOPR, "20") field(EGU, "dB") field(VAL, "40") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } record(calc, "BPMS:IN20:945:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:IN20:945:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:IN20:945:GRU.SEVR MS NPP") field(INPC, "BPMS:IN20:945:GRV.SEVR MS NPP") field(INPD, "BPMS:IN20:945:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:IN20:945:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:IN20:945:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:IN20:945:RED_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:945:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:945:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:945:BLU_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:945:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:945:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:945:YLO_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:945:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:IN20:945:YLO NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(sub, "BPMS:IN20:945:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "8") field(SCAN, "Passive") } record(bo, "BPMS:IN20:945:PINC_ENA") { field(DESC, "Simple Pincushion Alg") field(DTYP, "BusAddress") field(OUT, "#C0S2@drvBpmStriplPincEna,m32") field(MASK, "256") field(ZNAM, "DISABLED") field(ONAM, "ENABLED") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } record(ao, "BPMS:IN20:945:UDR_THRES") { field(DESC, "Detection Underrange Threshold") field(DTYP, "Bpm Parameters") field(OUT, "#C8S0") field(EGU, "ADC Ticks") field(DOL, "45.26") field(PINI, "YES") field(DRVL, "0") field(DRVH, "32767") info(autosaveFields, "VAL") } #! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ###################################### # HEAD of main processing chain ###################################### record(ai, "BPMS:IN20:945:X") { field(DESC, "X Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C8 S11") field(SCAN, "I/O Intr") # The priority determines what scan list we are being # put on (see drvPadUdpComm.c) field(PRIO, "HIGH") field(FLNK, "BPMS:IN20:945: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, "BPMS:IN20:945:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C8 S12") field(FLNK, "BPMS:IN20:945: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, "BPMS:IN20:945:TMIT") { field(DESC, "Charge Estimate") field(DTYP, "Raw Bpm Signal") field(INP, "#C8 S13") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") # FLINK into BSA field(FLNK, "BPMS:IN20:945: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, "BPMS:IN20:945:RWAV") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C8 S0") field(SCAN, "I/O Intr") # use LOW or HIGH to end up on the 'diagnostic' # scan list (see drvPadUdpComm.c) field(PRIO, "LOW") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") } record(ai, "BPMS:IN20:945:U") { field(DESC, "Raw U Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C8 S8") field(SCAN, "I/O Intr") # use LOW or HIGH to end up on the 'diagnostic' # scan list (see drvPadUdpComm.c) field(PRIO, "LOW") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "BPMS:IN20:945:V") } record(ai, "BPMS:IN20:945:V") { field(DESC, "Raw V Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C8 S9") field(SCAN, "Passive") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "BPMS:IN20:945:PINC") } record(ai, "BPMS:IN20:945:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C8 S10") field(SCAN, "Passive") } record(longin, "BPMS:IN20:945:RSTA") { field(DESC, "Status of Raw Processor") field(DTYP, "Bpm Raw Status") field(INP, "#C8S0") field(SCAN, "1 second") field(LOLO, "-1") field(HIHI, "+1") field(HHSV, "INVALID") field(LLSV, "INVALID") field(FLNK, "BPMS:IN20:945:RSTA_ALH") } record(calc, "BPMS:IN20:945:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:IN20:945:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:IN20:945:PHI") { field(DESC, "Rot Angle") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "deg") field(PREC, "1") field(LOPR, "-180") field(HOPR, "+180") field(FLNK, "BPMS:IN20:945:PHI_SEQ") } record(ao, "BPMS:IN20:945:PSI") { field(DESC, "Axis Sep. Angle") field(DTYP, "Soft Channel") field(VAL, "90") field(EGU, "deg") field(PREC, "1") field(LOPR, "0") field(HOPR, "+180") field(FLNK, "BPMS:IN20:945:PSI_SEQ") } #record(dfanout, "BPMS:IN20:945:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:IN20:945:USCL PP MS") # field(OUTB, "BPMS:IN20:945:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:IN20:945:UOFF") { field(DESC, "BPM U Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:945:UOFF_SEQ") } record(ao, "BPMS:IN20:945:VOFF") { field(DESC, "BPM V Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:945:VOFF_SEQ") } record(ao, "BPMS:IN20:945:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:945:USCL_SEQ") } record(ao, "BPMS:IN20:945:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:945:VSCL_SEQ") } record(mbbo, "BPMS:IN20:945:ACCESS") { field(DESC, "BPM On Line") field(DTYP, "StreamSwitch") field(OUT, "#C8 S0") field(ZRVL, "1") field(ZRST, "Running") field(ZRSV, "NO_ALARM") field(ONVL, "1") field(ONST, "Maintenance") field(ONSV, "MINOR") field(TWVL, "1") field(TWST, "Test") field(TWSV, "MINOR") field(THVL, "0") field(THST, "OFFLINE") field(THSV, "MAJOR") # set both, rval and val to get it right # regardless of whether devsup does conversion # or not. field(RVAL, "0") field(VAL, "0") field(PINI, "YES") field(FLNK, "BPMS:IN20:945:SIMOFF") info(autosaveFields, "RVAL") } # # Used by higher level software to determine if a PV is in feedback or not. # May also be used by actuator (magnet and RF) IOC applications to # switch output records to "closed_loop" to prevent outside programs from # changing setpoints when an actuator device is in feedback. # record(mbbo, "BPMS:IN20:945:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") field(OMSL, "supervisory") field(VAL, "0") field(ZRVL, "0") field(ONVL, "1") field(TWVL, "2") # Off - this device can be used in feedback but all feedback loops # using it are off. field(ZRST, "Off") # On - this device is being used by one or more feedback loops. field(ONST, "On") # Unavailable - this device is not used by any feedback loop. field(TWST, "Unavailable") info(autosaveFields, "VAL") } # Convenience record holding the MAD name record(stringin, "BPMS:IN20:945:MADN") { field(DESC, "MAD Name") field(VAL, "BPMS2") field(PINI, "YES") } record(stringin, "BPMS2:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:IN20:945") field(PINI, "YES") } record(ai, "BPMS:IN20:945:X_SLOW") { #alias("BPMS:IN20:945:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:945:X MS") field(FLNK, "BPMS:IN20:945:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:945:Y_SLOW") { #alias("BPMS:IN20:945:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:945:Y NPP MS") field(FLNK, "BPMS:IN20:945:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:945:TMIT_SLOW") { #alias("BPMS:IN20:945:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "BPMS:IN20:945:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "BPMS:IN20:945:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:IN20:945:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:IN20:945:SIMC PP") } record(calcout, "BPMS:IN20:945:SIM") { field(DESC, "BPM Pos. Simulation") field(DTYP, "Strip Signal Simulator") field(OUT, "8") #CALC & VAL unused; the real calculation is done # in device support. The reason this is a # calcout rather than sub is that we want # to use the OUT link... field(CALC, "A") field(INPA, "BPMS:IN20:945:USCL") field(INPL, "0") } # Switch simulation record BPMS:IN20:945:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:IN20:945:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:945:SIMCSEQ.SELN PP") field(ZRST, "OFF") field(ZRVL, "0x0f") field(ONST, "ON") field(ONVL, "0x1c0") field(TWST, "SOFT") field(TWVL, "0x030") field(MASK, "-1") field(NOBT, "16") field(VAL, "0") field(RVAL, "0x0f") field(PINI, "YES") } record(ao, "BPMS:IN20:945:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:945:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:945:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:945:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:945:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:945:SIM.D PP") field(EGU, "Nel") field(ASLO, "6000") #ESLO is used to add attenuation field(LINR, "LINEAR") field(VAL, "1E9") field(PINI, "YES") field(PREC, "4") field(LOPR, "0") field(HOPR, "1E11") } record(ao, "BPMS:IN20:945:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:945:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:IN20:945:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:945:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:IN20:945:DIGISIMW") { field(DESC, "VME Digi Sim. Waveform") field(DTYP, "VmeDigi Sim Wav") field(OUT, "#C8 S0") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32678") field(LOPR, "-32768") # 16384 samples/channel * 4 channels field(NELM, "65536") field(PINI, "NO") } #Used by model/database folks to verify BPM record(ao, "BPMS:IN20:945:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:IN20:945:MPSBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C0S2@bpmMPS+0,m32") field(MASK, "256") field(ZNAM, "BYPASSED") field(ONAM, "NOT_BYPASSED") field(ZSV, "MAJOR") field(OSV, "NO_ALARM") field(VAL, "0") field(PINI, "YES") field(ASG, "") info(autosaveFields, "VAL") } record(bo, "BPMS:IN20:945:MPSLTBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C1S2@bpmMPS+0,m32") field(MASK, "256") field(ZNAM, "BYPASSED") field(ONAM, "NOT_BYPASSED") field(ZSV, "NO_ALARM") field(OSV, "NO_ALARM") field(VAL, "0") field(PINI, "YES") field(ASG, "") info(autosaveFields, "VAL") } record(calc, "BPMS:IN20:945:MPSIGNRCALC") { field(DESC, "MPS ignore if TMIT too low") field(CALC, "A $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:945:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:945:UOFF") field(DOL2, "BPMS:IN20:945:UOFF") field(DOL3, "BPMS:IN20:945:UOFF") field(DOL4, "BPMS:IN20:945:UOFF") field(DOL5, "BPMS:IN20:945:UOFF") field(DOL6, "BPMS:IN20:945:UOFF") field(DOL7, "BPMS:IN20:945:UOFF") field(DOL8, "BPMS:IN20:945:UOFF") field(DOL9, "BPMS:IN20:945:UOFF") field(DOLA, "BPMS:IN20:945:UOFF") field(LNK1, "BPMS:IN20:945:UOFF_SEL.A PP") field(LNK2, "BPMS:IN20:945:UOFF_SEL.B PP") field(LNK3, "BPMS:IN20:945:UOFF_SEL.C PP") field(LNK4, "BPMS:IN20:945:UOFF_SEL.D PP") field(LNK5, "BPMS:IN20:945:UOFF_SEL.E PP") field(LNK6, "BPMS:IN20:945:UOFF_SEL.F PP") field(LNK7, "BPMS:IN20:945:UOFF_SEL.G PP") field(LNK8, "BPMS:IN20:945:UOFF_SEL.H PP") field(LNK9, "BPMS:IN20:945:UOFF_SEL.I PP") field(LNKA, "BPMS:IN20:945:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:945:UOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:945:UOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:945:UOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:945:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:945:UOFF_SEL") field(OUTA, "BPMS:IN20:945:U.AOFF CA") field(OUTB, "BPMS:IN20:945:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:945:UOFF_CTRL") { field(INPA, "BPMS:IN20:945:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:945:UOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:945:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:945:VOFF") field(DOL2, "BPMS:IN20:945:VOFF") field(DOL3, "BPMS:IN20:945:VOFF") field(DOL4, "BPMS:IN20:945:VOFF") field(DOL5, "BPMS:IN20:945:VOFF") field(DOL6, "BPMS:IN20:945:VOFF") field(DOL7, "BPMS:IN20:945:VOFF") field(DOL8, "BPMS:IN20:945:VOFF") field(DOL9, "BPMS:IN20:945:VOFF") field(DOLA, "BPMS:IN20:945:VOFF") field(LNK1, "BPMS:IN20:945:VOFF_SEL.A PP") field(LNK2, "BPMS:IN20:945:VOFF_SEL.B PP") field(LNK3, "BPMS:IN20:945:VOFF_SEL.C PP") field(LNK4, "BPMS:IN20:945:VOFF_SEL.D PP") field(LNK5, "BPMS:IN20:945:VOFF_SEL.E PP") field(LNK6, "BPMS:IN20:945:VOFF_SEL.F PP") field(LNK7, "BPMS:IN20:945:VOFF_SEL.G PP") field(LNK8, "BPMS:IN20:945:VOFF_SEL.H PP") field(LNK9, "BPMS:IN20:945:VOFF_SEL.I PP") field(LNKA, "BPMS:IN20:945:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:945:VOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:945:VOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:945:VOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:945:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:945:VOFF_SEL") field(OUTA, "BPMS:IN20:945:V.AOFF CA") field(OUTB, "BPMS:IN20:945:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:945:VOFF_CTRL") { field(INPA, "BPMS:IN20:945:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:945:VOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:945:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:945:USCL") field(DOL2, "BPMS:IN20:945:USCL") field(DOL3, "BPMS:IN20:945:USCL") field(DOL4, "BPMS:IN20:945:USCL") field(DOL5, "BPMS:IN20:945:USCL") field(DOL6, "BPMS:IN20:945:USCL") field(DOL7, "BPMS:IN20:945:USCL") field(DOL8, "BPMS:IN20:945:USCL") field(DOL9, "BPMS:IN20:945:USCL") field(DOLA, "BPMS:IN20:945:USCL") field(LNK1, "BPMS:IN20:945:USCL_SEL.A PP") field(LNK2, "BPMS:IN20:945:USCL_SEL.B PP") field(LNK3, "BPMS:IN20:945:USCL_SEL.C PP") field(LNK4, "BPMS:IN20:945:USCL_SEL.D PP") field(LNK5, "BPMS:IN20:945:USCL_SEL.E PP") field(LNK6, "BPMS:IN20:945:USCL_SEL.F PP") field(LNK7, "BPMS:IN20:945:USCL_SEL.G PP") field(LNK8, "BPMS:IN20:945:USCL_SEL.H PP") field(LNK9, "BPMS:IN20:945:USCL_SEL.I PP") field(LNKA, "BPMS:IN20:945:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:945:USCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:945:USCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:945:USCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:945:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:945:USCL_SEL") field(OUTA, "BPMS:IN20:945:U.ASLO CA") field(OUTB, "BPMS:IN20:945:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:945:USCL_CTRL") { field(INPA, "BPMS:IN20:945:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:945:USCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:945:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:945:VSCL") field(DOL2, "BPMS:IN20:945:VSCL") field(DOL3, "BPMS:IN20:945:VSCL") field(DOL4, "BPMS:IN20:945:VSCL") field(DOL5, "BPMS:IN20:945:VSCL") field(DOL6, "BPMS:IN20:945:VSCL") field(DOL7, "BPMS:IN20:945:VSCL") field(DOL8, "BPMS:IN20:945:VSCL") field(DOL9, "BPMS:IN20:945:VSCL") field(DOLA, "BPMS:IN20:945:VSCL") field(LNK1, "BPMS:IN20:945:VSCL_SEL.A PP") field(LNK2, "BPMS:IN20:945:VSCL_SEL.B PP") field(LNK3, "BPMS:IN20:945:VSCL_SEL.C PP") field(LNK4, "BPMS:IN20:945:VSCL_SEL.D PP") field(LNK5, "BPMS:IN20:945:VSCL_SEL.E PP") field(LNK6, "BPMS:IN20:945:VSCL_SEL.F PP") field(LNK7, "BPMS:IN20:945:VSCL_SEL.G PP") field(LNK8, "BPMS:IN20:945:VSCL_SEL.H PP") field(LNK9, "BPMS:IN20:945:VSCL_SEL.I PP") field(LNKA, "BPMS:IN20:945:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:945:VSCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:945:VSCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:945:VSCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:945:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:945:VSCL_SEL") field(OUTA, "BPMS:IN20:945:V.ASLO CA") field(OUTB, "BPMS:IN20:945:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:945:VSCL_CTRL") { field(INPA, "BPMS:IN20:945:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:945:VSCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:945:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:945:PHI") field(DOL2, "BPMS:IN20:945:PHI") field(DOL3, "BPMS:IN20:945:PHI") field(DOL4, "BPMS:IN20:945:PHI") field(DOL5, "BPMS:IN20:945:PHI") field(DOL6, "BPMS:IN20:945:PHI") field(DOL7, "BPMS:IN20:945:PHI") field(DOL8, "BPMS:IN20:945:PHI") field(DOL9, "BPMS:IN20:945:PHI") field(DOLA, "BPMS:IN20:945:PHI") field(LNK1, "BPMS:IN20:945:PHI_SEL.A PP") field(LNK2, "BPMS:IN20:945:PHI_SEL.B PP") field(LNK3, "BPMS:IN20:945:PHI_SEL.C PP") field(LNK4, "BPMS:IN20:945:PHI_SEL.D PP") field(LNK5, "BPMS:IN20:945:PHI_SEL.E PP") field(LNK6, "BPMS:IN20:945:PHI_SEL.F PP") field(LNK7, "BPMS:IN20:945:PHI_SEL.G PP") field(LNK8, "BPMS:IN20:945:PHI_SEL.H PP") field(LNK9, "BPMS:IN20:945:PHI_SEL.I PP") field(LNKA, "BPMS:IN20:945:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:945:PHI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:945:PHI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:945:PHI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:945:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:945:PHI_SEL") field(OUTA, "BPMS:IN20:945:CALC.E CA") field(OUTB, "BPMS:IN20:945:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:945:PHI_CTRL") { field(INPA, "BPMS:IN20:945:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:945:PHI_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:945:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:945:PSI") field(DOL2, "BPMS:IN20:945:PSI") field(DOL3, "BPMS:IN20:945:PSI") field(DOL4, "BPMS:IN20:945:PSI") field(DOL5, "BPMS:IN20:945:PSI") field(DOL6, "BPMS:IN20:945:PSI") field(DOL7, "BPMS:IN20:945:PSI") field(DOL8, "BPMS:IN20:945:PSI") field(DOL9, "BPMS:IN20:945:PSI") field(DOLA, "BPMS:IN20:945:PSI") field(LNK1, "BPMS:IN20:945:PSI_SEL.A PP") field(LNK2, "BPMS:IN20:945:PSI_SEL.B PP") field(LNK3, "BPMS:IN20:945:PSI_SEL.C PP") field(LNK4, "BPMS:IN20:945:PSI_SEL.D PP") field(LNK5, "BPMS:IN20:945:PSI_SEL.E PP") field(LNK6, "BPMS:IN20:945:PSI_SEL.F PP") field(LNK7, "BPMS:IN20:945:PSI_SEL.G PP") field(LNK8, "BPMS:IN20:945:PSI_SEL.H PP") field(LNK9, "BPMS:IN20:945:PSI_SEL.I PP") field(LNKA, "BPMS:IN20:945:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:945:PSI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:945:PSI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "90") field(B, "90") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:945:PSI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:945:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:945:PSI_SEL") field(OUTA, "BPMS:IN20:945:CALC.F CA") field(OUTB, "BPMS:IN20:945:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:945:PSI_CTRL") { field(INPA, "BPMS:IN20:945:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:945:PSI_SEL.L PP") } record(longout, "BPMS:IN20:945:PARMSEL") { field(VAL, "0") field(PINI, "YES") } #! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ############################################## # This is the head of the main processing chain # that runs at the highest priority. ############################################## ############################################# # This is the head of the processing chain for # diagnostics. ############################################## record(ai, "BPMS:IN20:981:GRN") { field(DESC, "GRN Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C9 S0") field(EGU, "raw") #TODO set HOPR/LOPR, alarm limits field(SCAN, "I/O Intr") # The priority determines what scan list we are being # put on (see drvPadUdpComm.c) field(PRIO, "LOW") field(FLNK, "BPMS:IN20:981:RED") # HOPR for the energy algorithm is determined as follows: # # inf inf # 1) Fourier relation / h^2 dt = / |H|^2 df = 2 B # 0 -inf # # 1a) It can be shown that the maximum of the impuls response # ha is ~ 2 B # # 2) The digitizer produces the numbers # # Ai = 2^s (hi/ha) # # where ha is the maximum of the impuls response # and 2^s is a scale factor. # # 3) 'Energy algorithm' calculates S = sum( Ai^2 ) # # inf # 4) S = (2^s / ha)^2 sum(hi^2) = K sum(hi^2) Dt ~ K / h^2 dt # 0 # # with K = (2^s / ha)^2 fs # # 5) From 4) and 1a) -> S ~ K ha and therefore # # 6) S = 2^(2s) fs/ha = 2^(2s) fs/(2 B) # # 7) The strip signals are sqrt(S); hence HOPR is about # # HOPR ~ 2^s sqrt( fs/2/B ) # # with 2^s = 32768, fs=120MHz, B=10MHz it follows # that HOPR ~ 1E5; we add some margin... field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:981:RED") { field(DESC, "RED Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C9 S1") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:981:BLU") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:981:BLU") { field(DESC, "BLU Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C9 S2") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:981:YLO") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:981:YLO") { field(DESC, "YLO Strip Amplitude") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects strip field(INP, "#C9 S3") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } ############################################## # Slowly-scanned diagnostics ############################################## # record(waveform, "BPMS:IN20:981:REDW") { field(DESC, "Raw CAL RED Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C9 S1") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "BPMS:IN20:981:GRNW") { field(DESC, "Raw CAL GRN Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C9 S2") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "1 second") } record(waveform, "BPMS:IN20:981: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, "#C9 S7") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "BPMS:IN20:981:REDDBG") { field(DESC, "Raw CAL RED Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C9 S8 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(waveform, "BPMS:IN20:981:GRNDBG") { field(DESC, "Raw CAL GRN Dbg") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C9 S9 @wbscan") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") } record(ai, "BPMS:IN20:981:GRUV") { field(DESC, "CAL Gain GRN/RED") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C9 S0") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") } record(ai, "BPMS:IN20:981:GRU") { field(DESC, "CAL Gain GRN/BLU") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C9 S1") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "BPMS:IN20:981:GRV") { field(DESC, "CAL Gain RED/YLO") field(DTYP, "Raw Stripl Calp") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C9 S2") field(SCAN, "10 second") field(PREC, "4") field(LOPR, "0.5") field(HOPR, "1.5") info(autosaveFields, "ASLO") } record(ai, "BPMS:IN20:981: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, "#C9 S4") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:IN20:981: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, "#C9 S5") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:IN20:981: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, "#C9 S6") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ai, "BPMS:IN20:981: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, "#C9 S7") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(ao, "BPMS:IN20:981:PINC_ADJ") { field(DESC, "Adjust Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:981:CALC.K PP MS") field(VAL, "0") field(DRVL, "0") field(DRVH, "2") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:IN20:981:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:981:QSCA.A PP MS") # 5.0E-6 / 1.6E-10 [nC/e-] field(VAL, "31250") field(EGU, "Nel") field(PREC, "3") field(PINI, "YES") info(autosaveFields, "VAL") } # Adjust TMIT scale for AFE attenuation record(calcout, "BPMS:IN20:981:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:IN20:981:ATT1 CP") field(INPC, "BPMS:IN20:981:ATT2 CP") field(CALC, "A*10^((B+C+D)/20)") # use CA link to deposit into TMIT.ASLO so # that TMIT is not forced into linkset # of this record field(OUT, "BPMS:IN20:981:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:IN20:981:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:981:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:981:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:IN20:981:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:IN20:981:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:IN20:981:ASIM.C PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } # Attenuate charge either by # real attenuator settings or # by fake ones. # If B, C >= 0 then their # values will be used instead # of ATT1, ATT2 record(calcout, "BPMS:IN20:981:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:981:QSIM.ESLO PP") # ATT1SIM puts value into A # set to -1 to use real attenuator settings # and >=0 to use B instead field(B, "-1") # ATT2SIM puts value into C # set to -1 to use real attenuator settings # and >=0 to use D instead field(D, "-1") field(CALC, "10^(((B>=0?B:A)+(D>=0?D:C))/20)") field(PINI, "YES") } record(ao, "BPMS:IN20:981:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:981:SIM.G PP") field(VAL, "0.07") field(EGU, "%") field(PINI, "YES") field(PREC, "3") field(LOPR, "0") field(HOPR, "0.25") } record(sel, "BPMS:IN20:981:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:IN20:981:RSTA.SEVR MS NPP") field(INPB, "BPMS:IN20:981:TMIT.SEVR MS NPP") field(INPC, "BPMS:IN20:981:Y.SEVR MS NPP") field(INPD, "BPMS:IN20:981:X.SEVR MS NPP") field(INPE, "BPMS:IN20:981:TGRN.SEVR MS NPP") field(INPF, "BPMS:IN20:981:TRED.SEVR MS NPP") field(INPG, "BPMS:IN20:981:TBLU.SEVR MS NPP") field(INPH, "BPMS:IN20:981:TYLO.SEVR MS NPP") field(INPI, "BPMS:IN20:981:GRU.SEVR MS NPP") field(INPJ, "BPMS:IN20:981:GRV.SEVR MS NPP") field(SCAN, "1 second") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:981:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:981:ATTC.B PP") field(DRVL, "-10") field(DRVH, "30") field(LOPR, "-10") field(HOPR, "30") field(EGU, "dB") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } # This record really belongs on the # PAD IOC. We keep them here however # so we can save/restore. It is more # confusing but shouldn't matter from # an efficiency standpoint (they are # rarely changed). record(longout, "BPMS:IN20:981:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:IN20:981:ATTC.C PP") field(DRVL, "-20") field(DRVH, "20") field(LOPR, "-20") field(HOPR, "20") field(EGU, "dB") field(VAL, "40") field(PINI, "YES") info(autosaveFields, "VAL DRVH HOPR DRVL LOPR") } record(calc, "BPMS:IN20:981:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:IN20:981:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:IN20:981:GRU.SEVR MS NPP") field(INPC, "BPMS:IN20:981:GRV.SEVR MS NPP") field(INPD, "BPMS:IN20:981:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:IN20:981:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:IN20:981:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:IN20:981:RED_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:981:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:981:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:981:BLU_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:981:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:IN20:981:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:IN20:981:YLO_SLOW") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(ai, "BPMS:IN20:981:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:IN20:981:YLO NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") } record(sub, "BPMS:IN20:981:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "9") field(SCAN, "Passive") } record(bo, "BPMS:IN20:981:PINC_ENA") { field(DESC, "Simple Pincushion Alg") field(DTYP, "BusAddress") field(OUT, "#C0S2@drvBpmStriplPincEna,m32") field(MASK, "512") field(ZNAM, "DISABLED") field(ONAM, "ENABLED") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } record(ao, "BPMS:IN20:981:UDR_THRES") { field(DESC, "Detection Underrange Threshold") field(DTYP, "Bpm Parameters") field(OUT, "#C9S0") field(EGU, "ADC Ticks") field(DOL, "45.26") field(PINI, "YES") field(DRVL, "0") field(DRVH, "32767") info(autosaveFields, "VAL") } #! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ###################################### # HEAD of main processing chain ###################################### record(ai, "BPMS:IN20:981:X") { field(DESC, "X Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C9 S11") field(SCAN, "I/O Intr") # The priority determines what scan list we are being # put on (see drvPadUdpComm.c) field(PRIO, "HIGH") field(FLNK, "BPMS:IN20:981: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, "BPMS:IN20:981:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C9 S12") field(FLNK, "BPMS:IN20:981: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, "BPMS:IN20:981:TMIT") { field(DESC, "Charge Estimate") field(DTYP, "Raw Bpm Signal") field(INP, "#C9 S13") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") # FLINK into BSA field(FLNK, "BPMS:IN20:981: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, "BPMS:IN20:981:RWAV") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'calX', 'calY' field(INP, "#C9 S0") field(SCAN, "I/O Intr") # use LOW or HIGH to end up on the 'diagnostic' # scan list (see drvPadUdpComm.c) field(PRIO, "LOW") field(NELM, "512") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") } record(ai, "BPMS:IN20:981:U") { field(DESC, "Raw U Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C9 S8") field(SCAN, "I/O Intr") # use LOW or HIGH to end up on the 'diagnostic' # scan list (see drvPadUdpComm.c) field(PRIO, "LOW") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "BPMS:IN20:981:V") } record(ai, "BPMS:IN20:981:V") { field(DESC, "Raw V Position") field(DTYP, "Raw Bpm Signal") field(INP, "#C9 S9") field(SCAN, "Passive") field(PREC, "5") field(EGU, "mm") field(LOPR, "-0.7") field(HOPR, "+0.7") field(FLNK, "BPMS:IN20:981:PINC") } record(ai, "BPMS:IN20:981:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C9 S10") field(SCAN, "Passive") } record(longin, "BPMS:IN20:981:RSTA") { field(DESC, "Status of Raw Processor") field(DTYP, "Bpm Raw Status") field(INP, "#C9S0") field(SCAN, "1 second") field(LOLO, "-1") field(HIHI, "+1") field(HHSV, "INVALID") field(LLSV, "INVALID") field(FLNK, "BPMS:IN20:981:RSTA_ALH") } record(calc, "BPMS:IN20:981:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:IN20:981:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:IN20:981:PHI") { field(DESC, "Rot Angle") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "deg") field(PREC, "1") field(LOPR, "-180") field(HOPR, "+180") field(FLNK, "BPMS:IN20:981:PHI_SEQ") } record(ao, "BPMS:IN20:981:PSI") { field(DESC, "Axis Sep. Angle") field(DTYP, "Soft Channel") field(VAL, "90") field(EGU, "deg") field(PREC, "1") field(LOPR, "0") field(HOPR, "+180") field(FLNK, "BPMS:IN20:981:PSI_SEQ") } #record(dfanout, "BPMS:IN20:981:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:IN20:981:USCL PP MS") # field(OUTB, "BPMS:IN20:981:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:IN20:981:UOFF") { field(DESC, "BPM U Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:981:UOFF_SEQ") } record(ao, "BPMS:IN20:981:VOFF") { field(DESC, "BPM V Offset") field(DTYP, "Soft Channel") field(VAL, "0") field(EGU, "mm") field(PREC, "4") field(LOPR, "-5") field(HOPR, "+5") field(FLNK, "BPMS:IN20:981:VOFF_SEQ") } record(ao, "BPMS:IN20:981:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:981:USCL_SEQ") } record(ao, "BPMS:IN20:981:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:IN20:981:VSCL_SEQ") } record(mbbo, "BPMS:IN20:981:ACCESS") { field(DESC, "BPM On Line") field(DTYP, "StreamSwitch") field(OUT, "#C9 S0") field(ZRVL, "1") field(ZRST, "Running") field(ZRSV, "NO_ALARM") field(ONVL, "1") field(ONST, "Maintenance") field(ONSV, "MINOR") field(TWVL, "1") field(TWST, "Test") field(TWSV, "MINOR") field(THVL, "0") field(THST, "OFFLINE") field(THSV, "MAJOR") # set both, rval and val to get it right # regardless of whether devsup does conversion # or not. field(RVAL, "0") field(VAL, "0") field(PINI, "YES") field(FLNK, "BPMS:IN20:981:SIMOFF") info(autosaveFields, "RVAL") } # # Used by higher level software to determine if a PV is in feedback or not. # May also be used by actuator (magnet and RF) IOC applications to # switch output records to "closed_loop" to prevent outside programs from # changing setpoints when an actuator device is in feedback. # record(mbbo, "BPMS:IN20:981:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") field(OMSL, "supervisory") field(VAL, "0") field(ZRVL, "0") field(ONVL, "1") field(TWVL, "2") # Off - this device can be used in feedback but all feedback loops # using it are off. field(ZRST, "Off") # On - this device is being used by one or more feedback loops. field(ONST, "On") # Unavailable - this device is not used by any feedback loop. field(TWST, "Unavailable") info(autosaveFields, "VAL") } # Convenience record holding the MAD name record(stringin, "BPMS:IN20:981:MADN") { field(DESC, "MAD Name") field(VAL, "BPMS3") field(PINI, "YES") } record(stringin, "BPMS3:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:IN20:981") field(PINI, "YES") } record(ai, "BPMS:IN20:981:X_SLOW") { #alias("BPMS:IN20:981:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:981:X MS") field(FLNK, "BPMS:IN20:981:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:981:Y_SLOW") { #alias("BPMS:IN20:981:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:IN20:981:Y NPP MS") field(FLNK, "BPMS:IN20:981:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:IN20:981:TMIT_SLOW") { #alias("BPMS:IN20:981:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "BPMS:IN20:981:TMIT NPP MS") field(EGU, "Nel") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") } ###################################### # Simulation Parameters + Control ###################################### # switch off simulation when going off-line record(calcout, "BPMS:IN20:981:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:IN20:981:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:IN20:981:SIMC PP") } record(calcout, "BPMS:IN20:981:SIM") { field(DESC, "BPM Pos. Simulation") field(DTYP, "Strip Signal Simulator") field(OUT, "9") #CALC & VAL unused; the real calculation is done # in device support. The reason this is a # calcout rather than sub is that we want # to use the OUT link... field(CALC, "A") field(INPA, "BPMS:IN20:981:USCL") field(INPL, "0") } # Switch simulation record BPMS:IN20:981:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:IN20:981:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:981:SIMCSEQ.SELN PP") field(ZRST, "OFF") field(ZRVL, "0x0f") field(ONST, "ON") field(ONVL, "0x1c0") field(TWST, "SOFT") field(TWVL, "0x030") field(MASK, "-1") field(NOBT, "16") field(VAL, "0") field(RVAL, "0x0f") field(PINI, "YES") } record(ao, "BPMS:IN20:981:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:981:SIM.B PP") field(VAL, "0.5") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:981:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:981:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:IN20:981:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:IN20:981:SIM.D PP") field(EGU, "Nel") field(ASLO, "6000") #ESLO is used to add attenuation field(LINR, "LINEAR") field(VAL, "1E9") field(PINI, "YES") field(PREC, "4") field(LOPR, "0") field(HOPR, "1E11") } record(ao, "BPMS:IN20:981:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:981:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:IN20:981:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:IN20:981:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:IN20:981:DIGISIMW") { field(DESC, "VME Digi Sim. Waveform") field(DTYP, "VmeDigi Sim Wav") field(OUT, "#C9 S0") field(FTVL, "SHORT") field(EGU, "Counts") field(HOPR, "32678") field(LOPR, "-32768") # 16384 samples/channel * 4 channels field(NELM, "65536") field(PINI, "NO") } #Used by model/database folks to verify BPM record(ao, "BPMS:IN20:981:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:IN20:981:MPSBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C0S2@bpmMPS+0,m32") field(MASK, "512") field(ZNAM, "BYPASSED") field(ONAM, "NOT_BYPASSED") field(ZSV, "MAJOR") field(OSV, "NO_ALARM") field(VAL, "0") field(PINI, "YES") field(ASG, "") info(autosaveFields, "VAL") } record(bo, "BPMS:IN20:981:MPSLTBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C1S2@bpmMPS+0,m32") field(MASK, "512") field(ZNAM, "BYPASSED") field(ONAM, "NOT_BYPASSED") field(ZSV, "NO_ALARM") field(OSV, "NO_ALARM") field(VAL, "0") field(PINI, "YES") field(ASG, "") info(autosaveFields, "VAL") } record(calc, "BPMS:IN20:981:MPSIGNRCALC") { field(DESC, "MPS ignore if TMIT too low") field(CALC, "A $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:981:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:981:UOFF") field(DOL2, "BPMS:IN20:981:UOFF") field(DOL3, "BPMS:IN20:981:UOFF") field(DOL4, "BPMS:IN20:981:UOFF") field(DOL5, "BPMS:IN20:981:UOFF") field(DOL6, "BPMS:IN20:981:UOFF") field(DOL7, "BPMS:IN20:981:UOFF") field(DOL8, "BPMS:IN20:981:UOFF") field(DOL9, "BPMS:IN20:981:UOFF") field(DOLA, "BPMS:IN20:981:UOFF") field(LNK1, "BPMS:IN20:981:UOFF_SEL.A PP") field(LNK2, "BPMS:IN20:981:UOFF_SEL.B PP") field(LNK3, "BPMS:IN20:981:UOFF_SEL.C PP") field(LNK4, "BPMS:IN20:981:UOFF_SEL.D PP") field(LNK5, "BPMS:IN20:981:UOFF_SEL.E PP") field(LNK6, "BPMS:IN20:981:UOFF_SEL.F PP") field(LNK7, "BPMS:IN20:981:UOFF_SEL.G PP") field(LNK8, "BPMS:IN20:981:UOFF_SEL.H PP") field(LNK9, "BPMS:IN20:981:UOFF_SEL.I PP") field(LNKA, "BPMS:IN20:981:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:981:UOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:981:UOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:981:UOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:981:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:981:UOFF_SEL") field(OUTA, "BPMS:IN20:981:U.AOFF CA") field(OUTB, "BPMS:IN20:981:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:981:UOFF_CTRL") { field(INPA, "BPMS:IN20:981:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:981:UOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:981:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:981:VOFF") field(DOL2, "BPMS:IN20:981:VOFF") field(DOL3, "BPMS:IN20:981:VOFF") field(DOL4, "BPMS:IN20:981:VOFF") field(DOL5, "BPMS:IN20:981:VOFF") field(DOL6, "BPMS:IN20:981:VOFF") field(DOL7, "BPMS:IN20:981:VOFF") field(DOL8, "BPMS:IN20:981:VOFF") field(DOL9, "BPMS:IN20:981:VOFF") field(DOLA, "BPMS:IN20:981:VOFF") field(LNK1, "BPMS:IN20:981:VOFF_SEL.A PP") field(LNK2, "BPMS:IN20:981:VOFF_SEL.B PP") field(LNK3, "BPMS:IN20:981:VOFF_SEL.C PP") field(LNK4, "BPMS:IN20:981:VOFF_SEL.D PP") field(LNK5, "BPMS:IN20:981:VOFF_SEL.E PP") field(LNK6, "BPMS:IN20:981:VOFF_SEL.F PP") field(LNK7, "BPMS:IN20:981:VOFF_SEL.G PP") field(LNK8, "BPMS:IN20:981:VOFF_SEL.H PP") field(LNK9, "BPMS:IN20:981:VOFF_SEL.I PP") field(LNKA, "BPMS:IN20:981:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:981:VOFF_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:981:VOFF_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:981:VOFF_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:981:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:981:VOFF_SEL") field(OUTA, "BPMS:IN20:981:V.AOFF CA") field(OUTB, "BPMS:IN20:981:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:981:VOFF_CTRL") { field(INPA, "BPMS:IN20:981:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:981:VOFF_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:981:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:981:USCL") field(DOL2, "BPMS:IN20:981:USCL") field(DOL3, "BPMS:IN20:981:USCL") field(DOL4, "BPMS:IN20:981:USCL") field(DOL5, "BPMS:IN20:981:USCL") field(DOL6, "BPMS:IN20:981:USCL") field(DOL7, "BPMS:IN20:981:USCL") field(DOL8, "BPMS:IN20:981:USCL") field(DOL9, "BPMS:IN20:981:USCL") field(DOLA, "BPMS:IN20:981:USCL") field(LNK1, "BPMS:IN20:981:USCL_SEL.A PP") field(LNK2, "BPMS:IN20:981:USCL_SEL.B PP") field(LNK3, "BPMS:IN20:981:USCL_SEL.C PP") field(LNK4, "BPMS:IN20:981:USCL_SEL.D PP") field(LNK5, "BPMS:IN20:981:USCL_SEL.E PP") field(LNK6, "BPMS:IN20:981:USCL_SEL.F PP") field(LNK7, "BPMS:IN20:981:USCL_SEL.G PP") field(LNK8, "BPMS:IN20:981:USCL_SEL.H PP") field(LNK9, "BPMS:IN20:981:USCL_SEL.I PP") field(LNKA, "BPMS:IN20:981:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:981:USCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:981:USCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:981:USCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:981:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:981:USCL_SEL") field(OUTA, "BPMS:IN20:981:U.ASLO CA") field(OUTB, "BPMS:IN20:981:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:981:USCL_CTRL") { field(INPA, "BPMS:IN20:981:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:981:USCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:981:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:981:VSCL") field(DOL2, "BPMS:IN20:981:VSCL") field(DOL3, "BPMS:IN20:981:VSCL") field(DOL4, "BPMS:IN20:981:VSCL") field(DOL5, "BPMS:IN20:981:VSCL") field(DOL6, "BPMS:IN20:981:VSCL") field(DOL7, "BPMS:IN20:981:VSCL") field(DOL8, "BPMS:IN20:981:VSCL") field(DOL9, "BPMS:IN20:981:VSCL") field(DOLA, "BPMS:IN20:981:VSCL") field(LNK1, "BPMS:IN20:981:VSCL_SEL.A PP") field(LNK2, "BPMS:IN20:981:VSCL_SEL.B PP") field(LNK3, "BPMS:IN20:981:VSCL_SEL.C PP") field(LNK4, "BPMS:IN20:981:VSCL_SEL.D PP") field(LNK5, "BPMS:IN20:981:VSCL_SEL.E PP") field(LNK6, "BPMS:IN20:981:VSCL_SEL.F PP") field(LNK7, "BPMS:IN20:981:VSCL_SEL.G PP") field(LNK8, "BPMS:IN20:981:VSCL_SEL.H PP") field(LNK9, "BPMS:IN20:981:VSCL_SEL.I PP") field(LNKA, "BPMS:IN20:981:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:981:VSCL_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:981:VSCL_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1") field(B, "1") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "4") field(FLNK, "BPMS:IN20:981:VSCL_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:981:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:981:VSCL_SEL") field(OUTA, "BPMS:IN20:981:V.ASLO CA") field(OUTB, "BPMS:IN20:981:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:981:VSCL_CTRL") { field(INPA, "BPMS:IN20:981:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:981:VSCL_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:981:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:981:PHI") field(DOL2, "BPMS:IN20:981:PHI") field(DOL3, "BPMS:IN20:981:PHI") field(DOL4, "BPMS:IN20:981:PHI") field(DOL5, "BPMS:IN20:981:PHI") field(DOL6, "BPMS:IN20:981:PHI") field(DOL7, "BPMS:IN20:981:PHI") field(DOL8, "BPMS:IN20:981:PHI") field(DOL9, "BPMS:IN20:981:PHI") field(DOLA, "BPMS:IN20:981:PHI") field(LNK1, "BPMS:IN20:981:PHI_SEL.A PP") field(LNK2, "BPMS:IN20:981:PHI_SEL.B PP") field(LNK3, "BPMS:IN20:981:PHI_SEL.C PP") field(LNK4, "BPMS:IN20:981:PHI_SEL.D PP") field(LNK5, "BPMS:IN20:981:PHI_SEL.E PP") field(LNK6, "BPMS:IN20:981:PHI_SEL.F PP") field(LNK7, "BPMS:IN20:981:PHI_SEL.G PP") field(LNK8, "BPMS:IN20:981:PHI_SEL.H PP") field(LNK9, "BPMS:IN20:981:PHI_SEL.I PP") field(LNKA, "BPMS:IN20:981:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:981:PHI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:981:PHI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "0") field(B, "0") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:981:PHI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:981:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:981:PHI_SEL") field(OUTA, "BPMS:IN20:981:CALC.E CA") field(OUTB, "BPMS:IN20:981:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:981:PHI_CTRL") { field(INPA, "BPMS:IN20:981:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:981:PHI_SEL.L PP") } # Maintain multiple (up to 10) values of # a parameter: # # Record holding the parameter $[parm] # must FLNK -> $[parm]_SEQ # # Different values of the parameter # $[parm0]..$[parm9] are stored in # $[parm]_SEL.A .. $[parm]_SEL.J # # The actual value of the parameter is # selected based on the value of a controlling # PV $[ctrl] using a 'mapping' CALC expression # $[mapc] to convert the $[ctrl] value into # the integer range 1..10. # # The selected value of $[parm] is written # to output link $[outl] # # A) When the user writes $[parm] then # its value is deposited in the currently # selected field of $[parm]_SEL and # propagated to $[outl] # # B) When the user writes any of $[parm]_SEL.A..J # then the value is stored there. If she # writes to the currently 'active' field\ # (as selected by $[ctrl]) then # the $[parm] PV itself is updated and the # value is also propagated to $[outl] # # C) If the user changes $[ctrl] then the # corresponding value $[parm]_SEL.A..J is # propagated to $[outl] and $[parm]. # # D) At initialization, the value corresponding # to the initial setting of $[ctrl] is written # to $[outl] and $[parm] # # MACROS: # # $[parm] PV holding the parameter # $[ctrl] PV that controls the selection of # the currently active setting of # $[parm] # $[outl] PV where the currently selected # value of $[parm] shall be written-to # (if applicable) # $[prec] Precision of the $[parm]_SEL variable # (should be set to same value as $[parm].PREC) # # $[parm0]..$[parm9] initial values of $[parm] # # $[mapc] CALC expression to convert the value # of the controlling PV which is available # as 'A' to the range 1..10 (or less if # less selections are used). # E.g., to convert the value of a bo (0/1) # you would set mapc to 'A+1' (0..1 -> 1..2) # # NOTE: This sb snippet is loaded/expanded # for every parameter under control # of $[ctrl]. ALSO, the companion # snippet parmCtl.db must be loaded/expanded # but only once per controlling PV. # # This record, when scanned (as a result # of $[parm] being written and processing # its FLNK to this record] fetches $[parm] # and deposits the value into the currently # selected field of the SEL record. # # NOTE: unfortunately, the selection # mechanism of the SEQ and SEL # records differs: SEQ is 1-based, # SEL is 0-based -- now that makes # sense, doesn't it? # record(seq, "BPMS:IN20:981:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:IN20:981:PSI") field(DOL2, "BPMS:IN20:981:PSI") field(DOL3, "BPMS:IN20:981:PSI") field(DOL4, "BPMS:IN20:981:PSI") field(DOL5, "BPMS:IN20:981:PSI") field(DOL6, "BPMS:IN20:981:PSI") field(DOL7, "BPMS:IN20:981:PSI") field(DOL8, "BPMS:IN20:981:PSI") field(DOL9, "BPMS:IN20:981:PSI") field(DOLA, "BPMS:IN20:981:PSI") field(LNK1, "BPMS:IN20:981:PSI_SEL.A PP") field(LNK2, "BPMS:IN20:981:PSI_SEL.B PP") field(LNK3, "BPMS:IN20:981:PSI_SEL.C PP") field(LNK4, "BPMS:IN20:981:PSI_SEL.D PP") field(LNK5, "BPMS:IN20:981:PSI_SEL.E PP") field(LNK6, "BPMS:IN20:981:PSI_SEL.F PP") field(LNK7, "BPMS:IN20:981:PSI_SEL.G PP") field(LNK8, "BPMS:IN20:981:PSI_SEL.H PP") field(LNK9, "BPMS:IN20:981:PSI_SEL.I PP") field(LNKA, "BPMS:IN20:981:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:IN20:981:PSI_CTRL NPP NMS") } # The $[parm]_SEL record holds all possible # values of $[parm] in the 'A..J' fields. # # When processed it updates it's own VAL # to the currently selected input. Input # 'L' serves as the (1-based) selector, # i.e., L==1 selects 'A'->'VAL'. # # When the selected value changes (as a # result of SEQ depositing a new value OR # $[ctrl] changing and updating L) then # the propagator record attached to the # FLNK is processed. # record(sub, "BPMS:IN20:981:PSI_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "90") field(B, "90") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:IN20:981:PSI_PROP") info(autosaveFields, "A B C D E F G H I J") } # # Finally the dfanout record # fetches the currently selected # value from SEL and propagates it # to $[outl]. It also updates # $[parm] itself so that $[parm] # always reflects the currently # selected value. # record(dfanout, "BPMS:IN20:981:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:IN20:981:PSI_SEL") field(OUTA, "BPMS:IN20:981:CALC.F CA") field(OUTB, "BPMS:IN20:981:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:IN20:981:PSI_CTRL") { field(INPA, "BPMS:IN20:981:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:IN20:981:PSI_SEL.L PP") } record(longout, "BPMS:IN20:981:PARMSEL") { field(VAL, "0") field(PINI, "YES") } # per IOC database for stripline BPMs #record(sub, "IOC:IN20:BP02:FIDP") { # field(DESC, "BPM Fiducial Processing") # field(SNAM, "bpmEvrFidProcess") # #This tells us if there is beam during this cycle... # field(INPA, "IOC:IN20:BP02:MODIFIER5.R") #} #record(mbbo, "IOC:IN20:BP02:PATTERNSIM") { # field(DESC, "Pattern Simulation") # field(ZRST, "Off") # field(ONST, "Soft") # field(TWST, "Raw") # field(DOL, "0") # field(PINI, "YES") #} record(sub, "IOC:IN20:BP02:EVTM") { field(SNAM, "subEventTestTiming") field(SCAN, "Event") field(EVNT, "40") }