# per BPM database for cavity BPMs # # # ############################################## # This is the head of the main processing chain # that runs at the highest priority. ############################################## record(ai, "BPMS:UNDH:1990:REFR") { field(DESC, "Raw Ref. Ampl.") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C0 S0") field(EGU, "raw") 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:UNDH:1990:URER") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") field(TSE, "-1") } record(ai, "BPMS:UNDH:1990:URER") { field(DESC, "Re{Cmplx Ampl. U/REF}") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C0 S1") field(EGU, "raw") #TODO set HOPR/LOPR, alarm limits field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:1990:UIMR") field(PREC, "1") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") field(TSE, "-1") } record(ai, "BPMS:UNDH:1990:UIMR") { field(DESC, "Im{Cmplx Ampl. U/REF}") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C0 S5") field(EGU, "raw") #TODO set HOPR/LOPR, alarm limits field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:1990:VRER") field(PREC, "1") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") field(TSE, "-1") } record(ai, "BPMS:UNDH:1990:VRER") { field(DESC, "Re{Cmplx Ampl. V/REF}") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C0 S2") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:1990:VIMR") field(PREC, "3") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") field(TSE, "-1") } record(ai, "BPMS:UNDH:1990:VIMR") { field(DESC, "Im{Cmplx Ampl. V/REF}") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C0 S6") field(EGU, "raw") #TODO set HOPR/LOPR, alarm limits field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") field(TSE, "-1") } ############################################## # This is the head of the processing chain for # diagnostics. ############################################## record(ai, "BPMS:UNDH:1990:RRMS") { field(DESC, "Ref. Raw RMS") field(DTYP, "Cavity Bpm Diag") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C0 S0") field(EGU, "Nel") field(SCAN, "I/O Intr") # use LOW or HIGH to end up on the 'diagnostic' # scan list (see drvPadUdpComm.c) field(PRIO, "LOW") field(FLNK, "BPMS:UNDH:1990:URMS") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") field(ASLO, "1E5") } record(ai, "BPMS:UNDH:1990:URMS") { field(DESC, "Ref. Raw RMS") field(DTYP, "Cavity Bpm Diag") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C0 S1") field(EGU, "mm") field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:1990:VRMS") field(PREC, "3") field(LOPR, "0") field(HOPR, "4") } record(ai, "BPMS:UNDH:1990:VRMS") { field(DESC, "Ref. Raw RMS") field(DTYP, "Cavity Bpm Diag") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C0 S2") field(EGU, "mm") field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:1990:TDEL") field(PREC, "3") field(LOPR, "0") field(HOPR, "4") } record(ai, "BPMS:UNDH:1990:TDEL") { field(DESC, "Ref. Peak Dly.") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C0 S4") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:1990:PDEL") field(PREC, "3") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") } record(ai, "BPMS:UNDH:1990:PDEL") { field(DESC, "Ref. Phase") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C0 S7") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:1990:SFFT") field(PREC, "2") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") } record(waveform, "BPMS:UNDH:1990:SFFT") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'beam-FFT', 'filter-FFT', 'filter-t-dom' field(INP, "#C0 S1") field(NELM, "192") field(FTVL, "FLOAT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:1990:PRENV") } record(waveform, "BPMS:UNDH:1990:PRENV") { field(DESC, "Filtered Preenvelope") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'beam-FFT', 'filter-FFT', 'filter-t-dom' field(INP, "#C0 S4") field(NELM, "384") field(FTVL, "FLOAT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "0") field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:1990:ENVU") } record(subArray, "BPMS:UNDH:1990:ENVU") { field(DESC, "Preenvelope U") field(FTVL, "FLOAT") field(EGU, "Counts") field(INP, "BPMS:UNDH:1990:PRENV NPP") field(MALM, "512") field(NELM, "128") field(INDX, "128") field(FLNK, "BPMS:UNDH:1990:ENVV") } record(subArray, "BPMS:UNDH:1990:ENVV") { field(DESC, "Preenvelope V") field(FTVL, "FLOAT") field(EGU, "Counts") field(INP, "BPMS:UNDH:1990:PRENV NPP") field(MALM, "512") field(NELM, "128") field(INDX, "256") } # Filter frequency response # (updated/scanned by driver) record(waveform, "BPMS:UNDH:1990:FFILT") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") field(INP, "#C0 S2 @wbscan") field(NELM, "192") field(FTVL, "FLOAT") field(EGU, "Counts") field(SCAN, "Passive") } record(subArray, "BPMS:UNDH:1990:REFW") { field(DESC, "Raw Ref. Waveform") field(FTVL, "FLOAT") field(INP, "BPMS:UNDH:1990:RWAV CPP") field(MALM, "512") field(NELM, "128") field(INDX, "385") } record(waveform, "BPMS:UNDH:1990:TFILT") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") field(INP, "#C0 S3 @wbscan") field(NELM, "384") field(FTVL, "FLOAT") field(EGU, "Counts") field(SCAN, "Passive") } ############################################## # Slowly-scanned diagnostics & status ############################################## record(sel, "BPMS:UNDH:1990:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:UNDH:1990:RSTA.SEVR MS NPP") field(INPB, "BPMS:UNDH:1990:TMIT.SEVR MS NPP") field(INPC, "BPMS:UNDH:1990:Y.SEVR MS NPP") field(INPD, "BPMS:UNDH:1990:X.SEVR MS NPP") field(SCAN, "1 second") } record(calc, "BPMS:UNDH:1990:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:UNDH:1990:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:UNDH:1990:CHK.SEVR MS NPP") } ############################################## # Input Parameters to Filter Bank (passive) ############################################## #record(ao, "BPMS:UNDH:1990:FC_REF") #{ #field(DESC, "Fc - Ref. Cavity") #field(DTYP, "Soft Channel") #field(OUT, "BPMS:UNDH:1990:FILT.B PP") #field(EGU, "MHz") #field(PREC, "1") #field(DRVL, "0") #field(DRVH, "60") #field(PINI, "NO") #field(VAL, "0") #field(UDF, "0") #field(STAT, "0") #field(SEVR, "0") #} #record(ao, "BPMS:UNDH:1990:BW_REF") #{ #field(DESC, "BW - Ref. Cavity") #field(DTYP, "Soft Channel") #field(OUT, "BPMS:UNDH:1990:FILT.C PP") #field(EGU, "MHz") #field(PREC, "1") #field(DRVL, "0") #field(DRVH, "60") #field(PINI, "NO") #} # Filter Parameters. # # B: fc; reference cavity # C: bw; reference cavity # # E: fc; U cavity # F: bw; U cavity # G: ts; U cavity # H: fc; V cavity # I: bw; V cavity # J: ts; V cavity # K: fo; sampling freq. # # NOTE: Do NOT create other records to write # the fc or bw parameters w/o providing # proper logic to update those records # when the driver changes bw/fc (auto-set # feature if either of them is zero) record(sub, "BPMS:UNDH:1990:FILT") { field(INAM, "bpmCavFilterSubInit") field(SNAM, "bpmCavFilterSubProc") field(A, "0") #field(INPB, "BPMS:UNDH:1990:FC_REF") #field(INPC, "BPMS:UNDH:1990:BW_REF") field(D, "0") #field(E, "30") #field(F, "12") #field(G, "0") #field(H, "30") field(I, "1") field(J, "0") field(K, "125") field(PREC, "1") field(EGU, "MHz") field(PINI, "YES") info(autosaveFields, "B C E F H I") } # Cause software to calculate new # bandwidth and center-frequency # values for U, V, Ref # CA links so that FILT.* PVs # update for CA clients without # additional process of FILT record(seq, "BPMS:UNDH:1990:AUTOFILTR") { field(SELM, "All") field(DOL1, "0") field(LNK1, "BPMS:UNDH:1990:FILT.B CA") field(DLY2, "1") field(DOL2, "0") field(LNK2, "BPMS:UNDH:1990:FILT.C CA") } record(seq, "BPMS:UNDH:1990:AUTOFILTU") { field(SELM, "All") field(DOL1, "0") field(LNK1, "BPMS:UNDH:1990:FILT.E CA") field(DLY2, "1") field(DOL2, "0") field(LNK2, "BPMS:UNDH:1990:FILT.F CA") } record(seq, "BPMS:UNDH:1990:AUTOFILTV") { field(SELM, "All") field(DOL1, "0") field(LNK1, "BPMS:UNDH:1990:FILT.H CA") field(DLY2, "1") field(DOL2, "0") field(LNK2, "BPMS:UNDH:1990:FILT.I CA") } record(seq, "BPMS:UNDH:1990:AUTOFILT") { field(SELM, "All") field(LNK1, "BPMS:UNDH:1990:AUTOFILTR PP") field(DLY2, "1") field(LNK2, "BPMS:UNDH:1990:AUTOFILTU PP") field(DLY3, "1") field(LNK3, "BPMS:UNDH:1990:AUTOFILTV PP") } # Cause software to calculate new # U and V detector phases record(seq, "BPMS:UNDH:1990:AUTOPHAS") { field(SELM, "All") field(DOL1, "400") field(LNK1, "BPMS:UNDH:1990:UPHAS CA") field(DLY2, "1") field(DOL2, "400") field(LNK2, "BPMS:UNDH:1990:VPHAS CA") } record(ao, "BPMS:UNDH:1990:TS_R") { field(DESC, "Sampling Time Ref") field(DTYP, "Soft Channel") field(OUT, "BPMS:UNDH:1990:TS_R_ADJ.A PP") field(EGU, "ns") field(PREC, "1") field(DRVL, "-1000") field(DRVH, "1000") field(PINI, "YES") info(autosaveFields, "VAL") } record(calcout, "BPMS:UNDH:1990:TS_R_ADJ") { field(DESC, "U Smpl. Time Scale") field(OUT, "BPMS:UNDH:1990:FILT.D PP") field(CALC, "A/1000") field(EGU, "us") } record(ao, "BPMS:UNDH:1990:TS_U") { field(DESC, "Sampling Time U") field(DTYP, "Soft Channel") field(OUT, "BPMS:UNDH:1990:TS_U_ADJ.A PP") field(EGU, "ns") field(PREC, "1") field(DRVL, "-1000") field(DRVH, "1000") field(PINI, "YES") info(autosaveFields, "VAL") } record(calcout, "BPMS:UNDH:1990:TS_U_ADJ") { field(DESC, "U Smpl. Time Scale") field(OUT, "BPMS:UNDH:1990:FILT.G PP") field(CALC, "A/1000") field(EGU, "us") } record(ao, "BPMS:UNDH:1990:TS_V") { field(DESC, "Sampling Time V") field(DTYP, "Soft Channel") field(OUT, "BPMS:UNDH:1990:TS_V_ADJ.A PP") field(EGU, "ns") field(PREC, "1") field(DRVL, "-1000") field(DRVH, "1000") field(PINI, "YES") field(ASLO, ".001") info(autosaveFields, "VAL") } record(calcout, "BPMS:UNDH:1990:TS_V_ADJ") { field(DESC, "V Smpl. Time Scale") field(OUT, "BPMS:UNDH:1990:FILT.J PP") field(CALC, "A/1000") field(EGU, "us") } #record(seq, "BPMS:UNDH:1990:FILTUPD") { #field(DESC, "Filt. Parm. Propagator") #field(DOL1, "BPMS:UNDH:1990:FILT.B NPP") #field(LNK1, "BPMS:UNDH:1990:FC_REF NPP") #field(DOL2, "BPMS:UNDH:1990:FILT.C NPP") #field(LNK2, "BPMS:UNDH:1990:BW_REF NPP") #field(SELM, "Mask") #field(SELN, "0x3ff") #} record(ao, "BPMS:UNDH:1990:UPHAS") { field(DESC, "Detector Phase U") field(DTYP, "Soft Channel") field(PREC, "1") field(EGU, "deg") field(FLNK, "BPMS:UNDH:1990:UPHAS_SEQ") } record(ao, "BPMS:UNDH:1990:VPHAS") { field(DESC, "Detector Phase V") field(DTYP, "Soft Channel") field(PREC, "1") field(EGU, "deg") field(FLNK, "BPMS:UNDH:1990:VPHAS_SEQ") } record(ao, "BPMS:UNDH:1990:UPHAS_OUT") { field(DESC, "Detector Phase U") field(DTYP, "Cavity Phase") field(OUT, "#C0S0") # value > 360 means 'auto-init' # field(VAL, "1000") field(PREC, "1") field(EGU, "deg") field(FLNK, "BPMS:UNDH:1990:UPHAS_FB") } # If the UPHAS_OUT record updates its # value then feed back into UPHAS record(ao, "BPMS:UNDH:1990:UPHAS_FB") { field(DESC, "Det. Phase U (FB)") field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:1990:UPHAS_OUT") field(OUT, "BPMS:UNDH:1990:UPHAS PP") field(PREC, "1") field(EGU, "deg") } record(ao, "BPMS:UNDH:1990:VPHAS_OUT") { field(DESC, "Detector Phase V") field(DTYP, "Cavity Phase") field(OUT, "#C0S1") # value > 360 means 'auto-init' # field(VAL, "1000") field(PREC, "1") field(EGU, "deg") field(FLNK, "BPMS:UNDH:1990:VPHAS_FB") } # If the VPHAS_OUT record updates its # value then feed back into VPHAS record(ao, "BPMS:UNDH:1990:VPHAS_FB") { field(DESC, "Det. Phase V (FB)") field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:1990:VPHAS_OUT") field(OUT, "BPMS:UNDH:1990:VPHAS PP") field(PREC, "1") field(EGU, "deg") } record(ao, "BPMS:UNDH:1990:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(VAL, "31250") field(EGU, "Nel") field(PREC, "3") field(FLNK, "BPMS:UNDH:1990:QSCL_SEQ") } record(ao, "BPMS:UNDH:1990:URSCL") { field(DESC, "RMS U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:UNDH:1990:URSCL_SEQ") } record(ao, "BPMS:UNDH:1990:VRSCL") { field(DESC, "RMS V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:UNDH:1990:VRSCL_SEQ") } record(ao, "BPMS:UNDH:1990:QRSCL") { field(DESC, "RMS Charge Scale") field(DTYP, "Soft Channel") field(VAL, "31250") field(EGU, "Nel") field(PREC, "3") field(FLNK, "BPMS:UNDH:1990:QRSCL_SEQ") } record(sub, "BPMS:UNDH:1990:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "0") field(SCAN, "Passive") } # Use CA links to keep these records # out of beam-rate locksets record(ai, "BPMS:UNDH:1990:REFR_SLOW") { field(DESC, "Slow Raw Ref. Ampl.") field(INP, "BPMS:UNDH:1990:REFR MS CA") field(EGU, "raw") field(SCAN, "1 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") field(FLNK, "BPMS:UNDH:1990:URER_SLOW") } record(ai, "BPMS:UNDH:1990:URER_SLOW") { field(DESC, "Slow Re{Cmplx Ampl. U/REF}") field(INP, "BPMS:UNDH:1990:URER MS CA") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") field(FLNK, "BPMS:UNDH:1990:UIMR_SLOW") } record(ai, "BPMS:UNDH:1990:UIMR_SLOW") { field(DESC, "Slow Im{Cmplx Ampl. U/REF}") field(INP, "BPMS:UNDH:1990:UIMR MS CA") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") field(FLNK, "BPMS:UNDH:1990:VRER_SLOW") } record(ai, "BPMS:UNDH:1990:VRER_SLOW") { field(DESC, "Slow Re{Cmplx Ampl. V/REF}") field(INP, "BPMS:UNDH:1990:VRER MS CA") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "3") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") field(FLNK, "BPMS:UNDH:1990:VIMR_SLOW") } record(ai, "BPMS:UNDH:1990:VIMR_SLOW") { field(DESC, "Slow Im{Cmplx Ampl. V/REF}") field(INP, "BPMS:UNDH:1990:VRER MS CA") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") }#! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ###################################### # HEAD of main processing chain ###################################### record(ai, "BPMS:UNDH:1990: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:UNDH:1990:Y") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "EOICDESK") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "BPMS:UNDH:1990:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S12") field(FLNK, "BPMS:UNDH:1990:TMIT") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "EOICDESK") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "BPMS:UNDH:1990: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:UNDH:1990:EFX.PROC") field(ASG, "EOICDESK") 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:UNDH:1990: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:UNDH:1990: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:UNDH:1990:V") } record(ai, "BPMS:UNDH:1990: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:UNDH:1990:PINC") } record(ai, "BPMS:UNDH:1990:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C0 S10") field(SCAN, "Passive") } record(longin, "BPMS:UNDH:1990: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:UNDH:1990:RSTA_ALH") } record(calc, "BPMS:UNDH:1990:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:UNDH:1990:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:UNDH:1990: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:UNDH:1990:PHI_SEQ") } record(ao, "BPMS:UNDH:1990: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:UNDH:1990:PSI_SEQ") } #record(dfanout, "BPMS:UNDH:1990:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:UNDH:1990:USCL PP MS") # field(OUTB, "BPMS:UNDH:1990:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:UNDH:1990: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:UNDH:1990:UOFF_SEQ") } record(ao, "BPMS:UNDH:1990: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:UNDH:1990:VOFF_SEQ") } record(ao, "BPMS:UNDH:1990:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:UNDH:1990:USCL_SEQ") } record(ao, "BPMS:UNDH:1990:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:UNDH:1990:VSCL_SEQ") } record(mbbo, "BPMS:UNDH:1990: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:UNDH:1990: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:UNDH:1990:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") field(OMSL, "supervisory") field(VAL, "0") field(ZRVL, "0") field(ONVL, "1") field(TWVL, "2") # Off - this device can be used in feedback but all feedback loops # using it are off. field(ZRST, "Off") # On - this device is being used by one or more feedback loops. field(ONST, "On") # Unavailable - this device is not used by any feedback loop. field(TWST, "Unavailable") info(autosaveFields, "VAL") } # Convenience record holding the MAD name record(stringin, "BPMS:UNDH:1990:MADN") { field(DESC, "MAD Name") field(VAL, "RFBHX19") field(PINI, "YES") } record(stringin, "RFBHX19:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:UNDH:1990") field(PINI, "YES") } record(ai, "BPMS:UNDH:1990:X_SLOW") { #alias("BPMS:UNDH:1990:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:UNDH:1990:X MS") field(FLNK, "BPMS:UNDH:1990:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:UNDH:1990:Y_SLOW") { #alias("BPMS:UNDH:1990:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:UNDH:1990:Y NPP MS") field(FLNK, "BPMS:UNDH:1990:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:UNDH:1990:TMIT_SLOW") { #alias("BPMS:UNDH:1990:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "BPMS:UNDH:1990: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:UNDH:1990:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:UNDH:1990:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:UNDH:1990:SIMC PP") } record(calcout, "BPMS:UNDH:1990: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:UNDH:1990:USCL") field(INPL, "0") } # Switch simulation record BPMS:UNDH:1990:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:UNDH:1990:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:UNDH:1990: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:UNDH:1990:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:UNDH:1990: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:UNDH:1990:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:UNDH:1990:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:UNDH:1990:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:UNDH:1990: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:UNDH:1990:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:UNDH:1990:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:UNDH:1990:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:UNDH:1990:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:UNDH:1990: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:UNDH:1990:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:UNDH:1990:MPSBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C0S2@bpmMPS+0,m32") field(MASK, "0x001") field(ZNAM, "BYPASSED") field(ONAM, "NOT_BYPASSED") field(ZSV, "MAJOR") field(OSV, "NO_ALARM") field(VAL, "0") field(PINI, "YES") field(ASG, "EOICDESK") info(autosaveFields, "VAL") } record(bo, "BPMS:UNDH:1990:MPSLTBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C1S2@bpmMPS+0,m32") field(MASK, "0x001") field(ZNAM, "BYPASSED") field(ONAM, "NOT_BYPASSED") field(ZSV, "NO_ALARM") field(OSV, "NO_ALARM") field(VAL, "0") field(PINI, "YES") field(ASG, "EOICDESK") info(autosaveFields, "VAL") } record(calc, "BPMS:UNDH:1990: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:UNDH:1990:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:1990:UOFF") field(DOL2, "BPMS:UNDH:1990:UOFF") field(DOL3, "BPMS:UNDH:1990:UOFF") field(DOL4, "BPMS:UNDH:1990:UOFF") field(DOL5, "BPMS:UNDH:1990:UOFF") field(DOL6, "BPMS:UNDH:1990:UOFF") field(DOL7, "BPMS:UNDH:1990:UOFF") field(DOL8, "BPMS:UNDH:1990:UOFF") field(DOL9, "BPMS:UNDH:1990:UOFF") field(DOLA, "BPMS:UNDH:1990:UOFF") field(LNK1, "BPMS:UNDH:1990:UOFF_SEL.A PP") field(LNK2, "BPMS:UNDH:1990:UOFF_SEL.B PP") field(LNK3, "BPMS:UNDH:1990:UOFF_SEL.C PP") field(LNK4, "BPMS:UNDH:1990:UOFF_SEL.D PP") field(LNK5, "BPMS:UNDH:1990:UOFF_SEL.E PP") field(LNK6, "BPMS:UNDH:1990:UOFF_SEL.F PP") field(LNK7, "BPMS:UNDH:1990:UOFF_SEL.G PP") field(LNK8, "BPMS:UNDH:1990:UOFF_SEL.H PP") field(LNK9, "BPMS:UNDH:1990:UOFF_SEL.I PP") field(LNKA, "BPMS:UNDH:1990:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:1990: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:UNDH:1990: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:UNDH:1990: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:UNDH:1990:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:1990:UOFF_SEL") field(OUTA, "BPMS:UNDH:1990:U.AOFF CA") field(OUTB, "BPMS:UNDH:1990:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:1990:UOFF_CTRL") { field(INPA, "BPMS:UNDH:1990:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:1990: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:UNDH:1990:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:1990:VOFF") field(DOL2, "BPMS:UNDH:1990:VOFF") field(DOL3, "BPMS:UNDH:1990:VOFF") field(DOL4, "BPMS:UNDH:1990:VOFF") field(DOL5, "BPMS:UNDH:1990:VOFF") field(DOL6, "BPMS:UNDH:1990:VOFF") field(DOL7, "BPMS:UNDH:1990:VOFF") field(DOL8, "BPMS:UNDH:1990:VOFF") field(DOL9, "BPMS:UNDH:1990:VOFF") field(DOLA, "BPMS:UNDH:1990:VOFF") field(LNK1, "BPMS:UNDH:1990:VOFF_SEL.A PP") field(LNK2, "BPMS:UNDH:1990:VOFF_SEL.B PP") field(LNK3, "BPMS:UNDH:1990:VOFF_SEL.C PP") field(LNK4, "BPMS:UNDH:1990:VOFF_SEL.D PP") field(LNK5, "BPMS:UNDH:1990:VOFF_SEL.E PP") field(LNK6, "BPMS:UNDH:1990:VOFF_SEL.F PP") field(LNK7, "BPMS:UNDH:1990:VOFF_SEL.G PP") field(LNK8, "BPMS:UNDH:1990:VOFF_SEL.H PP") field(LNK9, "BPMS:UNDH:1990:VOFF_SEL.I PP") field(LNKA, "BPMS:UNDH:1990:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:1990: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:UNDH:1990: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:UNDH:1990: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:UNDH:1990:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:1990:VOFF_SEL") field(OUTA, "BPMS:UNDH:1990:V.AOFF CA") field(OUTB, "BPMS:UNDH:1990:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:1990:VOFF_CTRL") { field(INPA, "BPMS:UNDH:1990:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:1990: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:UNDH:1990:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:1990:USCL") field(DOL2, "BPMS:UNDH:1990:USCL") field(DOL3, "BPMS:UNDH:1990:USCL") field(DOL4, "BPMS:UNDH:1990:USCL") field(DOL5, "BPMS:UNDH:1990:USCL") field(DOL6, "BPMS:UNDH:1990:USCL") field(DOL7, "BPMS:UNDH:1990:USCL") field(DOL8, "BPMS:UNDH:1990:USCL") field(DOL9, "BPMS:UNDH:1990:USCL") field(DOLA, "BPMS:UNDH:1990:USCL") field(LNK1, "BPMS:UNDH:1990:USCL_SEL.A PP") field(LNK2, "BPMS:UNDH:1990:USCL_SEL.B PP") field(LNK3, "BPMS:UNDH:1990:USCL_SEL.C PP") field(LNK4, "BPMS:UNDH:1990:USCL_SEL.D PP") field(LNK5, "BPMS:UNDH:1990:USCL_SEL.E PP") field(LNK6, "BPMS:UNDH:1990:USCL_SEL.F PP") field(LNK7, "BPMS:UNDH:1990:USCL_SEL.G PP") field(LNK8, "BPMS:UNDH:1990:USCL_SEL.H PP") field(LNK9, "BPMS:UNDH:1990:USCL_SEL.I PP") field(LNKA, "BPMS:UNDH:1990:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:1990: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:UNDH:1990: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:UNDH:1990: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:UNDH:1990:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:1990:USCL_SEL") field(OUTA, "BPMS:UNDH:1990:U.ASLO CA") field(OUTB, "BPMS:UNDH:1990:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:1990:USCL_CTRL") { field(INPA, "BPMS:UNDH:1990:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:1990: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:UNDH:1990:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:1990:VSCL") field(DOL2, "BPMS:UNDH:1990:VSCL") field(DOL3, "BPMS:UNDH:1990:VSCL") field(DOL4, "BPMS:UNDH:1990:VSCL") field(DOL5, "BPMS:UNDH:1990:VSCL") field(DOL6, "BPMS:UNDH:1990:VSCL") field(DOL7, "BPMS:UNDH:1990:VSCL") field(DOL8, "BPMS:UNDH:1990:VSCL") field(DOL9, "BPMS:UNDH:1990:VSCL") field(DOLA, "BPMS:UNDH:1990:VSCL") field(LNK1, "BPMS:UNDH:1990:VSCL_SEL.A PP") field(LNK2, "BPMS:UNDH:1990:VSCL_SEL.B PP") field(LNK3, "BPMS:UNDH:1990:VSCL_SEL.C PP") field(LNK4, "BPMS:UNDH:1990:VSCL_SEL.D PP") field(LNK5, "BPMS:UNDH:1990:VSCL_SEL.E PP") field(LNK6, "BPMS:UNDH:1990:VSCL_SEL.F PP") field(LNK7, "BPMS:UNDH:1990:VSCL_SEL.G PP") field(LNK8, "BPMS:UNDH:1990:VSCL_SEL.H PP") field(LNK9, "BPMS:UNDH:1990:VSCL_SEL.I PP") field(LNKA, "BPMS:UNDH:1990:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:1990: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:UNDH:1990: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:UNDH:1990: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:UNDH:1990:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:1990:VSCL_SEL") field(OUTA, "BPMS:UNDH:1990:V.ASLO CA") field(OUTB, "BPMS:UNDH:1990:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:1990:VSCL_CTRL") { field(INPA, "BPMS:UNDH:1990:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:1990: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:UNDH:1990:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:1990:PHI") field(DOL2, "BPMS:UNDH:1990:PHI") field(DOL3, "BPMS:UNDH:1990:PHI") field(DOL4, "BPMS:UNDH:1990:PHI") field(DOL5, "BPMS:UNDH:1990:PHI") field(DOL6, "BPMS:UNDH:1990:PHI") field(DOL7, "BPMS:UNDH:1990:PHI") field(DOL8, "BPMS:UNDH:1990:PHI") field(DOL9, "BPMS:UNDH:1990:PHI") field(DOLA, "BPMS:UNDH:1990:PHI") field(LNK1, "BPMS:UNDH:1990:PHI_SEL.A PP") field(LNK2, "BPMS:UNDH:1990:PHI_SEL.B PP") field(LNK3, "BPMS:UNDH:1990:PHI_SEL.C PP") field(LNK4, "BPMS:UNDH:1990:PHI_SEL.D PP") field(LNK5, "BPMS:UNDH:1990:PHI_SEL.E PP") field(LNK6, "BPMS:UNDH:1990:PHI_SEL.F PP") field(LNK7, "BPMS:UNDH:1990:PHI_SEL.G PP") field(LNK8, "BPMS:UNDH:1990:PHI_SEL.H PP") field(LNK9, "BPMS:UNDH:1990:PHI_SEL.I PP") field(LNKA, "BPMS:UNDH:1990:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:1990: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:UNDH:1990: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:UNDH:1990: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:UNDH:1990:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:1990:PHI_SEL") field(OUTA, "BPMS:UNDH:1990:CALC.E CA") field(OUTB, "BPMS:UNDH:1990:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:1990:PHI_CTRL") { field(INPA, "BPMS:UNDH:1990:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:1990: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:UNDH:1990:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:1990:PSI") field(DOL2, "BPMS:UNDH:1990:PSI") field(DOL3, "BPMS:UNDH:1990:PSI") field(DOL4, "BPMS:UNDH:1990:PSI") field(DOL5, "BPMS:UNDH:1990:PSI") field(DOL6, "BPMS:UNDH:1990:PSI") field(DOL7, "BPMS:UNDH:1990:PSI") field(DOL8, "BPMS:UNDH:1990:PSI") field(DOL9, "BPMS:UNDH:1990:PSI") field(DOLA, "BPMS:UNDH:1990:PSI") field(LNK1, "BPMS:UNDH:1990:PSI_SEL.A PP") field(LNK2, "BPMS:UNDH:1990:PSI_SEL.B PP") field(LNK3, "BPMS:UNDH:1990:PSI_SEL.C PP") field(LNK4, "BPMS:UNDH:1990:PSI_SEL.D PP") field(LNK5, "BPMS:UNDH:1990:PSI_SEL.E PP") field(LNK6, "BPMS:UNDH:1990:PSI_SEL.F PP") field(LNK7, "BPMS:UNDH:1990:PSI_SEL.G PP") field(LNK8, "BPMS:UNDH:1990:PSI_SEL.H PP") field(LNK9, "BPMS:UNDH:1990:PSI_SEL.I PP") field(LNKA, "BPMS:UNDH:1990:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:1990: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:UNDH:1990: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:UNDH:1990: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:UNDH:1990:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:1990:PSI_SEL") field(OUTA, "BPMS:UNDH:1990:CALC.F CA") field(OUTB, "BPMS:UNDH:1990:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:1990:PSI_CTRL") { field(INPA, "BPMS:UNDH:1990:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:1990:PSI_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:UNDH:1990:UPHAS_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:1990:UPHAS") field(DOL2, "BPMS:UNDH:1990:UPHAS") field(DOL3, "BPMS:UNDH:1990:UPHAS") field(DOL4, "BPMS:UNDH:1990:UPHAS") field(DOL5, "BPMS:UNDH:1990:UPHAS") field(DOL6, "BPMS:UNDH:1990:UPHAS") field(DOL7, "BPMS:UNDH:1990:UPHAS") field(DOL8, "BPMS:UNDH:1990:UPHAS") field(DOL9, "BPMS:UNDH:1990:UPHAS") field(DOLA, "BPMS:UNDH:1990:UPHAS") field(LNK1, "BPMS:UNDH:1990:UPHAS_SEL.A PP") field(LNK2, "BPMS:UNDH:1990:UPHAS_SEL.B PP") field(LNK3, "BPMS:UNDH:1990:UPHAS_SEL.C PP") field(LNK4, "BPMS:UNDH:1990:UPHAS_SEL.D PP") field(LNK5, "BPMS:UNDH:1990:UPHAS_SEL.E PP") field(LNK6, "BPMS:UNDH:1990:UPHAS_SEL.F PP") field(LNK7, "BPMS:UNDH:1990:UPHAS_SEL.G PP") field(LNK8, "BPMS:UNDH:1990:UPHAS_SEL.H PP") field(LNK9, "BPMS:UNDH:1990:UPHAS_SEL.I PP") field(LNKA, "BPMS:UNDH:1990:UPHAS_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:1990:UPHAS_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:UNDH:1990:UPHAS_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1000") field(B, "1000") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:UNDH:1990:UPHAS_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:UNDH:1990:UPHAS_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:1990:UPHAS_SEL") field(OUTA, "BPMS:UNDH:1990:UPHAS_OUT PP NMS") field(OUTB, "BPMS:UNDH:1990:UPHAS PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:1990:UPHAS_CTRL") { field(INPA, "BPMS:UNDH:1990:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:1990:UPHAS_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:UNDH:1990:VPHAS_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:1990:VPHAS") field(DOL2, "BPMS:UNDH:1990:VPHAS") field(DOL3, "BPMS:UNDH:1990:VPHAS") field(DOL4, "BPMS:UNDH:1990:VPHAS") field(DOL5, "BPMS:UNDH:1990:VPHAS") field(DOL6, "BPMS:UNDH:1990:VPHAS") field(DOL7, "BPMS:UNDH:1990:VPHAS") field(DOL8, "BPMS:UNDH:1990:VPHAS") field(DOL9, "BPMS:UNDH:1990:VPHAS") field(DOLA, "BPMS:UNDH:1990:VPHAS") field(LNK1, "BPMS:UNDH:1990:VPHAS_SEL.A PP") field(LNK2, "BPMS:UNDH:1990:VPHAS_SEL.B PP") field(LNK3, "BPMS:UNDH:1990:VPHAS_SEL.C PP") field(LNK4, "BPMS:UNDH:1990:VPHAS_SEL.D PP") field(LNK5, "BPMS:UNDH:1990:VPHAS_SEL.E PP") field(LNK6, "BPMS:UNDH:1990:VPHAS_SEL.F PP") field(LNK7, "BPMS:UNDH:1990:VPHAS_SEL.G PP") field(LNK8, "BPMS:UNDH:1990:VPHAS_SEL.H PP") field(LNK9, "BPMS:UNDH:1990:VPHAS_SEL.I PP") field(LNKA, "BPMS:UNDH:1990:VPHAS_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:1990:VPHAS_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:UNDH:1990:VPHAS_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1000") field(B, "1000") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:UNDH:1990:VPHAS_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:UNDH:1990:VPHAS_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:1990:VPHAS_SEL") field(OUTA, "BPMS:UNDH:1990:VPHAS_OUT PP NMS") field(OUTB, "BPMS:UNDH:1990:VPHAS PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:1990:VPHAS_CTRL") { field(INPA, "BPMS:UNDH:1990:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:1990:VPHAS_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:UNDH:1990:QSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:1990:QSCL") field(DOL2, "BPMS:UNDH:1990:QSCL") field(DOL3, "BPMS:UNDH:1990:QSCL") field(DOL4, "BPMS:UNDH:1990:QSCL") field(DOL5, "BPMS:UNDH:1990:QSCL") field(DOL6, "BPMS:UNDH:1990:QSCL") field(DOL7, "BPMS:UNDH:1990:QSCL") field(DOL8, "BPMS:UNDH:1990:QSCL") field(DOL9, "BPMS:UNDH:1990:QSCL") field(DOLA, "BPMS:UNDH:1990:QSCL") field(LNK1, "BPMS:UNDH:1990:QSCL_SEL.A PP") field(LNK2, "BPMS:UNDH:1990:QSCL_SEL.B PP") field(LNK3, "BPMS:UNDH:1990:QSCL_SEL.C PP") field(LNK4, "BPMS:UNDH:1990:QSCL_SEL.D PP") field(LNK5, "BPMS:UNDH:1990:QSCL_SEL.E PP") field(LNK6, "BPMS:UNDH:1990:QSCL_SEL.F PP") field(LNK7, "BPMS:UNDH:1990:QSCL_SEL.G PP") field(LNK8, "BPMS:UNDH:1990:QSCL_SEL.H PP") field(LNK9, "BPMS:UNDH:1990:QSCL_SEL.I PP") field(LNKA, "BPMS:UNDH:1990:QSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:1990:QSCL_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:UNDH:1990:QSCL_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, "3") field(FLNK, "BPMS:UNDH:1990:QSCL_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:UNDH:1990:QSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:1990:QSCL_SEL") field(OUTA, "BPMS:UNDH:1990:TMIT.ASLO CA") field(OUTB, "BPMS:UNDH:1990:QSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:1990:QSCL_CTRL") { field(INPA, "BPMS:UNDH:1990:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:1990:QSCL_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:UNDH:1990:URSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:1990:URSCL") field(DOL2, "BPMS:UNDH:1990:URSCL") field(DOL3, "BPMS:UNDH:1990:URSCL") field(DOL4, "BPMS:UNDH:1990:URSCL") field(DOL5, "BPMS:UNDH:1990:URSCL") field(DOL6, "BPMS:UNDH:1990:URSCL") field(DOL7, "BPMS:UNDH:1990:URSCL") field(DOL8, "BPMS:UNDH:1990:URSCL") field(DOL9, "BPMS:UNDH:1990:URSCL") field(DOLA, "BPMS:UNDH:1990:URSCL") field(LNK1, "BPMS:UNDH:1990:URSCL_SEL.A PP") field(LNK2, "BPMS:UNDH:1990:URSCL_SEL.B PP") field(LNK3, "BPMS:UNDH:1990:URSCL_SEL.C PP") field(LNK4, "BPMS:UNDH:1990:URSCL_SEL.D PP") field(LNK5, "BPMS:UNDH:1990:URSCL_SEL.E PP") field(LNK6, "BPMS:UNDH:1990:URSCL_SEL.F PP") field(LNK7, "BPMS:UNDH:1990:URSCL_SEL.G PP") field(LNK8, "BPMS:UNDH:1990:URSCL_SEL.H PP") field(LNK9, "BPMS:UNDH:1990:URSCL_SEL.I PP") field(LNKA, "BPMS:UNDH:1990:URSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:1990:URSCL_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:UNDH:1990:URSCL_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:UNDH:1990:URSCL_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:UNDH:1990:URSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:1990:URSCL_SEL") field(OUTA, "BPMS:UNDH:1990:URMS.ASLO CA") field(OUTB, "BPMS:UNDH:1990:URSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:1990:URSCL_CTRL") { field(INPA, "BPMS:UNDH:1990:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:1990:URSCL_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:UNDH:1990:VRSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:1990:VRSCL") field(DOL2, "BPMS:UNDH:1990:VRSCL") field(DOL3, "BPMS:UNDH:1990:VRSCL") field(DOL4, "BPMS:UNDH:1990:VRSCL") field(DOL5, "BPMS:UNDH:1990:VRSCL") field(DOL6, "BPMS:UNDH:1990:VRSCL") field(DOL7, "BPMS:UNDH:1990:VRSCL") field(DOL8, "BPMS:UNDH:1990:VRSCL") field(DOL9, "BPMS:UNDH:1990:VRSCL") field(DOLA, "BPMS:UNDH:1990:VRSCL") field(LNK1, "BPMS:UNDH:1990:VRSCL_SEL.A PP") field(LNK2, "BPMS:UNDH:1990:VRSCL_SEL.B PP") field(LNK3, "BPMS:UNDH:1990:VRSCL_SEL.C PP") field(LNK4, "BPMS:UNDH:1990:VRSCL_SEL.D PP") field(LNK5, "BPMS:UNDH:1990:VRSCL_SEL.E PP") field(LNK6, "BPMS:UNDH:1990:VRSCL_SEL.F PP") field(LNK7, "BPMS:UNDH:1990:VRSCL_SEL.G PP") field(LNK8, "BPMS:UNDH:1990:VRSCL_SEL.H PP") field(LNK9, "BPMS:UNDH:1990:VRSCL_SEL.I PP") field(LNKA, "BPMS:UNDH:1990:VRSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:1990:VRSCL_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:UNDH:1990:VRSCL_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:UNDH:1990:VRSCL_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:UNDH:1990:VRSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:1990:VRSCL_SEL") field(OUTA, "BPMS:UNDH:1990:VRMS.ASLO CA") field(OUTB, "BPMS:UNDH:1990:VRSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:1990:VRSCL_CTRL") { field(INPA, "BPMS:UNDH:1990:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:1990:VRSCL_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:UNDH:1990:QRSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:1990:QRSCL") field(DOL2, "BPMS:UNDH:1990:QRSCL") field(DOL3, "BPMS:UNDH:1990:QRSCL") field(DOL4, "BPMS:UNDH:1990:QRSCL") field(DOL5, "BPMS:UNDH:1990:QRSCL") field(DOL6, "BPMS:UNDH:1990:QRSCL") field(DOL7, "BPMS:UNDH:1990:QRSCL") field(DOL8, "BPMS:UNDH:1990:QRSCL") field(DOL9, "BPMS:UNDH:1990:QRSCL") field(DOLA, "BPMS:UNDH:1990:QRSCL") field(LNK1, "BPMS:UNDH:1990:QRSCL_SEL.A PP") field(LNK2, "BPMS:UNDH:1990:QRSCL_SEL.B PP") field(LNK3, "BPMS:UNDH:1990:QRSCL_SEL.C PP") field(LNK4, "BPMS:UNDH:1990:QRSCL_SEL.D PP") field(LNK5, "BPMS:UNDH:1990:QRSCL_SEL.E PP") field(LNK6, "BPMS:UNDH:1990:QRSCL_SEL.F PP") field(LNK7, "BPMS:UNDH:1990:QRSCL_SEL.G PP") field(LNK8, "BPMS:UNDH:1990:QRSCL_SEL.H PP") field(LNK9, "BPMS:UNDH:1990:QRSCL_SEL.I PP") field(LNKA, "BPMS:UNDH:1990:QRSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:1990:QRSCL_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:UNDH:1990:QRSCL_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, "3") field(FLNK, "BPMS:UNDH:1990:QRSCL_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:UNDH:1990:QRSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:1990:QRSCL_SEL") field(OUTA, "BPMS:UNDH:1990:RRMS.ASLO CA") field(OUTB, "BPMS:UNDH:1990:QRSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:1990:QRSCL_CTRL") { field(INPA, "BPMS:UNDH:1990:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:1990:QRSCL_SEL.L PP") } record(longout,"BPMS:UNDH:1990:PARMSEL") { field(OMSL,"closed_loop") field(DOL, "BPMS:UNDH:1990:RCVR_GAIN CP") } # per BPM database for cavity BPMs # # # ############################################## # This is the head of the main processing chain # that runs at the highest priority. ############################################## record(ai, "BPMS:UNDH:2090:REFR") { field(DESC, "Raw Ref. Ampl.") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C1 S0") field(EGU, "raw") 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:UNDH:2090:URER") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") field(TSE, "-1") } record(ai, "BPMS:UNDH:2090:URER") { field(DESC, "Re{Cmplx Ampl. U/REF}") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C1 S1") field(EGU, "raw") #TODO set HOPR/LOPR, alarm limits field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:2090:UIMR") field(PREC, "1") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") field(TSE, "-1") } record(ai, "BPMS:UNDH:2090:UIMR") { field(DESC, "Im{Cmplx Ampl. U/REF}") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C1 S5") field(EGU, "raw") #TODO set HOPR/LOPR, alarm limits field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:2090:VRER") field(PREC, "1") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") field(TSE, "-1") } record(ai, "BPMS:UNDH:2090:VRER") { field(DESC, "Re{Cmplx Ampl. V/REF}") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C1 S2") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:2090:VIMR") field(PREC, "3") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") field(TSE, "-1") } record(ai, "BPMS:UNDH:2090:VIMR") { field(DESC, "Im{Cmplx Ampl. V/REF}") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C1 S6") field(EGU, "raw") #TODO set HOPR/LOPR, alarm limits field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") field(TSE, "-1") } ############################################## # This is the head of the processing chain for # diagnostics. ############################################## record(ai, "BPMS:UNDH:2090:RRMS") { field(DESC, "Ref. Raw RMS") field(DTYP, "Cavity Bpm Diag") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C1 S0") field(EGU, "Nel") field(SCAN, "I/O Intr") # use LOW or HIGH to end up on the 'diagnostic' # scan list (see drvPadUdpComm.c) field(PRIO, "LOW") field(FLNK, "BPMS:UNDH:2090:URMS") field(PREC, "3") field(LOPR, "0") field(HOPR, "1E11") field(ASLO, "1E5") } record(ai, "BPMS:UNDH:2090:URMS") { field(DESC, "Ref. Raw RMS") field(DTYP, "Cavity Bpm Diag") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C1 S1") field(EGU, "mm") field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:2090:VRMS") field(PREC, "3") field(LOPR, "0") field(HOPR, "4") } record(ai, "BPMS:UNDH:2090:VRMS") { field(DESC, "Ref. Raw RMS") field(DTYP, "Cavity Bpm Diag") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C1 S2") field(EGU, "mm") field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:2090:TDEL") field(PREC, "3") field(LOPR, "0") field(HOPR, "4") } record(ai, "BPMS:UNDH:2090:TDEL") { field(DESC, "Ref. Peak Dly.") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C1 S4") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:2090:PDEL") field(PREC, "3") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") } record(ai, "BPMS:UNDH:2090:PDEL") { field(DESC, "Ref. Phase") field(DTYP, "Raw Bpm Signal") # 'card' selects PAD number, 'signal' selects type of signal field(INP, "#C1 S7") field(EGU, "raw") field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:2090:SFFT") field(PREC, "2") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") } record(waveform, "BPMS:UNDH:2090:SFFT") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'beam-FFT', 'filter-FFT', 'filter-t-dom' field(INP, "#C1 S1") field(NELM, "192") field(FTVL, "FLOAT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "-32767") field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:2090:PRENV") } record(waveform, "BPMS:UNDH:2090:PRENV") { field(DESC, "Filtered Preenvelope") field(DTYP, "WavBuf") # 'signal' number selects 'beam', 'beam-FFT', 'filter-FFT', 'filter-t-dom' field(INP, "#C1 S4") field(NELM, "384") field(FTVL, "FLOAT") field(EGU, "Counts") field(HOPR, "32768") field(LOPR, "0") field(SCAN, "Passive") field(FLNK, "BPMS:UNDH:2090:ENVU") } record(subArray, "BPMS:UNDH:2090:ENVU") { field(DESC, "Preenvelope U") field(FTVL, "FLOAT") field(EGU, "Counts") field(INP, "BPMS:UNDH:2090:PRENV NPP") field(MALM, "512") field(NELM, "128") field(INDX, "128") field(FLNK, "BPMS:UNDH:2090:ENVV") } record(subArray, "BPMS:UNDH:2090:ENVV") { field(DESC, "Preenvelope V") field(FTVL, "FLOAT") field(EGU, "Counts") field(INP, "BPMS:UNDH:2090:PRENV NPP") field(MALM, "512") field(NELM, "128") field(INDX, "256") } # Filter frequency response # (updated/scanned by driver) record(waveform, "BPMS:UNDH:2090:FFILT") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") field(INP, "#C1 S2 @wbscan") field(NELM, "192") field(FTVL, "FLOAT") field(EGU, "Counts") field(SCAN, "Passive") } record(subArray, "BPMS:UNDH:2090:REFW") { field(DESC, "Raw Ref. Waveform") field(FTVL, "FLOAT") field(INP, "BPMS:UNDH:2090:RWAV CPP") field(MALM, "512") field(NELM, "128") field(INDX, "385") } record(waveform, "BPMS:UNDH:2090:TFILT") { field(DESC, "Raw BPM Data") field(DTYP, "WavBuf") field(INP, "#C1 S3 @wbscan") field(NELM, "384") field(FTVL, "FLOAT") field(EGU, "Counts") field(SCAN, "Passive") } ############################################## # Slowly-scanned diagnostics & status ############################################## record(sel, "BPMS:UNDH:2090:STA") { field(DESC, "Status Summary") field(SELM, "High Signal") field(INPA, "BPMS:UNDH:2090:RSTA.SEVR MS NPP") field(INPB, "BPMS:UNDH:2090:TMIT.SEVR MS NPP") field(INPC, "BPMS:UNDH:2090:Y.SEVR MS NPP") field(INPD, "BPMS:UNDH:2090:X.SEVR MS NPP") field(SCAN, "1 second") } record(calc, "BPMS:UNDH:2090:STA_ALH") { field(DESC, "Status Summary") field(SCAN, "1 second") field(CALC, "0") field(INPA, "BPMS:UNDH:2090:RSTA_ALH.SEVR MS NPP") field(INPB, "BPMS:UNDH:2090:CHK.SEVR MS NPP") } ############################################## # Input Parameters to Filter Bank (passive) ############################################## #record(ao, "BPMS:UNDH:2090:FC_REF") #{ #field(DESC, "Fc - Ref. Cavity") #field(DTYP, "Soft Channel") #field(OUT, "BPMS:UNDH:2090:FILT.B PP") #field(EGU, "MHz") #field(PREC, "1") #field(DRVL, "0") #field(DRVH, "60") #field(PINI, "NO") #field(VAL, "0") #field(UDF, "0") #field(STAT, "0") #field(SEVR, "0") #} #record(ao, "BPMS:UNDH:2090:BW_REF") #{ #field(DESC, "BW - Ref. Cavity") #field(DTYP, "Soft Channel") #field(OUT, "BPMS:UNDH:2090:FILT.C PP") #field(EGU, "MHz") #field(PREC, "1") #field(DRVL, "0") #field(DRVH, "60") #field(PINI, "NO") #} # Filter Parameters. # # B: fc; reference cavity # C: bw; reference cavity # # E: fc; U cavity # F: bw; U cavity # G: ts; U cavity # H: fc; V cavity # I: bw; V cavity # J: ts; V cavity # K: fo; sampling freq. # # NOTE: Do NOT create other records to write # the fc or bw parameters w/o providing # proper logic to update those records # when the driver changes bw/fc (auto-set # feature if either of them is zero) record(sub, "BPMS:UNDH:2090:FILT") { field(INAM, "bpmCavFilterSubInit") field(SNAM, "bpmCavFilterSubProc") field(A, "1") #field(INPB, "BPMS:UNDH:2090:FC_REF") #field(INPC, "BPMS:UNDH:2090:BW_REF") field(D, "0") #field(E, "30") #field(F, "12") #field(G, "0") #field(H, "30") field(I, "1") field(J, "0") field(K, "125") field(PREC, "1") field(EGU, "MHz") field(PINI, "YES") info(autosaveFields, "B C E F H I") } # Cause software to calculate new # bandwidth and center-frequency # values for U, V, Ref # CA links so that FILT.* PVs # update for CA clients without # additional process of FILT record(seq, "BPMS:UNDH:2090:AUTOFILTR") { field(SELM, "All") field(DOL1, "0") field(LNK1, "BPMS:UNDH:2090:FILT.B CA") field(DLY2, "1") field(DOL2, "0") field(LNK2, "BPMS:UNDH:2090:FILT.C CA") } record(seq, "BPMS:UNDH:2090:AUTOFILTU") { field(SELM, "All") field(DOL1, "0") field(LNK1, "BPMS:UNDH:2090:FILT.E CA") field(DLY2, "1") field(DOL2, "0") field(LNK2, "BPMS:UNDH:2090:FILT.F CA") } record(seq, "BPMS:UNDH:2090:AUTOFILTV") { field(SELM, "All") field(DOL1, "0") field(LNK1, "BPMS:UNDH:2090:FILT.H CA") field(DLY2, "1") field(DOL2, "0") field(LNK2, "BPMS:UNDH:2090:FILT.I CA") } record(seq, "BPMS:UNDH:2090:AUTOFILT") { field(SELM, "All") field(LNK1, "BPMS:UNDH:2090:AUTOFILTR PP") field(DLY2, "1") field(LNK2, "BPMS:UNDH:2090:AUTOFILTU PP") field(DLY3, "1") field(LNK3, "BPMS:UNDH:2090:AUTOFILTV PP") } # Cause software to calculate new # U and V detector phases record(seq, "BPMS:UNDH:2090:AUTOPHAS") { field(SELM, "All") field(DOL1, "400") field(LNK1, "BPMS:UNDH:2090:UPHAS CA") field(DLY2, "1") field(DOL2, "400") field(LNK2, "BPMS:UNDH:2090:VPHAS CA") } record(ao, "BPMS:UNDH:2090:TS_R") { field(DESC, "Sampling Time Ref") field(DTYP, "Soft Channel") field(OUT, "BPMS:UNDH:2090:TS_R_ADJ.A PP") field(EGU, "ns") field(PREC, "1") field(DRVL, "-1000") field(DRVH, "1000") field(PINI, "YES") info(autosaveFields, "VAL") } record(calcout, "BPMS:UNDH:2090:TS_R_ADJ") { field(DESC, "U Smpl. Time Scale") field(OUT, "BPMS:UNDH:2090:FILT.D PP") field(CALC, "A/1000") field(EGU, "us") } record(ao, "BPMS:UNDH:2090:TS_U") { field(DESC, "Sampling Time U") field(DTYP, "Soft Channel") field(OUT, "BPMS:UNDH:2090:TS_U_ADJ.A PP") field(EGU, "ns") field(PREC, "1") field(DRVL, "-1000") field(DRVH, "1000") field(PINI, "YES") info(autosaveFields, "VAL") } record(calcout, "BPMS:UNDH:2090:TS_U_ADJ") { field(DESC, "U Smpl. Time Scale") field(OUT, "BPMS:UNDH:2090:FILT.G PP") field(CALC, "A/1000") field(EGU, "us") } record(ao, "BPMS:UNDH:2090:TS_V") { field(DESC, "Sampling Time V") field(DTYP, "Soft Channel") field(OUT, "BPMS:UNDH:2090:TS_V_ADJ.A PP") field(EGU, "ns") field(PREC, "1") field(DRVL, "-1000") field(DRVH, "1000") field(PINI, "YES") field(ASLO, ".001") info(autosaveFields, "VAL") } record(calcout, "BPMS:UNDH:2090:TS_V_ADJ") { field(DESC, "V Smpl. Time Scale") field(OUT, "BPMS:UNDH:2090:FILT.J PP") field(CALC, "A/1000") field(EGU, "us") } #record(seq, "BPMS:UNDH:2090:FILTUPD") { #field(DESC, "Filt. Parm. Propagator") #field(DOL1, "BPMS:UNDH:2090:FILT.B NPP") #field(LNK1, "BPMS:UNDH:2090:FC_REF NPP") #field(DOL2, "BPMS:UNDH:2090:FILT.C NPP") #field(LNK2, "BPMS:UNDH:2090:BW_REF NPP") #field(SELM, "Mask") #field(SELN, "0x3ff") #} record(ao, "BPMS:UNDH:2090:UPHAS") { field(DESC, "Detector Phase U") field(DTYP, "Soft Channel") field(PREC, "1") field(EGU, "deg") field(FLNK, "BPMS:UNDH:2090:UPHAS_SEQ") } record(ao, "BPMS:UNDH:2090:VPHAS") { field(DESC, "Detector Phase V") field(DTYP, "Soft Channel") field(PREC, "1") field(EGU, "deg") field(FLNK, "BPMS:UNDH:2090:VPHAS_SEQ") } record(ao, "BPMS:UNDH:2090:UPHAS_OUT") { field(DESC, "Detector Phase U") field(DTYP, "Cavity Phase") field(OUT, "#C1S0") # value > 360 means 'auto-init' # field(VAL, "1000") field(PREC, "1") field(EGU, "deg") field(FLNK, "BPMS:UNDH:2090:UPHAS_FB") } # If the UPHAS_OUT record updates its # value then feed back into UPHAS record(ao, "BPMS:UNDH:2090:UPHAS_FB") { field(DESC, "Det. Phase U (FB)") field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:2090:UPHAS_OUT") field(OUT, "BPMS:UNDH:2090:UPHAS PP") field(PREC, "1") field(EGU, "deg") } record(ao, "BPMS:UNDH:2090:VPHAS_OUT") { field(DESC, "Detector Phase V") field(DTYP, "Cavity Phase") field(OUT, "#C1S1") # value > 360 means 'auto-init' # field(VAL, "1000") field(PREC, "1") field(EGU, "deg") field(FLNK, "BPMS:UNDH:2090:VPHAS_FB") } # If the VPHAS_OUT record updates its # value then feed back into VPHAS record(ao, "BPMS:UNDH:2090:VPHAS_FB") { field(DESC, "Det. Phase V (FB)") field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:2090:VPHAS_OUT") field(OUT, "BPMS:UNDH:2090:VPHAS PP") field(PREC, "1") field(EGU, "deg") } record(ao, "BPMS:UNDH:2090:QSCL") { field(DESC, "TMIT/Charge Scale") field(DTYP, "Soft Channel") field(VAL, "31250") field(EGU, "Nel") field(PREC, "3") field(FLNK, "BPMS:UNDH:2090:QSCL_SEQ") } record(ao, "BPMS:UNDH:2090:URSCL") { field(DESC, "RMS U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:UNDH:2090:URSCL_SEQ") } record(ao, "BPMS:UNDH:2090:VRSCL") { field(DESC, "RMS V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:UNDH:2090:VRSCL_SEQ") } record(ao, "BPMS:UNDH:2090:QRSCL") { field(DESC, "RMS Charge Scale") field(DTYP, "Soft Channel") field(VAL, "31250") field(EGU, "Nel") field(PREC, "3") field(FLNK, "BPMS:UNDH:2090:QRSCL_SEQ") } record(sub, "BPMS:UNDH:2090:CALC") { field(SNAM, "drvBpmBvectSetupSub") # E: phi F: psi # BPM channel number in L field(INPL, "1") field(SCAN, "Passive") } # Use CA links to keep these records # out of beam-rate locksets record(ai, "BPMS:UNDH:2090:REFR_SLOW") { field(DESC, "Slow Raw Ref. Ampl.") field(INP, "BPMS:UNDH:2090:REFR MS CA") field(EGU, "raw") field(SCAN, "1 second") field(PREC, "1") field(LOPR, "0") field(HOPR, "1.4E5") field(LOLO, "1000") field(LOW, "2000") field(LLSV, "MAJOR") field(LSV, "MINOR") field(FLNK, "BPMS:UNDH:2090:URER_SLOW") } record(ai, "BPMS:UNDH:2090:URER_SLOW") { field(DESC, "Slow Re{Cmplx Ampl. U/REF}") field(INP, "BPMS:UNDH:2090:URER MS CA") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") field(FLNK, "BPMS:UNDH:2090:UIMR_SLOW") } record(ai, "BPMS:UNDH:2090:UIMR_SLOW") { field(DESC, "Slow Im{Cmplx Ampl. U/REF}") field(INP, "BPMS:UNDH:2090:UIMR MS CA") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") field(FLNK, "BPMS:UNDH:2090:VRER_SLOW") } record(ai, "BPMS:UNDH:2090:VRER_SLOW") { field(DESC, "Slow Re{Cmplx Ampl. V/REF}") field(INP, "BPMS:UNDH:2090:VRER MS CA") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "3") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") field(FLNK, "BPMS:UNDH:2090:VIMR_SLOW") } record(ai, "BPMS:UNDH:2090:VIMR_SLOW") { field(DESC, "Slow Im{Cmplx Ampl. V/REF}") field(INP, "BPMS:UNDH:2090:VRER MS CA") field(EGU, "raw") field(SCAN, "Passive") field(PREC, "1") field(LOPR, "0") field(HOPR, "0") field(LOLO, "0") field(LOW, "0") }#! Generated by VisualDCT v2.5 #! DBDSTART #! DBDEND # per BPM database for stripline BPMs ###################################### # HEAD of main processing chain ###################################### record(ai, "BPMS:UNDH:2090: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:UNDH:2090:Y") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "EOICDESK") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "BPMS:UNDH:2090:Y") { field(DESC, "Y Position") field(EGU, "mm") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S12") field(FLNK, "BPMS:UNDH:2090:TMIT") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") field(ASG, "EOICDESK") field(TSE, "-2") info(autosaveFields, "ASLO LOLO LOW HIGH HIHI HHSV LLSV") } record(ai, "BPMS:UNDH:2090: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:UNDH:2090:EFX.PROC") field(ASG, "EOICDESK") 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:UNDH:2090: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:UNDH:2090: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:UNDH:2090:V") } record(ai, "BPMS:UNDH:2090: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:UNDH:2090:PINC") } record(ai, "BPMS:UNDH:2090:PINC") { field(DESC, "Pin Cushion Corr.") field(DTYP, "Raw Bpm Signal") field(INP, "#C1 S10") field(SCAN, "Passive") } record(longin, "BPMS:UNDH:2090: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:UNDH:2090:RSTA_ALH") } record(calc, "BPMS:UNDH:2090:RSTA_ALH") { field(CALC, "A & B") field(INPA, "BPMS:UNDH:2090:RSTA") field(INPB, "0x30F") field(HIHI, "1") field(LOLO, "-1") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(SCAN, "Passive") } ###################################### # Input/Parameteres ###################################### record(ao, "BPMS:UNDH:2090: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:UNDH:2090:PHI_SEQ") } record(ao, "BPMS:UNDH:2090: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:UNDH:2090:PSI_SEQ") } #record(dfanout, "BPMS:UNDH:2090:PCMM") { # field(DESC, "BPM Scale") # field(OUTA, "BPMS:UNDH:2090:USCL PP MS") # field(OUTB, "BPMS:UNDH:2090:VSCL PP MS") # field(VAL, "12") # field(EGU, "mm") # field(PREC, "4") # field(LOPR, "5") # field(HOPR, "15") # field(PINI, "YES") #} record(ao, "BPMS:UNDH:2090: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:UNDH:2090:UOFF_SEQ") } record(ao, "BPMS:UNDH:2090: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:UNDH:2090:VOFF_SEQ") } record(ao, "BPMS:UNDH:2090:USCL") { field(DESC, "BPM U Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:UNDH:2090:USCL_SEQ") } record(ao, "BPMS:UNDH:2090:VSCL") { field(DESC, "BPM V Scale") field(DTYP, "Soft Channel") field(VAL, "1") field(EGU, "mm") field(PREC, "4") field(FLNK, "BPMS:UNDH:2090:VSCL_SEQ") } record(mbbo, "BPMS:UNDH:2090: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:UNDH:2090: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:UNDH:2090:FBCK") { field(DESC, "Feedback State") field(PINI, "YES") field(OMSL, "supervisory") field(VAL, "0") field(ZRVL, "0") field(ONVL, "1") field(TWVL, "2") # Off - this device can be used in feedback but all feedback loops # using it are off. field(ZRST, "Off") # On - this device is being used by one or more feedback loops. field(ONST, "On") # Unavailable - this device is not used by any feedback loop. field(TWST, "Unavailable") info(autosaveFields, "VAL") } # Convenience record holding the MAD name record(stringin, "BPMS:UNDH:2090:MADN") { field(DESC, "MAD Name") field(VAL, "RFBHX20") field(PINI, "YES") } record(stringin, "RFBHX20:NAME") { field(DESC, "BPM Name") field(VAL, "BPMS:UNDH:2090") field(PINI, "YES") } record(ai, "BPMS:UNDH:2090:X_SLOW") { #alias("BPMS:UNDH:2090:X1H") field(DESC, "X snapshot for display") field(EGU, "mm") field(INP, "BPMS:UNDH:2090:X MS") field(FLNK, "BPMS:UNDH:2090:Y_SLOW") field(PREC, "4") field(SCAN, "1 second") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:UNDH:2090:Y_SLOW") { #alias("BPMS:UNDH:2090:Y1H") field(DESC, "Y snapshot for display") field(EGU, "mm") field(INP, "BPMS:UNDH:2090:Y NPP MS") field(FLNK, "BPMS:UNDH:2090:TMIT_SLOW") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ai, "BPMS:UNDH:2090:TMIT_SLOW") { #alias("BPMS:UNDH:2090:TMIT1H") field(DESC, "TMIT snapshot for display") field(INP, "BPMS:UNDH:2090: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:UNDH:2090:SIMOFF") { field(DESC, "Sim Off Propagator") field(INPA, "BPMS:UNDH:2090:ACCESS.RVAL") field(CALC, "A") field(OCAL, "0") field(OOPT, "When Zero") field(DOPT, "Use OCAL") field(OUT, "BPMS:UNDH:2090:SIMC PP") } record(calcout, "BPMS:UNDH:2090: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:UNDH:2090:USCL") field(INPL, "0") } # Switch simulation record BPMS:UNDH:2090:SIMCSEQ moved to # bpmCavity.db.part and bpmStripl.db.part record(mbbo, "BPMS:UNDH:2090:SIMC") { field(DESC, "Stripl Sim Ctl") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:UNDH:2090: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:UNDH:2090:XSIM") { field(DESC, "BPM X Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:UNDH:2090: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:UNDH:2090:YSIM") { field(DESC, "BPM Y Pos. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:UNDH:2090:SIM.C PP") field(VAL, "0.") field(EGU, "mm") field(PINI, "YES") field(PREC, "4") field(LOPR, "-12") field(HOPR, "+12") } record(ao, "BPMS:UNDH:2090:QSIM") { field(DESC, "BPM Q Simul.") field(DTYP, "Raw Soft Channel") field(OUT, "BPMS:UNDH:2090: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:UNDH:2090:ROTS") { field(DESC, "BPM Rot. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:UNDH:2090:SIM.E PP") field(VAL, "0.") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "-180") } record(ao, "BPMS:UNDH:2090:PSIS") { field(DESC, "BPM Angle. Simul.") field(DTYP, "Soft Channel") field(OUT, "BPMS:UNDH:2090:SIM.F PP") field(VAL, "90") field(EGU, "deg") field(PINI, "YES") field(PREC, "1") field(LOPR, "0") } record(aao, "BPMS:UNDH:2090: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:UNDH:2090:Z") { field(DESC, "Z Position") field(PINI, "YES") info(autosaveFields, "VAL") } # MPS interface record(bo, "BPMS:UNDH:2090:MPSBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C0S2@bpmMPS+0,m32") field(MASK, "0x002") field(ZNAM, "BYPASSED") field(ONAM, "NOT_BYPASSED") field(ZSV, "MAJOR") field(OSV, "NO_ALARM") field(VAL, "0") field(PINI, "YES") field(ASG, "EOICDESK") info(autosaveFields, "VAL") } record(bo, "BPMS:UNDH:2090:MPSLTBYP") { field(DESC, "MPS Bypass") field(DTYP, "BusAddress") field(OUT, "#C1S2@bpmMPS+0,m32") field(MASK, "0x002") field(ZNAM, "BYPASSED") field(ONAM, "NOT_BYPASSED") field(ZSV, "NO_ALARM") field(OSV, "NO_ALARM") field(VAL, "0") field(PINI, "YES") field(ASG, "EOICDESK") info(autosaveFields, "VAL") } record(calc, "BPMS:UNDH:2090: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:UNDH:2090:UOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:2090:UOFF") field(DOL2, "BPMS:UNDH:2090:UOFF") field(DOL3, "BPMS:UNDH:2090:UOFF") field(DOL4, "BPMS:UNDH:2090:UOFF") field(DOL5, "BPMS:UNDH:2090:UOFF") field(DOL6, "BPMS:UNDH:2090:UOFF") field(DOL7, "BPMS:UNDH:2090:UOFF") field(DOL8, "BPMS:UNDH:2090:UOFF") field(DOL9, "BPMS:UNDH:2090:UOFF") field(DOLA, "BPMS:UNDH:2090:UOFF") field(LNK1, "BPMS:UNDH:2090:UOFF_SEL.A PP") field(LNK2, "BPMS:UNDH:2090:UOFF_SEL.B PP") field(LNK3, "BPMS:UNDH:2090:UOFF_SEL.C PP") field(LNK4, "BPMS:UNDH:2090:UOFF_SEL.D PP") field(LNK5, "BPMS:UNDH:2090:UOFF_SEL.E PP") field(LNK6, "BPMS:UNDH:2090:UOFF_SEL.F PP") field(LNK7, "BPMS:UNDH:2090:UOFF_SEL.G PP") field(LNK8, "BPMS:UNDH:2090:UOFF_SEL.H PP") field(LNK9, "BPMS:UNDH:2090:UOFF_SEL.I PP") field(LNKA, "BPMS:UNDH:2090:UOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:2090: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:UNDH:2090: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:UNDH:2090: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:UNDH:2090:UOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:2090:UOFF_SEL") field(OUTA, "BPMS:UNDH:2090:U.AOFF CA") field(OUTB, "BPMS:UNDH:2090:UOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:2090:UOFF_CTRL") { field(INPA, "BPMS:UNDH:2090:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:2090: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:UNDH:2090:VOFF_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:2090:VOFF") field(DOL2, "BPMS:UNDH:2090:VOFF") field(DOL3, "BPMS:UNDH:2090:VOFF") field(DOL4, "BPMS:UNDH:2090:VOFF") field(DOL5, "BPMS:UNDH:2090:VOFF") field(DOL6, "BPMS:UNDH:2090:VOFF") field(DOL7, "BPMS:UNDH:2090:VOFF") field(DOL8, "BPMS:UNDH:2090:VOFF") field(DOL9, "BPMS:UNDH:2090:VOFF") field(DOLA, "BPMS:UNDH:2090:VOFF") field(LNK1, "BPMS:UNDH:2090:VOFF_SEL.A PP") field(LNK2, "BPMS:UNDH:2090:VOFF_SEL.B PP") field(LNK3, "BPMS:UNDH:2090:VOFF_SEL.C PP") field(LNK4, "BPMS:UNDH:2090:VOFF_SEL.D PP") field(LNK5, "BPMS:UNDH:2090:VOFF_SEL.E PP") field(LNK6, "BPMS:UNDH:2090:VOFF_SEL.F PP") field(LNK7, "BPMS:UNDH:2090:VOFF_SEL.G PP") field(LNK8, "BPMS:UNDH:2090:VOFF_SEL.H PP") field(LNK9, "BPMS:UNDH:2090:VOFF_SEL.I PP") field(LNKA, "BPMS:UNDH:2090:VOFF_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:2090: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:UNDH:2090: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:UNDH:2090: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:UNDH:2090:VOFF_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:2090:VOFF_SEL") field(OUTA, "BPMS:UNDH:2090:V.AOFF CA") field(OUTB, "BPMS:UNDH:2090:VOFF PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:2090:VOFF_CTRL") { field(INPA, "BPMS:UNDH:2090:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:2090: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:UNDH:2090:USCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:2090:USCL") field(DOL2, "BPMS:UNDH:2090:USCL") field(DOL3, "BPMS:UNDH:2090:USCL") field(DOL4, "BPMS:UNDH:2090:USCL") field(DOL5, "BPMS:UNDH:2090:USCL") field(DOL6, "BPMS:UNDH:2090:USCL") field(DOL7, "BPMS:UNDH:2090:USCL") field(DOL8, "BPMS:UNDH:2090:USCL") field(DOL9, "BPMS:UNDH:2090:USCL") field(DOLA, "BPMS:UNDH:2090:USCL") field(LNK1, "BPMS:UNDH:2090:USCL_SEL.A PP") field(LNK2, "BPMS:UNDH:2090:USCL_SEL.B PP") field(LNK3, "BPMS:UNDH:2090:USCL_SEL.C PP") field(LNK4, "BPMS:UNDH:2090:USCL_SEL.D PP") field(LNK5, "BPMS:UNDH:2090:USCL_SEL.E PP") field(LNK6, "BPMS:UNDH:2090:USCL_SEL.F PP") field(LNK7, "BPMS:UNDH:2090:USCL_SEL.G PP") field(LNK8, "BPMS:UNDH:2090:USCL_SEL.H PP") field(LNK9, "BPMS:UNDH:2090:USCL_SEL.I PP") field(LNKA, "BPMS:UNDH:2090:USCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:2090: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:UNDH:2090: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:UNDH:2090: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:UNDH:2090:USCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:2090:USCL_SEL") field(OUTA, "BPMS:UNDH:2090:U.ASLO CA") field(OUTB, "BPMS:UNDH:2090:USCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:2090:USCL_CTRL") { field(INPA, "BPMS:UNDH:2090:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:2090: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:UNDH:2090:VSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:2090:VSCL") field(DOL2, "BPMS:UNDH:2090:VSCL") field(DOL3, "BPMS:UNDH:2090:VSCL") field(DOL4, "BPMS:UNDH:2090:VSCL") field(DOL5, "BPMS:UNDH:2090:VSCL") field(DOL6, "BPMS:UNDH:2090:VSCL") field(DOL7, "BPMS:UNDH:2090:VSCL") field(DOL8, "BPMS:UNDH:2090:VSCL") field(DOL9, "BPMS:UNDH:2090:VSCL") field(DOLA, "BPMS:UNDH:2090:VSCL") field(LNK1, "BPMS:UNDH:2090:VSCL_SEL.A PP") field(LNK2, "BPMS:UNDH:2090:VSCL_SEL.B PP") field(LNK3, "BPMS:UNDH:2090:VSCL_SEL.C PP") field(LNK4, "BPMS:UNDH:2090:VSCL_SEL.D PP") field(LNK5, "BPMS:UNDH:2090:VSCL_SEL.E PP") field(LNK6, "BPMS:UNDH:2090:VSCL_SEL.F PP") field(LNK7, "BPMS:UNDH:2090:VSCL_SEL.G PP") field(LNK8, "BPMS:UNDH:2090:VSCL_SEL.H PP") field(LNK9, "BPMS:UNDH:2090:VSCL_SEL.I PP") field(LNKA, "BPMS:UNDH:2090:VSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:2090: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:UNDH:2090: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:UNDH:2090: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:UNDH:2090:VSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:2090:VSCL_SEL") field(OUTA, "BPMS:UNDH:2090:V.ASLO CA") field(OUTB, "BPMS:UNDH:2090:VSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:2090:VSCL_CTRL") { field(INPA, "BPMS:UNDH:2090:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:2090: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:UNDH:2090:PHI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:2090:PHI") field(DOL2, "BPMS:UNDH:2090:PHI") field(DOL3, "BPMS:UNDH:2090:PHI") field(DOL4, "BPMS:UNDH:2090:PHI") field(DOL5, "BPMS:UNDH:2090:PHI") field(DOL6, "BPMS:UNDH:2090:PHI") field(DOL7, "BPMS:UNDH:2090:PHI") field(DOL8, "BPMS:UNDH:2090:PHI") field(DOL9, "BPMS:UNDH:2090:PHI") field(DOLA, "BPMS:UNDH:2090:PHI") field(LNK1, "BPMS:UNDH:2090:PHI_SEL.A PP") field(LNK2, "BPMS:UNDH:2090:PHI_SEL.B PP") field(LNK3, "BPMS:UNDH:2090:PHI_SEL.C PP") field(LNK4, "BPMS:UNDH:2090:PHI_SEL.D PP") field(LNK5, "BPMS:UNDH:2090:PHI_SEL.E PP") field(LNK6, "BPMS:UNDH:2090:PHI_SEL.F PP") field(LNK7, "BPMS:UNDH:2090:PHI_SEL.G PP") field(LNK8, "BPMS:UNDH:2090:PHI_SEL.H PP") field(LNK9, "BPMS:UNDH:2090:PHI_SEL.I PP") field(LNKA, "BPMS:UNDH:2090:PHI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:2090: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:UNDH:2090: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:UNDH:2090: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:UNDH:2090:PHI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:2090:PHI_SEL") field(OUTA, "BPMS:UNDH:2090:CALC.E CA") field(OUTB, "BPMS:UNDH:2090:PHI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:2090:PHI_CTRL") { field(INPA, "BPMS:UNDH:2090:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:2090: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:UNDH:2090:PSI_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:2090:PSI") field(DOL2, "BPMS:UNDH:2090:PSI") field(DOL3, "BPMS:UNDH:2090:PSI") field(DOL4, "BPMS:UNDH:2090:PSI") field(DOL5, "BPMS:UNDH:2090:PSI") field(DOL6, "BPMS:UNDH:2090:PSI") field(DOL7, "BPMS:UNDH:2090:PSI") field(DOL8, "BPMS:UNDH:2090:PSI") field(DOL9, "BPMS:UNDH:2090:PSI") field(DOLA, "BPMS:UNDH:2090:PSI") field(LNK1, "BPMS:UNDH:2090:PSI_SEL.A PP") field(LNK2, "BPMS:UNDH:2090:PSI_SEL.B PP") field(LNK3, "BPMS:UNDH:2090:PSI_SEL.C PP") field(LNK4, "BPMS:UNDH:2090:PSI_SEL.D PP") field(LNK5, "BPMS:UNDH:2090:PSI_SEL.E PP") field(LNK6, "BPMS:UNDH:2090:PSI_SEL.F PP") field(LNK7, "BPMS:UNDH:2090:PSI_SEL.G PP") field(LNK8, "BPMS:UNDH:2090:PSI_SEL.H PP") field(LNK9, "BPMS:UNDH:2090:PSI_SEL.I PP") field(LNKA, "BPMS:UNDH:2090:PSI_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:2090: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:UNDH:2090: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:UNDH:2090: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:UNDH:2090:PSI_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:2090:PSI_SEL") field(OUTA, "BPMS:UNDH:2090:CALC.F CA") field(OUTB, "BPMS:UNDH:2090:PSI PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:2090:PSI_CTRL") { field(INPA, "BPMS:UNDH:2090:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:2090:PSI_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:UNDH:2090:UPHAS_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:2090:UPHAS") field(DOL2, "BPMS:UNDH:2090:UPHAS") field(DOL3, "BPMS:UNDH:2090:UPHAS") field(DOL4, "BPMS:UNDH:2090:UPHAS") field(DOL5, "BPMS:UNDH:2090:UPHAS") field(DOL6, "BPMS:UNDH:2090:UPHAS") field(DOL7, "BPMS:UNDH:2090:UPHAS") field(DOL8, "BPMS:UNDH:2090:UPHAS") field(DOL9, "BPMS:UNDH:2090:UPHAS") field(DOLA, "BPMS:UNDH:2090:UPHAS") field(LNK1, "BPMS:UNDH:2090:UPHAS_SEL.A PP") field(LNK2, "BPMS:UNDH:2090:UPHAS_SEL.B PP") field(LNK3, "BPMS:UNDH:2090:UPHAS_SEL.C PP") field(LNK4, "BPMS:UNDH:2090:UPHAS_SEL.D PP") field(LNK5, "BPMS:UNDH:2090:UPHAS_SEL.E PP") field(LNK6, "BPMS:UNDH:2090:UPHAS_SEL.F PP") field(LNK7, "BPMS:UNDH:2090:UPHAS_SEL.G PP") field(LNK8, "BPMS:UNDH:2090:UPHAS_SEL.H PP") field(LNK9, "BPMS:UNDH:2090:UPHAS_SEL.I PP") field(LNKA, "BPMS:UNDH:2090:UPHAS_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:2090:UPHAS_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:UNDH:2090:UPHAS_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1000") field(B, "1000") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:UNDH:2090:UPHAS_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:UNDH:2090:UPHAS_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:2090:UPHAS_SEL") field(OUTA, "BPMS:UNDH:2090:UPHAS_OUT PP NMS") field(OUTB, "BPMS:UNDH:2090:UPHAS PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:2090:UPHAS_CTRL") { field(INPA, "BPMS:UNDH:2090:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:2090:UPHAS_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:UNDH:2090:VPHAS_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:2090:VPHAS") field(DOL2, "BPMS:UNDH:2090:VPHAS") field(DOL3, "BPMS:UNDH:2090:VPHAS") field(DOL4, "BPMS:UNDH:2090:VPHAS") field(DOL5, "BPMS:UNDH:2090:VPHAS") field(DOL6, "BPMS:UNDH:2090:VPHAS") field(DOL7, "BPMS:UNDH:2090:VPHAS") field(DOL8, "BPMS:UNDH:2090:VPHAS") field(DOL9, "BPMS:UNDH:2090:VPHAS") field(DOLA, "BPMS:UNDH:2090:VPHAS") field(LNK1, "BPMS:UNDH:2090:VPHAS_SEL.A PP") field(LNK2, "BPMS:UNDH:2090:VPHAS_SEL.B PP") field(LNK3, "BPMS:UNDH:2090:VPHAS_SEL.C PP") field(LNK4, "BPMS:UNDH:2090:VPHAS_SEL.D PP") field(LNK5, "BPMS:UNDH:2090:VPHAS_SEL.E PP") field(LNK6, "BPMS:UNDH:2090:VPHAS_SEL.F PP") field(LNK7, "BPMS:UNDH:2090:VPHAS_SEL.G PP") field(LNK8, "BPMS:UNDH:2090:VPHAS_SEL.H PP") field(LNK9, "BPMS:UNDH:2090:VPHAS_SEL.I PP") field(LNKA, "BPMS:UNDH:2090:VPHAS_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:2090:VPHAS_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:UNDH:2090:VPHAS_SEL") { # field(INAM, "parmSelSubInit") field(SNAM, "parmSelSubProc") field(A, "1000") field(B, "1000") field(C, "") field(D, "") field(E, "") field(F, "") field(G, "") field(H, "") field(I, "") field(J, "") field(PREC, "1") field(FLNK, "BPMS:UNDH:2090:VPHAS_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:UNDH:2090:VPHAS_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:2090:VPHAS_SEL") field(OUTA, "BPMS:UNDH:2090:VPHAS_OUT PP NMS") field(OUTB, "BPMS:UNDH:2090:VPHAS PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:2090:VPHAS_CTRL") { field(INPA, "BPMS:UNDH:2090:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:2090:VPHAS_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:UNDH:2090:QSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:2090:QSCL") field(DOL2, "BPMS:UNDH:2090:QSCL") field(DOL3, "BPMS:UNDH:2090:QSCL") field(DOL4, "BPMS:UNDH:2090:QSCL") field(DOL5, "BPMS:UNDH:2090:QSCL") field(DOL6, "BPMS:UNDH:2090:QSCL") field(DOL7, "BPMS:UNDH:2090:QSCL") field(DOL8, "BPMS:UNDH:2090:QSCL") field(DOL9, "BPMS:UNDH:2090:QSCL") field(DOLA, "BPMS:UNDH:2090:QSCL") field(LNK1, "BPMS:UNDH:2090:QSCL_SEL.A PP") field(LNK2, "BPMS:UNDH:2090:QSCL_SEL.B PP") field(LNK3, "BPMS:UNDH:2090:QSCL_SEL.C PP") field(LNK4, "BPMS:UNDH:2090:QSCL_SEL.D PP") field(LNK5, "BPMS:UNDH:2090:QSCL_SEL.E PP") field(LNK6, "BPMS:UNDH:2090:QSCL_SEL.F PP") field(LNK7, "BPMS:UNDH:2090:QSCL_SEL.G PP") field(LNK8, "BPMS:UNDH:2090:QSCL_SEL.H PP") field(LNK9, "BPMS:UNDH:2090:QSCL_SEL.I PP") field(LNKA, "BPMS:UNDH:2090:QSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:2090:QSCL_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:UNDH:2090:QSCL_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, "3") field(FLNK, "BPMS:UNDH:2090:QSCL_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:UNDH:2090:QSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:2090:QSCL_SEL") field(OUTA, "BPMS:UNDH:2090:TMIT.ASLO CA") field(OUTB, "BPMS:UNDH:2090:QSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:2090:QSCL_CTRL") { field(INPA, "BPMS:UNDH:2090:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:2090:QSCL_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:UNDH:2090:URSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:2090:URSCL") field(DOL2, "BPMS:UNDH:2090:URSCL") field(DOL3, "BPMS:UNDH:2090:URSCL") field(DOL4, "BPMS:UNDH:2090:URSCL") field(DOL5, "BPMS:UNDH:2090:URSCL") field(DOL6, "BPMS:UNDH:2090:URSCL") field(DOL7, "BPMS:UNDH:2090:URSCL") field(DOL8, "BPMS:UNDH:2090:URSCL") field(DOL9, "BPMS:UNDH:2090:URSCL") field(DOLA, "BPMS:UNDH:2090:URSCL") field(LNK1, "BPMS:UNDH:2090:URSCL_SEL.A PP") field(LNK2, "BPMS:UNDH:2090:URSCL_SEL.B PP") field(LNK3, "BPMS:UNDH:2090:URSCL_SEL.C PP") field(LNK4, "BPMS:UNDH:2090:URSCL_SEL.D PP") field(LNK5, "BPMS:UNDH:2090:URSCL_SEL.E PP") field(LNK6, "BPMS:UNDH:2090:URSCL_SEL.F PP") field(LNK7, "BPMS:UNDH:2090:URSCL_SEL.G PP") field(LNK8, "BPMS:UNDH:2090:URSCL_SEL.H PP") field(LNK9, "BPMS:UNDH:2090:URSCL_SEL.I PP") field(LNKA, "BPMS:UNDH:2090:URSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:2090:URSCL_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:UNDH:2090:URSCL_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:UNDH:2090:URSCL_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:UNDH:2090:URSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:2090:URSCL_SEL") field(OUTA, "BPMS:UNDH:2090:URMS.ASLO CA") field(OUTB, "BPMS:UNDH:2090:URSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:2090:URSCL_CTRL") { field(INPA, "BPMS:UNDH:2090:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:2090:URSCL_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:UNDH:2090:VRSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:2090:VRSCL") field(DOL2, "BPMS:UNDH:2090:VRSCL") field(DOL3, "BPMS:UNDH:2090:VRSCL") field(DOL4, "BPMS:UNDH:2090:VRSCL") field(DOL5, "BPMS:UNDH:2090:VRSCL") field(DOL6, "BPMS:UNDH:2090:VRSCL") field(DOL7, "BPMS:UNDH:2090:VRSCL") field(DOL8, "BPMS:UNDH:2090:VRSCL") field(DOL9, "BPMS:UNDH:2090:VRSCL") field(DOLA, "BPMS:UNDH:2090:VRSCL") field(LNK1, "BPMS:UNDH:2090:VRSCL_SEL.A PP") field(LNK2, "BPMS:UNDH:2090:VRSCL_SEL.B PP") field(LNK3, "BPMS:UNDH:2090:VRSCL_SEL.C PP") field(LNK4, "BPMS:UNDH:2090:VRSCL_SEL.D PP") field(LNK5, "BPMS:UNDH:2090:VRSCL_SEL.E PP") field(LNK6, "BPMS:UNDH:2090:VRSCL_SEL.F PP") field(LNK7, "BPMS:UNDH:2090:VRSCL_SEL.G PP") field(LNK8, "BPMS:UNDH:2090:VRSCL_SEL.H PP") field(LNK9, "BPMS:UNDH:2090:VRSCL_SEL.I PP") field(LNKA, "BPMS:UNDH:2090:VRSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:2090:VRSCL_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:UNDH:2090:VRSCL_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:UNDH:2090:VRSCL_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:UNDH:2090:VRSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:2090:VRSCL_SEL") field(OUTA, "BPMS:UNDH:2090:VRMS.ASLO CA") field(OUTB, "BPMS:UNDH:2090:VRSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:2090:VRSCL_CTRL") { field(INPA, "BPMS:UNDH:2090:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:2090:VRSCL_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:UNDH:2090:QRSCL_SEQ") { field(DESC, "Propagate Parm -> SEL") field(DOL1, "BPMS:UNDH:2090:QRSCL") field(DOL2, "BPMS:UNDH:2090:QRSCL") field(DOL3, "BPMS:UNDH:2090:QRSCL") field(DOL4, "BPMS:UNDH:2090:QRSCL") field(DOL5, "BPMS:UNDH:2090:QRSCL") field(DOL6, "BPMS:UNDH:2090:QRSCL") field(DOL7, "BPMS:UNDH:2090:QRSCL") field(DOL8, "BPMS:UNDH:2090:QRSCL") field(DOL9, "BPMS:UNDH:2090:QRSCL") field(DOLA, "BPMS:UNDH:2090:QRSCL") field(LNK1, "BPMS:UNDH:2090:QRSCL_SEL.A PP") field(LNK2, "BPMS:UNDH:2090:QRSCL_SEL.B PP") field(LNK3, "BPMS:UNDH:2090:QRSCL_SEL.C PP") field(LNK4, "BPMS:UNDH:2090:QRSCL_SEL.D PP") field(LNK5, "BPMS:UNDH:2090:QRSCL_SEL.E PP") field(LNK6, "BPMS:UNDH:2090:QRSCL_SEL.F PP") field(LNK7, "BPMS:UNDH:2090:QRSCL_SEL.G PP") field(LNK8, "BPMS:UNDH:2090:QRSCL_SEL.H PP") field(LNK9, "BPMS:UNDH:2090:QRSCL_SEL.I PP") field(LNKA, "BPMS:UNDH:2090:QRSCL_SEL.J PP") field(SELM, "Specified") field(SELL, "BPMS:UNDH:2090:QRSCL_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:UNDH:2090:QRSCL_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, "3") field(FLNK, "BPMS:UNDH:2090:QRSCL_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:UNDH:2090:QRSCL_PROP") { field(OMSL, "closed_loop") field(DOL, "BPMS:UNDH:2090:QRSCL_SEL") field(OUTA, "BPMS:UNDH:2090:RRMS.ASLO CA") field(OUTB, "BPMS:UNDH:2090:QRSCL PP") } # Drive the SEL record when the 'ctrl' PV changes # Use a CA link to monitor such changes record(calcout, "BPMS:UNDH:2090:QRSCL_CTRL") { field(INPA, "BPMS:UNDH:2090:PARMSEL CP") field(CALC, "A+1") field(DOPT, "Use CALC") field(OOPT, "On Change") field(OUT, "BPMS:UNDH:2090:QRSCL_SEL.L PP") } record(longout,"BPMS:UNDH:2090:PARMSEL") { field(OMSL,"closed_loop") field(DOL, "BPMS:UNDH:2090:RCVR_GAIN CP") } # per IOC database for stripline BPMs #record(sub, "IOC:UNDH:BP02:FIDP") { # field(DESC, "BPM Fiducial Processing") # field(SNAM, "bpmEvrFidProcess") # #This tells us if there is beam during this cycle... # field(INPA, "IOC:UNDH:BP02:MODIFIER5.R") #} #record(mbbo, "IOC:UNDH:BP02:PATTERNSIM") { # field(DESC, "Pattern Simulation") # field(ZRST, "Off") # field(ONST, "Soft") # field(TWST, "Raw") # field(DOL, "0") # field(PINI, "YES") #} record(sub, "IOC:UNDH:BP02:EVTM") { field(SNAM, "subEventTestTiming") field(SCAN, "Event") field(EVNT, "40") } record(longin, "IOC:UNDH:BP02:MPSFLT_X") { field(DESC, "Latched MPS Flt. X") field(DTYP, "BusAddress") field(INP, "#C2S2@bpmMPS+0,m32,bpmMPS") field(SCAN, "I/O Intr") field(PINI, "YES") } record(longin, "IOC:UNDH:BP02:MPSFLT_Y") { field(DESC, "Latched MPS Flt. Y") field(DTYP, "BusAddress") field(INP, "#C3S2@bpmMPS+0,m32,bpmMPS") field(SCAN, "I/O Intr") field(PINI, "YES") } record(longin, "IOC:UNDH:BP02:MPSFLT_T") { field(DESC, "Latched MPS Flt. TMIT") field(DTYP, "BusAddress") field(INP, "#C4S2@bpmMPS+0,m32,bpmMPS") field(SCAN, "I/O Intr") field(PINI, "YES") } record(bi, "BPMS:UNDH:790:SUM_10TO18") { field(DESC, "MPS Heartbeat state") field(DTYP, "BusAddress") field(INP, "#C5S2@bpmMPS+0,m32,bpmMPS") field(SCAN, "1 second") field(ZNAM, "OK") field(ONAM, "FAULT") field(OSV, "MAJOR") } # Local oscillator status: # Indicates if oscillator is locked to 119 Mhz reference record(bi, "BPMS:UNDH:1990:RCVR_LO_STA") { field(DESC, "Local oscillator status") field(DTYP, "ACROMAG-IP470") field(INP, "@cavBpmDigI_MPS P0 B7") field(SCAN, "1 second") field(ZNAM, "Locked") field(ONAM, "Not locked") field(ZSV, "NO_ALARM") field(OSV, "MINOR") } # Set gain of all three signals record(bo, "BPMS:UNDH:1990:RCVR_GAIN") { field(DESC, "Signal gain for restore") field(OUT, "BPMS:UNDH:1990:RCVR_GAIN_OUT PP") field(ZNAM, "High") field(ONAM, "Low") field(PINI, "YES") info(autosaveFields, "VAL") } record(bo, "BPMS:UNDH:1990:RCVR_GAIN_OUT") { field(DESC, "Signal gain") field(DTYP, "ACROMAG-IP445") field(OUT, "@cavBpmDigO P0 B0") field(ZNAM, "High") field(ONAM, "Low") } # Set self-test mode record(bo, "BPMS:UNDH:1990:RCVR_SELFTST") { field(DESC, "Inject 11 Ghz signal") field(DTYP, "ACROMAG-IP445") field(OUT, "@cavBpmDigO P0 B1") field(ZNAM, "Off") field(ONAM, "On") field(PINI, "YES") } # Set local oscillator mode: # Lock or unlock wrt 119 MHz reference record(bo, "BPMS:UNDH:1990:RCVR_LO_CTL") { field(DESC, "Set local oscillator mode") field(DTYP, "ACROMAG-IP445") field(OUT, "@cavBpmDigO P0 B2") field(ZNAM, "Lock") field(ONAM, "Unlock") field(PINI, "YES") info(autosaveFields, "VAL") } # Local oscillator status: # Indicates if oscillator is locked to 119 Mhz reference record(bi, "BPMS:UNDH:2090:RCVR_LO_STA") { field(DESC, "Local oscillator status") field(DTYP, "ACROMAG-IP470") field(INP, "@cavBpmDigI_MPS P0 B6") field(SCAN, "1 second") field(ZNAM, "Locked") field(ONAM, "Not locked") field(ZSV, "NO_ALARM") field(OSV, "MINOR") } # Set gain of all three signals record(bo, "BPMS:UNDH:2090:RCVR_GAIN") { field(DESC, "Signal gain for restore") field(OUT, "BPMS:UNDH:2090:RCVR_GAIN_OUT PP") field(ZNAM, "High") field(ONAM, "Low") field(PINI, "YES") info(autosaveFields, "VAL") } record(bo, "BPMS:UNDH:2090:RCVR_GAIN_OUT") { field(DESC, "Signal gain") field(DTYP, "ACROMAG-IP445") field(OUT, "@cavBpmDigO P0 B3") field(ZNAM, "High") field(ONAM, "Low") } # Set self-test mode record(bo, "BPMS:UNDH:2090:RCVR_SELFTST") { field(DESC, "Inject 11 Ghz signal") field(DTYP, "ACROMAG-IP445") field(OUT, "@cavBpmDigO P0 B4") field(ZNAM, "Off") field(ONAM, "On") field(PINI, "YES") } # Set local oscillator mode: # Lock or unlock wrt 119 MHz reference record(bo, "BPMS:UNDH:2090:RCVR_LO_CTL") { field(DESC, "Set local oscillator mode") field(DTYP, "ACROMAG-IP445") field(OUT, "@cavBpmDigO P0 B5") field(ZNAM, "Lock") field(ONAM, "Unlock") field(PINI, "YES") info(autosaveFields, "VAL") }