1. Add logic for TDUND flow switch See Email_R_Iverson_TDUND_Flow_Switch_2015-01-05 2. Fix typo in truth table name: Change "FEE Spectrometer Crystal - Beam Energy Too Low With Crystal Out" to "FEE Spectrometer Crystal - Beam Energy Too Low When Crystal Not Out" 3. Reorganize Profile Monitor BSY0 45 logic. Instead of using TDUND/D2 as inputs to logic, use them as ignore devices instead. This prevents confusion of the profile monitor truth table appearing to be bypassed when TDUND is bypassed. Replace single truth table 'Profile Monitor BSY0 45' with 2 new truth tables: 'Profile Monitor BSY0 45 Position' and 'Profile Monitor BSY0 45 Position When D2 or TDUND Not In' [sonya@lcls-dev2 algorithm]$ sdiff -bs 2014-12-05-a/doc/MPSLogicDocumentation.txt 2015-01-07-a/doc/MPSLogicDocumentation.txt .. title:: MPS Logic 2014-12-05-a | .. title:: MPS Logic 2015-01-07-a FEE Spectrometer Crystal - Beam Energy Too Low With Crystal O | FEE Spectrometer Crystal - Beam Energy Too Low When Crystal N ------------------------------------------------------------- | ------------------------------------------------------------- > TDUND Flow Switch Fault With TDUND Not Out > ------------------------------------------ > ============= = = ==================== ==================== = > Name B A Pockels Cell Mechanical Shutter > ============= = = ==================== ==================== = > Fault F F 0 Hz 0 Hz > Ok F T 120 Hz 120 Hz > Ok, TDUND Out T F 120 Hz 120 Hz > Ok T T 120 Hz 120 Hz > ============= = = ==================== ==================== = > > Where:: > > A = TDUND_FS_STATE > B = TDUND_OUT_POSITION > > > Profile Monitor BSY0 45 Position When D2 or TDUND Not In > -------------------------------------------------------- > ====== = = ==================== ==================== ======== > Name B A Pockels Cell Mechanical Shutter B > ====== = = ==================== ==================== ======== > Moving F F 0 Hz 0 Hz > Out F T 120 Hz 120 Hz > In T F 0 Hz 0 Hz > Broken T T 0 Hz 0 Hz > ====== = = ==================== ==================== ======== > > Where:: > > A = PROF_BSY0_45_OUT_LIMIT_POSITION > B = PROF_BSY0_45_IN_LIMIT_POSITION > > Profile Monitor BSY0 45 | Profile Monitor BSY0 45 Position ----------------------- | -------------------------------- The following code assigns the truth table's state number to | ====== = = ==================== ==================== ======== | Name B A Pockels Cell Mechanical Shutter B /* BSY PR45 Profile Monitor | ====== = = ==================== ==================== ======== * | Moving F F 0 Hz 0 Hz * state = 0 : PR45 BROKEN, 0 Hz fault | Out F T 120 Hz 120 Hz * state = 1 : PR45 MOVING, 0 Hz fault | In T F 10 Hz 10 Hz * state = 2 : PR45 OUT, 120 Hz beam allowed | Broken T T 0 Hz 0 Hz * state = 3 : PR45 IN and D2-or-TDUND IN, 10 Hz beam all | ====== = = ==================== ==================== ======== * state = 4 : PR45 IN but neither D2 nor TDUND IN, 0 Hz < * Input Descriptions < * < * Link Node MPS PV Name Link Node MPS Fau < * ------------------------------- ------------------ < * PROF:BSY0:45:OUT_LIMIT_MPS = PROF_BSY0_45_OUT_ < * PROF:BSY0:45:IN_LIMIT_MPS = PROF_BSY0_45_IN_L < * DUMP:LTU1:970:TDUND_IN_MPS = TDUND_IN_POSITION < * STPR:BSY0:88:IN_LIMSW_A_MPS = STPR_BSY0_88_IN_L < * < */ < < /* Initialize to a guard value */ < state = (unsigned int) -1; < < if ( PROF_BSY0_45_OUT_LIMIT_POSITION && PROF_BSY0_45_IN_L < { < state = 0; < } < < else if ( !PROF_BSY0_45_OUT_LIMIT_POSITION && !PROF_BSY0_ < { < state = 1; < } < < else if ( PROF_BSY0_45_OUT_LIMIT_POSITION ) < { < state = 2; < } < < else if ( PROF_BSY0_45_IN_LIMIT_POSITION && ( TDUND_IN_PO < { < state = 3; < } < else | Where:: { < state = 4; < } < ========================== ===== ==================== ======= | A = PROF_BSY0_45_OUT_LIMIT_POSITION Name State Pockels Cell Mechan | B = PROF_BSY0_45_IN_LIMIT_POSITION ========================== ===== ==================== ======= < Broken 0 0 Hz < Moving 1 0 Hz < Out 2 120 Hz < In and D2 or TDUND In 3 10 Hz < In but D2 and TDUND Not In 4 0 Hz < ========================== ===== ==================== ======= <