#================================== #---------------------------------- # rf_sig_cal.template: # # Calculate scale factor to convert # ADC counts to engineering units: # MV for cavity signal; sqrt(Watts) # for others #---------------------------------- #================================== #================================== # In the lab, measure the ADC counts # at 10 dBm RF input power and then # extrapolate to calculate RF power # at ADC full scale # # P[dBm] = 10*log10(((V^2/R)*1e-3)/1mW) # V in volts # R = 50 ohms # # Per A. Benwell, calculate power [dBm] # at ADC full scale: # P = 10 + 20*log10(32767/counts_at_10_dBm) #================================== record(ai, "$(DEV)PRL:CAL_ADC_10DBM") { field(VAL, "0") field(FLNK, "$(DEV)PRL:CAL_REF_CALC") field(PINI, "YES") field(ASG, "") info(autosaveFields, "VAL") } record(calc, "$(DEV)PRL:CAL_REF_CALC") { field(CALC, "10+20*LOG(C/B)") field(INPB, "$(DEV)PRL:CAL_ADC_10DBM") # full-scale ADC counts # for signed 16-bit ADC, = 2^15 - 1 field(INPC, "32767") field(FLNK, "$(DEV)PRL:CAL_REF_PWR") } record(ao, "$(DEV)PRL:CAL_REF_PWR") { field(DESC, "Power at ADC full scale") field(SCAN, "Passive") field(EGU, "dBm") field(PREC, "2") field(DOL, "$(DEV)PRL:CAL_REF_CALC") field(OMSL, "closed_loop") field(FLNK, "$(DEV)PRL:CAL_SCALE_SQRTW") } #================================== # Measured losses in the signal path: # coupler # cable # fixed attenuator # other - for losses not attributed # to a particular component # Loss values should be entered as # *positive* numbers. # # Not all of these are used for every # signal. For example, DRV (loopback) # is measured at the chassis, so # there are no cable losses to consider. # Unused values should be set to 0. #================================== record(ao, "$(DEV)PRL:CAL_LOSS_COUPLER") { field(EGU, "dB") field(PINI, "YES") field(SCAN, "Passive") field(OMSL, "supervisory") field(PREC, "3") field(FLNK, "$(DEV)PRL:CAL_LOSS_TOTAL") field(ASG, "") info(autosaveFields, "VAL") } record(ao, "$(DEV)PRL:CAL_LOSS_CABLE") { field(SCAN, "Passive") field(EGU, "dB") field(PREC, "3") field(OMSL, "supervisory") field(PINI, "YES") field(FLNK, "$(DEV)PRL:CAL_LOSS_TOTAL") field(ASG, "") info(autosaveFields, "VAL") } record(ao, "$(DEV)PRL:CAL_LOSS_ATTEN") { field(SCAN, "Passive") field(EGU, "dB") field(PREC, "3") field(OMSL, "supervisory") field(PINI, "YES") field(FLNK, "$(DEV)PRL:CAL_LOSS_TOTAL") field(ASG, "") info(autosaveFields, "VAL") } record(ao, "$(DEV)PRL:CAL_LOSS_OTHER") { field(SCAN, "Passive") field(EGU, "dB") field(PREC, "3") field(OMSL, "supervisory") field(PINI, "YES") field(FLNK, "$(DEV)PRL:CAL_LOSS_TOTAL") field(ASG, "") info(autosaveFields, "VAL") } record(calc, "$(DEV)PRL:CAL_LOSS_TOTAL") { field(SCAN, "Passive") field(CALC, "A+B+C+D") field(INPA, "$(DEV)PRL:CAL_LOSS_COUPLER") field(INPB, "$(DEV)PRL:CAL_LOSS_CABLE") field(INPC, "$(DEV)PRL:CAL_LOSS_ATTEN") field(INPD, "$(DEV)PRL:CAL_LOSS_OTHER") field(EGU, "dB") field(PREC, "2") field(PINI, "YES") field(FLNK, "$(DEV)PRL:CAL_SCALE_SQRTW") info(autosaveFields, "VAL") } #================================== # Calculate calibration scale factor # in sqrt(Watts). # # (1/c)*10^(referenceRfPower+losses-30)/20 # (Note that 'losses' is added because it is # a positive number. If we switch to using # negative values, then 'losses' should be # subtracted.) # c = optional normalization factor: # Value to divide by if raw signal # (to which scale factor will be applied) # is not in fraction of full scale # Can be link or static value. # If unused, set to 1. # # For cavity probe scale factor, # set CALCOUT macro to # $(DEV)PRL:CAL_SCALE_MV PP # in order to calculate scale in MV. In that # case, CAL_SCALE is set by: # :SCALEFCALC in rf_sig_cal_cav.template # or, in SRF case: # :SCALEF* in parm_sel.db/cav_parms.substitutions #================================== record(calcout, "$(DEV)PRL:CAL_SCALE_SQRTW") { field(CALC, "(10^((A+B-30)/20))/C") field(INPA, "$(DEV)PRL:CAL_REF_PWR") field(INPB, "$(DEV)PRL:CAL_LOSS_TOTAL") field(INPC, "1.0") field(OOPT, "Every Time") field(EGU, "sqrt(W)") field(OUT, "$(DEV)PRL:CAL_SCALE PP") info(autosaveFields, "VAL") } record(ao, "$(DEV)PRL:CAL_SCALE") { field(SCAN, "Passive") field(OMSL, "supervisory") field(PREC, "7") field(VAL, "1") field(PINI, "YES") field(FLNK, "$(DEV)PRL:SCALE") info(autosaveFields, "VAL") } # Signal waveform mean converted to counts # To support ADC calibration record(calc, "$(DEV)PRL:AMEAN_ADC") { field(DESC, "WF mean in counts") field(CALC, "FLOOR(C*A/B)") field(INPA, "$(DEV)PRL:AMEAN CPP MSI") field(INPB, "$(DEV)PRL:CAL_SCALE MSI") field(INPC, "32767") field(EGU, "counts") field(FLNK, "$(DEV)PRL:CAL_LOSS_REF_DB") } # Convenience record to push the current # counts value to $(DEV)PRL:CAL_ADC_10DBM. # Should be done during calibration when # 10dBm is injected into ADC channel record(ao, "$(DEV)PRL:PUSH_ADC_10DBM") { field(DESC, "Push current counts for 10 dBm") field(OMSL, "closed_loop") field(DOL, "$(DEV)PRL:AMEAN_ADC") field(OUT, "$(DEV)PRL:CAL_ADC_10DBM PP") field(ASG, "") } # Calculated db ratio of live counts wrt counts # at 10 dBm. To support measuring signal loss # due to cable (and other components). record(calc, "$(DEV)PRL:CAL_LOSS_REF_DB") { field(DESC, "Live loss wrt 10 dBm") field(CALC, "20*LOG(B/A)") field(PREC, "4") field(INPA, "$(DEV)PRL:AMEAN_ADC") field(INPB, "$(DEV)PRL:CAL_ADC_10DBM CP") field(EGU, "dB") field(PINI, "YES") } # Convenience record to cable loss value # It is assumed to be: # live calculated loss - fixed attenuator record(calcout, "$(DEV)PRL:PUSH_CABLE_LOSS") { field(DESC, "Push liveloss-fixed to cable") field(CALC, "A-B") field(INPA, "$(DEV)PRL:CAL_LOSS_REF_DB") field(INPB, "$(DEV)PRL:CAL_LOSS_ATTEN") field(OOPT, "Every Time") field(OUT, "$(DEV)PRL:CAL_LOSS_CABLE PP") field(ASG, "") } #================================== # Cable delay length #================================== record(ao, "$(DEV)PRL:CAL_DELAY_CABLE") { field(SCAN, "Passive") field(EGU, "ns") field(PREC, "3") field(OMSL, "supervisory") field(PINI, "YES") info(autosaveFields, "VAL") field(ASG, "") } #================================== #---------------------------------- # rf_sig_cal.template: # # Calculate scale factor to convert # ADC counts to engineering units: # MV for cavity signal; sqrt(Watts) # for others #---------------------------------- #================================== #================================== # In the lab, measure the ADC counts # at 10 dBm RF input power and then # extrapolate to calculate RF power # at ADC full scale # # P[dBm] = 10*log10(((V^2/R)*1e-3)/1mW) # V in volts # R = 50 ohms # # Per A. Benwell, calculate power [dBm] # at ADC full scale: # P = 10 + 20*log10(32767/counts_at_10_dBm) #================================== record(ai, "$(DEV)DRV2:CAL_ADC_10DBM") { field(VAL, "0") field(FLNK, "$(DEV)DRV2:CAL_REF_CALC") field(PINI, "YES") field(ASG, "") info(autosaveFields, "VAL") } record(calc, "$(DEV)DRV2:CAL_REF_CALC") { field(CALC, "10+20*LOG(C/B)") field(INPB, "$(DEV)DRV2:CAL_ADC_10DBM") # full-scale ADC counts # for signed 16-bit ADC, = 2^15 - 1 field(INPC, "32767") field(FLNK, "$(DEV)DRV2:CAL_REF_PWR") } record(ao, "$(DEV)DRV2:CAL_REF_PWR") { field(DESC, "Power at ADC full scale") field(SCAN, "Passive") field(EGU, "dBm") field(PREC, "2") field(DOL, "$(DEV)DRV2:CAL_REF_CALC") field(OMSL, "closed_loop") field(FLNK, "$(DEV)DRV2:CAL_SCALE_SQRTW") } #================================== # Measured losses in the signal path: # coupler # cable # fixed attenuator # other - for losses not attributed # to a particular component # Loss values should be entered as # *positive* numbers. # # Not all of these are used for every # signal. For example, DRV (loopback) # is measured at the chassis, so # there are no cable losses to consider. # Unused values should be set to 0. #================================== record(ao, "$(DEV)DRV2:CAL_LOSS_COUPLER") { field(EGU, "dB") field(PINI, "YES") field(SCAN, "Passive") field(OMSL, "supervisory") field(PREC, "3") field(FLNK, "$(DEV)DRV2:CAL_LOSS_TOTAL") field(ASG, "") info(autosaveFields, "VAL") } record(ao, "$(DEV)DRV2:CAL_LOSS_CABLE") { field(SCAN, "Passive") field(EGU, "dB") field(PREC, "3") field(OMSL, "supervisory") field(PINI, "YES") field(FLNK, "$(DEV)DRV2:CAL_LOSS_TOTAL") field(ASG, "") info(autosaveFields, "VAL") } record(ao, "$(DEV)DRV2:CAL_LOSS_ATTEN") { field(SCAN, "Passive") field(EGU, "dB") field(PREC, "3") field(OMSL, "supervisory") field(PINI, "YES") field(FLNK, "$(DEV)DRV2:CAL_LOSS_TOTAL") field(ASG, "") info(autosaveFields, "VAL") } record(ao, "$(DEV)DRV2:CAL_LOSS_OTHER") { field(SCAN, "Passive") field(EGU, "dB") field(PREC, "3") field(OMSL, "supervisory") field(PINI, "YES") field(FLNK, "$(DEV)DRV2:CAL_LOSS_TOTAL") field(ASG, "") info(autosaveFields, "VAL") } record(calc, "$(DEV)DRV2:CAL_LOSS_TOTAL") { field(SCAN, "Passive") field(CALC, "A+B+C+D") field(INPA, "$(DEV)DRV2:CAL_LOSS_COUPLER") field(INPB, "$(DEV)DRV2:CAL_LOSS_CABLE") field(INPC, "$(DEV)DRV2:CAL_LOSS_ATTEN") field(INPD, "$(DEV)DRV2:CAL_LOSS_OTHER") field(EGU, "dB") field(PREC, "2") field(PINI, "YES") field(FLNK, "$(DEV)DRV2:CAL_SCALE_SQRTW") info(autosaveFields, "VAL") } #================================== # Calculate calibration scale factor # in sqrt(Watts). # # (1/c)*10^(referenceRfPower+losses-30)/20 # (Note that 'losses' is added because it is # a positive number. If we switch to using # negative values, then 'losses' should be # subtracted.) # c = optional normalization factor: # Value to divide by if raw signal # (to which scale factor will be applied) # is not in fraction of full scale # Can be link or static value. # If unused, set to 1. # # For cavity probe scale factor, # set CALCOUT macro to # $(DEV)DRV2:CAL_SCALE_MV PP # in order to calculate scale in MV. In that # case, CAL_SCALE is set by: # :SCALEFCALC in rf_sig_cal_cav.template # or, in SRF case: # :SCALEF* in parm_sel.db/cav_parms.substitutions #================================== record(calcout, "$(DEV)DRV2:CAL_SCALE_SQRTW") { field(CALC, "(10^((A+B-30)/20))/C") field(INPA, "$(DEV)DRV2:CAL_REF_PWR") field(INPB, "$(DEV)DRV2:CAL_LOSS_TOTAL") field(INPC, "1.0") field(OOPT, "Every Time") field(EGU, "sqrt(W)") field(OUT, "$(DEV)DRV2:CAL_SCALE PP") info(autosaveFields, "VAL") } record(ao, "$(DEV)DRV2:CAL_SCALE") { field(SCAN, "Passive") field(OMSL, "supervisory") field(PREC, "7") field(VAL, "1") field(PINI, "YES") field(FLNK, "$(DEV)DRV2:SCALE") info(autosaveFields, "VAL") } # Signal waveform mean converted to counts # To support ADC calibration record(calc, "$(DEV)DRV2:AMEAN_ADC") { field(DESC, "WF mean in counts") field(CALC, "FLOOR(C*A/B)") field(INPA, "$(DEV)DRV2:AMEAN CPP MSI") field(INPB, "$(DEV)DRV2:CAL_SCALE MSI") field(INPC, "32767") field(EGU, "counts") field(FLNK, "$(DEV)DRV2:CAL_LOSS_REF_DB") } # Convenience record to push the current # counts value to $(DEV)DRV2:CAL_ADC_10DBM. # Should be done during calibration when # 10dBm is injected into ADC channel record(ao, "$(DEV)DRV2:PUSH_ADC_10DBM") { field(DESC, "Push current counts for 10 dBm") field(OMSL, "closed_loop") field(DOL, "$(DEV)DRV2:AMEAN_ADC") field(OUT, "$(DEV)DRV2:CAL_ADC_10DBM PP") field(ASG, "") } # Calculated db ratio of live counts wrt counts # at 10 dBm. To support measuring signal loss # due to cable (and other components). record(calc, "$(DEV)DRV2:CAL_LOSS_REF_DB") { field(DESC, "Live loss wrt 10 dBm") field(CALC, "20*LOG(B/A)") field(PREC, "4") field(INPA, "$(DEV)DRV2:AMEAN_ADC") field(INPB, "$(DEV)DRV2:CAL_ADC_10DBM CP") field(EGU, "dB") field(PINI, "YES") } # Convenience record to cable loss value # It is assumed to be: # live calculated loss - fixed attenuator record(calcout, "$(DEV)DRV2:PUSH_CABLE_LOSS") { field(DESC, "Push liveloss-fixed to cable") field(CALC, "A-B") field(INPA, "$(DEV)DRV2:CAL_LOSS_REF_DB") field(INPB, "$(DEV)DRV2:CAL_LOSS_ATTEN") field(OOPT, "Every Time") field(OUT, "$(DEV)DRV2:CAL_LOSS_CABLE PP") field(ASG, "") } #================================== # Cable delay length #================================== record(ao, "$(DEV)DRV2:CAL_DELAY_CABLE") { field(SCAN, "Passive") field(EGU, "ns") field(PREC, "3") field(OMSL, "supervisory") field(PINI, "YES") info(autosaveFields, "VAL") field(ASG, "") } #================================== #---------------------------------- # rf_sig_cal.template: # # Calculate scale factor to convert # ADC counts to engineering units: # MV for cavity signal; sqrt(Watts) # for others #---------------------------------- #================================== #================================== # In the lab, measure the ADC counts # at 10 dBm RF input power and then # extrapolate to calculate RF power # at ADC full scale # # P[dBm] = 10*log10(((V^2/R)*1e-3)/1mW) # V in volts # R = 50 ohms # # Per A. Benwell, calculate power [dBm] # at ADC full scale: # P = 10 + 20*log10(32767/counts_at_10_dBm) #================================== record(ai, "$(DEV)LASR:CAL_ADC_10DBM") { field(VAL, "0") field(FLNK, "$(DEV)LASR:CAL_REF_CALC") field(PINI, "YES") field(ASG, "") info(autosaveFields, "VAL") } record(calc, "$(DEV)LASR:CAL_REF_CALC") { field(CALC, "10+20*LOG(C/B)") field(INPB, "$(DEV)LASR:CAL_ADC_10DBM") # full-scale ADC counts # for signed 16-bit ADC, = 2^15 - 1 field(INPC, "32767") field(FLNK, "$(DEV)LASR:CAL_REF_PWR") } record(ao, "$(DEV)LASR:CAL_REF_PWR") { field(DESC, "Power at ADC full scale") field(SCAN, "Passive") field(EGU, "dBm") field(PREC, "2") field(DOL, "$(DEV)LASR:CAL_REF_CALC") field(OMSL, "closed_loop") field(FLNK, "$(DEV)LASR:CAL_SCALE_SQRTW") } #================================== # Measured losses in the signal path: # coupler # cable # fixed attenuator # other - for losses not attributed # to a particular component # Loss values should be entered as # *positive* numbers. # # Not all of these are used for every # signal. For example, DRV (loopback) # is measured at the chassis, so # there are no cable losses to consider. # Unused values should be set to 0. #================================== record(ao, "$(DEV)LASR:CAL_LOSS_COUPLER") { field(EGU, "dB") field(PINI, "YES") field(SCAN, "Passive") field(OMSL, "supervisory") field(PREC, "3") field(FLNK, "$(DEV)LASR:CAL_LOSS_TOTAL") field(ASG, "") info(autosaveFields, "VAL") } record(ao, "$(DEV)LASR:CAL_LOSS_CABLE") { field(SCAN, "Passive") field(EGU, "dB") field(PREC, "3") field(OMSL, "supervisory") field(PINI, "YES") field(FLNK, "$(DEV)LASR:CAL_LOSS_TOTAL") field(ASG, "") info(autosaveFields, "VAL") } record(ao, "$(DEV)LASR:CAL_LOSS_ATTEN") { field(SCAN, "Passive") field(EGU, "dB") field(PREC, "3") field(OMSL, "supervisory") field(PINI, "YES") field(FLNK, "$(DEV)LASR:CAL_LOSS_TOTAL") field(ASG, "") info(autosaveFields, "VAL") } record(ao, "$(DEV)LASR:CAL_LOSS_OTHER") { field(SCAN, "Passive") field(EGU, "dB") field(PREC, "3") field(OMSL, "supervisory") field(PINI, "YES") field(FLNK, "$(DEV)LASR:CAL_LOSS_TOTAL") field(ASG, "") info(autosaveFields, "VAL") } record(calc, "$(DEV)LASR:CAL_LOSS_TOTAL") { field(SCAN, "Passive") field(CALC, "A+B+C+D") field(INPA, "$(DEV)LASR:CAL_LOSS_COUPLER") field(INPB, "$(DEV)LASR:CAL_LOSS_CABLE") field(INPC, "$(DEV)LASR:CAL_LOSS_ATTEN") field(INPD, "$(DEV)LASR:CAL_LOSS_OTHER") field(EGU, "dB") field(PREC, "2") field(PINI, "YES") field(FLNK, "$(DEV)LASR:CAL_SCALE_SQRTW") info(autosaveFields, "VAL") } #================================== # Calculate calibration scale factor # in sqrt(Watts). # # (1/c)*10^(referenceRfPower+losses-30)/20 # (Note that 'losses' is added because it is # a positive number. If we switch to using # negative values, then 'losses' should be # subtracted.) # c = optional normalization factor: # Value to divide by if raw signal # (to which scale factor will be applied) # is not in fraction of full scale # Can be link or static value. # If unused, set to 1. # # For cavity probe scale factor, # set CALCOUT macro to # $(DEV)LASR:CAL_SCALE_MV PP # in order to calculate scale in MV. In that # case, CAL_SCALE is set by: # :SCALEFCALC in rf_sig_cal_cav.template # or, in SRF case: # :SCALEF* in parm_sel.db/cav_parms.substitutions #================================== record(calcout, "$(DEV)LASR:CAL_SCALE_SQRTW") { field(CALC, "(10^((A+B-30)/20))/C") field(INPA, "$(DEV)LASR:CAL_REF_PWR") field(INPB, "$(DEV)LASR:CAL_LOSS_TOTAL") field(INPC, "1.0") field(OOPT, "Every Time") field(EGU, "sqrt(W)") field(OUT, "$(DEV)LASR:CAL_SCALE PP") info(autosaveFields, "VAL") } record(ao, "$(DEV)LASR:CAL_SCALE") { field(SCAN, "Passive") field(OMSL, "supervisory") field(PREC, "7") field(VAL, "1") field(PINI, "YES") field(FLNK, "$(DEV)LASR:SCALE") info(autosaveFields, "VAL") } # Signal waveform mean converted to counts # To support ADC calibration record(calc, "$(DEV)LASR:AMEAN_ADC") { field(DESC, "WF mean in counts") field(CALC, "FLOOR(C*A/B)") field(INPA, "$(DEV)LASR:AMEAN CPP MSI") field(INPB, "$(DEV)LASR:CAL_SCALE MSI") field(INPC, "32767") field(EGU, "counts") field(FLNK, "$(DEV)LASR:CAL_LOSS_REF_DB") } # Convenience record to push the current # counts value to $(DEV)LASR:CAL_ADC_10DBM. # Should be done during calibration when # 10dBm is injected into ADC channel record(ao, "$(DEV)LASR:PUSH_ADC_10DBM") { field(DESC, "Push current counts for 10 dBm") field(OMSL, "closed_loop") field(DOL, "$(DEV)LASR:AMEAN_ADC") field(OUT, "$(DEV)LASR:CAL_ADC_10DBM PP") field(ASG, "") } # Calculated db ratio of live counts wrt counts # at 10 dBm. To support measuring signal loss # due to cable (and other components). record(calc, "$(DEV)LASR:CAL_LOSS_REF_DB") { field(DESC, "Live loss wrt 10 dBm") field(CALC, "20*LOG(B/A)") field(PREC, "4") field(INPA, "$(DEV)LASR:AMEAN_ADC") field(INPB, "$(DEV)LASR:CAL_ADC_10DBM CP") field(EGU, "dB") field(PINI, "YES") } # Convenience record to cable loss value # It is assumed to be: # live calculated loss - fixed attenuator record(calcout, "$(DEV)LASR:PUSH_CABLE_LOSS") { field(DESC, "Push liveloss-fixed to cable") field(CALC, "A-B") field(INPA, "$(DEV)LASR:CAL_LOSS_REF_DB") field(INPB, "$(DEV)LASR:CAL_LOSS_ATTEN") field(OOPT, "Every Time") field(OUT, "$(DEV)LASR:CAL_LOSS_CABLE PP") field(ASG, "") } #================================== # Cable delay length #================================== record(ao, "$(DEV)LASR:CAL_DELAY_CABLE") { field(SCAN, "Passive") field(EGU, "ns") field(PREC, "3") field(OMSL, "supervisory") field(PINI, "YES") info(autosaveFields, "VAL") field(ASG, "") } #================================== #---------------------------------- # rf_sig_cal.template: # # Calculate scale factor to convert # ADC counts to engineering units: # MV for cavity signal; sqrt(Watts) # for others #---------------------------------- #================================== #================================== # In the lab, measure the ADC counts # at 10 dBm RF input power and then # extrapolate to calculate RF power # at ADC full scale # # P[dBm] = 10*log10(((V^2/R)*1e-3)/1mW) # V in volts # R = 50 ohms # # Per A. Benwell, calculate power [dBm] # at ADC full scale: # P = 10 + 20*log10(32767/counts_at_10_dBm) #================================== record(ai, "$(DEV)PRL7_2:CAL_ADC_10DBM") { field(VAL, "0") field(FLNK, "$(DEV)PRL7_2:CAL_REF_CALC") field(PINI, "YES") field(ASG, "") info(autosaveFields, "VAL") } record(calc, "$(DEV)PRL7_2:CAL_REF_CALC") { field(CALC, "10+20*LOG(C/B)") field(INPB, "$(DEV)PRL7_2:CAL_ADC_10DBM") # full-scale ADC counts # for signed 16-bit ADC, = 2^15 - 1 field(INPC, "32767") field(FLNK, "$(DEV)PRL7_2:CAL_REF_PWR") } record(ao, "$(DEV)PRL7_2:CAL_REF_PWR") { field(DESC, "Power at ADC full scale") field(SCAN, "Passive") field(EGU, "dBm") field(PREC, "2") field(DOL, "$(DEV)PRL7_2:CAL_REF_CALC") field(OMSL, "closed_loop") field(FLNK, "$(DEV)PRL7_2:CAL_SCALE_SQRTW") } #================================== # Measured losses in the signal path: # coupler # cable # fixed attenuator # other - for losses not attributed # to a particular component # Loss values should be entered as # *positive* numbers. # # Not all of these are used for every # signal. For example, DRV (loopback) # is measured at the chassis, so # there are no cable losses to consider. # Unused values should be set to 0. #================================== record(ao, "$(DEV)PRL7_2:CAL_LOSS_COUPLER") { field(EGU, "dB") field(PINI, "YES") field(SCAN, "Passive") field(OMSL, "supervisory") field(PREC, "3") field(FLNK, "$(DEV)PRL7_2:CAL_LOSS_TOTAL") field(ASG, "") info(autosaveFields, "VAL") } record(ao, "$(DEV)PRL7_2:CAL_LOSS_CABLE") { field(SCAN, "Passive") field(EGU, "dB") field(PREC, "3") field(OMSL, "supervisory") field(PINI, "YES") field(FLNK, "$(DEV)PRL7_2:CAL_LOSS_TOTAL") field(ASG, "") info(autosaveFields, "VAL") } record(ao, "$(DEV)PRL7_2:CAL_LOSS_ATTEN") { field(SCAN, "Passive") field(EGU, "dB") field(PREC, "3") field(OMSL, "supervisory") field(PINI, "YES") field(FLNK, "$(DEV)PRL7_2:CAL_LOSS_TOTAL") field(ASG, "") info(autosaveFields, "VAL") } record(ao, "$(DEV)PRL7_2:CAL_LOSS_OTHER") { field(SCAN, "Passive") field(EGU, "dB") field(PREC, "3") field(OMSL, "supervisory") field(PINI, "YES") field(FLNK, "$(DEV)PRL7_2:CAL_LOSS_TOTAL") field(ASG, "") info(autosaveFields, "VAL") } record(calc, "$(DEV)PRL7_2:CAL_LOSS_TOTAL") { field(SCAN, "Passive") field(CALC, "A+B+C+D") field(INPA, "$(DEV)PRL7_2:CAL_LOSS_COUPLER") field(INPB, "$(DEV)PRL7_2:CAL_LOSS_CABLE") field(INPC, "$(DEV)PRL7_2:CAL_LOSS_ATTEN") field(INPD, "$(DEV)PRL7_2:CAL_LOSS_OTHER") field(EGU, "dB") field(PREC, "2") field(PINI, "YES") field(FLNK, "$(DEV)PRL7_2:CAL_SCALE_SQRTW") info(autosaveFields, "VAL") } #================================== # Calculate calibration scale factor # in sqrt(Watts). # # (1/c)*10^(referenceRfPower+losses-30)/20 # (Note that 'losses' is added because it is # a positive number. If we switch to using # negative values, then 'losses' should be # subtracted.) # c = optional normalization factor: # Value to divide by if raw signal # (to which scale factor will be applied) # is not in fraction of full scale # Can be link or static value. # If unused, set to 1. # # For cavity probe scale factor, # set CALCOUT macro to # $(DEV)PRL7_2:CAL_SCALE_MV PP # in order to calculate scale in MV. In that # case, CAL_SCALE is set by: # :SCALEFCALC in rf_sig_cal_cav.template # or, in SRF case: # :SCALEF* in parm_sel.db/cav_parms.substitutions #================================== record(calcout, "$(DEV)PRL7_2:CAL_SCALE_SQRTW") { field(CALC, "(10^((A+B-30)/20))/C") field(INPA, "$(DEV)PRL7_2:CAL_REF_PWR") field(INPB, "$(DEV)PRL7_2:CAL_LOSS_TOTAL") field(INPC, "1.0") field(OOPT, "Every Time") field(EGU, "sqrt(W)") field(OUT, "$(DEV)PRL7_2:CAL_SCALE PP") info(autosaveFields, "VAL") } record(ao, "$(DEV)PRL7_2:CAL_SCALE") { field(SCAN, "Passive") field(OMSL, "supervisory") field(PREC, "7") field(VAL, "1") field(PINI, "YES") field(FLNK, "$(DEV)PRL7_2:SCALE") info(autosaveFields, "VAL") } # Signal waveform mean converted to counts # To support ADC calibration record(calc, "$(DEV)PRL7_2:AMEAN_ADC") { field(DESC, "WF mean in counts") field(CALC, "FLOOR(C*A/B)") field(INPA, "$(DEV)PRL7_2:AMEAN CPP MSI") field(INPB, "$(DEV)PRL7_2:CAL_SCALE MSI") field(INPC, "32767") field(EGU, "counts") field(FLNK, "$(DEV)PRL7_2:CAL_LOSS_REF_DB") } # Convenience record to push the current # counts value to $(DEV)PRL7_2:CAL_ADC_10DBM. # Should be done during calibration when # 10dBm is injected into ADC channel record(ao, "$(DEV)PRL7_2:PUSH_ADC_10DBM") { field(DESC, "Push current counts for 10 dBm") field(OMSL, "closed_loop") field(DOL, "$(DEV)PRL7_2:AMEAN_ADC") field(OUT, "$(DEV)PRL7_2:CAL_ADC_10DBM PP") field(ASG, "") } # Calculated db ratio of live counts wrt counts # at 10 dBm. To support measuring signal loss # due to cable (and other components). record(calc, "$(DEV)PRL7_2:CAL_LOSS_REF_DB") { field(DESC, "Live loss wrt 10 dBm") field(CALC, "20*LOG(B/A)") field(PREC, "4") field(INPA, "$(DEV)PRL7_2:AMEAN_ADC") field(INPB, "$(DEV)PRL7_2:CAL_ADC_10DBM CP") field(EGU, "dB") field(PINI, "YES") } # Convenience record to cable loss value # It is assumed to be: # live calculated loss - fixed attenuator record(calcout, "$(DEV)PRL7_2:PUSH_CABLE_LOSS") { field(DESC, "Push liveloss-fixed to cable") field(CALC, "A-B") field(INPA, "$(DEV)PRL7_2:CAL_LOSS_REF_DB") field(INPB, "$(DEV)PRL7_2:CAL_LOSS_ATTEN") field(OOPT, "Every Time") field(OUT, "$(DEV)PRL7_2:CAL_LOSS_CABLE PP") field(ASG, "") } #================================== # Cable delay length #================================== record(ao, "$(DEV)PRL7_2:CAL_DELAY_CABLE") { field(SCAN, "Passive") field(EGU, "ns") field(PREC, "3") field(OMSL, "supervisory") field(PINI, "YES") info(autosaveFields, "VAL") field(ASG, "") } #================================== #---------------------------------- # wfCavSig.db: # # Waveform signal support for a # single signal, for a single cavity #---------------------------------- #================================== #================================== # Calibration scale factor for # SRF waveform signals. Fans value # out to corresponding I and Q # waveform scale factors. #================================== record(ao, "$(DEV)PRL:SCALE") { field(SCAN, "Passive") field(OMSL, "closed_loop") field(DOL, "$(DEV)PRL:CAL_SCALE") field(PREC, "7") field(PINI, "YES") field(FLNK, "$(DEV)PRL:SCALE_FO PP") info(autosaveFields, "VAL LOLO LOW HIGH HIHI LLSV LSV HSV HHSV") } record(dfanout, "$(DEV)PRL:SCALE_FO") { field(DESC, "Write out WF scale factors") field(OMSL, "closed_loop") field(DOL, "$(DEV)PRL:SCALE") field(OUTA, "$(DEV)PRL:ISCALE PP") field(OUTB, "$(DEV)PRL:QSCALE PP") field(OUTC, "") field(OUTD, "") field(OUTE, "") field(FLNK, "") } # Dummy PV to allow python API to access actual PV record(longin, "$(DEV)PRL:SCALEDMY") { field(DTYP, "FEED Register Read") field(INP , "@name=$(NAME) reg=mbox_$(BIT)_PRL:SCALE") info(feed:info:input, "$(DEV)PRL:SCALE") } #================================== # Set waveform display ranges. # Affects all users. # Setting range upper limit also # sets I/Q range to +/- upper limit. # Sets limits for I/QWFDISP PVs # because those are shown on the # relevant waveform displays. # # On boot, these records are processed # by wf_cav.template #================================== record(ao, "$(DEV)PRL:AHOPR") { field(OMSL, "supervisory") field(VAL, "60") field(FLNK, "$(DEV)PRL:IQLOPR") } record(calc, "$(DEV)PRL:IQLOPR") { field(CALC, "-A") field(INPA, "$(DEV)PRL:AHOPR") field(FLNK, "$(DEV)PRL:WFOPR_FO1") } record(dfanout, "$(DEV)PRL:WFOPR_FO1") { field(DESC, "Update wf limits & reset displays") field(SELM, "All") field(DOL, "$(DEV)PRL:IQLOPR") field(OMSL, "closed_loop") field(OUTA, "$(DEV)PRL:IWFDISP.LOPR PP") field(OUTB, "$(DEV)PRL:QWFDISP.LOPR PP") field(OUTC, "$(DEV)PRL:IWF.LOPR PP") field(OUTD, "$(DEV)PRL:QWF.LOPR PP") field(FLNK, "$(DEV)PRL:WFOPR_FO2") } record(dfanout, "$(DEV)PRL:WFOPR_FO2") { field(DESC, "Update wf limits & reset displays") field(SELM, "All") field(DOL, "$(DEV)PRL:AHOPR") field(OMSL, "closed_loop") field(OUTA, "$(DEV)PRL:AWF.HOPR PP") field(OUTB, "$(DEV)PRL:IWFDISP.HOPR PP") field(OUTC, "$(DEV)PRL:QWFDISP.HOPR PP") field(OUTD, "$(DEV)PRL:IWF.HOPR PP") field(OUTE, "$(DEV)PRL:QWF.HOPR PP") field(OUTF, "") field(FLNK, "$(DEV)PRL:WFOPR_FO3") } record(ao, "$(DEV)PRL:ALOPR") { field(OMSL, "supervisory") field(VAL, "0") field(OUT, "$(DEV)PRL:AWF.LOPR PP") field(FLNK, "$(DEV)PRL:WFOPR_FO3") } record(dfanout, "$(DEV)PRL:WFOPR_FO3") { field(DESC, "Update wf limits & reset displays") field(SELM, "All") field(DOL, "$(DEV)PRL:ALOPR") field(OMSL, "closed_loop") field(OUTA, "$(DEV)PRL:AWF.LOPR PP") field(OUTB, "") field(FLNK, "") } # Waveform statistics scalar operating limits: # leave LOPR at 0, set HOPR to default value # Unlike waveforms, thesedo not update these # based on user display range selections. Consider # re-thinking this record(dfanout, "$(DEV)PRL:AHOPR_FO") { field(DESC, "Update scalar HOPR") field(OMSL, "closed_loop") field(DOL, "60") field(OUTA, "$(DEV)PRL:AMEAN.HOPR PP") field(OUTB, "$(DEV)PRL:AMIN.HOPR PP") field(OUTC, "$(DEV)PRL:AMAX.HOPR PP") field(PINI, "YES") field(FLNK, "$(DEV)PRL:PWRHOPR") } record(calc, "$(DEV)PRL:PWRHOPR") { field(DESC, "Calc power HOPR") field(CALC, "A*A*B") field(INPA, "60") field(INPB, "$(DEV)PRL:PWRSCALE CP") field(FLNK, "$(DEV)PRL:PWRHOPR_FO") } record(dfanout, "$(DEV)PRL:PWRHOPR_FO") { field(DESC, "Update scalar HOPR") field(OMSL, "closed_loop") field(DOL, "$(DEV)PRL:PWRHOPR") field(OUTA, "$(DEV)PRL:PWRMEAN.HOPR PP") field(OUTB, "$(DEV)PRL:PWRMIN.HOPR PP") field(OUTC, "$(DEV)PRL:PWRMAX.HOPR PP") } record(dfanout, "$(DEV)PRL:PHOPR_FO") { field(DESC, "Update scalar HOPR") field(OMSL, "closed_loop") field(DOL, "200") field(OUTA, "$(DEV)PRL:PMEAN.HOPR PP") field(OUTB, "$(DEV)PRL:PMIN.HOPR PP") field(OUTC, "$(DEV)PRL:PMAX.HOPR PP") field(PINI, "YES") field(FLNK, "$(DEV)PRL:PLOPR_FO") } record(dfanout, "$(DEV)PRL:PLOPR_FO") { field(DESC, "Update scalar HOPR") field(OMSL, "closed_loop") field(DOL, "-200") field(OUTA, "$(DEV)PRL:PMEAN.LOPR PP") field(OUTB, "$(DEV)PRL:PMIN.LOPR PP") field(OUTC, "$(DEV)PRL:PMAX.LOPR PP") } #================================== #---------------------------------- # wfCavSig.db: # # Waveform signal support for a # single signal, for a single cavity #---------------------------------- #================================== #================================== # Calibration scale factor for # SRF waveform signals. Fans value # out to corresponding I and Q # waveform scale factors. #================================== record(ao, "$(DEV)DRV2:SCALE") { field(SCAN, "Passive") field(OMSL, "closed_loop") field(DOL, "$(DEV)DRV2:CAL_SCALE") field(PREC, "7") field(PINI, "YES") field(FLNK, "$(DEV)DRV2:SCALE_FO PP") info(autosaveFields, "VAL LOLO LOW HIGH HIHI LLSV LSV HSV HHSV") } record(dfanout, "$(DEV)DRV2:SCALE_FO") { field(DESC, "Write out WF scale factors") field(OMSL, "closed_loop") field(DOL, "$(DEV)DRV2:SCALE") field(OUTA, "$(DEV)DRV2:ISCALE PP") field(OUTB, "$(DEV)DRV2:QSCALE PP") field(OUTC, "") field(OUTD, "") field(OUTE, "") field(FLNK, "") } # Dummy PV to allow python API to access actual PV record(longin, "$(DEV)DRV2:SCALEDMY") { field(DTYP, "FEED Register Read") field(INP , "@name=$(NAME) reg=mbox_$(BIT)_DRV2:SCALE") info(feed:info:input, "$(DEV)DRV2:SCALE") } #================================== # Set waveform display ranges. # Affects all users. # Setting range upper limit also # sets I/Q range to +/- upper limit. # Sets limits for I/QWFDISP PVs # because those are shown on the # relevant waveform displays. # # On boot, these records are processed # by wf_cav.template #================================== record(ao, "$(DEV)DRV2:AHOPR") { field(OMSL, "supervisory") field(VAL, "60") field(FLNK, "$(DEV)DRV2:IQLOPR") } record(calc, "$(DEV)DRV2:IQLOPR") { field(CALC, "-A") field(INPA, "$(DEV)DRV2:AHOPR") field(FLNK, "$(DEV)DRV2:WFOPR_FO1") } record(dfanout, "$(DEV)DRV2:WFOPR_FO1") { field(DESC, "Update wf limits & reset displays") field(SELM, "All") field(DOL, "$(DEV)DRV2:IQLOPR") field(OMSL, "closed_loop") field(OUTA, "$(DEV)DRV2:IWFDISP.LOPR PP") field(OUTB, "$(DEV)DRV2:QWFDISP.LOPR PP") field(OUTC, "$(DEV)DRV2:IWF.LOPR PP") field(OUTD, "$(DEV)DRV2:QWF.LOPR PP") field(FLNK, "$(DEV)DRV2:WFOPR_FO2") } record(dfanout, "$(DEV)DRV2:WFOPR_FO2") { field(DESC, "Update wf limits & reset displays") field(SELM, "All") field(DOL, "$(DEV)DRV2:AHOPR") field(OMSL, "closed_loop") field(OUTA, "$(DEV)DRV2:AWF.HOPR PP") field(OUTB, "$(DEV)DRV2:IWFDISP.HOPR PP") field(OUTC, "$(DEV)DRV2:QWFDISP.HOPR PP") field(OUTD, "$(DEV)DRV2:IWF.HOPR PP") field(OUTE, "$(DEV)DRV2:QWF.HOPR PP") field(OUTF, "") field(FLNK, "$(DEV)DRV2:WFOPR_FO3") } record(ao, "$(DEV)DRV2:ALOPR") { field(OMSL, "supervisory") field(VAL, "0") field(OUT, "$(DEV)DRV2:AWF.LOPR PP") field(FLNK, "$(DEV)DRV2:WFOPR_FO3") } record(dfanout, "$(DEV)DRV2:WFOPR_FO3") { field(DESC, "Update wf limits & reset displays") field(SELM, "All") field(DOL, "$(DEV)DRV2:ALOPR") field(OMSL, "closed_loop") field(OUTA, "$(DEV)DRV2:AWF.LOPR PP") field(OUTB, "") field(FLNK, "") } # Waveform statistics scalar operating limits: # leave LOPR at 0, set HOPR to default value # Unlike waveforms, thesedo not update these # based on user display range selections. Consider # re-thinking this record(dfanout, "$(DEV)DRV2:AHOPR_FO") { field(DESC, "Update scalar HOPR") field(OMSL, "closed_loop") field(DOL, "60") field(OUTA, "$(DEV)DRV2:AMEAN.HOPR PP") field(OUTB, "$(DEV)DRV2:AMIN.HOPR PP") field(OUTC, "$(DEV)DRV2:AMAX.HOPR PP") field(PINI, "YES") field(FLNK, "$(DEV)DRV2:PWRHOPR") } record(calc, "$(DEV)DRV2:PWRHOPR") { field(DESC, "Calc power HOPR") field(CALC, "A*A*B") field(INPA, "60") field(INPB, "$(DEV)DRV2:PWRSCALE CP") field(FLNK, "$(DEV)DRV2:PWRHOPR_FO") } record(dfanout, "$(DEV)DRV2:PWRHOPR_FO") { field(DESC, "Update scalar HOPR") field(OMSL, "closed_loop") field(DOL, "$(DEV)DRV2:PWRHOPR") field(OUTA, "$(DEV)DRV2:PWRMEAN.HOPR PP") field(OUTB, "$(DEV)DRV2:PWRMIN.HOPR PP") field(OUTC, "$(DEV)DRV2:PWRMAX.HOPR PP") } record(dfanout, "$(DEV)DRV2:PHOPR_FO") { field(DESC, "Update scalar HOPR") field(OMSL, "closed_loop") field(DOL, "200") field(OUTA, "$(DEV)DRV2:PMEAN.HOPR PP") field(OUTB, "$(DEV)DRV2:PMIN.HOPR PP") field(OUTC, "$(DEV)DRV2:PMAX.HOPR PP") field(PINI, "YES") field(FLNK, "$(DEV)DRV2:PLOPR_FO") } record(dfanout, "$(DEV)DRV2:PLOPR_FO") { field(DESC, "Update scalar HOPR") field(OMSL, "closed_loop") field(DOL, "-200") field(OUTA, "$(DEV)DRV2:PMEAN.LOPR PP") field(OUTB, "$(DEV)DRV2:PMIN.LOPR PP") field(OUTC, "$(DEV)DRV2:PMAX.LOPR PP") } #================================== #---------------------------------- # wfCavSig.db: # # Waveform signal support for a # single signal, for a single cavity #---------------------------------- #================================== #================================== # Calibration scale factor for # SRF waveform signals. Fans value # out to corresponding I and Q # waveform scale factors. #================================== record(ao, "$(DEV)LASR:SCALE") { field(SCAN, "Passive") field(OMSL, "closed_loop") field(DOL, "$(DEV)LASR:CAL_SCALE") field(PREC, "7") field(PINI, "YES") field(FLNK, "$(DEV)LASR:SCALE_FO PP") info(autosaveFields, "VAL LOLO LOW HIGH HIHI LLSV LSV HSV HHSV") } record(dfanout, "$(DEV)LASR:SCALE_FO") { field(DESC, "Write out WF scale factors") field(OMSL, "closed_loop") field(DOL, "$(DEV)LASR:SCALE") field(OUTA, "$(DEV)LASR:ISCALE PP") field(OUTB, "$(DEV)LASR:QSCALE PP") field(OUTC, "") field(OUTD, "") field(OUTE, "") field(FLNK, "") } # Dummy PV to allow python API to access actual PV record(longin, "$(DEV)LASR:SCALEDMY") { field(DTYP, "FEED Register Read") field(INP , "@name=$(NAME) reg=mbox_$(BIT)_LASR:SCALE") info(feed:info:input, "$(DEV)LASR:SCALE") } #================================== # Set waveform display ranges. # Affects all users. # Setting range upper limit also # sets I/Q range to +/- upper limit. # Sets limits for I/QWFDISP PVs # because those are shown on the # relevant waveform displays. # # On boot, these records are processed # by wf_cav.template #================================== record(ao, "$(DEV)LASR:AHOPR") { field(OMSL, "supervisory") field(VAL, "60") field(FLNK, "$(DEV)LASR:IQLOPR") } record(calc, "$(DEV)LASR:IQLOPR") { field(CALC, "-A") field(INPA, "$(DEV)LASR:AHOPR") field(FLNK, "$(DEV)LASR:WFOPR_FO1") } record(dfanout, "$(DEV)LASR:WFOPR_FO1") { field(DESC, "Update wf limits & reset displays") field(SELM, "All") field(DOL, "$(DEV)LASR:IQLOPR") field(OMSL, "closed_loop") field(OUTA, "$(DEV)LASR:IWFDISP.LOPR PP") field(OUTB, "$(DEV)LASR:QWFDISP.LOPR PP") field(OUTC, "$(DEV)LASR:IWF.LOPR PP") field(OUTD, "$(DEV)LASR:QWF.LOPR PP") field(FLNK, "$(DEV)LASR:WFOPR_FO2") } record(dfanout, "$(DEV)LASR:WFOPR_FO2") { field(DESC, "Update wf limits & reset displays") field(SELM, "All") field(DOL, "$(DEV)LASR:AHOPR") field(OMSL, "closed_loop") field(OUTA, "$(DEV)LASR:AWF.HOPR PP") field(OUTB, "$(DEV)LASR:IWFDISP.HOPR PP") field(OUTC, "$(DEV)LASR:QWFDISP.HOPR PP") field(OUTD, "$(DEV)LASR:IWF.HOPR PP") field(OUTE, "$(DEV)LASR:QWF.HOPR PP") field(OUTF, "") field(FLNK, "$(DEV)LASR:WFOPR_FO3") } record(ao, "$(DEV)LASR:ALOPR") { field(OMSL, "supervisory") field(VAL, "0") field(OUT, "$(DEV)LASR:AWF.LOPR PP") field(FLNK, "$(DEV)LASR:WFOPR_FO3") } record(dfanout, "$(DEV)LASR:WFOPR_FO3") { field(DESC, "Update wf limits & reset displays") field(SELM, "All") field(DOL, "$(DEV)LASR:ALOPR") field(OMSL, "closed_loop") field(OUTA, "$(DEV)LASR:AWF.LOPR PP") field(OUTB, "") field(FLNK, "") } # Waveform statistics scalar operating limits: # leave LOPR at 0, set HOPR to default value # Unlike waveforms, thesedo not update these # based on user display range selections. Consider # re-thinking this record(dfanout, "$(DEV)LASR:AHOPR_FO") { field(DESC, "Update scalar HOPR") field(OMSL, "closed_loop") field(DOL, "60") field(OUTA, "$(DEV)LASR:AMEAN.HOPR PP") field(OUTB, "$(DEV)LASR:AMIN.HOPR PP") field(OUTC, "$(DEV)LASR:AMAX.HOPR PP") field(PINI, "YES") field(FLNK, "$(DEV)LASR:PWRHOPR") } record(calc, "$(DEV)LASR:PWRHOPR") { field(DESC, "Calc power HOPR") field(CALC, "A*A*B") field(INPA, "60") field(INPB, "$(DEV)LASR:PWRSCALE CP") field(FLNK, "$(DEV)LASR:PWRHOPR_FO") } record(dfanout, "$(DEV)LASR:PWRHOPR_FO") { field(DESC, "Update scalar HOPR") field(OMSL, "closed_loop") field(DOL, "$(DEV)LASR:PWRHOPR") field(OUTA, "$(DEV)LASR:PWRMEAN.HOPR PP") field(OUTB, "$(DEV)LASR:PWRMIN.HOPR PP") field(OUTC, "$(DEV)LASR:PWRMAX.HOPR PP") } record(dfanout, "$(DEV)LASR:PHOPR_FO") { field(DESC, "Update scalar HOPR") field(OMSL, "closed_loop") field(DOL, "200") field(OUTA, "$(DEV)LASR:PMEAN.HOPR PP") field(OUTB, "$(DEV)LASR:PMIN.HOPR PP") field(OUTC, "$(DEV)LASR:PMAX.HOPR PP") field(PINI, "YES") field(FLNK, "$(DEV)LASR:PLOPR_FO") } record(dfanout, "$(DEV)LASR:PLOPR_FO") { field(DESC, "Update scalar HOPR") field(OMSL, "closed_loop") field(DOL, "-200") field(OUTA, "$(DEV)LASR:PMEAN.LOPR PP") field(OUTB, "$(DEV)LASR:PMIN.LOPR PP") field(OUTC, "$(DEV)LASR:PMAX.LOPR PP") } #================================== #---------------------------------- # wfCavSig.db: # # Waveform signal support for a # single signal, for a single cavity #---------------------------------- #================================== #================================== # Calibration scale factor for # SRF waveform signals. Fans value # out to corresponding I and Q # waveform scale factors. #================================== record(ao, "$(DEV)PRL7_2:SCALE") { field(SCAN, "Passive") field(OMSL, "closed_loop") field(DOL, "$(DEV)PRL7_2:CAL_SCALE") field(PREC, "7") field(PINI, "YES") field(FLNK, "$(DEV)PRL7_2:SCALE_FO PP") info(autosaveFields, "VAL LOLO LOW HIGH HIHI LLSV LSV HSV HHSV") } record(dfanout, "$(DEV)PRL7_2:SCALE_FO") { field(DESC, "Write out WF scale factors") field(OMSL, "closed_loop") field(DOL, "$(DEV)PRL7_2:SCALE") field(OUTA, "$(DEV)PRL7_2:ISCALE PP") field(OUTB, "$(DEV)PRL7_2:QSCALE PP") field(OUTC, "") field(OUTD, "") field(OUTE, "") field(FLNK, "") } # Dummy PV to allow python API to access actual PV record(longin, "$(DEV)PRL7_2:SCALEDMY") { field(DTYP, "FEED Register Read") field(INP , "@name=$(NAME) reg=mbox_$(BIT)_PRL7_2:SCALE") info(feed:info:input, "$(DEV)PRL7_2:SCALE") } #================================== # Set waveform display ranges. # Affects all users. # Setting range upper limit also # sets I/Q range to +/- upper limit. # Sets limits for I/QWFDISP PVs # because those are shown on the # relevant waveform displays. # # On boot, these records are processed # by wf_cav.template #================================== record(ao, "$(DEV)PRL7_2:AHOPR") { field(OMSL, "supervisory") field(VAL, "60") field(FLNK, "$(DEV)PRL7_2:IQLOPR") } record(calc, "$(DEV)PRL7_2:IQLOPR") { field(CALC, "-A") field(INPA, "$(DEV)PRL7_2:AHOPR") field(FLNK, "$(DEV)PRL7_2:WFOPR_FO1") } record(dfanout, "$(DEV)PRL7_2:WFOPR_FO1") { field(DESC, "Update wf limits & reset displays") field(SELM, "All") field(DOL, "$(DEV)PRL7_2:IQLOPR") field(OMSL, "closed_loop") field(OUTA, "$(DEV)PRL7_2:IWFDISP.LOPR PP") field(OUTB, "$(DEV)PRL7_2:QWFDISP.LOPR PP") field(OUTC, "$(DEV)PRL7_2:IWF.LOPR PP") field(OUTD, "$(DEV)PRL7_2:QWF.LOPR PP") field(FLNK, "$(DEV)PRL7_2:WFOPR_FO2") } record(dfanout, "$(DEV)PRL7_2:WFOPR_FO2") { field(DESC, "Update wf limits & reset displays") field(SELM, "All") field(DOL, "$(DEV)PRL7_2:AHOPR") field(OMSL, "closed_loop") field(OUTA, "$(DEV)PRL7_2:AWF.HOPR PP") field(OUTB, "$(DEV)PRL7_2:IWFDISP.HOPR PP") field(OUTC, "$(DEV)PRL7_2:QWFDISP.HOPR PP") field(OUTD, "$(DEV)PRL7_2:IWF.HOPR PP") field(OUTE, "$(DEV)PRL7_2:QWF.HOPR PP") field(OUTF, "") field(FLNK, "$(DEV)PRL7_2:WFOPR_FO3") } record(ao, "$(DEV)PRL7_2:ALOPR") { field(OMSL, "supervisory") field(VAL, "0") field(OUT, "$(DEV)PRL7_2:AWF.LOPR PP") field(FLNK, "$(DEV)PRL7_2:WFOPR_FO3") } record(dfanout, "$(DEV)PRL7_2:WFOPR_FO3") { field(DESC, "Update wf limits & reset displays") field(SELM, "All") field(DOL, "$(DEV)PRL7_2:ALOPR") field(OMSL, "closed_loop") field(OUTA, "$(DEV)PRL7_2:AWF.LOPR PP") field(OUTB, "") field(FLNK, "") } # Waveform statistics scalar operating limits: # leave LOPR at 0, set HOPR to default value # Unlike waveforms, thesedo not update these # based on user display range selections. Consider # re-thinking this record(dfanout, "$(DEV)PRL7_2:AHOPR_FO") { field(DESC, "Update scalar HOPR") field(OMSL, "closed_loop") field(DOL, "60") field(OUTA, "$(DEV)PRL7_2:AMEAN.HOPR PP") field(OUTB, "$(DEV)PRL7_2:AMIN.HOPR PP") field(OUTC, "$(DEV)PRL7_2:AMAX.HOPR PP") field(PINI, "YES") field(FLNK, "$(DEV)PRL7_2:PWRHOPR") } record(calc, "$(DEV)PRL7_2:PWRHOPR") { field(DESC, "Calc power HOPR") field(CALC, "A*A*B") field(INPA, "60") field(INPB, "$(DEV)PRL7_2:PWRSCALE CP") field(FLNK, "$(DEV)PRL7_2:PWRHOPR_FO") } record(dfanout, "$(DEV)PRL7_2:PWRHOPR_FO") { field(DESC, "Update scalar HOPR") field(OMSL, "closed_loop") field(DOL, "$(DEV)PRL7_2:PWRHOPR") field(OUTA, "$(DEV)PRL7_2:PWRMEAN.HOPR PP") field(OUTB, "$(DEV)PRL7_2:PWRMIN.HOPR PP") field(OUTC, "$(DEV)PRL7_2:PWRMAX.HOPR PP") } record(dfanout, "$(DEV)PRL7_2:PHOPR_FO") { field(DESC, "Update scalar HOPR") field(OMSL, "closed_loop") field(DOL, "200") field(OUTA, "$(DEV)PRL7_2:PMEAN.HOPR PP") field(OUTB, "$(DEV)PRL7_2:PMIN.HOPR PP") field(OUTC, "$(DEV)PRL7_2:PMAX.HOPR PP") field(PINI, "YES") field(FLNK, "$(DEV)PRL7_2:PLOPR_FO") } record(dfanout, "$(DEV)PRL7_2:PLOPR_FO") { field(DESC, "Update scalar HOPR") field(OMSL, "closed_loop") field(DOL, "-200") field(OUTA, "$(DEV)PRL7_2:PMEAN.LOPR PP") field(OUTB, "$(DEV)PRL7_2:PMIN.LOPR PP") field(OUTC, "$(DEV)PRL7_2:PMAX.LOPR PP") }