#! Generated by VisualDCT v2.6 #! DBDSTART #! DBDEND # # Vitara Automatic Operation # # Required macros: #DEVDevice prefix for each new PV in this file #CHDevice prefix including channel #FREQ_MOTORPV name of Vitara freq motor record(bo, "$(DEV):AUTO_MODE_ENABLE") { field(DESC, "Automatic mode enable/disable") field(ZNAM, "Manual") field(ONAM, "Automatic") field(ZSV, "MINOR") field(OSV, "NO_ALARM") # info(intentionally omitted) } record(ao, "$(DEV):PID_COARSE_AUTO_ON_LIMIT") { field(DESC, "PID AutoOn Threshhold") field(EGU, "V") field(PREC, "4") field(PINI, "YES") field(VAL, ".25") info(autosaveFields, "VAL HHSV HSV LSV LLSV HIHI HIGH LOW LOLO") } record(ao, "$(DEV):PID_COARSE_AUTO_OFF_LIMIT") { field(DESC, "PID AutoOff Threshhold") field(EGU, "V") field(PREC, "4") field(PINI, "YES") field(VAL, ".05") info(autosaveFields, "VAL HHSV HSV LSV LLSV HIHI HIGH LOW LOLO") } record(ao, "$(DEV):AUTO_SEARCH_TOL") { field(DESC, "Freq Err tolerance") field(EGU, "Hz") field(PREC, "0") field(PINI, "YES") field(VAL, "3") info(autosaveFields, "VAL HHSV HSV LSV LLSV HIHI HIGH LOW LOLO") } record( calcout, "$(DEV):PID_COARSE_FILT_ERR" ) { field( DESC, "Filtered PID error" ) field( INPA, "$(DEV):PID_COARSE.ERR CP MS" ) field( INPB, "0.8" ) field( CALC, "A*(1-B)+VAL*B" ) info(autosaveFields, "HHSV HSV LSV LLSV HIHI HIGH LOW LOLO") } # Enable coarse PID when the piezo element is too far from it's center # ABS(piezo - center) > AUTO_ON_LIMIT # and the chamber freq motor is not moving # but only if we're still locked to protect against runaway conditions record(calcout, "$(DEV):PID_COARSE_AUTO_ON") { field(DESC, "Enable coarse PID when too far") field( INPA, "$(DEV):PID_COARSE_FILT_ERR CP MS" ) field(INPB, "$(DEV):PID_COARSE_AUTO_ON_LIMIT CP MS") field(INPC, "$(FREQ_MOTOR).DMOV") field(INPD, "$(DEV):PHASE_LOCKED CP MS") field(CALC, "(ABS(A)>B) && C=1 && D=1") field(OUT, "$(DEV):PID_COARSE.FBON") field(OOPT, "Transition To Non-zero") field(OCAL, "1") field(DISV, "0") field(SDIS, "$(DEV):AUTO_MODE_ENABLE") } # Disable PID when the piezo element is near it's center # ABS(piezo - center) < AUTO_OFF_LIMIT # or if we lose lock, so the motor doesn't walk off # or if the RF lock is disabled record(calcout, "$(DEV):PID_COARSE_AUTO_OFF") { field(DESC, "Disable coarse PID when at mean") field( INPA, "$(DEV):PID_COARSE_FILT_ERR CP MS" ) field(INPB, "$(DEV):PID_COARSE_AUTO_OFF_LIMIT CP MS") # field(INPC, "$(FREQ_MOTOR).DMOV") field(INPD, "$(DEV):PHASE_LOCKED CP MS") field(CALC, "((ABS(A)B&&!D&&!E") field(OUT, "$(DEV):FREQ_SEARCH_START PP MS") field(OOPT, "When Non-zero") field(DISV, "0") field(SDIS, "$(DEV):AUTO_MODE_ENABLE") } record(calcout, "$(DEV):AUTO_RF_LOCK_ENABLE_CALC") { field(DESC, "Auto RF Lock watcher") field(SCAN, "2 second") field(INPA, "$(CH)DIODE_PWR_RMS NPP MS") field(INPB, "$(CH)DIODE_PWR.LOLO NPP MS") field(INPC, "$(CH)DIODE_PWR.HIHI NPP MS") field(INPD, "$(CH)RF_PWR_RMS NPP MS") field(INPE, "$(CH)RF_PWR.LOLO NPP MS") field(INPF, "$(CH)RF_PWR.HIHI NPP MS") field(INPG, "$(DEV):FREQ_SEARCH_ACTIVE CP MS") field(CALC, "(A>B)&&(AE)&&(D