/* ====================================================================== Abs: PVs and Defines shared by SNL sequences. Name: mgntCtrl.h Auth: 25-May-2006, Debbie Rogind (ROGIND) Rev: dd-mmm-yyyy, Reviewer's Name (USERNAME) ---------------------------------------------------------------------- Mod: 04-Oct-2023, A. Le (ANLE): Add STATUS_DACZERODONE 28-Aug-2023, A. Le (ANLE): Add STATUS_DACZEROWAIT 17-Apr-2022, A. Le (ANLE): Add BACT to BDES function 15-Sept-2021, K. Luchini (LUCHINI): chg max size of degauss from 54 to 60 21-Jun-2020, K. Luchini (LUCHINI): add CTRL_LOAD_IDES and FUNC_LOAD_IDES 01-Apr-2020, K. Luchini (LUCHINI): remove MGNT_TYPE_EFC 26-Nov-2020, K. Luchini (LUCHINI): add MGNT_TYPE_KICK add MGNT_TYPE_SEXT add MGNT_TYPE_EFC 05-Nov-2012, K. Luchini (LUCHINI): add TIME_FORMAT 07-Sep-2012, K. Luchini (LUCHINI): rename FUNC_PERTURB_SLIDE to FUNC_UNUSED rename CTRL_PERTRUB_SLIDE to CTRL_UNUSED The ctrl function perturb slide has been deprecated 20-Jun-2008, K. Luchini (LUCHINI): chg MGNT_TYPE_LGPS from 0 to 4 to match the LNK# (ie LNK4) in pv MGNT::1:CTRLCLEAR found in the file Db/common/mgnt_ctrl_all.template 03-Jul-2007, K. Luchini (LUCHINI): replace CTRL_UNAVAILABLE with CTRL_BCON_TO_BDES add FUNC_BCON_TO_BDES and CTRL_MAX. added MGNT_TYPE_BEND,MGNT_TYPE_XCOR,etc. ====================================================================== */ #ifndef MGNTCTRL_H #define MGNTCTRL_H #ifndef OK #define OK 0 #endif #ifndef ERROR #define ERROR 1 #endif #define TIME_FORMAT "%m/%d/%Y %H:%M:%S" #define MAX_TIMEOUT_CNT 10 /* max timeout count */ #define RAMP_DELAY 2.0 /* for testing (EPSC), use pf :RAMPSTARTDLY */ #define RAMP_SETTLE_DELAY 60.0 /* setl pvs hopr */ #define WAIT_DELAY 1.0 /* one second delay */ #define TURN_OFF_DELAY 5.0 /* delay before turning off ps, use pv :PSONDLY */ #define TURN_ON_DELAY 5.0 /* delay before checking turn on status,use PSOFFDLY */ #define MAX_NOTMOVING_CNT 10 #define MAX_NUM_RAMP_POINTS 5000 #define MAX_DEGAUSS_POINTS 60 /* maximum size of degauss waveform */ #define MAX_STDZ_POINTS 21 /* Maximum size of stdz waveform */ /* * Functions handled by SNL Sequencer go first * these corresponde to $(DEV):CTRL.RVAL */ #define CTRL_READY 0 #define CTRL_UNUSED 1 #define CTRL_TRIM 2 #define CTRL_CALB 3 #define CTRL_STDZ 4 #define CTRL_DEGAUSS 5 /*used for 50B1 only */ #define CTRL_PERTURB 6 #define CTRL_DAC_ZERO 7 #define CTRL_RESET 8 #define CTRL_TURN_ON 9 #define CTRL_ONLINE 9 #define CTRL_TURN_OFF 10 #define CTRL_OFFLINE 10 #define CTRL_SAVE_BDES 11 #define CTRL_LOAD_BDES 12 #define CTRL_LOAD_IDES 12 #define CTRL_UNDO_BDES 13 #define CTRL_BACT_TO_BDES 14 #define CTRL_BCON_TO_BDES 15 #define CTRL_MAX 15 #define NUM_CTRL_STATES 21 #define STATUS_DONE 0 /* req wait */ #define STATUS_RAMPING 1 #define STATUS_WAITING 2 #define STATUS_STDZMINI 3 #define STATUS_UNAVAILABLE 4 #define STATUS_RAMP_TIMEOUT 5 #define STATUS_ERROR 6 #define STATUS_TIMEOUT 7 #define STATUS_ABORT 8 #define STATUS_DISABLED 9 #define STATUS_FEEDBACK 10 /* FBCK and PAU both ON */ #define STATUS_SETTLING 11 #define STATUS_CHG_POLARITY 12 #define STATUS_TRIPPED 13 #define STATUS_OFFWAIT 14 #define STATUS_ONWAIT 15 #define STATUS_DACZEROWAIT 16 #define STATUS_DACZERODONE 17 #define STATUS_OK 20 #define TRIMTYPE_3 0 #define TRIMTYPE_LINEAR 1 #define OFF 0 #define ON 1 #define NUM_CTRL_FUNC 16 #define FUNC_READY 0 #define FUNC_UNUSED 1 #define FUNC_TRIM 2 #define FUNC_CALB 3 #define FUNC_STDZ 4 #define FUNC_DEGAUSS 5 #define FUNC_PERTURB 6 #define FUNC_DAC_ZERO 7 #define FUNC_RESET 8 #define FUNC_TURN_ON 9 #define FUNC_ONLINE 9 #define FUNC_TURN_OFF 10 #define FUNC_OFFLINE 10 #define FUNC_SAVE_BDES 11 #define FUNC_LOAD_BDES 12 #define FUNC_LOAD_IDES 12 #define FUNC_UNDO_BDES 13 #define FUNC_BACT_TO_BDES 14 #define FUNC_BCON_TO_BDES 15 /* * Used in mgnt_ctrl_.template in pv :switch */ #define MGNT_TYPE_ALL 1 #define MGNT_TYPE_BEND 2 #define MGNT_TYPE_BTRM 3 #define MGNT_TYPE_LGPS 4 #define MGNT_TYPE_QUAD 5 #define MGNT_TYPE_XCOR 6 #define MGNT_TYPE_YCOR 7 #define MGNT_TYPE_SOLN 8 #define MGNT_TYPE_KICK 9 #define MGNT_TYPE_SEXT 10 #define STDZ_MIN 0 /* set ictrl=imin prior to going up */ #define STDZ_MAX 1 /* set ictrl=imax prior to going down */ #define CALB_ZERO_TOL 0.001 #define CALB_NORMAL 0 #define CALB_SAMPLE 1 #endif /* MGNTCTRL_H */