#! 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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110:TYLO") { field(DESC, "Yellow arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C0 S7") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(bo, "BPMS:LTU0:110:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:110:CALC.K NPP MS") field(ZNAM, "Off") field(ONAM, "On") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:LTU0:110:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:110: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:LTU0:110:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:LTU0:110:ATT1 CP") field(INPC, "BPMS:LTU0:110: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:LTU0:110:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:LTU0:110:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:LTU0:110:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:LTU0:110:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:LTU0:110:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:LTU0:110:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:LTU0:110: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:LTU0:110:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:110: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:LTU0:110:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:110: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:LTU0:110:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:LTU0:110:RSTA.SEVR MS NPP") field(INPB, "BPMS:LTU0:110:TMIT.SEVR MS NPP") field(INPC, "BPMS:LTU0:110:Y.SEVR MS NPP") field(INPD, "BPMS:LTU0:110:X.SEVR MS NPP") field(INPE, "BPMS:LTU0:110:TGRN.SEVR MS NPP") field(INPF, "BPMS:LTU0:110:TRED.SEVR MS NPP") field(INPG, "BPMS:LTU0:110:TBLU.SEVR MS NPP") field(INPH, "BPMS:LTU0:110:TYLO.SEVR MS NPP") field(INPI, "BPMS:LTU0:110:GRU.SEVR MS NPP") field(INPJ, "BPMS:LTU0:110: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:LTU0:110:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:LTU0:110: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:LTU0:110:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:LTU0:110: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:LTU0:110:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:LTU0:110:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:LTU0:110:GRU.SEVR MS NPP") field(INPC, "BPMS:LTU0:110:GRV.SEVR MS NPP") field(INPD, "BPMS:LTU0:110:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:LTU0:110:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:LTU0:110:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:LTU0:110: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:LTU0:110:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:LTU0:110:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:110: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:LTU0:110:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:LTU0:110:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:110: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:LTU0:110:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:LTU0:110: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:LTU0:110:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "0") field(SCAN, "Passive") } record(bo, "BPMS:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S12") field(FLNK, "BPMS:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110:V") } record(ai, "BPMS:LTU0:110: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:LTU0:110:PINC") } record(ai, "BPMS:LTU0:110:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S10") field(SCAN, "Passive") } record(longin, "BPMS:LTU0:110: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:LTU0:110:RSTA_ALH") } record(calc, "BPMS:LTU0:110:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:LTU0:110:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:110:PADTOC") } record(calc, "BPMS:LTU0:110:PADTOC") { field(CALC, "(A&B)?1:0") field(INPA, "BPMS:LTU0:110:RSTA") field(INPB, "0x100") field(FLNK, "BPMS:LTU0:110:PADTO") } record(bi, "BPMS:LTU0:110:PADTO") { field(DESC, "PAD connection timeout") field(INP, "BPMS:LTU0:110:PADTOC") field(ZNAM, "OK") field(ONAM, "TIMEOUT") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:LTU0:110: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:LTU0:110:PHI_SEQ") } record(ao, "BPMS:LTU0:110: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:LTU0:110:PSI_SEQ") } #record(dfanout, "BPMS:LTU0:110:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:LTU0:110:USCL PP MS") # field(OUTB, "BPMS:LTU0:110:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:LTU0:110: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:LTU0:110:UOFF_SEQ") } record(ao, "BPMS:LTU0:110: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:LTU0:110:VOFF_SEQ") } record(ao, "BPMS:LTU0:110:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:LTU0:110:USCL_SEQ") } record(ao, "BPMS:LTU0:110:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:LTU0:110:VSCL_SEQ") } record(mbbo, "BPMS:LTU0:110: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:LTU0:110: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:LTU0:110:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") # 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, "RVAL") } # Convenience record holding the MAD name record(stringin, "BPMS:LTU0:110:MADN") { field(DESC, "MAD Name") field(VAL, "BPMVM1") field(PINI, "YES") } record(stringin, "BPMVM1:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:LTU0:110") field(PINI, "YES") } record(ai, "BPMS:LTU0:110:X_SLOW") { field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:LTU0:110:X MS") field(FLNK, "BPMS:LTU0:110:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:LTU0:110:Y_SLOW") { field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:LTU0:110:Y NPP MS") field(FLNK, "BPMS:LTU0:110:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:LTU0:110:TMIT_SLOW") { field(DESC, "TMIT snapshot for display") field(INP, "BPMS:LTU0:110: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:LTU0:110:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:LTU0:110:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:LTU0:110:SIMC PP") } record(calcout, "BPMS:LTU0:110: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:LTU0:110:USCL") field(INPL, "0") } # Switch simulation record BPMS:LTU0:110:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:LTU0:110:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:LTU0:110: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:LTU0:110:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:110: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:LTU0:110:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:110:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:LTU0:110:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:LTU0:110: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:LTU0:110:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:110:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:LTU0:110:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:110:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:LTU0:110: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:LTU0:110:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:110:UOFF") field(DOL2, "BPMS:LTU0:110:UOFF") field(DOL3, "BPMS:LTU0:110:UOFF") field(DOL4, "BPMS:LTU0:110:UOFF") field(DOL5, "BPMS:LTU0:110:UOFF") field(DOL6, "BPMS:LTU0:110:UOFF") field(DOL7, "BPMS:LTU0:110:UOFF") field(DOL8, "BPMS:LTU0:110:UOFF") field(DOL9, "BPMS:LTU0:110:UOFF") field(DOLA, "BPMS:LTU0:110:UOFF") field(LNK1, "BPMS:LTU0:110:UOFF_SEL.A PP") field(LNK2, "BPMS:LTU0:110:UOFF_SEL.B PP") field(LNK3, "BPMS:LTU0:110:UOFF_SEL.C PP") field(LNK4, "BPMS:LTU0:110:UOFF_SEL.D PP") field(LNK5, "BPMS:LTU0:110:UOFF_SEL.E PP") field(LNK6, "BPMS:LTU0:110:UOFF_SEL.F PP") field(LNK7, "BPMS:LTU0:110:UOFF_SEL.G PP") field(LNK8, "BPMS:LTU0:110:UOFF_SEL.H PP") field(LNK9, "BPMS:LTU0:110:UOFF_SEL.I PP") field(LNKA, "BPMS:LTU0:110:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:110:UOFF_SEL") field(OUTA, "BPMS:LTU0:110:U.AOFF CA") field(OUTB, "BPMS:LTU0:110:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:110:UOFF_CTRL") { field(INPA, "BPMS:LTU0:110:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:110: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:LTU0:110:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:110:VOFF") field(DOL2, "BPMS:LTU0:110:VOFF") field(DOL3, "BPMS:LTU0:110:VOFF") field(DOL4, "BPMS:LTU0:110:VOFF") field(DOL5, "BPMS:LTU0:110:VOFF") field(DOL6, "BPMS:LTU0:110:VOFF") field(DOL7, "BPMS:LTU0:110:VOFF") field(DOL8, "BPMS:LTU0:110:VOFF") field(DOL9, "BPMS:LTU0:110:VOFF") field(DOLA, "BPMS:LTU0:110:VOFF") field(LNK1, "BPMS:LTU0:110:VOFF_SEL.A PP") field(LNK2, "BPMS:LTU0:110:VOFF_SEL.B PP") field(LNK3, "BPMS:LTU0:110:VOFF_SEL.C PP") field(LNK4, "BPMS:LTU0:110:VOFF_SEL.D PP") field(LNK5, "BPMS:LTU0:110:VOFF_SEL.E PP") field(LNK6, "BPMS:LTU0:110:VOFF_SEL.F PP") field(LNK7, "BPMS:LTU0:110:VOFF_SEL.G PP") field(LNK8, "BPMS:LTU0:110:VOFF_SEL.H PP") field(LNK9, "BPMS:LTU0:110:VOFF_SEL.I PP") field(LNKA, "BPMS:LTU0:110:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:110:VOFF_SEL") field(OUTA, "BPMS:LTU0:110:V.AOFF CA") field(OUTB, "BPMS:LTU0:110:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:110:VOFF_CTRL") { field(INPA, "BPMS:LTU0:110:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:110: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:LTU0:110:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:110:USCL") field(DOL2, "BPMS:LTU0:110:USCL") field(DOL3, "BPMS:LTU0:110:USCL") field(DOL4, "BPMS:LTU0:110:USCL") field(DOL5, "BPMS:LTU0:110:USCL") field(DOL6, "BPMS:LTU0:110:USCL") field(DOL7, "BPMS:LTU0:110:USCL") field(DOL8, "BPMS:LTU0:110:USCL") field(DOL9, "BPMS:LTU0:110:USCL") field(DOLA, "BPMS:LTU0:110:USCL") field(LNK1, "BPMS:LTU0:110:USCL_SEL.A PP") field(LNK2, "BPMS:LTU0:110:USCL_SEL.B PP") field(LNK3, "BPMS:LTU0:110:USCL_SEL.C PP") field(LNK4, "BPMS:LTU0:110:USCL_SEL.D PP") field(LNK5, "BPMS:LTU0:110:USCL_SEL.E PP") field(LNK6, "BPMS:LTU0:110:USCL_SEL.F PP") field(LNK7, "BPMS:LTU0:110:USCL_SEL.G PP") field(LNK8, "BPMS:LTU0:110:USCL_SEL.H PP") field(LNK9, "BPMS:LTU0:110:USCL_SEL.I PP") field(LNKA, "BPMS:LTU0:110:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:110:USCL_SEL") field(OUTA, "BPMS:LTU0:110:U.ASLO CA") field(OUTB, "BPMS:LTU0:110:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:110:USCL_CTRL") { field(INPA, "BPMS:LTU0:110:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:110: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:LTU0:110:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:110:VSCL") field(DOL2, "BPMS:LTU0:110:VSCL") field(DOL3, "BPMS:LTU0:110:VSCL") field(DOL4, "BPMS:LTU0:110:VSCL") field(DOL5, "BPMS:LTU0:110:VSCL") field(DOL6, "BPMS:LTU0:110:VSCL") field(DOL7, "BPMS:LTU0:110:VSCL") field(DOL8, "BPMS:LTU0:110:VSCL") field(DOL9, "BPMS:LTU0:110:VSCL") field(DOLA, "BPMS:LTU0:110:VSCL") field(LNK1, "BPMS:LTU0:110:VSCL_SEL.A PP") field(LNK2, "BPMS:LTU0:110:VSCL_SEL.B PP") field(LNK3, "BPMS:LTU0:110:VSCL_SEL.C PP") field(LNK4, "BPMS:LTU0:110:VSCL_SEL.D PP") field(LNK5, "BPMS:LTU0:110:VSCL_SEL.E PP") field(LNK6, "BPMS:LTU0:110:VSCL_SEL.F PP") field(LNK7, "BPMS:LTU0:110:VSCL_SEL.G PP") field(LNK8, "BPMS:LTU0:110:VSCL_SEL.H PP") field(LNK9, "BPMS:LTU0:110:VSCL_SEL.I PP") field(LNKA, "BPMS:LTU0:110:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:110:VSCL_SEL") field(OUTA, "BPMS:LTU0:110:V.ASLO CA") field(OUTB, "BPMS:LTU0:110:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:110:VSCL_CTRL") { field(INPA, "BPMS:LTU0:110:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:110: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:LTU0:110:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:110:PHI") field(DOL2, "BPMS:LTU0:110:PHI") field(DOL3, "BPMS:LTU0:110:PHI") field(DOL4, "BPMS:LTU0:110:PHI") field(DOL5, "BPMS:LTU0:110:PHI") field(DOL6, "BPMS:LTU0:110:PHI") field(DOL7, "BPMS:LTU0:110:PHI") field(DOL8, "BPMS:LTU0:110:PHI") field(DOL9, "BPMS:LTU0:110:PHI") field(DOLA, "BPMS:LTU0:110:PHI") field(LNK1, "BPMS:LTU0:110:PHI_SEL.A PP") field(LNK2, "BPMS:LTU0:110:PHI_SEL.B PP") field(LNK3, "BPMS:LTU0:110:PHI_SEL.C PP") field(LNK4, "BPMS:LTU0:110:PHI_SEL.D PP") field(LNK5, "BPMS:LTU0:110:PHI_SEL.E PP") field(LNK6, "BPMS:LTU0:110:PHI_SEL.F PP") field(LNK7, "BPMS:LTU0:110:PHI_SEL.G PP") field(LNK8, "BPMS:LTU0:110:PHI_SEL.H PP") field(LNK9, "BPMS:LTU0:110:PHI_SEL.I PP") field(LNKA, "BPMS:LTU0:110:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:110:PHI_SEL") field(OUTA, "BPMS:LTU0:110:CALC.E CA") field(OUTB, "BPMS:LTU0:110:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:110:PHI_CTRL") { field(INPA, "BPMS:LTU0:110:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:110: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:LTU0:110:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:110:PSI") field(DOL2, "BPMS:LTU0:110:PSI") field(DOL3, "BPMS:LTU0:110:PSI") field(DOL4, "BPMS:LTU0:110:PSI") field(DOL5, "BPMS:LTU0:110:PSI") field(DOL6, "BPMS:LTU0:110:PSI") field(DOL7, "BPMS:LTU0:110:PSI") field(DOL8, "BPMS:LTU0:110:PSI") field(DOL9, "BPMS:LTU0:110:PSI") field(DOLA, "BPMS:LTU0:110:PSI") field(LNK1, "BPMS:LTU0:110:PSI_SEL.A PP") field(LNK2, "BPMS:LTU0:110:PSI_SEL.B PP") field(LNK3, "BPMS:LTU0:110:PSI_SEL.C PP") field(LNK4, "BPMS:LTU0:110:PSI_SEL.D PP") field(LNK5, "BPMS:LTU0:110:PSI_SEL.E PP") field(LNK6, "BPMS:LTU0:110:PSI_SEL.F PP") field(LNK7, "BPMS:LTU0:110:PSI_SEL.G PP") field(LNK8, "BPMS:LTU0:110:PSI_SEL.H PP") field(LNK9, "BPMS:LTU0:110:PSI_SEL.I PP") field(LNKA, "BPMS:LTU0:110:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:110: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:LTU0:110: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:LTU0:110: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:LTU0:110:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:110:PSI_SEL") field(OUTA, "BPMS:LTU0:110:CALC.F CA") field(OUTB, "BPMS:LTU0:110:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:110:PSI_CTRL") { field(INPA, "BPMS:LTU0:110:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:110:PSI_SEL.L PP") } record(longout, "BPMS:LTU0:110: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120:TYLO") { field(DESC, "Yellow arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C1 S7") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(bo, "BPMS:LTU0:120:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:120:CALC.K NPP MS") field(ZNAM, "Off") field(ONAM, "On") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:LTU0:120:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:120: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:LTU0:120:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:LTU0:120:ATT1 CP") field(INPC, "BPMS:LTU0:120: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:LTU0:120:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:LTU0:120:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:LTU0:120:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:LTU0:120:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:LTU0:120:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:LTU0:120:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:LTU0:120: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:LTU0:120:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:120: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:LTU0:120:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:120: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:LTU0:120:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:LTU0:120:RSTA.SEVR MS NPP") field(INPB, "BPMS:LTU0:120:TMIT.SEVR MS NPP") field(INPC, "BPMS:LTU0:120:Y.SEVR MS NPP") field(INPD, "BPMS:LTU0:120:X.SEVR MS NPP") field(INPE, "BPMS:LTU0:120:TGRN.SEVR MS NPP") field(INPF, "BPMS:LTU0:120:TRED.SEVR MS NPP") field(INPG, "BPMS:LTU0:120:TBLU.SEVR MS NPP") field(INPH, "BPMS:LTU0:120:TYLO.SEVR MS NPP") field(INPI, "BPMS:LTU0:120:GRU.SEVR MS NPP") field(INPJ, "BPMS:LTU0:120: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:LTU0:120:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:LTU0:120: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:LTU0:120:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:LTU0:120: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:LTU0:120:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:LTU0:120:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:LTU0:120:GRU.SEVR MS NPP") field(INPC, "BPMS:LTU0:120:GRV.SEVR MS NPP") field(INPD, "BPMS:LTU0:120:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:LTU0:120:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:LTU0:120:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:LTU0:120: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:LTU0:120:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:LTU0:120:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:120: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:LTU0:120:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:LTU0:120:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:120: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:LTU0:120:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:LTU0:120: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:LTU0:120:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "1") field(SCAN, "Passive") } record(bo, "BPMS:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S12") field(FLNK, "BPMS:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120:V") } record(ai, "BPMS:LTU0:120: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:LTU0:120:PINC") } record(ai, "BPMS:LTU0:120:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S10") field(SCAN, "Passive") } record(longin, "BPMS:LTU0:120: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:LTU0:120:RSTA_ALH") } record(calc, "BPMS:LTU0:120:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:LTU0:120:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:120:PADTOC") } record(calc, "BPMS:LTU0:120:PADTOC") { field(CALC, "(A&B)?1:0") field(INPA, "BPMS:LTU0:120:RSTA") field(INPB, "0x100") field(FLNK, "BPMS:LTU0:120:PADTO") } record(bi, "BPMS:LTU0:120:PADTO") { field(DESC, "PAD connection timeout") field(INP, "BPMS:LTU0:120:PADTOC") field(ZNAM, "OK") field(ONAM, "TIMEOUT") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:LTU0:120: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:LTU0:120:PHI_SEQ") } record(ao, "BPMS:LTU0:120: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:LTU0:120:PSI_SEQ") } #record(dfanout, "BPMS:LTU0:120:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:LTU0:120:USCL PP MS") # field(OUTB, "BPMS:LTU0:120:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:LTU0:120: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:LTU0:120:UOFF_SEQ") } record(ao, "BPMS:LTU0:120: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:LTU0:120:VOFF_SEQ") } record(ao, "BPMS:LTU0:120:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:LTU0:120:USCL_SEQ") } record(ao, "BPMS:LTU0:120:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:LTU0:120:VSCL_SEQ") } record(mbbo, "BPMS:LTU0:120: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:LTU0:120: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:LTU0:120:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") # 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, "RVAL") } # Convenience record holding the MAD name record(stringin, "BPMS:LTU0:120:MADN") { field(DESC, "MAD Name") field(VAL, "BPMVM2") field(PINI, "YES") } record(stringin, "BPMVM2:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:LTU0:120") field(PINI, "YES") } record(ai, "BPMS:LTU0:120:X_SLOW") { field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:LTU0:120:X MS") field(FLNK, "BPMS:LTU0:120:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:LTU0:120:Y_SLOW") { field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:LTU0:120:Y NPP MS") field(FLNK, "BPMS:LTU0:120:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:LTU0:120:TMIT_SLOW") { field(DESC, "TMIT snapshot for display") field(INP, "BPMS:LTU0:120: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:LTU0:120:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:LTU0:120:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:LTU0:120:SIMC PP") } record(calcout, "BPMS:LTU0:120: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:LTU0:120:USCL") field(INPL, "0") } # Switch simulation record BPMS:LTU0:120:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:LTU0:120:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:LTU0:120: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:LTU0:120:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:120: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:LTU0:120:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:120:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:LTU0:120:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:LTU0:120: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:LTU0:120:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:120:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:LTU0:120:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:120:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:LTU0:120: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:LTU0:120:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:120:UOFF") field(DOL2, "BPMS:LTU0:120:UOFF") field(DOL3, "BPMS:LTU0:120:UOFF") field(DOL4, "BPMS:LTU0:120:UOFF") field(DOL5, "BPMS:LTU0:120:UOFF") field(DOL6, "BPMS:LTU0:120:UOFF") field(DOL7, "BPMS:LTU0:120:UOFF") field(DOL8, "BPMS:LTU0:120:UOFF") field(DOL9, "BPMS:LTU0:120:UOFF") field(DOLA, "BPMS:LTU0:120:UOFF") field(LNK1, "BPMS:LTU0:120:UOFF_SEL.A PP") field(LNK2, "BPMS:LTU0:120:UOFF_SEL.B PP") field(LNK3, "BPMS:LTU0:120:UOFF_SEL.C PP") field(LNK4, "BPMS:LTU0:120:UOFF_SEL.D PP") field(LNK5, "BPMS:LTU0:120:UOFF_SEL.E PP") field(LNK6, "BPMS:LTU0:120:UOFF_SEL.F PP") field(LNK7, "BPMS:LTU0:120:UOFF_SEL.G PP") field(LNK8, "BPMS:LTU0:120:UOFF_SEL.H PP") field(LNK9, "BPMS:LTU0:120:UOFF_SEL.I PP") field(LNKA, "BPMS:LTU0:120:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:120:UOFF_SEL") field(OUTA, "BPMS:LTU0:120:U.AOFF CA") field(OUTB, "BPMS:LTU0:120:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:120:UOFF_CTRL") { field(INPA, "BPMS:LTU0:120:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:120: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:LTU0:120:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:120:VOFF") field(DOL2, "BPMS:LTU0:120:VOFF") field(DOL3, "BPMS:LTU0:120:VOFF") field(DOL4, "BPMS:LTU0:120:VOFF") field(DOL5, "BPMS:LTU0:120:VOFF") field(DOL6, "BPMS:LTU0:120:VOFF") field(DOL7, "BPMS:LTU0:120:VOFF") field(DOL8, "BPMS:LTU0:120:VOFF") field(DOL9, "BPMS:LTU0:120:VOFF") field(DOLA, "BPMS:LTU0:120:VOFF") field(LNK1, "BPMS:LTU0:120:VOFF_SEL.A PP") field(LNK2, "BPMS:LTU0:120:VOFF_SEL.B PP") field(LNK3, "BPMS:LTU0:120:VOFF_SEL.C PP") field(LNK4, "BPMS:LTU0:120:VOFF_SEL.D PP") field(LNK5, "BPMS:LTU0:120:VOFF_SEL.E PP") field(LNK6, "BPMS:LTU0:120:VOFF_SEL.F PP") field(LNK7, "BPMS:LTU0:120:VOFF_SEL.G PP") field(LNK8, "BPMS:LTU0:120:VOFF_SEL.H PP") field(LNK9, "BPMS:LTU0:120:VOFF_SEL.I PP") field(LNKA, "BPMS:LTU0:120:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:120:VOFF_SEL") field(OUTA, "BPMS:LTU0:120:V.AOFF CA") field(OUTB, "BPMS:LTU0:120:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:120:VOFF_CTRL") { field(INPA, "BPMS:LTU0:120:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:120: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:LTU0:120:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:120:USCL") field(DOL2, "BPMS:LTU0:120:USCL") field(DOL3, "BPMS:LTU0:120:USCL") field(DOL4, "BPMS:LTU0:120:USCL") field(DOL5, "BPMS:LTU0:120:USCL") field(DOL6, "BPMS:LTU0:120:USCL") field(DOL7, "BPMS:LTU0:120:USCL") field(DOL8, "BPMS:LTU0:120:USCL") field(DOL9, "BPMS:LTU0:120:USCL") field(DOLA, "BPMS:LTU0:120:USCL") field(LNK1, "BPMS:LTU0:120:USCL_SEL.A PP") field(LNK2, "BPMS:LTU0:120:USCL_SEL.B PP") field(LNK3, "BPMS:LTU0:120:USCL_SEL.C PP") field(LNK4, "BPMS:LTU0:120:USCL_SEL.D PP") field(LNK5, "BPMS:LTU0:120:USCL_SEL.E PP") field(LNK6, "BPMS:LTU0:120:USCL_SEL.F PP") field(LNK7, "BPMS:LTU0:120:USCL_SEL.G PP") field(LNK8, "BPMS:LTU0:120:USCL_SEL.H PP") field(LNK9, "BPMS:LTU0:120:USCL_SEL.I PP") field(LNKA, "BPMS:LTU0:120:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:120:USCL_SEL") field(OUTA, "BPMS:LTU0:120:U.ASLO CA") field(OUTB, "BPMS:LTU0:120:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:120:USCL_CTRL") { field(INPA, "BPMS:LTU0:120:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:120: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:LTU0:120:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:120:VSCL") field(DOL2, "BPMS:LTU0:120:VSCL") field(DOL3, "BPMS:LTU0:120:VSCL") field(DOL4, "BPMS:LTU0:120:VSCL") field(DOL5, "BPMS:LTU0:120:VSCL") field(DOL6, "BPMS:LTU0:120:VSCL") field(DOL7, "BPMS:LTU0:120:VSCL") field(DOL8, "BPMS:LTU0:120:VSCL") field(DOL9, "BPMS:LTU0:120:VSCL") field(DOLA, "BPMS:LTU0:120:VSCL") field(LNK1, "BPMS:LTU0:120:VSCL_SEL.A PP") field(LNK2, "BPMS:LTU0:120:VSCL_SEL.B PP") field(LNK3, "BPMS:LTU0:120:VSCL_SEL.C PP") field(LNK4, "BPMS:LTU0:120:VSCL_SEL.D PP") field(LNK5, "BPMS:LTU0:120:VSCL_SEL.E PP") field(LNK6, "BPMS:LTU0:120:VSCL_SEL.F PP") field(LNK7, "BPMS:LTU0:120:VSCL_SEL.G PP") field(LNK8, "BPMS:LTU0:120:VSCL_SEL.H PP") field(LNK9, "BPMS:LTU0:120:VSCL_SEL.I PP") field(LNKA, "BPMS:LTU0:120:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:120:VSCL_SEL") field(OUTA, "BPMS:LTU0:120:V.ASLO CA") field(OUTB, "BPMS:LTU0:120:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:120:VSCL_CTRL") { field(INPA, "BPMS:LTU0:120:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:120: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:LTU0:120:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:120:PHI") field(DOL2, "BPMS:LTU0:120:PHI") field(DOL3, "BPMS:LTU0:120:PHI") field(DOL4, "BPMS:LTU0:120:PHI") field(DOL5, "BPMS:LTU0:120:PHI") field(DOL6, "BPMS:LTU0:120:PHI") field(DOL7, "BPMS:LTU0:120:PHI") field(DOL8, "BPMS:LTU0:120:PHI") field(DOL9, "BPMS:LTU0:120:PHI") field(DOLA, "BPMS:LTU0:120:PHI") field(LNK1, "BPMS:LTU0:120:PHI_SEL.A PP") field(LNK2, "BPMS:LTU0:120:PHI_SEL.B PP") field(LNK3, "BPMS:LTU0:120:PHI_SEL.C PP") field(LNK4, "BPMS:LTU0:120:PHI_SEL.D PP") field(LNK5, "BPMS:LTU0:120:PHI_SEL.E PP") field(LNK6, "BPMS:LTU0:120:PHI_SEL.F PP") field(LNK7, "BPMS:LTU0:120:PHI_SEL.G PP") field(LNK8, "BPMS:LTU0:120:PHI_SEL.H PP") field(LNK9, "BPMS:LTU0:120:PHI_SEL.I PP") field(LNKA, "BPMS:LTU0:120:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:120:PHI_SEL") field(OUTA, "BPMS:LTU0:120:CALC.E CA") field(OUTB, "BPMS:LTU0:120:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:120:PHI_CTRL") { field(INPA, "BPMS:LTU0:120:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:120: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:LTU0:120:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:120:PSI") field(DOL2, "BPMS:LTU0:120:PSI") field(DOL3, "BPMS:LTU0:120:PSI") field(DOL4, "BPMS:LTU0:120:PSI") field(DOL5, "BPMS:LTU0:120:PSI") field(DOL6, "BPMS:LTU0:120:PSI") field(DOL7, "BPMS:LTU0:120:PSI") field(DOL8, "BPMS:LTU0:120:PSI") field(DOL9, "BPMS:LTU0:120:PSI") field(DOLA, "BPMS:LTU0:120:PSI") field(LNK1, "BPMS:LTU0:120:PSI_SEL.A PP") field(LNK2, "BPMS:LTU0:120:PSI_SEL.B PP") field(LNK3, "BPMS:LTU0:120:PSI_SEL.C PP") field(LNK4, "BPMS:LTU0:120:PSI_SEL.D PP") field(LNK5, "BPMS:LTU0:120:PSI_SEL.E PP") field(LNK6, "BPMS:LTU0:120:PSI_SEL.F PP") field(LNK7, "BPMS:LTU0:120:PSI_SEL.G PP") field(LNK8, "BPMS:LTU0:120:PSI_SEL.H PP") field(LNK9, "BPMS:LTU0:120:PSI_SEL.I PP") field(LNKA, "BPMS:LTU0:120:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:120: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:LTU0:120: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:LTU0:120: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:LTU0:120:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:120:PSI_SEL") field(OUTA, "BPMS:LTU0:120:CALC.F CA") field(OUTB, "BPMS:LTU0:120:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:120:PSI_CTRL") { field(INPA, "BPMS:LTU0:120:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:120:PSI_SEL.L PP") } record(longout, "BPMS:LTU0:120: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130:TYLO") { field(DESC, "Yellow arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C2 S7") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(bo, "BPMS:LTU0:130:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:130:CALC.K NPP MS") field(ZNAM, "Off") field(ONAM, "On") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:LTU0:130:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:130: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:LTU0:130:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:LTU0:130:ATT1 CP") field(INPC, "BPMS:LTU0:130: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:LTU0:130:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:LTU0:130:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:LTU0:130:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:LTU0:130:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:LTU0:130:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:LTU0:130:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:LTU0:130: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:LTU0:130:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:130: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:LTU0:130:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:130: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:LTU0:130:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:LTU0:130:RSTA.SEVR MS NPP") field(INPB, "BPMS:LTU0:130:TMIT.SEVR MS NPP") field(INPC, "BPMS:LTU0:130:Y.SEVR MS NPP") field(INPD, "BPMS:LTU0:130:X.SEVR MS NPP") field(INPE, "BPMS:LTU0:130:TGRN.SEVR MS NPP") field(INPF, "BPMS:LTU0:130:TRED.SEVR MS NPP") field(INPG, "BPMS:LTU0:130:TBLU.SEVR MS NPP") field(INPH, "BPMS:LTU0:130:TYLO.SEVR MS NPP") field(INPI, "BPMS:LTU0:130:GRU.SEVR MS NPP") field(INPJ, "BPMS:LTU0:130: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:LTU0:130:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:LTU0:130: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:LTU0:130:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:LTU0:130: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:LTU0:130:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:LTU0:130:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:LTU0:130:GRU.SEVR MS NPP") field(INPC, "BPMS:LTU0:130:GRV.SEVR MS NPP") field(INPD, "BPMS:LTU0:130:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:LTU0:130:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:LTU0:130:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:LTU0:130: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:LTU0:130:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:LTU0:130:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:130: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:LTU0:130:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:LTU0:130:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:130: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:LTU0:130:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:LTU0:130: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:LTU0:130:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "2") field(SCAN, "Passive") } record(bo, "BPMS:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C2 S12") field(FLNK, "BPMS:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130:V") } record(ai, "BPMS:LTU0:130: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:LTU0:130:PINC") } record(ai, "BPMS:LTU0:130:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C2 S10") field(SCAN, "Passive") } record(longin, "BPMS:LTU0:130: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:LTU0:130:RSTA_ALH") } record(calc, "BPMS:LTU0:130:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:LTU0:130:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:130:PADTOC") } record(calc, "BPMS:LTU0:130:PADTOC") { field(CALC, "(A&B)?1:0") field(INPA, "BPMS:LTU0:130:RSTA") field(INPB, "0x100") field(FLNK, "BPMS:LTU0:130:PADTO") } record(bi, "BPMS:LTU0:130:PADTO") { field(DESC, "PAD connection timeout") field(INP, "BPMS:LTU0:130:PADTOC") field(ZNAM, "OK") field(ONAM, "TIMEOUT") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:LTU0:130: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:LTU0:130:PHI_SEQ") } record(ao, "BPMS:LTU0:130: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:LTU0:130:PSI_SEQ") } #record(dfanout, "BPMS:LTU0:130:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:LTU0:130:USCL PP MS") # field(OUTB, "BPMS:LTU0:130:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:LTU0:130: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:LTU0:130:UOFF_SEQ") } record(ao, "BPMS:LTU0:130: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:LTU0:130:VOFF_SEQ") } record(ao, "BPMS:LTU0:130:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:LTU0:130:USCL_SEQ") } record(ao, "BPMS:LTU0:130:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:LTU0:130:VSCL_SEQ") } record(mbbo, "BPMS:LTU0:130: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:LTU0:130: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:LTU0:130:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") # 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, "RVAL") } # Convenience record holding the MAD name record(stringin, "BPMS:LTU0:130:MADN") { field(DESC, "MAD Name") field(VAL, "BPMVB1") field(PINI, "YES") } record(stringin, "BPMVB1:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:LTU0:130") field(PINI, "YES") } record(ai, "BPMS:LTU0:130:X_SLOW") { field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:LTU0:130:X MS") field(FLNK, "BPMS:LTU0:130:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:LTU0:130:Y_SLOW") { field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:LTU0:130:Y NPP MS") field(FLNK, "BPMS:LTU0:130:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:LTU0:130:TMIT_SLOW") { field(DESC, "TMIT snapshot for display") field(INP, "BPMS:LTU0:130: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:LTU0:130:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:LTU0:130:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:LTU0:130:SIMC PP") } record(calcout, "BPMS:LTU0:130: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:LTU0:130:USCL") field(INPL, "0") } # Switch simulation record BPMS:LTU0:130:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:LTU0:130:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:LTU0:130: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:LTU0:130:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:130: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:LTU0:130:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:130:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:LTU0:130:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:LTU0:130: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:LTU0:130:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:130:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:LTU0:130:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:130:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:LTU0:130: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:LTU0:130:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:130:UOFF") field(DOL2, "BPMS:LTU0:130:UOFF") field(DOL3, "BPMS:LTU0:130:UOFF") field(DOL4, "BPMS:LTU0:130:UOFF") field(DOL5, "BPMS:LTU0:130:UOFF") field(DOL6, "BPMS:LTU0:130:UOFF") field(DOL7, "BPMS:LTU0:130:UOFF") field(DOL8, "BPMS:LTU0:130:UOFF") field(DOL9, "BPMS:LTU0:130:UOFF") field(DOLA, "BPMS:LTU0:130:UOFF") field(LNK1, "BPMS:LTU0:130:UOFF_SEL.A PP") field(LNK2, "BPMS:LTU0:130:UOFF_SEL.B PP") field(LNK3, "BPMS:LTU0:130:UOFF_SEL.C PP") field(LNK4, "BPMS:LTU0:130:UOFF_SEL.D PP") field(LNK5, "BPMS:LTU0:130:UOFF_SEL.E PP") field(LNK6, "BPMS:LTU0:130:UOFF_SEL.F PP") field(LNK7, "BPMS:LTU0:130:UOFF_SEL.G PP") field(LNK8, "BPMS:LTU0:130:UOFF_SEL.H PP") field(LNK9, "BPMS:LTU0:130:UOFF_SEL.I PP") field(LNKA, "BPMS:LTU0:130:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:130:UOFF_SEL") field(OUTA, "BPMS:LTU0:130:U.AOFF CA") field(OUTB, "BPMS:LTU0:130:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:130:UOFF_CTRL") { field(INPA, "BPMS:LTU0:130:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:130: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:LTU0:130:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:130:VOFF") field(DOL2, "BPMS:LTU0:130:VOFF") field(DOL3, "BPMS:LTU0:130:VOFF") field(DOL4, "BPMS:LTU0:130:VOFF") field(DOL5, "BPMS:LTU0:130:VOFF") field(DOL6, "BPMS:LTU0:130:VOFF") field(DOL7, "BPMS:LTU0:130:VOFF") field(DOL8, "BPMS:LTU0:130:VOFF") field(DOL9, "BPMS:LTU0:130:VOFF") field(DOLA, "BPMS:LTU0:130:VOFF") field(LNK1, "BPMS:LTU0:130:VOFF_SEL.A PP") field(LNK2, "BPMS:LTU0:130:VOFF_SEL.B PP") field(LNK3, "BPMS:LTU0:130:VOFF_SEL.C PP") field(LNK4, "BPMS:LTU0:130:VOFF_SEL.D PP") field(LNK5, "BPMS:LTU0:130:VOFF_SEL.E PP") field(LNK6, "BPMS:LTU0:130:VOFF_SEL.F PP") field(LNK7, "BPMS:LTU0:130:VOFF_SEL.G PP") field(LNK8, "BPMS:LTU0:130:VOFF_SEL.H PP") field(LNK9, "BPMS:LTU0:130:VOFF_SEL.I PP") field(LNKA, "BPMS:LTU0:130:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:130:VOFF_SEL") field(OUTA, "BPMS:LTU0:130:V.AOFF CA") field(OUTB, "BPMS:LTU0:130:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:130:VOFF_CTRL") { field(INPA, "BPMS:LTU0:130:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:130: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:LTU0:130:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:130:USCL") field(DOL2, "BPMS:LTU0:130:USCL") field(DOL3, "BPMS:LTU0:130:USCL") field(DOL4, "BPMS:LTU0:130:USCL") field(DOL5, "BPMS:LTU0:130:USCL") field(DOL6, "BPMS:LTU0:130:USCL") field(DOL7, "BPMS:LTU0:130:USCL") field(DOL8, "BPMS:LTU0:130:USCL") field(DOL9, "BPMS:LTU0:130:USCL") field(DOLA, "BPMS:LTU0:130:USCL") field(LNK1, "BPMS:LTU0:130:USCL_SEL.A PP") field(LNK2, "BPMS:LTU0:130:USCL_SEL.B PP") field(LNK3, "BPMS:LTU0:130:USCL_SEL.C PP") field(LNK4, "BPMS:LTU0:130:USCL_SEL.D PP") field(LNK5, "BPMS:LTU0:130:USCL_SEL.E PP") field(LNK6, "BPMS:LTU0:130:USCL_SEL.F PP") field(LNK7, "BPMS:LTU0:130:USCL_SEL.G PP") field(LNK8, "BPMS:LTU0:130:USCL_SEL.H PP") field(LNK9, "BPMS:LTU0:130:USCL_SEL.I PP") field(LNKA, "BPMS:LTU0:130:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:130:USCL_SEL") field(OUTA, "BPMS:LTU0:130:U.ASLO CA") field(OUTB, "BPMS:LTU0:130:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:130:USCL_CTRL") { field(INPA, "BPMS:LTU0:130:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:130: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:LTU0:130:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:130:VSCL") field(DOL2, "BPMS:LTU0:130:VSCL") field(DOL3, "BPMS:LTU0:130:VSCL") field(DOL4, "BPMS:LTU0:130:VSCL") field(DOL5, "BPMS:LTU0:130:VSCL") field(DOL6, "BPMS:LTU0:130:VSCL") field(DOL7, "BPMS:LTU0:130:VSCL") field(DOL8, "BPMS:LTU0:130:VSCL") field(DOL9, "BPMS:LTU0:130:VSCL") field(DOLA, "BPMS:LTU0:130:VSCL") field(LNK1, "BPMS:LTU0:130:VSCL_SEL.A PP") field(LNK2, "BPMS:LTU0:130:VSCL_SEL.B PP") field(LNK3, "BPMS:LTU0:130:VSCL_SEL.C PP") field(LNK4, "BPMS:LTU0:130:VSCL_SEL.D PP") field(LNK5, "BPMS:LTU0:130:VSCL_SEL.E PP") field(LNK6, "BPMS:LTU0:130:VSCL_SEL.F PP") field(LNK7, "BPMS:LTU0:130:VSCL_SEL.G PP") field(LNK8, "BPMS:LTU0:130:VSCL_SEL.H PP") field(LNK9, "BPMS:LTU0:130:VSCL_SEL.I PP") field(LNKA, "BPMS:LTU0:130:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:130:VSCL_SEL") field(OUTA, "BPMS:LTU0:130:V.ASLO CA") field(OUTB, "BPMS:LTU0:130:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:130:VSCL_CTRL") { field(INPA, "BPMS:LTU0:130:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:130: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:LTU0:130:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:130:PHI") field(DOL2, "BPMS:LTU0:130:PHI") field(DOL3, "BPMS:LTU0:130:PHI") field(DOL4, "BPMS:LTU0:130:PHI") field(DOL5, "BPMS:LTU0:130:PHI") field(DOL6, "BPMS:LTU0:130:PHI") field(DOL7, "BPMS:LTU0:130:PHI") field(DOL8, "BPMS:LTU0:130:PHI") field(DOL9, "BPMS:LTU0:130:PHI") field(DOLA, "BPMS:LTU0:130:PHI") field(LNK1, "BPMS:LTU0:130:PHI_SEL.A PP") field(LNK2, "BPMS:LTU0:130:PHI_SEL.B PP") field(LNK3, "BPMS:LTU0:130:PHI_SEL.C PP") field(LNK4, "BPMS:LTU0:130:PHI_SEL.D PP") field(LNK5, "BPMS:LTU0:130:PHI_SEL.E PP") field(LNK6, "BPMS:LTU0:130:PHI_SEL.F PP") field(LNK7, "BPMS:LTU0:130:PHI_SEL.G PP") field(LNK8, "BPMS:LTU0:130:PHI_SEL.H PP") field(LNK9, "BPMS:LTU0:130:PHI_SEL.I PP") field(LNKA, "BPMS:LTU0:130:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:130:PHI_SEL") field(OUTA, "BPMS:LTU0:130:CALC.E CA") field(OUTB, "BPMS:LTU0:130:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:130:PHI_CTRL") { field(INPA, "BPMS:LTU0:130:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:130: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:LTU0:130:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:130:PSI") field(DOL2, "BPMS:LTU0:130:PSI") field(DOL3, "BPMS:LTU0:130:PSI") field(DOL4, "BPMS:LTU0:130:PSI") field(DOL5, "BPMS:LTU0:130:PSI") field(DOL6, "BPMS:LTU0:130:PSI") field(DOL7, "BPMS:LTU0:130:PSI") field(DOL8, "BPMS:LTU0:130:PSI") field(DOL9, "BPMS:LTU0:130:PSI") field(DOLA, "BPMS:LTU0:130:PSI") field(LNK1, "BPMS:LTU0:130:PSI_SEL.A PP") field(LNK2, "BPMS:LTU0:130:PSI_SEL.B PP") field(LNK3, "BPMS:LTU0:130:PSI_SEL.C PP") field(LNK4, "BPMS:LTU0:130:PSI_SEL.D PP") field(LNK5, "BPMS:LTU0:130:PSI_SEL.E PP") field(LNK6, "BPMS:LTU0:130:PSI_SEL.F PP") field(LNK7, "BPMS:LTU0:130:PSI_SEL.G PP") field(LNK8, "BPMS:LTU0:130:PSI_SEL.H PP") field(LNK9, "BPMS:LTU0:130:PSI_SEL.I PP") field(LNKA, "BPMS:LTU0:130:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:130: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:LTU0:130: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:LTU0:130: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:LTU0:130:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:130:PSI_SEL") field(OUTA, "BPMS:LTU0:130:CALC.F CA") field(OUTB, "BPMS:LTU0:130:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:130:PSI_CTRL") { field(INPA, "BPMS:LTU0:130:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:130:PSI_SEL.L PP") } record(longout, "BPMS:LTU0:130: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150:TYLO") { field(DESC, "Yellow arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C3 S7") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(bo, "BPMS:LTU0:150:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:150:CALC.K NPP MS") field(ZNAM, "Off") field(ONAM, "On") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:LTU0:150:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:150: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:LTU0:150:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:LTU0:150:ATT1 CP") field(INPC, "BPMS:LTU0:150: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:LTU0:150:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:LTU0:150:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:LTU0:150:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:LTU0:150:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:LTU0:150:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:LTU0:150:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:LTU0:150: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:LTU0:150:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:150: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:LTU0:150:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:150: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:LTU0:150:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:LTU0:150:RSTA.SEVR MS NPP") field(INPB, "BPMS:LTU0:150:TMIT.SEVR MS NPP") field(INPC, "BPMS:LTU0:150:Y.SEVR MS NPP") field(INPD, "BPMS:LTU0:150:X.SEVR MS NPP") field(INPE, "BPMS:LTU0:150:TGRN.SEVR MS NPP") field(INPF, "BPMS:LTU0:150:TRED.SEVR MS NPP") field(INPG, "BPMS:LTU0:150:TBLU.SEVR MS NPP") field(INPH, "BPMS:LTU0:150:TYLO.SEVR MS NPP") field(INPI, "BPMS:LTU0:150:GRU.SEVR MS NPP") field(INPJ, "BPMS:LTU0:150: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:LTU0:150:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:LTU0:150: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:LTU0:150:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:LTU0:150: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:LTU0:150:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:LTU0:150:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:LTU0:150:GRU.SEVR MS NPP") field(INPC, "BPMS:LTU0:150:GRV.SEVR MS NPP") field(INPD, "BPMS:LTU0:150:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:LTU0:150:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:LTU0:150:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:LTU0:150: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:LTU0:150:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:LTU0:150:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:150: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:LTU0:150:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:LTU0:150:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:150: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:LTU0:150:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:LTU0:150: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:LTU0:150:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "3") field(SCAN, "Passive") } record(bo, "BPMS:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C3 S12") field(FLNK, "BPMS:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150:V") } record(ai, "BPMS:LTU0:150: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:LTU0:150:PINC") } record(ai, "BPMS:LTU0:150:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C3 S10") field(SCAN, "Passive") } record(longin, "BPMS:LTU0:150: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:LTU0:150:RSTA_ALH") } record(calc, "BPMS:LTU0:150:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:LTU0:150:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:150:PADTOC") } record(calc, "BPMS:LTU0:150:PADTOC") { field(CALC, "(A&B)?1:0") field(INPA, "BPMS:LTU0:150:RSTA") field(INPB, "0x100") field(FLNK, "BPMS:LTU0:150:PADTO") } record(bi, "BPMS:LTU0:150:PADTO") { field(DESC, "PAD connection timeout") field(INP, "BPMS:LTU0:150:PADTOC") field(ZNAM, "OK") field(ONAM, "TIMEOUT") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:LTU0:150: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:LTU0:150:PHI_SEQ") } record(ao, "BPMS:LTU0:150: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:LTU0:150:PSI_SEQ") } #record(dfanout, "BPMS:LTU0:150:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:LTU0:150:USCL PP MS") # field(OUTB, "BPMS:LTU0:150:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:LTU0:150: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:LTU0:150:UOFF_SEQ") } record(ao, "BPMS:LTU0:150: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:LTU0:150:VOFF_SEQ") } record(ao, "BPMS:LTU0:150:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:LTU0:150:USCL_SEQ") } record(ao, "BPMS:LTU0:150:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:LTU0:150:VSCL_SEQ") } record(mbbo, "BPMS:LTU0:150: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:LTU0:150: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:LTU0:150:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") # 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, "RVAL") } # Convenience record holding the MAD name record(stringin, "BPMS:LTU0:150:MADN") { field(DESC, "MAD Name") field(VAL, "BPMVB2") field(PINI, "YES") } record(stringin, "BPMVB2:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:LTU0:150") field(PINI, "YES") } record(ai, "BPMS:LTU0:150:X_SLOW") { field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:LTU0:150:X MS") field(FLNK, "BPMS:LTU0:150:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:LTU0:150:Y_SLOW") { field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:LTU0:150:Y NPP MS") field(FLNK, "BPMS:LTU0:150:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:LTU0:150:TMIT_SLOW") { field(DESC, "TMIT snapshot for display") field(INP, "BPMS:LTU0:150: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:LTU0:150:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:LTU0:150:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:LTU0:150:SIMC PP") } record(calcout, "BPMS:LTU0:150: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:LTU0:150:USCL") field(INPL, "0") } # Switch simulation record BPMS:LTU0:150:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:LTU0:150:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:LTU0:150: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:LTU0:150:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:150: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:LTU0:150:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:150:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:LTU0:150:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:LTU0:150: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:LTU0:150:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:150:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:LTU0:150:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:150:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:LTU0:150: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:LTU0:150:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:150:UOFF") field(DOL2, "BPMS:LTU0:150:UOFF") field(DOL3, "BPMS:LTU0:150:UOFF") field(DOL4, "BPMS:LTU0:150:UOFF") field(DOL5, "BPMS:LTU0:150:UOFF") field(DOL6, "BPMS:LTU0:150:UOFF") field(DOL7, "BPMS:LTU0:150:UOFF") field(DOL8, "BPMS:LTU0:150:UOFF") field(DOL9, "BPMS:LTU0:150:UOFF") field(DOLA, "BPMS:LTU0:150:UOFF") field(LNK1, "BPMS:LTU0:150:UOFF_SEL.A PP") field(LNK2, "BPMS:LTU0:150:UOFF_SEL.B PP") field(LNK3, "BPMS:LTU0:150:UOFF_SEL.C PP") field(LNK4, "BPMS:LTU0:150:UOFF_SEL.D PP") field(LNK5, "BPMS:LTU0:150:UOFF_SEL.E PP") field(LNK6, "BPMS:LTU0:150:UOFF_SEL.F PP") field(LNK7, "BPMS:LTU0:150:UOFF_SEL.G PP") field(LNK8, "BPMS:LTU0:150:UOFF_SEL.H PP") field(LNK9, "BPMS:LTU0:150:UOFF_SEL.I PP") field(LNKA, "BPMS:LTU0:150:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:150:UOFF_SEL") field(OUTA, "BPMS:LTU0:150:U.AOFF CA") field(OUTB, "BPMS:LTU0:150:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:150:UOFF_CTRL") { field(INPA, "BPMS:LTU0:150:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:150: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:LTU0:150:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:150:VOFF") field(DOL2, "BPMS:LTU0:150:VOFF") field(DOL3, "BPMS:LTU0:150:VOFF") field(DOL4, "BPMS:LTU0:150:VOFF") field(DOL5, "BPMS:LTU0:150:VOFF") field(DOL6, "BPMS:LTU0:150:VOFF") field(DOL7, "BPMS:LTU0:150:VOFF") field(DOL8, "BPMS:LTU0:150:VOFF") field(DOL9, "BPMS:LTU0:150:VOFF") field(DOLA, "BPMS:LTU0:150:VOFF") field(LNK1, "BPMS:LTU0:150:VOFF_SEL.A PP") field(LNK2, "BPMS:LTU0:150:VOFF_SEL.B PP") field(LNK3, "BPMS:LTU0:150:VOFF_SEL.C PP") field(LNK4, "BPMS:LTU0:150:VOFF_SEL.D PP") field(LNK5, "BPMS:LTU0:150:VOFF_SEL.E PP") field(LNK6, "BPMS:LTU0:150:VOFF_SEL.F PP") field(LNK7, "BPMS:LTU0:150:VOFF_SEL.G PP") field(LNK8, "BPMS:LTU0:150:VOFF_SEL.H PP") field(LNK9, "BPMS:LTU0:150:VOFF_SEL.I PP") field(LNKA, "BPMS:LTU0:150:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:150:VOFF_SEL") field(OUTA, "BPMS:LTU0:150:V.AOFF CA") field(OUTB, "BPMS:LTU0:150:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:150:VOFF_CTRL") { field(INPA, "BPMS:LTU0:150:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:150: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:LTU0:150:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:150:USCL") field(DOL2, "BPMS:LTU0:150:USCL") field(DOL3, "BPMS:LTU0:150:USCL") field(DOL4, "BPMS:LTU0:150:USCL") field(DOL5, "BPMS:LTU0:150:USCL") field(DOL6, "BPMS:LTU0:150:USCL") field(DOL7, "BPMS:LTU0:150:USCL") field(DOL8, "BPMS:LTU0:150:USCL") field(DOL9, "BPMS:LTU0:150:USCL") field(DOLA, "BPMS:LTU0:150:USCL") field(LNK1, "BPMS:LTU0:150:USCL_SEL.A PP") field(LNK2, "BPMS:LTU0:150:USCL_SEL.B PP") field(LNK3, "BPMS:LTU0:150:USCL_SEL.C PP") field(LNK4, "BPMS:LTU0:150:USCL_SEL.D PP") field(LNK5, "BPMS:LTU0:150:USCL_SEL.E PP") field(LNK6, "BPMS:LTU0:150:USCL_SEL.F PP") field(LNK7, "BPMS:LTU0:150:USCL_SEL.G PP") field(LNK8, "BPMS:LTU0:150:USCL_SEL.H PP") field(LNK9, "BPMS:LTU0:150:USCL_SEL.I PP") field(LNKA, "BPMS:LTU0:150:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:150:USCL_SEL") field(OUTA, "BPMS:LTU0:150:U.ASLO CA") field(OUTB, "BPMS:LTU0:150:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:150:USCL_CTRL") { field(INPA, "BPMS:LTU0:150:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:150: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:LTU0:150:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:150:VSCL") field(DOL2, "BPMS:LTU0:150:VSCL") field(DOL3, "BPMS:LTU0:150:VSCL") field(DOL4, "BPMS:LTU0:150:VSCL") field(DOL5, "BPMS:LTU0:150:VSCL") field(DOL6, "BPMS:LTU0:150:VSCL") field(DOL7, "BPMS:LTU0:150:VSCL") field(DOL8, "BPMS:LTU0:150:VSCL") field(DOL9, "BPMS:LTU0:150:VSCL") field(DOLA, "BPMS:LTU0:150:VSCL") field(LNK1, "BPMS:LTU0:150:VSCL_SEL.A PP") field(LNK2, "BPMS:LTU0:150:VSCL_SEL.B PP") field(LNK3, "BPMS:LTU0:150:VSCL_SEL.C PP") field(LNK4, "BPMS:LTU0:150:VSCL_SEL.D PP") field(LNK5, "BPMS:LTU0:150:VSCL_SEL.E PP") field(LNK6, "BPMS:LTU0:150:VSCL_SEL.F PP") field(LNK7, "BPMS:LTU0:150:VSCL_SEL.G PP") field(LNK8, "BPMS:LTU0:150:VSCL_SEL.H PP") field(LNK9, "BPMS:LTU0:150:VSCL_SEL.I PP") field(LNKA, "BPMS:LTU0:150:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:150:VSCL_SEL") field(OUTA, "BPMS:LTU0:150:V.ASLO CA") field(OUTB, "BPMS:LTU0:150:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:150:VSCL_CTRL") { field(INPA, "BPMS:LTU0:150:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:150: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:LTU0:150:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:150:PHI") field(DOL2, "BPMS:LTU0:150:PHI") field(DOL3, "BPMS:LTU0:150:PHI") field(DOL4, "BPMS:LTU0:150:PHI") field(DOL5, "BPMS:LTU0:150:PHI") field(DOL6, "BPMS:LTU0:150:PHI") field(DOL7, "BPMS:LTU0:150:PHI") field(DOL8, "BPMS:LTU0:150:PHI") field(DOL9, "BPMS:LTU0:150:PHI") field(DOLA, "BPMS:LTU0:150:PHI") field(LNK1, "BPMS:LTU0:150:PHI_SEL.A PP") field(LNK2, "BPMS:LTU0:150:PHI_SEL.B PP") field(LNK3, "BPMS:LTU0:150:PHI_SEL.C PP") field(LNK4, "BPMS:LTU0:150:PHI_SEL.D PP") field(LNK5, "BPMS:LTU0:150:PHI_SEL.E PP") field(LNK6, "BPMS:LTU0:150:PHI_SEL.F PP") field(LNK7, "BPMS:LTU0:150:PHI_SEL.G PP") field(LNK8, "BPMS:LTU0:150:PHI_SEL.H PP") field(LNK9, "BPMS:LTU0:150:PHI_SEL.I PP") field(LNKA, "BPMS:LTU0:150:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:150:PHI_SEL") field(OUTA, "BPMS:LTU0:150:CALC.E CA") field(OUTB, "BPMS:LTU0:150:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:150:PHI_CTRL") { field(INPA, "BPMS:LTU0:150:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:150: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:LTU0:150:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:150:PSI") field(DOL2, "BPMS:LTU0:150:PSI") field(DOL3, "BPMS:LTU0:150:PSI") field(DOL4, "BPMS:LTU0:150:PSI") field(DOL5, "BPMS:LTU0:150:PSI") field(DOL6, "BPMS:LTU0:150:PSI") field(DOL7, "BPMS:LTU0:150:PSI") field(DOL8, "BPMS:LTU0:150:PSI") field(DOL9, "BPMS:LTU0:150:PSI") field(DOLA, "BPMS:LTU0:150:PSI") field(LNK1, "BPMS:LTU0:150:PSI_SEL.A PP") field(LNK2, "BPMS:LTU0:150:PSI_SEL.B PP") field(LNK3, "BPMS:LTU0:150:PSI_SEL.C PP") field(LNK4, "BPMS:LTU0:150:PSI_SEL.D PP") field(LNK5, "BPMS:LTU0:150:PSI_SEL.E PP") field(LNK6, "BPMS:LTU0:150:PSI_SEL.F PP") field(LNK7, "BPMS:LTU0:150:PSI_SEL.G PP") field(LNK8, "BPMS:LTU0:150:PSI_SEL.H PP") field(LNK9, "BPMS:LTU0:150:PSI_SEL.I PP") field(LNKA, "BPMS:LTU0:150:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:150: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:LTU0:150: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:LTU0:150: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:LTU0:150:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:150:PSI_SEL") field(OUTA, "BPMS:LTU0:150:CALC.F CA") field(OUTB, "BPMS:LTU0:150:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:150:PSI_CTRL") { field(INPA, "BPMS:LTU0:150:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:150:PSI_SEL.L PP") } record(longout, "BPMS:LTU0:150: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170:TYLO") { field(DESC, "Yellow arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C4 S7") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(bo, "BPMS:LTU0:170:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:170:CALC.K NPP MS") field(ZNAM, "Off") field(ONAM, "On") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:LTU0:170:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:170: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:LTU0:170:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:LTU0:170:ATT1 CP") field(INPC, "BPMS:LTU0:170: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:LTU0:170:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:LTU0:170:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:LTU0:170:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:LTU0:170:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:LTU0:170:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:LTU0:170:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:LTU0:170: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:LTU0:170:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:170: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:LTU0:170:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:170: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:LTU0:170:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:LTU0:170:RSTA.SEVR MS NPP") field(INPB, "BPMS:LTU0:170:TMIT.SEVR MS NPP") field(INPC, "BPMS:LTU0:170:Y.SEVR MS NPP") field(INPD, "BPMS:LTU0:170:X.SEVR MS NPP") field(INPE, "BPMS:LTU0:170:TGRN.SEVR MS NPP") field(INPF, "BPMS:LTU0:170:TRED.SEVR MS NPP") field(INPG, "BPMS:LTU0:170:TBLU.SEVR MS NPP") field(INPH, "BPMS:LTU0:170:TYLO.SEVR MS NPP") field(INPI, "BPMS:LTU0:170:GRU.SEVR MS NPP") field(INPJ, "BPMS:LTU0:170: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:LTU0:170:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:LTU0:170: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:LTU0:170:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:LTU0:170: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:LTU0:170:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:LTU0:170:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:LTU0:170:GRU.SEVR MS NPP") field(INPC, "BPMS:LTU0:170:GRV.SEVR MS NPP") field(INPD, "BPMS:LTU0:170:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:LTU0:170:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:LTU0:170:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:LTU0:170: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:LTU0:170:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:LTU0:170:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:170: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:LTU0:170:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:LTU0:170:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:170: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:LTU0:170:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:LTU0:170: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:LTU0:170:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "4") field(SCAN, "Passive") } record(bo, "BPMS:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C4 S12") field(FLNK, "BPMS:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170:V") } record(ai, "BPMS:LTU0:170: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:LTU0:170:PINC") } record(ai, "BPMS:LTU0:170:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C4 S10") field(SCAN, "Passive") } record(longin, "BPMS:LTU0:170: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:LTU0:170:RSTA_ALH") } record(calc, "BPMS:LTU0:170:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:LTU0:170:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:170:PADTOC") } record(calc, "BPMS:LTU0:170:PADTOC") { field(CALC, "(A&B)?1:0") field(INPA, "BPMS:LTU0:170:RSTA") field(INPB, "0x100") field(FLNK, "BPMS:LTU0:170:PADTO") } record(bi, "BPMS:LTU0:170:PADTO") { field(DESC, "PAD connection timeout") field(INP, "BPMS:LTU0:170:PADTOC") field(ZNAM, "OK") field(ONAM, "TIMEOUT") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:LTU0:170: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:LTU0:170:PHI_SEQ") } record(ao, "BPMS:LTU0:170: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:LTU0:170:PSI_SEQ") } #record(dfanout, "BPMS:LTU0:170:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:LTU0:170:USCL PP MS") # field(OUTB, "BPMS:LTU0:170:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:LTU0:170: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:LTU0:170:UOFF_SEQ") } record(ao, "BPMS:LTU0:170: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:LTU0:170:VOFF_SEQ") } record(ao, "BPMS:LTU0:170:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:LTU0:170:USCL_SEQ") } record(ao, "BPMS:LTU0:170:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:LTU0:170:VSCL_SEQ") } record(mbbo, "BPMS:LTU0:170: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:LTU0:170: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:LTU0:170:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") # 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, "RVAL") } # Convenience record holding the MAD name record(stringin, "BPMS:LTU0:170:MADN") { field(DESC, "MAD Name") field(VAL, "BPMVB3") field(PINI, "YES") } record(stringin, "BPMVB3:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:LTU0:170") field(PINI, "YES") } record(ai, "BPMS:LTU0:170:X_SLOW") { field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:LTU0:170:X MS") field(FLNK, "BPMS:LTU0:170:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:LTU0:170:Y_SLOW") { field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:LTU0:170:Y NPP MS") field(FLNK, "BPMS:LTU0:170:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:LTU0:170:TMIT_SLOW") { field(DESC, "TMIT snapshot for display") field(INP, "BPMS:LTU0:170: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:LTU0:170:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:LTU0:170:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:LTU0:170:SIMC PP") } record(calcout, "BPMS:LTU0:170: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:LTU0:170:USCL") field(INPL, "0") } # Switch simulation record BPMS:LTU0:170:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:LTU0:170:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:LTU0:170: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:LTU0:170:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:170: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:LTU0:170:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:170:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:LTU0:170:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:LTU0:170: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:LTU0:170:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:170:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:LTU0:170:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:170:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:LTU0:170: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:LTU0:170:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:170:UOFF") field(DOL2, "BPMS:LTU0:170:UOFF") field(DOL3, "BPMS:LTU0:170:UOFF") field(DOL4, "BPMS:LTU0:170:UOFF") field(DOL5, "BPMS:LTU0:170:UOFF") field(DOL6, "BPMS:LTU0:170:UOFF") field(DOL7, "BPMS:LTU0:170:UOFF") field(DOL8, "BPMS:LTU0:170:UOFF") field(DOL9, "BPMS:LTU0:170:UOFF") field(DOLA, "BPMS:LTU0:170:UOFF") field(LNK1, "BPMS:LTU0:170:UOFF_SEL.A PP") field(LNK2, "BPMS:LTU0:170:UOFF_SEL.B PP") field(LNK3, "BPMS:LTU0:170:UOFF_SEL.C PP") field(LNK4, "BPMS:LTU0:170:UOFF_SEL.D PP") field(LNK5, "BPMS:LTU0:170:UOFF_SEL.E PP") field(LNK6, "BPMS:LTU0:170:UOFF_SEL.F PP") field(LNK7, "BPMS:LTU0:170:UOFF_SEL.G PP") field(LNK8, "BPMS:LTU0:170:UOFF_SEL.H PP") field(LNK9, "BPMS:LTU0:170:UOFF_SEL.I PP") field(LNKA, "BPMS:LTU0:170:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:170:UOFF_SEL") field(OUTA, "BPMS:LTU0:170:U.AOFF CA") field(OUTB, "BPMS:LTU0:170:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:170:UOFF_CTRL") { field(INPA, "BPMS:LTU0:170:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:170: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:LTU0:170:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:170:VOFF") field(DOL2, "BPMS:LTU0:170:VOFF") field(DOL3, "BPMS:LTU0:170:VOFF") field(DOL4, "BPMS:LTU0:170:VOFF") field(DOL5, "BPMS:LTU0:170:VOFF") field(DOL6, "BPMS:LTU0:170:VOFF") field(DOL7, "BPMS:LTU0:170:VOFF") field(DOL8, "BPMS:LTU0:170:VOFF") field(DOL9, "BPMS:LTU0:170:VOFF") field(DOLA, "BPMS:LTU0:170:VOFF") field(LNK1, "BPMS:LTU0:170:VOFF_SEL.A PP") field(LNK2, "BPMS:LTU0:170:VOFF_SEL.B PP") field(LNK3, "BPMS:LTU0:170:VOFF_SEL.C PP") field(LNK4, "BPMS:LTU0:170:VOFF_SEL.D PP") field(LNK5, "BPMS:LTU0:170:VOFF_SEL.E PP") field(LNK6, "BPMS:LTU0:170:VOFF_SEL.F PP") field(LNK7, "BPMS:LTU0:170:VOFF_SEL.G PP") field(LNK8, "BPMS:LTU0:170:VOFF_SEL.H PP") field(LNK9, "BPMS:LTU0:170:VOFF_SEL.I PP") field(LNKA, "BPMS:LTU0:170:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:170:VOFF_SEL") field(OUTA, "BPMS:LTU0:170:V.AOFF CA") field(OUTB, "BPMS:LTU0:170:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:170:VOFF_CTRL") { field(INPA, "BPMS:LTU0:170:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:170: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:LTU0:170:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:170:USCL") field(DOL2, "BPMS:LTU0:170:USCL") field(DOL3, "BPMS:LTU0:170:USCL") field(DOL4, "BPMS:LTU0:170:USCL") field(DOL5, "BPMS:LTU0:170:USCL") field(DOL6, "BPMS:LTU0:170:USCL") field(DOL7, "BPMS:LTU0:170:USCL") field(DOL8, "BPMS:LTU0:170:USCL") field(DOL9, "BPMS:LTU0:170:USCL") field(DOLA, "BPMS:LTU0:170:USCL") field(LNK1, "BPMS:LTU0:170:USCL_SEL.A PP") field(LNK2, "BPMS:LTU0:170:USCL_SEL.B PP") field(LNK3, "BPMS:LTU0:170:USCL_SEL.C PP") field(LNK4, "BPMS:LTU0:170:USCL_SEL.D PP") field(LNK5, "BPMS:LTU0:170:USCL_SEL.E PP") field(LNK6, "BPMS:LTU0:170:USCL_SEL.F PP") field(LNK7, "BPMS:LTU0:170:USCL_SEL.G PP") field(LNK8, "BPMS:LTU0:170:USCL_SEL.H PP") field(LNK9, "BPMS:LTU0:170:USCL_SEL.I PP") field(LNKA, "BPMS:LTU0:170:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:170:USCL_SEL") field(OUTA, "BPMS:LTU0:170:U.ASLO CA") field(OUTB, "BPMS:LTU0:170:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:170:USCL_CTRL") { field(INPA, "BPMS:LTU0:170:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:170: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:LTU0:170:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:170:VSCL") field(DOL2, "BPMS:LTU0:170:VSCL") field(DOL3, "BPMS:LTU0:170:VSCL") field(DOL4, "BPMS:LTU0:170:VSCL") field(DOL5, "BPMS:LTU0:170:VSCL") field(DOL6, "BPMS:LTU0:170:VSCL") field(DOL7, "BPMS:LTU0:170:VSCL") field(DOL8, "BPMS:LTU0:170:VSCL") field(DOL9, "BPMS:LTU0:170:VSCL") field(DOLA, "BPMS:LTU0:170:VSCL") field(LNK1, "BPMS:LTU0:170:VSCL_SEL.A PP") field(LNK2, "BPMS:LTU0:170:VSCL_SEL.B PP") field(LNK3, "BPMS:LTU0:170:VSCL_SEL.C PP") field(LNK4, "BPMS:LTU0:170:VSCL_SEL.D PP") field(LNK5, "BPMS:LTU0:170:VSCL_SEL.E PP") field(LNK6, "BPMS:LTU0:170:VSCL_SEL.F PP") field(LNK7, "BPMS:LTU0:170:VSCL_SEL.G PP") field(LNK8, "BPMS:LTU0:170:VSCL_SEL.H PP") field(LNK9, "BPMS:LTU0:170:VSCL_SEL.I PP") field(LNKA, "BPMS:LTU0:170:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:170:VSCL_SEL") field(OUTA, "BPMS:LTU0:170:V.ASLO CA") field(OUTB, "BPMS:LTU0:170:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:170:VSCL_CTRL") { field(INPA, "BPMS:LTU0:170:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:170: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:LTU0:170:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:170:PHI") field(DOL2, "BPMS:LTU0:170:PHI") field(DOL3, "BPMS:LTU0:170:PHI") field(DOL4, "BPMS:LTU0:170:PHI") field(DOL5, "BPMS:LTU0:170:PHI") field(DOL6, "BPMS:LTU0:170:PHI") field(DOL7, "BPMS:LTU0:170:PHI") field(DOL8, "BPMS:LTU0:170:PHI") field(DOL9, "BPMS:LTU0:170:PHI") field(DOLA, "BPMS:LTU0:170:PHI") field(LNK1, "BPMS:LTU0:170:PHI_SEL.A PP") field(LNK2, "BPMS:LTU0:170:PHI_SEL.B PP") field(LNK3, "BPMS:LTU0:170:PHI_SEL.C PP") field(LNK4, "BPMS:LTU0:170:PHI_SEL.D PP") field(LNK5, "BPMS:LTU0:170:PHI_SEL.E PP") field(LNK6, "BPMS:LTU0:170:PHI_SEL.F PP") field(LNK7, "BPMS:LTU0:170:PHI_SEL.G PP") field(LNK8, "BPMS:LTU0:170:PHI_SEL.H PP") field(LNK9, "BPMS:LTU0:170:PHI_SEL.I PP") field(LNKA, "BPMS:LTU0:170:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:170:PHI_SEL") field(OUTA, "BPMS:LTU0:170:CALC.E CA") field(OUTB, "BPMS:LTU0:170:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:170:PHI_CTRL") { field(INPA, "BPMS:LTU0:170:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:170: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:LTU0:170:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:170:PSI") field(DOL2, "BPMS:LTU0:170:PSI") field(DOL3, "BPMS:LTU0:170:PSI") field(DOL4, "BPMS:LTU0:170:PSI") field(DOL5, "BPMS:LTU0:170:PSI") field(DOL6, "BPMS:LTU0:170:PSI") field(DOL7, "BPMS:LTU0:170:PSI") field(DOL8, "BPMS:LTU0:170:PSI") field(DOL9, "BPMS:LTU0:170:PSI") field(DOLA, "BPMS:LTU0:170:PSI") field(LNK1, "BPMS:LTU0:170:PSI_SEL.A PP") field(LNK2, "BPMS:LTU0:170:PSI_SEL.B PP") field(LNK3, "BPMS:LTU0:170:PSI_SEL.C PP") field(LNK4, "BPMS:LTU0:170:PSI_SEL.D PP") field(LNK5, "BPMS:LTU0:170:PSI_SEL.E PP") field(LNK6, "BPMS:LTU0:170:PSI_SEL.F PP") field(LNK7, "BPMS:LTU0:170:PSI_SEL.G PP") field(LNK8, "BPMS:LTU0:170:PSI_SEL.H PP") field(LNK9, "BPMS:LTU0:170:PSI_SEL.I PP") field(LNKA, "BPMS:LTU0:170:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:170: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:LTU0:170: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:LTU0:170: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:LTU0:170:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:170:PSI_SEL") field(OUTA, "BPMS:LTU0:170:CALC.F CA") field(OUTB, "BPMS:LTU0:170:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:170:PSI_CTRL") { field(INPA, "BPMS:LTU0:170:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:170:PSI_SEL.L PP") } record(longout, "BPMS:LTU0:170: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180:TYLO") { field(DESC, "Yellow arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C5 S7") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(bo, "BPMS:LTU0:180:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:180:CALC.K NPP MS") field(ZNAM, "Off") field(ONAM, "On") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:LTU0:180:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:180: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:LTU0:180:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:LTU0:180:ATT1 CP") field(INPC, "BPMS:LTU0:180: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:LTU0:180:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:LTU0:180:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:LTU0:180:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:LTU0:180:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:LTU0:180:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:LTU0:180:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:LTU0:180: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:LTU0:180:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:180: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:LTU0:180:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:180: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:LTU0:180:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:LTU0:180:RSTA.SEVR MS NPP") field(INPB, "BPMS:LTU0:180:TMIT.SEVR MS NPP") field(INPC, "BPMS:LTU0:180:Y.SEVR MS NPP") field(INPD, "BPMS:LTU0:180:X.SEVR MS NPP") field(INPE, "BPMS:LTU0:180:TGRN.SEVR MS NPP") field(INPF, "BPMS:LTU0:180:TRED.SEVR MS NPP") field(INPG, "BPMS:LTU0:180:TBLU.SEVR MS NPP") field(INPH, "BPMS:LTU0:180:TYLO.SEVR MS NPP") field(INPI, "BPMS:LTU0:180:GRU.SEVR MS NPP") field(INPJ, "BPMS:LTU0:180: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:LTU0:180:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:LTU0:180: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:LTU0:180:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:LTU0:180: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:LTU0:180:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:LTU0:180:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:LTU0:180:GRU.SEVR MS NPP") field(INPC, "BPMS:LTU0:180:GRV.SEVR MS NPP") field(INPD, "BPMS:LTU0:180:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:LTU0:180:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:LTU0:180:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:LTU0:180: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:LTU0:180:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:LTU0:180:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:180: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:LTU0:180:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:LTU0:180:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:180: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:LTU0:180:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:LTU0:180: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:LTU0:180:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "5") field(SCAN, "Passive") } record(bo, "BPMS:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C5 S12") field(FLNK, "BPMS:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180:V") } record(ai, "BPMS:LTU0:180: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:LTU0:180:PINC") } record(ai, "BPMS:LTU0:180:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C5 S10") field(SCAN, "Passive") } record(longin, "BPMS:LTU0:180: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:LTU0:180:RSTA_ALH") } record(calc, "BPMS:LTU0:180:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:LTU0:180:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:180:PADTOC") } record(calc, "BPMS:LTU0:180:PADTOC") { field(CALC, "(A&B)?1:0") field(INPA, "BPMS:LTU0:180:RSTA") field(INPB, "0x100") field(FLNK, "BPMS:LTU0:180:PADTO") } record(bi, "BPMS:LTU0:180:PADTO") { field(DESC, "PAD connection timeout") field(INP, "BPMS:LTU0:180:PADTOC") field(ZNAM, "OK") field(ONAM, "TIMEOUT") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:LTU0:180: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:LTU0:180:PHI_SEQ") } record(ao, "BPMS:LTU0:180: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:LTU0:180:PSI_SEQ") } #record(dfanout, "BPMS:LTU0:180:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:LTU0:180:USCL PP MS") # field(OUTB, "BPMS:LTU0:180:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:LTU0:180: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:LTU0:180:UOFF_SEQ") } record(ao, "BPMS:LTU0:180: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:LTU0:180:VOFF_SEQ") } record(ao, "BPMS:LTU0:180:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:LTU0:180:USCL_SEQ") } record(ao, "BPMS:LTU0:180:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:LTU0:180:VSCL_SEQ") } record(mbbo, "BPMS:LTU0:180: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:LTU0:180: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:LTU0:180:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") # 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, "RVAL") } # Convenience record holding the MAD name record(stringin, "BPMS:LTU0:180:MADN") { field(DESC, "MAD Name") field(VAL, "BPMVM3") field(PINI, "YES") } record(stringin, "BPMVM3:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:LTU0:180") field(PINI, "YES") } record(ai, "BPMS:LTU0:180:X_SLOW") { field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:LTU0:180:X MS") field(FLNK, "BPMS:LTU0:180:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:LTU0:180:Y_SLOW") { field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:LTU0:180:Y NPP MS") field(FLNK, "BPMS:LTU0:180:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:LTU0:180:TMIT_SLOW") { field(DESC, "TMIT snapshot for display") field(INP, "BPMS:LTU0:180: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:LTU0:180:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:LTU0:180:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:LTU0:180:SIMC PP") } record(calcout, "BPMS:LTU0:180: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:LTU0:180:USCL") field(INPL, "0") } # Switch simulation record BPMS:LTU0:180:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:LTU0:180:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:LTU0:180: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:LTU0:180:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:180: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:LTU0:180:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:180:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:LTU0:180:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:LTU0:180: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:LTU0:180:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:180:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:LTU0:180:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:180:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:LTU0:180: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:LTU0:180:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:180:UOFF") field(DOL2, "BPMS:LTU0:180:UOFF") field(DOL3, "BPMS:LTU0:180:UOFF") field(DOL4, "BPMS:LTU0:180:UOFF") field(DOL5, "BPMS:LTU0:180:UOFF") field(DOL6, "BPMS:LTU0:180:UOFF") field(DOL7, "BPMS:LTU0:180:UOFF") field(DOL8, "BPMS:LTU0:180:UOFF") field(DOL9, "BPMS:LTU0:180:UOFF") field(DOLA, "BPMS:LTU0:180:UOFF") field(LNK1, "BPMS:LTU0:180:UOFF_SEL.A PP") field(LNK2, "BPMS:LTU0:180:UOFF_SEL.B PP") field(LNK3, "BPMS:LTU0:180:UOFF_SEL.C PP") field(LNK4, "BPMS:LTU0:180:UOFF_SEL.D PP") field(LNK5, "BPMS:LTU0:180:UOFF_SEL.E PP") field(LNK6, "BPMS:LTU0:180:UOFF_SEL.F PP") field(LNK7, "BPMS:LTU0:180:UOFF_SEL.G PP") field(LNK8, "BPMS:LTU0:180:UOFF_SEL.H PP") field(LNK9, "BPMS:LTU0:180:UOFF_SEL.I PP") field(LNKA, "BPMS:LTU0:180:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:180:UOFF_SEL") field(OUTA, "BPMS:LTU0:180:U.AOFF CA") field(OUTB, "BPMS:LTU0:180:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:180:UOFF_CTRL") { field(INPA, "BPMS:LTU0:180:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:180: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:LTU0:180:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:180:VOFF") field(DOL2, "BPMS:LTU0:180:VOFF") field(DOL3, "BPMS:LTU0:180:VOFF") field(DOL4, "BPMS:LTU0:180:VOFF") field(DOL5, "BPMS:LTU0:180:VOFF") field(DOL6, "BPMS:LTU0:180:VOFF") field(DOL7, "BPMS:LTU0:180:VOFF") field(DOL8, "BPMS:LTU0:180:VOFF") field(DOL9, "BPMS:LTU0:180:VOFF") field(DOLA, "BPMS:LTU0:180:VOFF") field(LNK1, "BPMS:LTU0:180:VOFF_SEL.A PP") field(LNK2, "BPMS:LTU0:180:VOFF_SEL.B PP") field(LNK3, "BPMS:LTU0:180:VOFF_SEL.C PP") field(LNK4, "BPMS:LTU0:180:VOFF_SEL.D PP") field(LNK5, "BPMS:LTU0:180:VOFF_SEL.E PP") field(LNK6, "BPMS:LTU0:180:VOFF_SEL.F PP") field(LNK7, "BPMS:LTU0:180:VOFF_SEL.G PP") field(LNK8, "BPMS:LTU0:180:VOFF_SEL.H PP") field(LNK9, "BPMS:LTU0:180:VOFF_SEL.I PP") field(LNKA, "BPMS:LTU0:180:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:180:VOFF_SEL") field(OUTA, "BPMS:LTU0:180:V.AOFF CA") field(OUTB, "BPMS:LTU0:180:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:180:VOFF_CTRL") { field(INPA, "BPMS:LTU0:180:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:180: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:LTU0:180:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:180:USCL") field(DOL2, "BPMS:LTU0:180:USCL") field(DOL3, "BPMS:LTU0:180:USCL") field(DOL4, "BPMS:LTU0:180:USCL") field(DOL5, "BPMS:LTU0:180:USCL") field(DOL6, "BPMS:LTU0:180:USCL") field(DOL7, "BPMS:LTU0:180:USCL") field(DOL8, "BPMS:LTU0:180:USCL") field(DOL9, "BPMS:LTU0:180:USCL") field(DOLA, "BPMS:LTU0:180:USCL") field(LNK1, "BPMS:LTU0:180:USCL_SEL.A PP") field(LNK2, "BPMS:LTU0:180:USCL_SEL.B PP") field(LNK3, "BPMS:LTU0:180:USCL_SEL.C PP") field(LNK4, "BPMS:LTU0:180:USCL_SEL.D PP") field(LNK5, "BPMS:LTU0:180:USCL_SEL.E PP") field(LNK6, "BPMS:LTU0:180:USCL_SEL.F PP") field(LNK7, "BPMS:LTU0:180:USCL_SEL.G PP") field(LNK8, "BPMS:LTU0:180:USCL_SEL.H PP") field(LNK9, "BPMS:LTU0:180:USCL_SEL.I PP") field(LNKA, "BPMS:LTU0:180:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:180:USCL_SEL") field(OUTA, "BPMS:LTU0:180:U.ASLO CA") field(OUTB, "BPMS:LTU0:180:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:180:USCL_CTRL") { field(INPA, "BPMS:LTU0:180:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:180: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:LTU0:180:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:180:VSCL") field(DOL2, "BPMS:LTU0:180:VSCL") field(DOL3, "BPMS:LTU0:180:VSCL") field(DOL4, "BPMS:LTU0:180:VSCL") field(DOL5, "BPMS:LTU0:180:VSCL") field(DOL6, "BPMS:LTU0:180:VSCL") field(DOL7, "BPMS:LTU0:180:VSCL") field(DOL8, "BPMS:LTU0:180:VSCL") field(DOL9, "BPMS:LTU0:180:VSCL") field(DOLA, "BPMS:LTU0:180:VSCL") field(LNK1, "BPMS:LTU0:180:VSCL_SEL.A PP") field(LNK2, "BPMS:LTU0:180:VSCL_SEL.B PP") field(LNK3, "BPMS:LTU0:180:VSCL_SEL.C PP") field(LNK4, "BPMS:LTU0:180:VSCL_SEL.D PP") field(LNK5, "BPMS:LTU0:180:VSCL_SEL.E PP") field(LNK6, "BPMS:LTU0:180:VSCL_SEL.F PP") field(LNK7, "BPMS:LTU0:180:VSCL_SEL.G PP") field(LNK8, "BPMS:LTU0:180:VSCL_SEL.H PP") field(LNK9, "BPMS:LTU0:180:VSCL_SEL.I PP") field(LNKA, "BPMS:LTU0:180:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:180:VSCL_SEL") field(OUTA, "BPMS:LTU0:180:V.ASLO CA") field(OUTB, "BPMS:LTU0:180:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:180:VSCL_CTRL") { field(INPA, "BPMS:LTU0:180:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:180: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:LTU0:180:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:180:PHI") field(DOL2, "BPMS:LTU0:180:PHI") field(DOL3, "BPMS:LTU0:180:PHI") field(DOL4, "BPMS:LTU0:180:PHI") field(DOL5, "BPMS:LTU0:180:PHI") field(DOL6, "BPMS:LTU0:180:PHI") field(DOL7, "BPMS:LTU0:180:PHI") field(DOL8, "BPMS:LTU0:180:PHI") field(DOL9, "BPMS:LTU0:180:PHI") field(DOLA, "BPMS:LTU0:180:PHI") field(LNK1, "BPMS:LTU0:180:PHI_SEL.A PP") field(LNK2, "BPMS:LTU0:180:PHI_SEL.B PP") field(LNK3, "BPMS:LTU0:180:PHI_SEL.C PP") field(LNK4, "BPMS:LTU0:180:PHI_SEL.D PP") field(LNK5, "BPMS:LTU0:180:PHI_SEL.E PP") field(LNK6, "BPMS:LTU0:180:PHI_SEL.F PP") field(LNK7, "BPMS:LTU0:180:PHI_SEL.G PP") field(LNK8, "BPMS:LTU0:180:PHI_SEL.H PP") field(LNK9, "BPMS:LTU0:180:PHI_SEL.I PP") field(LNKA, "BPMS:LTU0:180:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:180:PHI_SEL") field(OUTA, "BPMS:LTU0:180:CALC.E CA") field(OUTB, "BPMS:LTU0:180:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:180:PHI_CTRL") { field(INPA, "BPMS:LTU0:180:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:180: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:LTU0:180:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:180:PSI") field(DOL2, "BPMS:LTU0:180:PSI") field(DOL3, "BPMS:LTU0:180:PSI") field(DOL4, "BPMS:LTU0:180:PSI") field(DOL5, "BPMS:LTU0:180:PSI") field(DOL6, "BPMS:LTU0:180:PSI") field(DOL7, "BPMS:LTU0:180:PSI") field(DOL8, "BPMS:LTU0:180:PSI") field(DOL9, "BPMS:LTU0:180:PSI") field(DOLA, "BPMS:LTU0:180:PSI") field(LNK1, "BPMS:LTU0:180:PSI_SEL.A PP") field(LNK2, "BPMS:LTU0:180:PSI_SEL.B PP") field(LNK3, "BPMS:LTU0:180:PSI_SEL.C PP") field(LNK4, "BPMS:LTU0:180:PSI_SEL.D PP") field(LNK5, "BPMS:LTU0:180:PSI_SEL.E PP") field(LNK6, "BPMS:LTU0:180:PSI_SEL.F PP") field(LNK7, "BPMS:LTU0:180:PSI_SEL.G PP") field(LNK8, "BPMS:LTU0:180:PSI_SEL.H PP") field(LNK9, "BPMS:LTU0:180:PSI_SEL.I PP") field(LNKA, "BPMS:LTU0:180:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:180: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:LTU0:180: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:LTU0:180: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:LTU0:180:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:180:PSI_SEL") field(OUTA, "BPMS:LTU0:180:CALC.F CA") field(OUTB, "BPMS:LTU0:180:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:180:PSI_CTRL") { field(INPA, "BPMS:LTU0:180:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:180:PSI_SEL.L PP") } record(longout, "BPMS:LTU0:180: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190:TYLO") { field(DESC, "Yellow arrival time") field(DTYP, "Raw Bpm Signal") field(EGU, "ADC Clocks") # 'card' selects PAD number, 'signal' selects cal coeff field(INP, "#C6 S7") field(SCAN, "10 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "128") field(LOLO, "5") field(LOW, "8") field(HIGH, "60") field(HIHI, "70") field(LLSV, "MAJOR") field(LSV, "MINOR") field(HSV, "MINOR") field(HHSV, "MAJOR") } record(bo, "BPMS:LTU0:190:PCEN") { field(DESC, "Enable Pinc. Corr.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:190:CALC.K NPP MS") field(ZNAM, "Off") field(ONAM, "On") field(VAL, "0") field(PINI, "YES") info(autosaveFields, "VAL") } # QSCL setting: # # Q: charge # Z: impedance # F: form factor: phi/(2 pi) sin(2 pi f l/c) # # Signal = Q Z F G h(t) = A h(t) [A] = Vs # # inf inf # Energy = A^2 / h^2(t) dt = A^2 / |H(w)|^2 dw/2/pi = A^2 B # 0 0 # # Measured energy = Sum{ (Vp/32768 * xi)^2 } / fs = S / fs ~ Energy # # -> A^2 B = S/fs # # With T = sqrt( Sum{ xi^2 } ) # # A = sqrt(S)/sqrt(B*fs) = T/sqrt(B*fs) Vp/32768 # # T/32768 Vp # Q = A/F/G/Z = ----------------- # F G Z sqrt(B*fs) # # Vp = { 1.5Vpp/2 (PGA=1) or 2.25Vpp/2 (PGA=0) } / 2 (transformer) # # I believe PGA is off (-> Vp ~ .56V) # # Z = 50 # # G: (calibration uses GRN/BLU -> signal should have the # level of the grn/red channels with the additional switch) # # Block diagram / parts / gain: # # [filt] [Att1] [Amp1] [Att2] [BPF] [Amp2] [pad] [Amp3] [switch] # f-17520 hmc540lp3 SBF-5089 hmc540lp3 MBP-140-6-4 SBF-4089 PAT-0 SBF-4089 HMC-197 # # -2dB* -1dB 20dB -1dB -4.5 14.8dB 0dB 14.8dB -0.4dB # # *: 1st filter ATT is a wild guess. # BPF loss (RLC Catalog, pp.55): (L (nsect+.5) / (% of 3dB BW) + .2) dB # with L ~6.2 10MHz/fc=140Mhz filter-> 4.5 # # -> Gtot ~ 40.7dB # # subtract cable loss (2dB); Gtot = 86 # # T/32768 Vp .56V/32768 # Q = A/F/G/Z = ----------------- = T/F ------------------------ # F G Z sqrt(B*fs) 86*50*sqrt(10*140)Mhz # # = T/F = 1.06E-7/F nC # # F for a 7% coverage, 4" BPM at 140MHz .07 sin(2*pi*140e6 4*.0254/3e8) # = .021 # # => 1.06E-7/.021 nC = 5E-6 nC # # (Faraday cup measurement -> (3600/44)^-1 1e-4 -> 1.22E-6 # record(ao, "BPMS:LTU0:190:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:190: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:LTU0:190:QSCA") { field(DESC, "TMIT ATT Adj. Scale") field(INPB, "BPMS:LTU0:190:ATT1 CP") field(INPC, "BPMS:LTU0:190: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:LTU0:190:TMIT.ASLO CA") field(EGU, "Nel") field(PREC, "3") info(autosaveFields, "D") } record(ao, "BPMS:LTU0:190:ATT1SIMP") { field(DESC, "ATT1 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:LTU0:190:ATT1 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:LTU0:190:ASIM.A PP") field(IVOA, "Set output to IVOV") field(IVOV, "0") field(EGU, "dB") } record(ao, "BPMS:LTU0:190:ATT2SIMP") { field(DESC, "ATT2 Propagator") field(DTYP, "Soft Channel") field(DOL, "BPMS:LTU0:190:ATT2 CP") field(OMSL, "closed_loop") field(OUT, "BPMS:LTU0:190: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:LTU0:190:ASIM") { field(DESC, "Q Simul Attenuator") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:190: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:LTU0:190:WSIM") { field(DESC, "BPM W Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:190: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:LTU0:190:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:LTU0:190:RSTA.SEVR MS NPP") field(INPB, "BPMS:LTU0:190:TMIT.SEVR MS NPP") field(INPC, "BPMS:LTU0:190:Y.SEVR MS NPP") field(INPD, "BPMS:LTU0:190:X.SEVR MS NPP") field(INPE, "BPMS:LTU0:190:TGRN.SEVR MS NPP") field(INPF, "BPMS:LTU0:190:TRED.SEVR MS NPP") field(INPG, "BPMS:LTU0:190:TBLU.SEVR MS NPP") field(INPH, "BPMS:LTU0:190:TYLO.SEVR MS NPP") field(INPI, "BPMS:LTU0:190:GRU.SEVR MS NPP") field(INPJ, "BPMS:LTU0:190: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:LTU0:190:ATTO") { field(DESC, "AFE Tot. Att. Offset") # fetched via inlink #field(OUT, "BPMS:LTU0:190: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:LTU0:190:CLAO") { field(DESC, "AFE Cal. Att. Offset") # fetched via inlink #field(OUT, "BPMS:LTU0:190: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:LTU0:190:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:LTU0:190:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:LTU0:190:GRU.SEVR MS NPP") field(INPC, "BPMS:LTU0:190:GRV.SEVR MS NPP") field(INPD, "BPMS:LTU0:190:CHK.SEVR MS NPP") } # snapshot PV for the bpm values display record(ai, "BPMS:LTU0:190:GRN_SLOW") { field(DESC, "GRN snapshot for display") field(INP, "BPMS:LTU0:190:GRN NPP MS") field(EGU, "raw") field(SCAN, "1 second") field(FLNK, "BPMS:LTU0:190: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:LTU0:190:RED_SLOW") { field(DESC, "RED snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:LTU0:190:RED NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:190: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:LTU0:190:BLU_SLOW") { field(DESC, "BLU snapshot for display") # 'card' selects PAD number, 'signal' selects strip field(INP, "BPMS:LTU0:190:BLU NPP MS") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:190: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:LTU0:190:YLO_SLOW") { field(DESC, "YLO snapshot for display") field(INP, "BPMS:LTU0:190: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:LTU0:190:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "6") field(SCAN, "Passive") } record(bo, "BPMS:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C6 S12") field(FLNK, "BPMS:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190:V") } record(ai, "BPMS:LTU0:190: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:LTU0:190:PINC") } record(ai, "BPMS:LTU0:190:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C6 S10") field(SCAN, "Passive") } record(longin, "BPMS:LTU0:190: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:LTU0:190:RSTA_ALH") } record(calc, "BPMS:LTU0:190:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:LTU0:190:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") field(FLNK, "BPMS:LTU0:190:PADTOC") } record(calc, "BPMS:LTU0:190:PADTOC") { field(CALC, "(A&B)?1:0") field(INPA, "BPMS:LTU0:190:RSTA") field(INPB, "0x100") field(FLNK, "BPMS:LTU0:190:PADTO") } record(bi, "BPMS:LTU0:190:PADTO") { field(DESC, "PAD connection timeout") field(INP, "BPMS:LTU0:190:PADTOC") field(ZNAM, "OK") field(ONAM, "TIMEOUT") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:LTU0:190: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:LTU0:190:PHI_SEQ") } record(ao, "BPMS:LTU0:190: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:LTU0:190:PSI_SEQ") } #record(dfanout, "BPMS:LTU0:190:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:LTU0:190:USCL PP MS") # field(OUTB, "BPMS:LTU0:190:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:LTU0:190: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:LTU0:190:UOFF_SEQ") } record(ao, "BPMS:LTU0:190: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:LTU0:190:VOFF_SEQ") } record(ao, "BPMS:LTU0:190:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:LTU0:190:USCL_SEQ") } record(ao, "BPMS:LTU0:190:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:LTU0:190:VSCL_SEQ") } record(mbbo, "BPMS:LTU0:190: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:LTU0:190: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:LTU0:190:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") # 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, "RVAL") } # Convenience record holding the MAD name record(stringin, "BPMS:LTU0:190:MADN") { field(DESC, "MAD Name") field(VAL, "BPMVM4") field(PINI, "YES") } record(stringin, "BPMVM4:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:LTU0:190") field(PINI, "YES") } record(ai, "BPMS:LTU0:190:X_SLOW") { field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:LTU0:190:X MS") field(FLNK, "BPMS:LTU0:190:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:LTU0:190:Y_SLOW") { field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:LTU0:190:Y NPP MS") field(FLNK, "BPMS:LTU0:190:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:LTU0:190:TMIT_SLOW") { field(DESC, "TMIT snapshot for display") field(INP, "BPMS:LTU0:190: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:LTU0:190:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:LTU0:190:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:LTU0:190:SIMC PP") } record(calcout, "BPMS:LTU0:190: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:LTU0:190:USCL") field(INPL, "0") } # Switch simulation record BPMS:LTU0:190:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:LTU0:190:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:LTU0:190: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:LTU0:190:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:190: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:LTU0:190:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:190:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:LTU0:190:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:LTU0:190: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:LTU0:190:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:190:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:LTU0:190:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:LTU0:190:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:LTU0:190: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:LTU0:190:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:190:UOFF") field(DOL2, "BPMS:LTU0:190:UOFF") field(DOL3, "BPMS:LTU0:190:UOFF") field(DOL4, "BPMS:LTU0:190:UOFF") field(DOL5, "BPMS:LTU0:190:UOFF") field(DOL6, "BPMS:LTU0:190:UOFF") field(DOL7, "BPMS:LTU0:190:UOFF") field(DOL8, "BPMS:LTU0:190:UOFF") field(DOL9, "BPMS:LTU0:190:UOFF") field(DOLA, "BPMS:LTU0:190:UOFF") field(LNK1, "BPMS:LTU0:190:UOFF_SEL.A PP") field(LNK2, "BPMS:LTU0:190:UOFF_SEL.B PP") field(LNK3, "BPMS:LTU0:190:UOFF_SEL.C PP") field(LNK4, "BPMS:LTU0:190:UOFF_SEL.D PP") field(LNK5, "BPMS:LTU0:190:UOFF_SEL.E PP") field(LNK6, "BPMS:LTU0:190:UOFF_SEL.F PP") field(LNK7, "BPMS:LTU0:190:UOFF_SEL.G PP") field(LNK8, "BPMS:LTU0:190:UOFF_SEL.H PP") field(LNK9, "BPMS:LTU0:190:UOFF_SEL.I PP") field(LNKA, "BPMS:LTU0:190:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:190:UOFF_SEL") field(OUTA, "BPMS:LTU0:190:U.AOFF CA") field(OUTB, "BPMS:LTU0:190:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:190:UOFF_CTRL") { field(INPA, "BPMS:LTU0:190:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:190: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:LTU0:190:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:190:VOFF") field(DOL2, "BPMS:LTU0:190:VOFF") field(DOL3, "BPMS:LTU0:190:VOFF") field(DOL4, "BPMS:LTU0:190:VOFF") field(DOL5, "BPMS:LTU0:190:VOFF") field(DOL6, "BPMS:LTU0:190:VOFF") field(DOL7, "BPMS:LTU0:190:VOFF") field(DOL8, "BPMS:LTU0:190:VOFF") field(DOL9, "BPMS:LTU0:190:VOFF") field(DOLA, "BPMS:LTU0:190:VOFF") field(LNK1, "BPMS:LTU0:190:VOFF_SEL.A PP") field(LNK2, "BPMS:LTU0:190:VOFF_SEL.B PP") field(LNK3, "BPMS:LTU0:190:VOFF_SEL.C PP") field(LNK4, "BPMS:LTU0:190:VOFF_SEL.D PP") field(LNK5, "BPMS:LTU0:190:VOFF_SEL.E PP") field(LNK6, "BPMS:LTU0:190:VOFF_SEL.F PP") field(LNK7, "BPMS:LTU0:190:VOFF_SEL.G PP") field(LNK8, "BPMS:LTU0:190:VOFF_SEL.H PP") field(LNK9, "BPMS:LTU0:190:VOFF_SEL.I PP") field(LNKA, "BPMS:LTU0:190:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:190:VOFF_SEL") field(OUTA, "BPMS:LTU0:190:V.AOFF CA") field(OUTB, "BPMS:LTU0:190:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:190:VOFF_CTRL") { field(INPA, "BPMS:LTU0:190:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:190: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:LTU0:190:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:190:USCL") field(DOL2, "BPMS:LTU0:190:USCL") field(DOL3, "BPMS:LTU0:190:USCL") field(DOL4, "BPMS:LTU0:190:USCL") field(DOL5, "BPMS:LTU0:190:USCL") field(DOL6, "BPMS:LTU0:190:USCL") field(DOL7, "BPMS:LTU0:190:USCL") field(DOL8, "BPMS:LTU0:190:USCL") field(DOL9, "BPMS:LTU0:190:USCL") field(DOLA, "BPMS:LTU0:190:USCL") field(LNK1, "BPMS:LTU0:190:USCL_SEL.A PP") field(LNK2, "BPMS:LTU0:190:USCL_SEL.B PP") field(LNK3, "BPMS:LTU0:190:USCL_SEL.C PP") field(LNK4, "BPMS:LTU0:190:USCL_SEL.D PP") field(LNK5, "BPMS:LTU0:190:USCL_SEL.E PP") field(LNK6, "BPMS:LTU0:190:USCL_SEL.F PP") field(LNK7, "BPMS:LTU0:190:USCL_SEL.G PP") field(LNK8, "BPMS:LTU0:190:USCL_SEL.H PP") field(LNK9, "BPMS:LTU0:190:USCL_SEL.I PP") field(LNKA, "BPMS:LTU0:190:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:190:USCL_SEL") field(OUTA, "BPMS:LTU0:190:U.ASLO CA") field(OUTB, "BPMS:LTU0:190:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:190:USCL_CTRL") { field(INPA, "BPMS:LTU0:190:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:190: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:LTU0:190:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:190:VSCL") field(DOL2, "BPMS:LTU0:190:VSCL") field(DOL3, "BPMS:LTU0:190:VSCL") field(DOL4, "BPMS:LTU0:190:VSCL") field(DOL5, "BPMS:LTU0:190:VSCL") field(DOL6, "BPMS:LTU0:190:VSCL") field(DOL7, "BPMS:LTU0:190:VSCL") field(DOL8, "BPMS:LTU0:190:VSCL") field(DOL9, "BPMS:LTU0:190:VSCL") field(DOLA, "BPMS:LTU0:190:VSCL") field(LNK1, "BPMS:LTU0:190:VSCL_SEL.A PP") field(LNK2, "BPMS:LTU0:190:VSCL_SEL.B PP") field(LNK3, "BPMS:LTU0:190:VSCL_SEL.C PP") field(LNK4, "BPMS:LTU0:190:VSCL_SEL.D PP") field(LNK5, "BPMS:LTU0:190:VSCL_SEL.E PP") field(LNK6, "BPMS:LTU0:190:VSCL_SEL.F PP") field(LNK7, "BPMS:LTU0:190:VSCL_SEL.G PP") field(LNK8, "BPMS:LTU0:190:VSCL_SEL.H PP") field(LNK9, "BPMS:LTU0:190:VSCL_SEL.I PP") field(LNKA, "BPMS:LTU0:190:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:190:VSCL_SEL") field(OUTA, "BPMS:LTU0:190:V.ASLO CA") field(OUTB, "BPMS:LTU0:190:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:190:VSCL_CTRL") { field(INPA, "BPMS:LTU0:190:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:190: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:LTU0:190:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:190:PHI") field(DOL2, "BPMS:LTU0:190:PHI") field(DOL3, "BPMS:LTU0:190:PHI") field(DOL4, "BPMS:LTU0:190:PHI") field(DOL5, "BPMS:LTU0:190:PHI") field(DOL6, "BPMS:LTU0:190:PHI") field(DOL7, "BPMS:LTU0:190:PHI") field(DOL8, "BPMS:LTU0:190:PHI") field(DOL9, "BPMS:LTU0:190:PHI") field(DOLA, "BPMS:LTU0:190:PHI") field(LNK1, "BPMS:LTU0:190:PHI_SEL.A PP") field(LNK2, "BPMS:LTU0:190:PHI_SEL.B PP") field(LNK3, "BPMS:LTU0:190:PHI_SEL.C PP") field(LNK4, "BPMS:LTU0:190:PHI_SEL.D PP") field(LNK5, "BPMS:LTU0:190:PHI_SEL.E PP") field(LNK6, "BPMS:LTU0:190:PHI_SEL.F PP") field(LNK7, "BPMS:LTU0:190:PHI_SEL.G PP") field(LNK8, "BPMS:LTU0:190:PHI_SEL.H PP") field(LNK9, "BPMS:LTU0:190:PHI_SEL.I PP") field(LNKA, "BPMS:LTU0:190:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:190:PHI_SEL") field(OUTA, "BPMS:LTU0:190:CALC.E CA") field(OUTB, "BPMS:LTU0:190:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:190:PHI_CTRL") { field(INPA, "BPMS:LTU0:190:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:190: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:LTU0:190:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:LTU0:190:PSI") field(DOL2, "BPMS:LTU0:190:PSI") field(DOL3, "BPMS:LTU0:190:PSI") field(DOL4, "BPMS:LTU0:190:PSI") field(DOL5, "BPMS:LTU0:190:PSI") field(DOL6, "BPMS:LTU0:190:PSI") field(DOL7, "BPMS:LTU0:190:PSI") field(DOL8, "BPMS:LTU0:190:PSI") field(DOL9, "BPMS:LTU0:190:PSI") field(DOLA, "BPMS:LTU0:190:PSI") field(LNK1, "BPMS:LTU0:190:PSI_SEL.A PP") field(LNK2, "BPMS:LTU0:190:PSI_SEL.B PP") field(LNK3, "BPMS:LTU0:190:PSI_SEL.C PP") field(LNK4, "BPMS:LTU0:190:PSI_SEL.D PP") field(LNK5, "BPMS:LTU0:190:PSI_SEL.E PP") field(LNK6, "BPMS:LTU0:190:PSI_SEL.F PP") field(LNK7, "BPMS:LTU0:190:PSI_SEL.G PP") field(LNK8, "BPMS:LTU0:190:PSI_SEL.H PP") field(LNK9, "BPMS:LTU0:190:PSI_SEL.I PP") field(LNKA, "BPMS:LTU0:190:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:LTU0:190: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:LTU0:190: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:LTU0:190: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:LTU0:190:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:LTU0:190:PSI_SEL") field(OUTA, "BPMS:LTU0:190:CALC.F CA") field(OUTB, "BPMS:LTU0:190:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:LTU0:190:PSI_CTRL") { field(INPA, "BPMS:LTU0:190:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:LTU0:190:PSI_SEL.L PP") } record(longout, "BPMS:LTU0:190:PARMSEL") { field(VAL, "0") field(PINI, "YES") } # per IOC database for stripline BPMs #record(sub, "IOC:LTU0:BP01:FIDP") { # field(DESC, "BPM Fiducial Processing") # field(SNAM, "bpmEvrFidProcess") # #This tells us if there is beam during this cycle... # field(INPA, "IOC:LTU0:BP01:MODIFIER5.R") #} #record(mbbo, "IOC:LTU0:BP01:PATTERNSIM") { # field(DESC, "Pattern Simulation") # field(ZRST, "Off") # field(ONST, "Soft") # field(TWST, "Raw") # field(DOL, "0") # field(PINI, "YES") #} record(sub, "IOC:LTU0:BP01:EVTM") { field(SNAM, "subEventTestTiming") field(SCAN, "Event") field(EVNT, "40") }