#================================== #---------------------------------- # rf_sig_cal_simple.template: # # Scale factor to convert waveform # fraction-of-full-scale readout # to engineering units: MV for cavity # signal; sqrt(Watts) for others #---------------------------------- #================================== record(ao, "$(CM,undefined)$(CAV,undefined)0:CAV:CAL_SCALE") { field(SCAN, "Passive") field(OMSL, "supervisory") field(PREC, "7") field(VAL, "1") field(PINI, "YES") field(FLNK, "$(CM,undefined)$(CAV,undefined)0:CAV:SCALE_CALC") info(autosaveFields, "VAL") } # Unnecessary intermediate PV # to be compatible with wfCav.template record(ao, "$(CM,undefined)$(CAV,undefined)0:CAV:SCALE_CALC") { field(OMSL, "closed_loop") field(DOL, "$(CM,undefined)$(CAV,undefined)0:CAV:CAL_SCALE") field(FLNK, "$(CM,undefined)$(CAV,undefined)0:CAV:SCALE") } # When reference is in sqrt(Watts) record(calcout, "$(CM,undefined)$(CAV,undefined)0:CAV:SCALETOREF") { field(CALC, "B*A/C") field(INPA, "$(CM,undefined)$(CAV,undefined)0:CAV:CAL_SCALE") # current scaling field(INPB, "1")# B = known reference, in power field(INPC, "$(CM,undefined)$(CAV,undefined)0:CAV:AMEAN") # current amplitude mean field(OOPT, "Every Time") field(OUT, "$(CM,undefined)$(CAV,undefined)0:CAV:CAL_SCALE PP") # new scaling field(PINI, "NO") # do not overwrite cal on startup info(autosaveFields, "B") } # Signal waveform mean converted to counts # To be consistent with signals. Keep this? record(calc, "$(CM,undefined)$(CAV,undefined)0:CAV:AMEAN_ADC") { field(DESC, "WF mean in counts") field(CALC, "FLOOR(C*A/B)") field(INPA, "$(CM,undefined)$(CAV,undefined)0:CAV:AMEAN CPP") field(INPB, "$(CM,undefined)$(CAV,undefined)0:CAV:CAL_SCALE") field(INPC, "32767") field(EGU, "counts") } #================================== #---------------------------------- # rf_sig_cal_simple.template: # # Scale factor to convert waveform # fraction-of-full-scale readout # to engineering units: MV for cavity # signal; sqrt(Watts) for others #---------------------------------- #================================== record(ao, "$(CM,undefined)$(CAV,undefined)0:DRV:CAL_SCALE") { field(SCAN, "Passive") field(OMSL, "supervisory") field(PREC, "7") field(VAL, "1") field(PINI, "YES") field(FLNK, "$(CM,undefined)$(CAV,undefined)0:DRV:SCALE_CALC") info(autosaveFields, "VAL") } # Unnecessary intermediate PV # to be compatible with wfCav.template record(ao, "$(CM,undefined)$(CAV,undefined)0:DRV:SCALE_CALC") { field(OMSL, "closed_loop") field(DOL, "$(CM,undefined)$(CAV,undefined)0:DRV:CAL_SCALE") field(FLNK, "$(CM,undefined)$(CAV,undefined)0:DRV:SCALE") } # When reference is in sqrt(Watts) record(calcout, "$(CM,undefined)$(CAV,undefined)0:DRV:SCALETOREF") { field(CALC, "B*A/C") field(INPA, "$(CM,undefined)$(CAV,undefined)0:DRV:CAL_SCALE") # current scaling field(INPB, "1")# B = known reference, in power field(INPC, "$(CM,undefined)$(CAV,undefined)0:DRV:AMEAN") # current amplitude mean field(OOPT, "Every Time") field(OUT, "$(CM,undefined)$(CAV,undefined)0:DRV:CAL_SCALE PP") # new scaling field(PINI, "NO") # do not overwrite cal on startup info(autosaveFields, "B") } # Signal waveform mean converted to counts # To be consistent with signals. Keep this? record(calc, "$(CM,undefined)$(CAV,undefined)0:DRV:AMEAN_ADC") { field(DESC, "WF mean in counts") field(CALC, "FLOOR(C*A/B)") field(INPA, "$(CM,undefined)$(CAV,undefined)0:DRV:AMEAN CPP") field(INPB, "$(CM,undefined)$(CAV,undefined)0:DRV:CAL_SCALE") field(INPC, "32767") field(EGU, "counts") } #================================== #---------------------------------- # rf_sig_cal_simple.template: # # Scale factor to convert waveform # fraction-of-full-scale readout # to engineering units: MV for cavity # signal; sqrt(Watts) for others #---------------------------------- #================================== record(ao, "$(CM,undefined)$(CAV,undefined)0:FWD:CAL_SCALE") { field(SCAN, "Passive") field(OMSL, "supervisory") field(PREC, "7") field(VAL, "1") field(PINI, "YES") field(FLNK, "$(CM,undefined)$(CAV,undefined)0:FWD:SCALE_CALC") info(autosaveFields, "VAL") } # Unnecessary intermediate PV # to be compatible with wfCav.template record(ao, "$(CM,undefined)$(CAV,undefined)0:FWD:SCALE_CALC") { field(OMSL, "closed_loop") field(DOL, "$(CM,undefined)$(CAV,undefined)0:FWD:CAL_SCALE") field(FLNK, "$(CM,undefined)$(CAV,undefined)0:FWD:SCALE") } # When reference is in sqrt(Watts) record(calcout, "$(CM,undefined)$(CAV,undefined)0:FWD:SCALETOREF") { field(CALC, "B*A/C") field(INPA, "$(CM,undefined)$(CAV,undefined)0:FWD:CAL_SCALE") # current scaling field(INPB, "1")# B = known reference, in power field(INPC, "$(CM,undefined)$(CAV,undefined)0:FWD:AMEAN") # current amplitude mean field(OOPT, "Every Time") field(OUT, "$(CM,undefined)$(CAV,undefined)0:FWD:CAL_SCALE PP") # new scaling field(PINI, "NO") # do not overwrite cal on startup info(autosaveFields, "B") } # Signal waveform mean converted to counts # To be consistent with signals. Keep this? record(calc, "$(CM,undefined)$(CAV,undefined)0:FWD:AMEAN_ADC") { field(DESC, "WF mean in counts") field(CALC, "FLOOR(C*A/B)") field(INPA, "$(CM,undefined)$(CAV,undefined)0:FWD:AMEAN CPP") field(INPB, "$(CM,undefined)$(CAV,undefined)0:FWD:CAL_SCALE") field(INPC, "32767") field(EGU, "counts") } #================================== #---------------------------------- # rf_sig_cal_simple.template: # # Scale factor to convert waveform # fraction-of-full-scale readout # to engineering units: MV for cavity # signal; sqrt(Watts) for others #---------------------------------- #================================== record(ao, "$(CM,undefined)$(CAV,undefined)0:REV:CAL_SCALE") { field(SCAN, "Passive") field(OMSL, "supervisory") field(PREC, "7") field(VAL, "1") field(PINI, "YES") field(FLNK, "$(CM,undefined)$(CAV,undefined)0:REV:SCALE_CALC") info(autosaveFields, "VAL") } # Unnecessary intermediate PV # to be compatible with wfCav.template record(ao, "$(CM,undefined)$(CAV,undefined)0:REV:SCALE_CALC") { field(OMSL, "closed_loop") field(DOL, "$(CM,undefined)$(CAV,undefined)0:REV:CAL_SCALE") field(FLNK, "$(CM,undefined)$(CAV,undefined)0:REV:SCALE") } # When reference is in sqrt(Watts) record(calcout, "$(CM,undefined)$(CAV,undefined)0:REV:SCALETOREF") { field(CALC, "B*A/C") field(INPA, "$(CM,undefined)$(CAV,undefined)0:REV:CAL_SCALE") # current scaling field(INPB, "1")# B = known reference, in power field(INPC, "$(CM,undefined)$(CAV,undefined)0:REV:AMEAN") # current amplitude mean field(OOPT, "Every Time") field(OUT, "$(CM,undefined)$(CAV,undefined)0:REV:CAL_SCALE PP") # new scaling field(PINI, "NO") # do not overwrite cal on startup info(autosaveFields, "B") } # Signal waveform mean converted to counts # To be consistent with signals. Keep this? record(calc, "$(CM,undefined)$(CAV,undefined)0:REV:AMEAN_ADC") { field(DESC, "WF mean in counts") field(CALC, "FLOOR(C*A/B)") field(INPA, "$(CM,undefined)$(CAV,undefined)0:REV:AMEAN CPP") field(INPB, "$(CM,undefined)$(CAV,undefined)0:REV:CAL_SCALE") field(INPC, "32767") field(EGU, "counts") } #================================== #---------------------------------- # rf_sig_cal_simple.template: # # Scale factor to convert waveform # fraction-of-full-scale readout # to engineering units: MV for cavity # signal; sqrt(Watts) for others #---------------------------------- #================================== record(ao, "$(CM,undefined)$(CAV,undefined)0:DAC:CAL_SCALE") { field(SCAN, "Passive") field(OMSL, "supervisory") field(PREC, "7") field(VAL, "1") field(PINI, "YES") field(FLNK, "$(CM,undefined)$(CAV,undefined)0:DAC:SCALE_CALC") info(autosaveFields, "VAL") } # Unnecessary intermediate PV # to be compatible with wfCav.template record(ao, "$(CM,undefined)$(CAV,undefined)0:DAC:SCALE_CALC") { field(OMSL, "closed_loop") field(DOL, "$(CM,undefined)$(CAV,undefined)0:DAC:CAL_SCALE") field(FLNK, "$(CM,undefined)$(CAV,undefined)0:DAC:SCALE") } # When reference is in sqrt(Watts) record(calcout, "$(CM,undefined)$(CAV,undefined)0:DAC:SCALETOREF") { field(CALC, "B*A/C") field(INPA, "$(CM,undefined)$(CAV,undefined)0:DAC:CAL_SCALE") # current scaling field(INPB, "1")# B = known reference, in power field(INPC, "$(CM,undefined)$(CAV,undefined)0:DAC:AMEAN") # current amplitude mean field(OOPT, "Every Time") field(OUT, "$(CM,undefined)$(CAV,undefined)0:DAC:CAL_SCALE PP") # new scaling field(PINI, "NO") # do not overwrite cal on startup info(autosaveFields, "B") } # Signal waveform mean converted to counts # To be consistent with signals. Keep this? record(calc, "$(CM,undefined)$(CAV,undefined)0:DAC:AMEAN_ADC") { field(DESC, "WF mean in counts") field(CALC, "FLOOR(C*A/B)") field(INPA, "$(CM,undefined)$(CAV,undefined)0:DAC:AMEAN CPP") field(INPB, "$(CM,undefined)$(CAV,undefined)0:DAC:CAL_SCALE") field(INPC, "32767") field(EGU, "counts") }