/* ====================================================================== Abs: PVs shared by SNL sequences mgntCtrl.st Name: psCtrl.h Auth: 11-Sep-2013, Kristi Luchini (LUCHINI): Rev: dd-mmm-yyyy, Reviewer's Name (USERNAME) ---------------------------------------------------------------------- Mod: 28-Feb-2024, A. Le (ANLE): Rename IACTMAX to STDZIACTMAX Remove STDZIACTMAX.DISV 12-Feb-2024, A. Le (ANLE): Add IACTMAX and IACTMAX.DISV 28-Aug-2023, A. Le (ANLE): Add daczeroramptime and rampmultfac (1.577 for EPSCs) 16-Sep-2022, A. Le (ANLE): Add btolmax 12-Jul-2022, A. Le (ANLE): Assign abs_idiff to IADIFF instead of IDIFF Add TRIMITOL 21-Jun-2022, A. Le (ANLE): Remove trimrampdelay 06-Jun-2022, K. Luchini (LUCHINI): add DEGAUS_IMAX_CHECK chg IDESPOL to IACTPOL 17-May-2022, K. Luchini (LUCHINI): add DEGAUS_AUTO,DEGAUS_IMAX, IDESPOL_CHECK add 09-May-2022, K. Luchini (LUCHINI): add pv DEGAUSTYPE 05-Jun-2020, K. Luchini (LUCHINI): add isetpt_proc 04-Mar-2020, K. Luchini (LUCHINI): chg PSCATAGORY to PSCATEGORY 17-Dec-2018, K. Luchini (LUCHINI): chg unsigned long to uint32_t chg long and int tto int32_t 13-Nov-2018, K. Luchini (LUCHINI): add prev_psOn 01-Nov-2018, K. Luchini (LUCHINI): add trim_time variable for pv TRIMTIME, time to complete a trim function request. 17-Aug-2018, K. Luchini (LUCHINI): restore degauss_go_proc as per dorian to add imax and monitor any change. set the trim coils bedes to zero 16-Aug-2018, K. Luchini (LUCHINI): remove degaus_go_proc, use sdtz_go_proc with flnk set to SLAVESSTDZGO ====================================================================== */ #ifndef PSCTRL_H #define PSCTRL_H /* * The CTRL rval for each menu setpoint is different * Please note that MBBO Record RVAL field is an uint32_t * whereas the VAL field is an unsigned short (ie epicsEnum16) */ short ctrlstate; assign ctrlstate to "{DEV}:CTRLSTATE"; short ctrlSet; assign ctrlSet to "{DEV}:CTRL"; short ctrl_omsl; assign ctrl_omsl to "{DEV}:CTRL.OMSL"; uint32_t ctrl; assign ctrl to "{DEV}:CTRL.RVAL"; monitor ctrl; evflag ctrl_ef; sync ctrl ctrl_ef; short funcSet; assign funcSet to "{DEV}:FUNC"; short unavail; assign unavail to "{DEV}:UNAVAIL"; monitor unavail; short abort; assign abort to "{DEV}:ABORT.RVAL"; monitor abort; evflag abort_ef; sync abort abort_ef; short outOfService; assign outOfService to "{DEV}:OUTOFSERVICE"; monitor outOfService; uint32_t ptrbdisable; assign ptrbdisable to "{DEV}:PTRBDISABLE.RVAL"; monitor ptrbdisable; uint32_t trimdisable; assign trimdisable to "{DEV}:TRIMDISABLE.RVAL"; monitor trimdisable; uint32_t calbdisable; assign calbdisable to "{DEV}:CALBDISABLE.RVAL"; monitor calbdisable; uint32_t stdzdisable; assign stdzdisable to "{DEV}:STDZDISABLE.RVAL"; monitor stdzdisable; uint32_t degaus_enb; assign degaus_enb to "{DEV}:DEGAUSENABLE.RVAL"; monitor degaus_enb; uint32_t degaus_auto_enb; assign degaus_auto_enb to "{DEV}:DEGAUSAUTOENABLE.RVAL"; monitor degaus_auto_enb; short onoffctrl; assign onoffctrl to "{DEV}:ONOFFCTRL"; monitor onoffctrl; short noanlgctrl; assign noanlgctrl to "{DEV}:NOANLGCTRL"; monitor noanlgctrl; short fbck; assign fbck to "{DEV}:FBCK"; monitor fbck; evflag fbck_ef; sync fbck fbck_ef; short pau; assign pau to "{DEV}:PAU"; monitor pau; evflag pau_ef; sync pau pau_ef; /* Deprecate after removed from matlab applications (see henrik) */ short fbckenable; assign fbckenable to "{DEV}:FBCKENABLE"; monitor fbckenable; /* Current PVs */ double imax; assign imax to "{DEV}:IMAX"; monitor imax; double ides; assign ides to "{DEV}:IDES"; double iact; assign iact to "{DEV}:IACT"; double itolmax; assign itolmax to "{DEV}:IDELTAS.I"; double iramprate; assign iramprate to "{DEV}:IRAMPRATE"; double ictrl; assign ictrl to "{DEV}:ICTRL"; double isetpt; assign isetpt to "{DEV}:ISETPT"; unsigned char isetpt_proc; assign isetpt_proc to "{DEV}:ISETPT.PROC"; double abs_idiff; assign abs_idiff to "{DEV}:IADIFF"; double idiff; assign idiff to "{DEV}:IDIFF"; double irange; assign irange to "{DEV}:IRANGE"; monitor irange; uint32_t iadjust; assign iadjust to "{DEV}:IADJUST.RVAL"; unsigned char idirect_proc; assign idirect_proc to "{DEV}:IDIRECT.PROC"; double itol; assign itol to "{DEV}:TRIMITOL"; /* B-field PVs */ double bdes; assign bdes to "{DEV}:BDES"; double bcon; assign bcon to "{DEV}:BCON"; double bact; assign bact to "{DEV}:BACT"; int32_t outOfTol; assign outOfTol to "{DEV}:BDELTAS.M"; monitor outOfTol; short bdes_disv; assign bdes_disv to "{DEV}:BDES.DISV"; int32_t blimits; assign blimits to "{DEV}:BLIMITS"; double bctrl; assign bctrl to "{DEV}:BCTRL"; double bctrl_hopr; assign bctrl_hopr to "{DEV}:BCTRL.HOPR"; short bctrlgo_disv; assign bctrlgo_disv to "{DEV}:BCTRLGO.DISV"; short bctrl_omsl; assign bctrl_omsl to "{DEV}:BCTRL.OMSL"; short bctrl_disv; assign bctrl_disv to "{DEV}:BCTRL.DISV"; double bdessave; assign bdessave to "{DEV}:BDESSAVE"; double bdesprevtrim; assign bdesprevtrim to "{DEV}:BDESPREVTRIM"; double btol; assign btol to "{DEV}:TRIMBTOL"; double abs_bdiff; assign abs_bdiff to "{DEV}:BADIFF"; double btolmax; assign btolmax to "{DEV}:BDELTAS.I"; /* Power Supply PVs */ short reset; assign reset to "{DEV}:RESET"; short intlksumy; assign intlksumy to "{DEV}:INTLKSUMY"; monitor intlksumy; uint32_t psCategory; assign psCategory to "{DEV}:PSCATEGORY.RVAL"; monitor psCategory; uint32_t psController; assign psController to "{DEV}:PSCONTROLLER.RVAL"; monitor psController; uint32_t psType; assign psType to "{DEV}:PSTYPE.RVAL"; monitor psType; uint32_t polarity; assign polarity to "{DEV}:REVSWSTATE.RVAL"; monitor polarity; evflag polarity_ef; sync polarity polarity_ef; short polarity_set; assign polarity_set to "{DEV}:REVSWSET"; short turnedOff; assign turnedOff to "{DEV}:TURNEDOFF"; short statesetpt; assign statesetpt to "{DEV}:STATESETPT"; short psOn; assign psOn to "{DEV}:STATE"; monitor psOn; evflag psOn_ef; sync psOn psOn_ef; uint32_t prev_psOn; assign prev_psOn to "{DEV}:STATE.ORAW"; double psOn_delay; assign psOn_delay to "{DEV}:PSONDLY"; monitor psOn_delay; double psOff_delay; assign psOff_delay to "{DEV}:PSOFFDLY"; monitor psOff_delay; string psStateChg_tod; short rampDone; assign rampDone to "{DEV}:RAMPDONE"; monitor rampDone; short rampstate; assign rampstate to "{DEV}:RAMPSTATE"; monitor rampstate; double rampStart_delay; assign rampStart_delay to "{DEV}:RAMPSTARTDLY"; monitor rampStart_delay; double rampTime; assign rampTime to "{DEV}:RAMPTIME"; monitor rampTime; double rampTimeLeft; assign rampTimeLeft to "{DEV}:RAMPTIME_LEFT"; monitor rampTimeLeft; double imove; assign imove to "{DEV}:IMOVE"; double daczeroramptime; assign daczeroramptime to "{DEV}:DACZERORAMPTIME"; monitor daczeroramptime; double rampmultfac; assign rampmultfac to "{DEV}:RAMPTIME.D"; /* Trim PVs */ short softramp; assign softramp to "{DEV}:SOFTRAMP"; monitor softramp; double softsteptime; assign softsteptime to "{DEV}:SOFTSTEPTIME"; double trim_time; assign trim_time to "{DEV}:TRIMTIME"; double trimramprate; assign trimramprate to "{DEV}:TRIMRAMPRATE"; monitor trimramprate; short trimtype; assign trimtype to "{DEV}:TRIMTYPE"; monitor trimtype; int32_t trimmaxnum; assign trimmaxnum to "{DEV}:TRIMMAXNUM"; monitor trimmaxnum; double trim_setl; assign trim_setl to "{DEV}:TRIMSETL"; monitor trim_setl; string trimtod; assign trimtod to "{DEV}:TRIMTOD"; double trimdelaypct; assign trimdelaypct to "{DEV}:TRIMDLYPCT"; monitor trimdelaypct; int32_t trimtrycnt; assign trimtrycnt to "{DEV}:TRIMTRYCNT"; short trimok; assign trimok to "{DEV}:TRIMOK"; double trimstepmin; assign trimstepmin to "{DEV}:TRIMSTEPMIN"; uint32_t trimifintol; assign trimifintol to "{DEV}:TRIMIFINTOL.RVAL"; monitor trimifintol; /* Standarize PVs */ short stdzMainPs; assign stdzMainPs to "{DEV}:STDZMAINPS"; uint32_t stdzPsOff; assign stdzPsOff to "{DEV}:STDZPS.RVAL"; monitor stdzPsOff; short stdzok; assign stdzok to "{DEV}:STDZOK"; string stdztod; assign stdztod to "{DEV}:STDZTOD"; string stdzlosttod; assign stdzlosttod to "{DEV}:STDZLOSTTOD"; short stdzgo; assign stdzgo to "{DEV}:STDZGO"; uint32_t stdzdirect; assign stdzdirect to "{DEV}:STDZDIRECT.RVAL"; int32_t stdzcyclenum; assign stdzcyclenum to "{DEV}:STDZCYCLENUM"; int32_t stdzcyclecnt; assign stdzcyclecnt to "{DEV}:STDZCYCLECNT"; double stdzimin; assign stdzimin to "{DEV}:STDZIMIN"; double stdzimax; assign stdzimax to "{DEV}:STDZIMAX"; double stdzifinal; assign stdzifinal to "{DEV}:STDZIFINAL"; double stdz_ictrl[MAX_STDZ_POINTS]; assign stdz_ictrl to "{DEV}:STDZWF"; uint32_t stdz_nord; assign stdz_nord to "{DEV}:STDZWF.NORD"; double stdzminiDelay; assign stdzminiDelay to "{DEV}:STDZMINIDLY"; monitor stdzminiDelay; double stdzminisetpt; assign stdzminisetpt to "{DEV}:STDZMINISETPT"; unsigned char stdzminisetpt_proc; assign stdzminisetpt_proc to "{DEV}:STDZMINISETPT.PROC"; uint32_t stdzminisetptoor; assign stdzminisetptoor to "{DEV}:STDZMINISETPTOOR"; double stdzitolr; assign stdzitolr to "{DEV}:STDZITOLR"; monitor stdzitolr; double stdzitol; assign stdzitol to "{DEV}:STDZITOL"; monitor stdzitol; double istdztolmax; assign istdztolmax to "{DEV}:IDELTAS.VAL"; double stdziactmax; assign stdziactmax to "{DEV}:STDZIACTMAX"; /* Calibrate PVs */ short calbok; assign calbok to "{DEV}:CALBOK"; string calbtod; assign calbtod to "{DEV}:CALBTOD"; unsigned short calbstate; assign calbstate to "{DEV}:CALBSTATE"; double i2vslope; assign i2vslope to "{DEV}:CALCDAC.A"; monitor i2vslope; double dacslope; assign dacslope to "{DEV}:DACSLOPE"; monitor dacslope; double dacoffset; assign dacoffset to "{DEV}:DACOFFSET"; monitor dacoffset; double calbslope; assign calbslope to "{DEV}:CALBSLOPE"; double calbintercept; assign calbintercept to "{DEV}:CALBOFFSET"; double calbgoodfit; assign calbgoodfit to "{DEV}:CALBGOODFIT"; double calbwaittime; assign calbwaittime to "{DEV}:CALBWAITTIME"; monitor calbwaittime; double calbimax; assign calbimax to "{DEV}:CALBIMAX"; monitor calbimax; double calbimin; assign calbimin to "{DEV}:CALBIMIN"; monitor calbimin; double calbifinal; assign calbifinal to "{DEV}:CALBIFINAL"; monitor calbifinal; double calbidelta; assign calbidelta to "{DEV}:CALBIDELTA"; monitor calbidelta; int32_t calbstepnum; assign calbstepnum to "{DEV}:CALBSTEPNUM"; monitor calbstepnum; uint32_t calb_intol; assign calb_intol to "{DEV}:CALBLIMITS.VALA"; double calb_iratio; assign calb_iratio to "{DEV}:CALBLIMITS.VALB"; double calb_itol_offset; assign calb_itol_offset to "{DEV}:CALBLIMITS.VALC"; double calb_itol_slope; assign calb_itol_slope to "{DEV}:CALBLIMITS.VALD"; double calb_imult; assign calb_imult to "{DEV}:CALBIMULT"; unsigned short calb_use_default; assign calb_use_default to "{DEV}:CALBUSEDEFAULT"; /* Linear Square Fit */ unsigned char calb_LinSqFit_proc; assign calb_LinSqFit_proc to "{DEV}:CALBFITLSQ.PROC"; double calb_LinSqFit_offset; assign calb_LinSqFit_offset to "{DEV}:CALBFITLSQ.VALA"; double calb_LinSqFit_slope; assign calb_LinSqFit_slope to "{DEV}:CALBFITLSQ.VALB"; double calb_LinSqFit_r; assign calb_LinSqFit_r to "{DEV}:CALBFITLSQ.VALC"; unsigned char calcdac_proc; assign calcdac_proc to "{DEV}:CALCDAC.PROC"; double calcdac; assign calcdac to "{DEV}:CALCDAC"; double dacval; assign dacval to "{DEV}:DAC"; unsigned short dacval_omsl; assign dacval_omsl to "{DEV}:DAC.OMSL"; double dacwf[10]; assign dacwf to "{DEV}:DACWF"; double calbywf[10]; assign calbywf to "{DEV}:CALBYWF"; double calbiactwf[10]; assign calbiactwf to "{DEV}:CALBIACTWF"; double calbictrlwf[10]; assign calbictrlwf to "{DEV}:CALBICTRLWF"; double calcdacwf[10]; assign calcdacwf to "{DEV}:CALCDACWF"; /* Degauss PVs */ unsigned char degaus_go_proc; assign degaus_go_proc to "{DEV}:DEGAUSGO.PROC"; unsigned char degaus_imax_proc; assign degaus_imax_proc to "{DEV}:DEGAUS_IMAX_CHECK.PROC"; string degaus_tod; assign degaus_tod to "{DEV}:DEGAUSTOD"; string degaus_losttod; assign degaus_losttod to "{DEV}:DEGAUSLOSTTOD"; short degaus_ok; assign degaus_ok to "{DEV}:DEGAUSOK"; short degaus_ok_sevr; assign degaus_ok_sevr to "{DEV}:DEGAUSOK.ZSV"; double degaus_time; assign degaus_time to "{DEV}:DEGAUSTIME"; double degaus_ramprate; assign degaus_ramprate to "{DEV}:DEGAUSRAMPRATE"; monitor degaus_ramprate; double degaus_setl; assign degaus_setl to "{DEV}:DEGAUSSETL"; monitor degaus_setl; double degaus_blimit; assign degaus_blimit to "{DEV}:DEGAUSBLIMIT"; monitor degaus_blimit; double degaus_ictrl[MAX_DEGAUSS_POINTS]; assign degaus_ictrl to "{DEV}:DEGAUSWF"; uint32_t degaus_nord; assign degaus_nord to "{DEV}:DEGAUSWF.NORD"; uint32_t degaus_nelm; assign degaus_nelm to "{DEV}:DEGAUSWF.NELM"; uint32_t degaus_type; assign degaus_type to "{DEV}:DEGAUSTYPE.RVAL"; double degaus_imax; assign degaus_imax to "{DEV}:DEGAUS_IMAX"; short degaus_imax_pol; assign degaus_imax_pol to "{DEV}:DEGAUS_IMAXPOL"; monitor degaus_imax_pol; short iact_pol; assign iact_pol to "{DEV}:IACTPOL"; monitor iact_pol; /* Misc */ double progress; assign progress to "{DEV}:PROGRESS"; string snlstatmsg; assign snlstatmsg to "{DEV}:SNLSTATMSG"; short snldebug; assign snldebug to "{DEV}:DEBUG"; monitor snldebug; short statmsg_onoff_sevr; assign statmsg_onoff_sevr to "{DEV}:STATMSG.FRSV"; #endif /* PSCTRL_H */