grecord( ao, "$(PREF)scan:tag:lft:hv" ) { field( VAL , "1250" ) field( DESC, "HV for LEFT" ) field( EGU , "V" ) } grecord( ao, "$(PREF)scan:tag:top:hv" ) { field( VAL , "1500" ) field( DESC, "HV for TOP" ) field( EGU , "V" ) } grecord( ao, "$(PREF)scan:tag:bot:hv" ) { field( VAL , "1500" ) field( DESC, "HV for BOTTOM" ) field( EGU , "V" ) } grecord( ao, "$(PREF)scan:tag:lft:hv_sav" ) { field( DESC, "HV for LEFT" ) field( EGU , "V" ) } grecord( ao, "$(PREF)scan:tag:top:hv_sav" ) { field( DESC, "HV for TOP" ) field( EGU , "V" ) } grecord( ao, "$(PREF)scan:tag:bot:hv_sav" ) { field( DESC, "HV for BOTTOM" ) field( EGU , "V" ) } # Button to push to set the HVs for scan grecord(mbbo, "$(PREF)scan:tag:setHaloVolts") { field(DESC, "Set halo volts") field(VAL , "0" ) field(PINI, "NO" ) field(SCAN, "Passive") field(NOBT, "3" ) field(ZRST, "UNDEFINED" ) field(ONST, "SCAN" ) field(TWST, "RESTORE" ) field(FLNK, "$(PREF)scan:tag:hv_switch") } # record to select if the scan values should be set # or the old values shoud be restored. record(seq, "$(PREF)scan:tag:hv_switch") { field(DESC, "Setpoint switch") field(SCAN, "Passive") field(SELM, "Specified") field(SELL ,"$(PREF)scan:tag:setHaloVolts" ) field(DOL1, "1") field(DOL2, "1") field(LNK1, "$(PREF)scan:tag:hv_save.PROC PP") field(LNK2, "$(PREF)scan:tag:hv_res.PROC PP") } # Record to save the current HVs to bufferb PVs record(seq, "$(PREF)scan:tag:hv_save") { field(DESC, "Save old HVs") field(SCAN, "Passive") field(SELM, "All") field(DOL1, "$(HV_LFT)") field(DOL2, "$(HV_TOP)") field(DOL3, "$(HV_BOT)") field(LNK1, "$(PREF)scan:tag:lft:hv_sav PP") field(LNK2, "$(PREF)scan:tag:top:hv_sav PP") field(LNK3, "$(PREF)scan:tag:bot:hv_sav PP") field(FLNK, "$(PREF)scan:tag:hv_set") } # Record to set the saved HVs to their scan values record(seq, "$(PREF)scan:tag:hv_set") { field(DESC, "Set scan HVs") field(SCAN, "Passive") field(SELM, "All") field(DOL1, "$(PREF)scan:tag:lft:hv") field(DOL2, "$(PREF)scan:tag:top:hv") field(DOL3, "$(PREF)scan:tag:bot:hv") field(LNK1, "$(HV_LFT) PP") field(LNK2, "$(HV_TOP) PP") field(LNK3, "$(HV_BOT) PP") } # Record to restore the saved HVs record(seq, "$(PREF)scan:tag:hv_res") { field(DESC, "Restore HVs") field(SCAN, "Passive") field(SELM, "All") field(DOL1, "$(PREF)scan:tag:lft:hv_sav") field(DOL2, "$(PREF)scan:tag:top:hv_sav") field(DOL3, "$(PREF)scan:tag:bot:hv_sav") field(LNK1, "$(HV_LFT) PP") field(LNK2, "$(HV_TOP) PP") field(LNK3, "$(HV_BOT) PP") }