/* Initialize Max Rates to 120 Hz */ setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceFuture); /* * Logic Ignored When ST1/ST2 Are In or TD11 Is In or TDUND Is In or YG BL211 Is In */ if (STPR_FEE1_1_ST1ST2IN_POSITION && !STPR_FEE1_1_ST1ST2OUT_POSITION || TD11_IN_LIMIT_STATE || TDUND_IN_POSITION || YG_BL211_IN_LIMIT_STATE && !YG_BL211_OUT_LIMIT_STATE) { /* Ignore FEE Solid Attenuator 321 */ setNewTruthTableState(161, MPSTruthTableStateIgnored); /* Ignore FEE Solid Attenuator 323 */ setNewTruthTableState(163, MPSTruthTableStateIgnored); /* Ignore FEE Solid Attenuator 322 */ setNewTruthTableState(162, MPSTruthTableStateIgnored); /* Ignore FEE Solid Attenuator 325 */ setNewTruthTableState(165, MPSTruthTableStateIgnored); /* Ignore FEE Solid Attenuator 328 */ setNewTruthTableState(168, MPSTruthTableStateIgnored); /* Ignore FEE Solid Attenuator 326 */ setNewTruthTableState(166, MPSTruthTableStateIgnored); /* Ignore FEE Solid Attenuator 329 */ setNewTruthTableState(169, MPSTruthTableStateIgnored); /* Ignore FEE Solid Attenuator 327 */ setNewTruthTableState(167, MPSTruthTableStateIgnored); /* Ignore FEE Solid Attenuator 324 */ setNewTruthTableState(164, MPSTruthTableStateIgnored); /* Ignore FEE Gas Flow Vacuum Isolation Valve Summary */ setNewTruthTableState(159, MPSTruthTableStateIgnored); /* Ignore FEE Instrument Vacuum Isolation Valve Summary */ setNewTruthTableState(160, MPSTruthTableStateIgnored); /* Ignore FEE Fast Shutter Valve and System Summary */ setNewTruthTableState(157, MPSTruthTableStateIgnored); /* Ignore FEE Gas Flow Aperture Summary */ setNewTruthTableState(158, MPSTruthTableStateIgnored); } else { /* FEE Solid Attenuator 321 */ /* State 0 -- Moving */ if (!SATT_FEE1_321_IN_POSITION && !SATT_FEE1_321_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(161, 0); } /* State 1 -- Out */ if (!SATT_FEE1_321_IN_POSITION && SATT_FEE1_321_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(161, 1); } /* State 2 -- In */ if ( SATT_FEE1_321_IN_POSITION && !SATT_FEE1_321_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(161, 2); } /* State 3 -- Broken */ if ( SATT_FEE1_321_IN_POSITION && SATT_FEE1_321_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(161, 3); } /* FEE Solid Attenuator 323 */ /* State 0 -- Moving */ if (!SATT_FEE1_323_IN_POSITION && !SATT_FEE1_323_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(163, 0); } /* State 1 -- Out */ if (!SATT_FEE1_323_IN_POSITION && SATT_FEE1_323_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(163, 1); } /* State 2 -- In */ if ( SATT_FEE1_323_IN_POSITION && !SATT_FEE1_323_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(163, 2); } /* State 3 -- Broken */ if ( SATT_FEE1_323_IN_POSITION && SATT_FEE1_323_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(163, 3); } /* FEE Solid Attenuator 322 */ /* State 0 -- Moving */ if (!SATT_FEE1_322_IN_POSITION && !SATT_FEE1_322_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(162, 0); } /* State 1 -- Out */ if (!SATT_FEE1_322_IN_POSITION && SATT_FEE1_322_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(162, 1); } /* State 2 -- In */ if ( SATT_FEE1_322_IN_POSITION && !SATT_FEE1_322_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(162, 2); } /* State 3 -- Broken */ if ( SATT_FEE1_322_IN_POSITION && SATT_FEE1_322_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(162, 3); } /* FEE Solid Attenuator 325 */ /* State 0 -- Moving */ if (!SATT_FEE1_325_IN_POSITION && !SATT_FEE1_325_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(165, 0); } /* State 1 -- Out */ if (!SATT_FEE1_325_IN_POSITION && SATT_FEE1_325_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(165, 1); } /* State 2 -- In */ if ( SATT_FEE1_325_IN_POSITION && !SATT_FEE1_325_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(165, 2); } /* State 3 -- Broken */ if ( SATT_FEE1_325_IN_POSITION && SATT_FEE1_325_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(165, 3); } /* FEE Solid Attenuator 328 */ /* State 0 -- Moving */ if (!SATT_FEE1_328_IN_POSITION && !SATT_FEE1_328_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(168, 0); } /* State 1 -- Out */ if (!SATT_FEE1_328_IN_POSITION && SATT_FEE1_328_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(168, 1); } /* State 2 -- In */ if ( SATT_FEE1_328_IN_POSITION && !SATT_FEE1_328_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(168, 2); } /* State 3 -- Broken */ if ( SATT_FEE1_328_IN_POSITION && SATT_FEE1_328_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(168, 3); } /* FEE Solid Attenuator 326 */ /* State 0 -- Moving */ if (!SATT_FEE1_326_IN_POSITION && !SATT_FEE1_326_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(166, 0); } /* State 1 -- Out */ if (!SATT_FEE1_326_IN_POSITION && SATT_FEE1_326_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(166, 1); } /* State 2 -- In */ if ( SATT_FEE1_326_IN_POSITION && !SATT_FEE1_326_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(166, 2); } /* State 3 -- Broken */ if ( SATT_FEE1_326_IN_POSITION && SATT_FEE1_326_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(166, 3); } /* FEE Solid Attenuator 329 */ /* State 0 -- Moving */ if (!SATT_FEE1_329_IN_POSITION && !SATT_FEE1_329_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(169, 0); } /* State 1 -- Out */ if (!SATT_FEE1_329_IN_POSITION && SATT_FEE1_329_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(169, 1); } /* State 2 -- In */ if ( SATT_FEE1_329_IN_POSITION && !SATT_FEE1_329_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(169, 2); } /* State 3 -- Broken */ if ( SATT_FEE1_329_IN_POSITION && SATT_FEE1_329_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(169, 3); } /* FEE Solid Attenuator 327 */ /* State 0 -- Moving */ if (!SATT_FEE1_327_IN_POSITION && !SATT_FEE1_327_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(167, 0); } /* State 1 -- Out */ if (!SATT_FEE1_327_IN_POSITION && SATT_FEE1_327_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(167, 1); } /* State 2 -- In */ if ( SATT_FEE1_327_IN_POSITION && !SATT_FEE1_327_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(167, 2); } /* State 3 -- Broken */ if ( SATT_FEE1_327_IN_POSITION && SATT_FEE1_327_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(167, 3); } /* FEE Solid Attenuator 324 */ /* State 0 -- Moving */ if (!SATT_FEE1_324_IN_POSITION && !SATT_FEE1_324_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(164, 0); } /* State 1 -- Out */ if (!SATT_FEE1_324_IN_POSITION && SATT_FEE1_324_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(164, 1); } /* State 2 -- In */ if ( SATT_FEE1_324_IN_POSITION && !SATT_FEE1_324_OUT_POSITION) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(164, 2); } /* State 3 -- Broken */ if ( SATT_FEE1_324_IN_POSITION && SATT_FEE1_324_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(164, 3); } /* FEE Gas Flow Vacuum Isolation Valve Summary */ /* State 0 -- Not All Out */ if (!VMPS_FEE1_E202_ISOV_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(159, 0); } /* State 1 -- All Out */ if ( VMPS_FEE1_E202_ISOV_FAULT) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(159, 1); } /* FEE Instrument Vacuum Isolation Valve Summary */ /* State 0 -- Not All Out */ if (!VMPS_FEE1_E101_ISOL_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(160, 0); } /* State 1 -- All Out */ if ( VMPS_FEE1_E101_ISOL_FAULT) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(160, 1); } /* FEE Fast Shutter Valve and System Summary */ /* State 0 -- Not All Out And Ready */ if (!VMPS_FEE1_E101_FSHR_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(157, 0); } /* State 1 -- All Out And Ready */ if ( VMPS_FEE1_E101_FSHR_FAULT) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(157, 1); } /* FEE Gas Flow Aperture Summary */ /* State 0 -- Not All Out Or In */ if (!VMPS_FEE1_E202_APRT_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(158, 0); } /* State 1 -- All Out Or In */ if ( VMPS_FEE1_E202_APRT_FAULT) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(158, 1); } } /* * Logic Ignored When YG BL211 Is In */ if (YG_BL211_IN_LIMIT_STATE && !YG_BL211_OUT_LIMIT_STATE) { /* Ignore OTR21 Position */ setNewTruthTableState(216, MPSTruthTableStateIgnored); /* Ignore VACV UND1 1000 Position */ setNewTruthTableState(269, MPSTruthTableStateIgnored); /* Ignore VACV DMP 700 Position */ setNewTruthTableState(263, MPSTruthTableStateIgnored); /* Ignore OTR30 Position */ setNewTruthTableState(220, MPSTruthTableStateIgnored); /* Ignore OTR BL291 Position */ setNewTruthTableState(206, MPSTruthTableStateIgnored); /* Ignore VVPG 0757 Position */ setNewTruthTableState(277, MPSTruthTableStateIgnored); /* Ignore OTR22 Position */ setNewTruthTableState(218, MPSTruthTableStateIgnored); /* Ignore VVPG 0725 Position */ setNewTruthTableState(275, MPSTruthTableStateIgnored); /* Ignore YG BL241 Position */ setNewTruthTableState(282, MPSTruthTableStateIgnored); /* Ignore VVPG 0435 Position */ setNewTruthTableState(271, MPSTruthTableStateIgnored); /* Ignore VACV DMP 100 Position */ setNewTruthTableState(261, MPSTruthTableStateIgnored); /* Ignore VACV DMP 395 Position */ setNewTruthTableState(262, MPSTruthTableStateIgnored); /* Ignore VACV LTU1 100 Position */ setNewTruthTableState(264, MPSTruthTableStateIgnored); /* Ignore OTR BL711 Position */ setNewTruthTableState(214, MPSTruthTableStateIgnored); /* Ignore VACFS LTU1 102 Position */ setNewTruthTableState(260, MPSTruthTableStateIgnored); /* Ignore PIC997 Threshold */ setNewTruthTableState(250, MPSTruthTableStateIgnored); /* Ignore OTRH1 Position */ setNewTruthTableState(224, MPSTruthTableStateIgnored); /* Ignore VVPG 0742 Position */ setNewTruthTableState(276, MPSTruthTableStateIgnored); /* Ignore OTR BL571 Position */ setNewTruthTableState(210, MPSTruthTableStateIgnored); /* Ignore VACV LTU1 174 Position */ setNewTruthTableState(265, MPSTruthTableStateIgnored); /* Ignore VVPG 0580 Position */ setNewTruthTableState(273, MPSTruthTableStateIgnored); /* Ignore OTR33 Position */ setNewTruthTableState(222, MPSTruthTableStateIgnored); /* Ignore OTR BL237 Position */ setNewTruthTableState(204, MPSTruthTableStateIgnored); /* Ignore VACV LTU1 265 Position */ setNewTruthTableState(266, MPSTruthTableStateIgnored); /* Ignore VVPG 0505 Position */ setNewTruthTableState(272, MPSTruthTableStateIgnored); /* Ignore VVPG 0999 Position */ setNewTruthTableState(279, MPSTruthTableStateIgnored); /* Ignore PIC998 Threshold */ setNewTruthTableState(251, MPSTruthTableStateIgnored); /* Ignore OTR BL541 Position */ setNewTruthTableState(208, MPSTruthTableStateIgnored); /* Ignore VVPG 0670 Position */ setNewTruthTableState(274, MPSTruthTableStateIgnored); /* Ignore OTRH2 Position */ setNewTruthTableState(227, MPSTruthTableStateIgnored); /* Ignore VVPG 0774 Position */ setNewTruthTableState(278, MPSTruthTableStateIgnored); /* Ignore YG BL351 Position */ setNewTruthTableState(283, MPSTruthTableStateIgnored); /* Ignore OTR BL621 Position */ setNewTruthTableState(212, MPSTruthTableStateIgnored); /* Ignore VVMG LTU1 505 Position */ setNewTruthTableState(270, MPSTruthTableStateIgnored); /* Ignore TDUND Position */ setNewTruthTableState(256, MPSTruthTableStateIgnored); /* Ignore VACV UND 2500 Position */ setNewTruthTableState(268, MPSTruthTableStateIgnored); /* Ignore VACV LTU1 355 Position */ setNewTruthTableState(267, MPSTruthTableStateIgnored); } else { /* OTR21 Position */ /* State 0 -- Moving */ if (!OTR21_IN_STATE && !OTR21_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(216, 0); } /* State 1 -- Out */ if (!OTR21_IN_STATE && OTR21_OUT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(216, 1); } /* State 2 -- In */ if ( OTR21_IN_STATE && !OTR21_OUT_STATE) { setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(216, 2); } /* State 3 -- Broken */ if ( OTR21_IN_STATE && OTR21_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(216, 3); } /* VACV UND1 1000 Position */ /* State 0 -- Not Out */ if (!VACV_LTU0_1000_OPEN_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(269, 0); } /* State 1 -- Out */ if ( VACV_LTU0_1000_OPEN_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(269, 1); } /* VACV DMP 700 Position */ /* State 0 -- Not Out */ if (!VACV_DMP_700_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(263, 0); } /* State 1 -- Out */ if ( VACV_DMP_700_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(263, 1); } /* OTR30 Position */ /* State 0 -- Moving */ if (!OTR30_0449_IN_STATE && !OTR30_0449_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(220, 0); } /* State 1 -- Out */ if (!OTR30_0449_IN_STATE && OTR30_0449_OUT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(220, 1); } /* State 2 -- In */ if ( OTR30_0449_IN_STATE && !OTR30_0449_OUT_STATE) { setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(220, 2); } /* State 3 -- Broken */ if ( OTR30_0449_IN_STATE && OTR30_0449_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(220, 3); } /* OTR BL291 Position */ /* State 0 -- Moving */ if (!OT_BL291_IN_LIMIT_STATE && !OT_BL291_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(206, 0); } /* State 1 -- Out */ if (!OT_BL291_IN_LIMIT_STATE && OT_BL291_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(206, 1); } /* State 2 -- In */ if ( OT_BL291_IN_LIMIT_STATE && !OT_BL291_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(206, 2); } /* State 3 -- Broken */ if ( OT_BL291_IN_LIMIT_STATE && OT_BL291_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(206, 3); } /* VVPG 0757 Position */ /* State 0 -- Not Out */ if (!VVPG_0757_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(277, 0); } /* State 1 -- Out */ if ( VVPG_0757_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(277, 1); } /* OTR22 Position */ /* State 0 -- Moving */ if (!OTR22_IN_STATE && !OTR22_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(218, 0); } /* State 1 -- Out */ if (!OTR22_IN_STATE && OTR22_OUT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(218, 1); } /* State 2 -- In */ if ( OTR22_IN_STATE && !OTR22_OUT_STATE) { setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(218, 2); } /* State 3 -- Broken */ if ( OTR22_IN_STATE && OTR22_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(218, 3); } /* VVPG 0725 Position */ /* State 0 -- Not Out */ if (!VVPG_0725_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(275, 0); } /* State 1 -- Out */ if ( VVPG_0725_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(275, 1); } /* YG BL241 Position */ /* State 0 -- Moving */ if (!YG_BL241_IN_LIMIT_STATE && !YG_BL241_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(282, 0); } /* State 1 -- Out */ if (!YG_BL241_IN_LIMIT_STATE && YG_BL241_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(282, 1); } /* State 2 -- In */ if ( YG_BL241_IN_LIMIT_STATE && !YG_BL241_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(282, 2); } /* State 3 -- Broken */ if ( YG_BL241_IN_LIMIT_STATE && YG_BL241_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(282, 3); } /* VVPG 0435 Position */ /* State 0 -- Not Out */ if (!VVPG_0435_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(271, 0); } /* State 1 -- Out */ if ( VVPG_0435_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(271, 1); } /* VACV DMP 100 Position */ /* State 0 -- Not Out */ if (!VACV_DMP_100_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(261, 0); } /* State 1 -- Out */ if ( VACV_DMP_100_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(261, 1); } /* VACV DMP 395 Position */ /* State 0 -- Not Out */ if (!VACV_DMP_395_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(262, 0); } /* State 1 -- Out */ if ( VACV_DMP_395_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(262, 1); } /* VACV LTU1 100 Position */ /* State 0 -- Not Out */ if (!VACV_LTU1_100_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(264, 0); } /* State 1 -- Out */ if ( VACV_LTU1_100_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(264, 1); } /* OTR BL711 Position */ /* State 0 -- Moving */ if (!OT_BL711_IN_LIMIT_STATE && !OT_BL711_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(214, 0); } /* State 1 -- Out */ if (!OT_BL711_IN_LIMIT_STATE && OT_BL711_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(214, 1); } /* State 2 -- In */ if ( OT_BL711_IN_LIMIT_STATE && !OT_BL711_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(214, 2); } /* State 3 -- Broken */ if ( OT_BL711_IN_LIMIT_STATE && OT_BL711_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(214, 3); } /* VACFS LTU1 102 Position */ /* State 0 -- Not Out */ if (!VACFS_LTU1_102_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(260, 0); } /* State 1 -- Out */ if ( VACFS_LTU1_102_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(260, 1); } /* PIC997 Threshold */ /* State 0 -- Exceeded */ if (!PIC997_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(250, 0); } /* State 1 -- OK */ if ( PIC997_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(250, 1); } /* OTRH1 Position */ /* State 0 -- Moving */ if (!OTRH1_IN_LIMIT_STATE && !OTRH1_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(224, 0); } /* State 1 -- Out */ if (!OTRH1_IN_LIMIT_STATE && OTRH1_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(224, 1); } /* State 2 -- In */ if ( OTRH1_IN_LIMIT_STATE && !OTRH1_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(224, 2); } /* State 3 -- Broken */ if ( OTRH1_IN_LIMIT_STATE && OTRH1_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(224, 3); } /* VVPG 0742 Position */ /* State 0 -- Not Out */ if (!VVPG_0742_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(276, 0); } /* State 1 -- Out */ if ( VVPG_0742_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(276, 1); } /* OTR BL571 Position */ /* State 0 -- Moving */ if (!OT_BL571_IN_LIMIT_STATE && !OT_BL571_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(210, 0); } /* State 1 -- Out */ if (!OT_BL571_IN_LIMIT_STATE && OT_BL571_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(210, 1); } /* State 2 -- In */ if ( OT_BL571_IN_LIMIT_STATE && !OT_BL571_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(210, 2); } /* State 3 -- Broken */ if ( OT_BL571_IN_LIMIT_STATE && OT_BL571_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(210, 3); } /* VACV LTU1 174 Position */ /* State 0 -- Not Out */ if (!VACV_LTU1_174_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(265, 0); } /* State 1 -- Out */ if ( VACV_LTU1_174_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(265, 1); } /* VVPG 0580 Position */ /* State 0 -- Not Out */ if (!VVPG_0580_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(273, 0); } /* State 1 -- Out */ if ( VVPG_0580_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(273, 1); } /* OTR33 Position */ /* State 0 -- Moving */ if (!OTR33_0745_IN_STATE && !OTR33_0745_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(222, 0); } /* State 1 -- Out */ if (!OTR33_0745_IN_STATE && OTR33_0745_OUT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(222, 1); } /* State 2 -- In */ if ( OTR33_0745_IN_STATE && !OTR33_0745_OUT_STATE) { setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(222, 2); } /* State 3 -- Broken */ if ( OTR33_0745_IN_STATE && OTR33_0745_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(222, 3); } /* OTR BL237 Position */ /* State 0 -- Moving */ if (!OT_BL237_IN_LIMIT_STATE && !OT_BL237_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(204, 0); } /* State 1 -- Out */ if (!OT_BL237_IN_LIMIT_STATE && OT_BL237_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(204, 1); } /* State 2 -- In */ if ( OT_BL237_IN_LIMIT_STATE && !OT_BL237_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(204, 2); } /* State 3 -- Broken */ if ( OT_BL237_IN_LIMIT_STATE && OT_BL237_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(204, 3); } /* VACV LTU1 265 Position */ /* State 0 -- Not Out */ if (!VACV_LTU1_265_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(266, 0); } /* State 1 -- Out */ if ( VACV_LTU1_265_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(266, 1); } /* VVPG 0505 Position */ /* State 0 -- Not Out */ if (!VVPG_0505_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(272, 0); } /* State 1 -- Out */ if ( VVPG_0505_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(272, 1); } /* VVPG 0999 Position */ /* State 0 -- Not Out */ if (!VVPG_0999_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(279, 0); } /* State 1 -- Out */ if ( VVPG_0999_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(279, 1); } /* PIC998 Threshold */ /* State 0 -- Exceeded */ if (!PIC998_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(251, 0); } /* State 1 -- OK */ if ( PIC998_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(251, 1); } /* OTR BL541 Position */ /* State 0 -- Moving */ if (!OT_BL541_IN_LIMIT_STATE && !OT_BL541_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(208, 0); } /* State 1 -- Out */ if (!OT_BL541_IN_LIMIT_STATE && OT_BL541_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(208, 1); } /* State 2 -- In */ if ( OT_BL541_IN_LIMIT_STATE && !OT_BL541_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(208, 2); } /* State 3 -- Broken */ if ( OT_BL541_IN_LIMIT_STATE && OT_BL541_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(208, 3); } /* VVPG 0670 Position */ /* State 0 -- Not Out */ if (!VVPG_0670_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(274, 0); } /* State 1 -- Out */ if ( VVPG_0670_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(274, 1); } /* OTRH2 Position */ /* State 0 -- Moving */ if (!OTRH2_IN_LIMIT_STATE && !OTRH2_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(227, 0); } /* State 1 -- Out */ if (!OTRH2_IN_LIMIT_STATE && OTRH2_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(227, 1); } /* State 2 -- In */ if ( OTRH2_IN_LIMIT_STATE && !OTRH2_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(227, 2); } /* State 3 -- Broken */ if ( OTRH2_IN_LIMIT_STATE && OTRH2_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(227, 3); } /* VVPG 0774 Position */ /* State 0 -- Not Out */ if (!VVPG_0774_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(278, 0); } /* State 1 -- Out */ if ( VVPG_0774_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(278, 1); } /* YG BL351 Position */ /* State 0 -- Moving */ if (!YG_BL351_IN_LIMIT_STATE && !YG_BL351_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(283, 0); } /* State 1 -- Out */ if (!YG_BL351_IN_LIMIT_STATE && YG_BL351_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(283, 1); } /* State 2 -- In */ if ( YG_BL351_IN_LIMIT_STATE && !YG_BL351_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(283, 2); } /* State 3 -- Broken */ if ( YG_BL351_IN_LIMIT_STATE && YG_BL351_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(283, 3); } /* OTR BL621 Position */ /* State 0 -- Moving */ if (!OT_BL621_IN_LIMIT_STATE && !OT_BL621_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(212, 0); } /* State 1 -- Out */ if (!OT_BL621_IN_LIMIT_STATE && OT_BL621_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(212, 1); } /* State 2 -- In */ if ( OT_BL621_IN_LIMIT_STATE && !OT_BL621_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(212, 2); } /* State 3 -- Broken */ if ( OT_BL621_IN_LIMIT_STATE && OT_BL621_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(212, 3); } /* VVMG LTU1 505 Position */ /* State 0 -- Not Out */ if (!VVPG_0505_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(270, 0); } /* State 1 -- Out */ if ( VVPG_0505_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(270, 1); } /* TDUND Position */ /* State 0 -- Moving */ if (!TDUND_IN_POSITION && !TDUND_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(256, 0); } /* State 1 -- Out */ if (!TDUND_IN_POSITION && TDUND_OUT_POSITION) { setNewTruthTableState(256, 1); } /* State 2 -- In */ if ( TDUND_IN_POSITION && !TDUND_OUT_POSITION) { setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(256, 2); } /* State 3 -- Broken */ if ( TDUND_IN_POSITION && TDUND_OUT_POSITION) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(256, 3); } /* VACV UND 2500 Position */ /* State 0 -- Not Out */ if (!VACV_UND_2500_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(268, 0); } /* State 1 -- Out */ if ( VACV_UND_2500_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(268, 1); } /* VACV LTU1 355 Position */ /* State 0 -- Not Out */ if (!VACV_LTU1_355_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(267, 0); } /* State 1 -- Out */ if ( VACV_LTU1_355_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(267, 1); } } /* * Logic Ignored When TD11 Is In or TDUND Is In or YG BL211 Is In */ if (TD11_IN_LIMIT_STATE || TDUND_IN_POSITION || YG_BL211_IN_LIMIT_STATE && !YG_BL211_OUT_LIMIT_STATE) { /* Ignore BLM HVPS LTU1 762 */ setNewTruthTableState(40, MPSTruthTableStateIgnored); /* Ignore OTRH2 Position And TDUND Not In */ setNewTruthTableState(229, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: LTU1 772 */ setNewTruthTableState(101, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 1121 */ setNewTruthTableState(59, MPSTruthTableStateIgnored); /* Ignore OTRH1 Position And TDUND Not In */ setNewTruthTableState(226, MPSTruthTableStateIgnored); /* Ignore BLM Argonne Heartbeat (LN36) */ setNewTruthTableState(38, MPSTruthTableStateIgnored); /* Ignore OTR BL621 Position and TDUND Not In */ setNewTruthTableState(213, MPSTruthTableStateIgnored); /* Ignore OTR21 Position And TDUND Not In */ setNewTruthTableState(217, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 921 */ setNewTruthTableState(140, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: LTU1 762 */ setNewTruthTableState(100, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 1521 */ setNewTruthTableState(65, MPSTruthTableStateIgnored); /* Ignore BLM Argonne Heartbeat (LN33) */ setNewTruthTableState(36, MPSTruthTableStateIgnored); /* Ignore BFW 2110 Position */ setNewTruthTableState(14, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 2821 */ setNewTruthTableState(126, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 821 */ setNewTruthTableState(138, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 321 */ setNewTruthTableState(85, MPSTruthTableStateIgnored); /* Ignore BFW 1910 Position */ setNewTruthTableState(11, MPSTruthTableStateIgnored); /* Ignore BFW 2710 Position */ setNewTruthTableState(20, MPSTruthTableStateIgnored); /* Ignore BLM Trigger Missed (LN36) */ setNewTruthTableState(147, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 721 */ setNewTruthTableState(92, MPSTruthTableStateIgnored); /* Ignore BFW 710 Position */ setNewTruthTableState(31, MPSTruthTableStateIgnored); /* Ignore Toroid Comparator Power Status (B921) */ setNewTruthTableState(259, MPSTruthTableStateIgnored); /* Ignore Magnet Power: QUM4 */ setNewTruthTableState(202, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 1221 */ setNewTruthTableState(107, MPSTruthTableStateIgnored); /* Ignore LION585 Threshold */ setNewTruthTableState(175, MPSTruthTableStateIgnored); /* Ignore BFW 2210 Position */ setNewTruthTableState(15, MPSTruthTableStateIgnored); /* Ignore BLM PEP Timing Check (LN35) */ setNewTruthTableState(50, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND BLF17 */ setNewTruthTableState(142, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Threshold: LTU1 772 */ setNewTruthTableState(56, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: LTU1 722 */ setNewTruthTableState(98, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 1721 */ setNewTruthTableState(68, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 1821 */ setNewTruthTableState(114, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 120 */ setNewTruthTableState(105, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 1921 */ setNewTruthTableState(115, MPSTruthTableStateIgnored); /* Ignore BFW 110 Position */ setNewTruthTableState(2, MPSTruthTableStateIgnored); /* Ignore BFW 1210 Position */ setNewTruthTableState(4, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 1621 */ setNewTruthTableState(66, MPSTruthTableStateIgnored); /* Ignore LION584 Threshold */ setNewTruthTableState(174, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 721 */ setNewTruthTableState(137, MPSTruthTableStateIgnored); /* Ignore BFW 2010 Position */ setNewTruthTableState(12, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 1021 */ setNewTruthTableState(103, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 2520 */ setNewTruthTableState(77, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 1021 */ setNewTruthTableState(58, MPSTruthTableStateIgnored); /* Ignore Magnet In Tolerance: QE31 */ setNewTruthTableState(192, MPSTruthTableStateIgnored); /* Ignore BLM PEP Timing Check (LN30) */ setNewTruthTableState(47, MPSTruthTableStateIgnored); /* Ignore BLM Argonne Heartbeat (LN37) */ setNewTruthTableState(39, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 1321 */ setNewTruthTableState(108, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 3021 */ setNewTruthTableState(83, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 920 */ setNewTruthTableState(94, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 321 */ setNewTruthTableState(130, MPSTruthTableStateIgnored); /* Ignore BPM Summary (10-18) */ setNewTruthTableState(150, MPSTruthTableStateIgnored); /* Ignore BFW 1810 Position */ setNewTruthTableState(10, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 221 */ setNewTruthTableState(73, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 1821 */ setNewTruthTableState(69, MPSTruthTableStateIgnored); /* Ignore BPM Summary (1-9) */ setNewTruthTableState(149, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: LTU1 980 */ setNewTruthTableState(57, MPSTruthTableStateIgnored); /* Ignore Magnet Power: QUM1 */ setNewTruthTableState(199, MPSTruthTableStateIgnored); /* Ignore BFW Inserted Count */ setNewTruthTableState(34, MPSTruthTableStateIgnored); /* Ignore BFW 2910 Position */ setNewTruthTableState(22, MPSTruthTableStateIgnored); /* Ignore OTR BL571 Position and TDUND Not In */ setNewTruthTableState(211, MPSTruthTableStateIgnored); /* Ignore LION752 Threshold */ setNewTruthTableState(180, MPSTruthTableStateIgnored); /* Ignore BLM PEP Timing Check (LN37) */ setNewTruthTableState(52, MPSTruthTableStateIgnored); /* Ignore OTR BL541 Position and TDUND Not In */ setNewTruthTableState(209, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 521 */ setNewTruthTableState(135, MPSTruthTableStateIgnored); /* Ignore BLM Trigger Missed (LN33) */ setNewTruthTableState(145, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 621 */ setNewTruthTableState(136, MPSTruthTableStateIgnored); /* Ignore BLM Trigger Missed (LN35) */ setNewTruthTableState(146, MPSTruthTableStateIgnored); /* Ignore BLM HVPS UND1 120 */ setNewTruthTableState(41, MPSTruthTableStateIgnored); /* Ignore Magnet In Tolerance: QUM1 */ setNewTruthTableState(193, MPSTruthTableStateIgnored); /* Ignore BFW 1310 Position */ setNewTruthTableState(5, MPSTruthTableStateIgnored); /* Ignore BLM HVPS UND1 2221 */ setNewTruthTableState(43, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 1721 */ setNewTruthTableState(113, MPSTruthTableStateIgnored); /* Ignore BFW 1110 Position */ setNewTruthTableState(3, MPSTruthTableStateIgnored); /* Ignore LION717 Threshold */ setNewTruthTableState(177, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 421 */ setNewTruthTableState(134, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 2121 */ setNewTruthTableState(117, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 421 */ setNewTruthTableState(89, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 3221 */ setNewTruthTableState(131, MPSTruthTableStateIgnored); /* Ignore OTR BL711 Position and TDUND Not In */ setNewTruthTableState(215, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 2321 */ setNewTruthTableState(120, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 920 */ setNewTruthTableState(139, MPSTruthTableStateIgnored); /* Ignore Magnet In Tolerance: QUM2 */ setNewTruthTableState(194, MPSTruthTableStateIgnored); /* Ignore BFW 3210 Position */ setNewTruthTableState(26, MPSTruthTableStateIgnored); /* Ignore Magnet Power: QUM3 */ setNewTruthTableState(201, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 2421 */ setNewTruthTableState(76, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND BLF17 */ setNewTruthTableState(97, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Threshold: LTU1 732 */ setNewTruthTableState(54, MPSTruthTableStateIgnored); /* Ignore BFW 3010 Position */ setNewTruthTableState(23, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 2321 */ setNewTruthTableState(75, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: LTU1 980 */ setNewTruthTableState(102, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 2921 */ setNewTruthTableState(127, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 3221 */ setNewTruthTableState(86, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 121 */ setNewTruthTableState(106, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 2520 */ setNewTruthTableState(122, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 2521 */ setNewTruthTableState(78, MPSTruthTableStateIgnored); /* Ignore Magnet Power: QUM2 */ setNewTruthTableState(200, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 3121 */ setNewTruthTableState(84, MPSTruthTableStateIgnored); /* Ignore BLM PEP Timing Check (LN32) */ setNewTruthTableState(48, MPSTruthTableStateIgnored); /* Ignore LION753 Threshold */ setNewTruthTableState(181, MPSTruthTableStateIgnored); /* Ignore BFW 2310 Position */ setNewTruthTableState(16, MPSTruthTableStateIgnored); /* Ignore LION405 Threshold */ setNewTruthTableState(171, MPSTruthTableStateIgnored); /* Ignore Magnet Power: QE31 */ setNewTruthTableState(198, MPSTruthTableStateIgnored); /* Ignore BLM HVPS UND1 920 */ setNewTruthTableState(46, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 2821 */ setNewTruthTableState(81, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 3021 */ setNewTruthTableState(128, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 1621 */ setNewTruthTableState(111, MPSTruthTableStateIgnored); /* Ignore BLM Trigger Missed (LN32) */ setNewTruthTableState(144, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 2221 */ setNewTruthTableState(74, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 2521 */ setNewTruthTableState(123, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 3321 */ setNewTruthTableState(88, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 2421 */ setNewTruthTableState(121, MPSTruthTableStateIgnored); /* Ignore BLM Argonne Heartbeat (LN32) */ setNewTruthTableState(35, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 1421 */ setNewTruthTableState(64, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND BLF1 */ setNewTruthTableState(96, MPSTruthTableStateIgnored); /* Ignore BFW 1710 Position */ setNewTruthTableState(9, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 221 */ setNewTruthTableState(118, MPSTruthTableStateIgnored); /* Ignore BFW 1410 Position */ setNewTruthTableState(6, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 2721 */ setNewTruthTableState(80, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 821 */ setNewTruthTableState(93, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 921 */ setNewTruthTableState(95, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 1720 */ setNewTruthTableState(112, MPSTruthTableStateIgnored); /* Ignore BPM Summary (28-36) */ setNewTruthTableState(152, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 120 */ setNewTruthTableState(60, MPSTruthTableStateIgnored); /* Ignore BFW 2410 Position */ setNewTruthTableState(17, MPSTruthTableStateIgnored); /* Ignore BFW 1010 Position */ setNewTruthTableState(1, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 1521 */ setNewTruthTableState(110, MPSTruthTableStateIgnored); /* Ignore Magnet In Tolerance: QUM4 */ setNewTruthTableState(196, MPSTruthTableStateIgnored); /* Ignore BFW 210 Position */ setNewTruthTableState(13, MPSTruthTableStateIgnored); /* Ignore BLM PEP Timing Check (LN36) */ setNewTruthTableState(51, MPSTruthTableStateIgnored); /* Ignore LION716 Threshold */ setNewTruthTableState(176, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 1121 */ setNewTruthTableState(104, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Threshold: LTU1 722 */ setNewTruthTableState(53, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 2121 */ setNewTruthTableState(72, MPSTruthTableStateIgnored); /* Ignore BLM HVPS UND1 1720 */ setNewTruthTableState(42, MPSTruthTableStateIgnored); /* Ignore BLM PEP Timing Check (LN33) */ setNewTruthTableState(49, MPSTruthTableStateIgnored); /* Ignore BFW 510 Position */ setNewTruthTableState(29, MPSTruthTableStateIgnored); /* Ignore OTR22 Position And TDUND Not In */ setNewTruthTableState(219, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND BLF1 */ setNewTruthTableState(141, MPSTruthTableStateIgnored); /* Ignore LION505 Threshold */ setNewTruthTableState(173, MPSTruthTableStateIgnored); /* Ignore LION732 Threshold */ setNewTruthTableState(178, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 1720 */ setNewTruthTableState(67, MPSTruthTableStateIgnored); /* Ignore LION404 Threshold */ setNewTruthTableState(170, MPSTruthTableStateIgnored); /* Ignore BLM HVPS UND1 3320 */ setNewTruthTableState(45, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 621 */ setNewTruthTableState(91, MPSTruthTableStateIgnored); /* Ignore BFW 810 Position */ setNewTruthTableState(32, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 2621 */ setNewTruthTableState(79, MPSTruthTableStateIgnored); /* Ignore LION733 Threshold */ setNewTruthTableState(179, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 1221 */ setNewTruthTableState(62, MPSTruthTableStateIgnored); /* Ignore BFW 1610 Position */ setNewTruthTableState(8, MPSTruthTableStateIgnored); /* Ignore BLM Trigger Missed (LN30) */ setNewTruthTableState(143, MPSTruthTableStateIgnored); /* Ignore BLM Argonne Heartbeat (LN35) */ setNewTruthTableState(37, MPSTruthTableStateIgnored); /* Ignore BPM Summary (19-27) */ setNewTruthTableState(151, MPSTruthTableStateIgnored); /* Ignore OTR BL237 Position and TDUND Not In */ setNewTruthTableState(205, MPSTruthTableStateIgnored); /* Ignore BFW 2510 Position */ setNewTruthTableState(18, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 1321 */ setNewTruthTableState(63, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 121 */ setNewTruthTableState(61, MPSTruthTableStateIgnored); /* Ignore BFW 1510 Position */ setNewTruthTableState(7, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 2021 */ setNewTruthTableState(116, MPSTruthTableStateIgnored); /* Ignore Magnet In Tolerance: QUM3 */ setNewTruthTableState(195, MPSTruthTableStateIgnored); /* Ignore BFW 610 Position */ setNewTruthTableState(30, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 2621 */ setNewTruthTableState(124, MPSTruthTableStateIgnored); /* Ignore BFW 2810 Position */ setNewTruthTableState(21, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 3321 */ setNewTruthTableState(133, MPSTruthTableStateIgnored); /* Ignore OTR BL291 Position and TDUND Not In */ setNewTruthTableState(207, MPSTruthTableStateIgnored); /* Ignore BFW 310 Position */ setNewTruthTableState(24, MPSTruthTableStateIgnored); /* Ignore OTR30 Position And TDUND Not In */ setNewTruthTableState(221, MPSTruthTableStateIgnored); /* Ignore Toroid Comparator (IMUNDO vs IMDUMP) */ setNewTruthTableState(258, MPSTruthTableStateIgnored); /* Ignore BFW 2610 Position */ setNewTruthTableState(19, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 3320 */ setNewTruthTableState(87, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 2921 */ setNewTruthTableState(82, MPSTruthTableStateIgnored); /* Ignore BLM HVPS UND1 2520 */ setNewTruthTableState(44, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 1921 */ setNewTruthTableState(70, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 521 */ setNewTruthTableState(90, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Thresholds: UND 2021 */ setNewTruthTableState(71, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 3121 */ setNewTruthTableState(129, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: LTU1 732 */ setNewTruthTableState(99, MPSTruthTableStateIgnored); /* Ignore Toroid Comparator (IMUNDI vs IMUNDO) */ setNewTruthTableState(257, MPSTruthTableStateIgnored); /* Ignore BLM Trigger Missed (LN37) */ setNewTruthTableState(148, MPSTruthTableStateIgnored); /* Ignore BFW 3110 Position */ setNewTruthTableState(25, MPSTruthTableStateIgnored); /* Ignore BFW 910 Position */ setNewTruthTableState(33, MPSTruthTableStateIgnored); /* Ignore BFW 3310 Position */ setNewTruthTableState(27, MPSTruthTableStateIgnored); /* Ignore OTR33 Position And TDUND Not In */ setNewTruthTableState(223, MPSTruthTableStateIgnored); /* Ignore LION765 Threshold */ setNewTruthTableState(182, MPSTruthTableStateIgnored); /* Ignore BFW 410 Position */ setNewTruthTableState(28, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 2221 */ setNewTruthTableState(119, MPSTruthTableStateIgnored); /* Ignore BLM Pedestal Threshold: LTU1 762 */ setNewTruthTableState(55, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 1421 */ setNewTruthTableState(109, MPSTruthTableStateIgnored); /* Ignore LION504 Threshold */ setNewTruthTableState(172, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 3320 */ setNewTruthTableState(132, MPSTruthTableStateIgnored); /* Ignore BLM Raw Charge Thresholds: UND 2721 */ setNewTruthTableState(125, MPSTruthTableStateIgnored); /* Ignore LION766 Threshold */ setNewTruthTableState(183, MPSTruthTableStateIgnored); /* Ignore PIC Raw Charge Thresholds: DMP1 698 */ setNewTruthTableState(234, MPSTruthTableStateIgnored); /* Ignore PIC Raw Charge Thresholds: DMP1 699 */ setNewTruthTableState(235, MPSTruthTableStateIgnored); /* Ignore PIC Trigger Missed (LN34) */ setNewTruthTableState(249, MPSTruthTableStateIgnored); /* Ignore PIC HVPS B921 */ setNewTruthTableState(233, MPSTruthTableStateIgnored); } else { /* BLM HVPS LTU1 762 */ /* State 0 -- Broken */ if (!HVPS_LTU1_762_HIGH_FAULT && !HVPS_LTU1_762_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(40, 0); } /* State 1 -- Over High Threshold */ if (!HVPS_LTU1_762_HIGH_FAULT && HVPS_LTU1_762_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(40, 1); } /* State 2 -- Under Low Threshold */ if ( HVPS_LTU1_762_HIGH_FAULT && !HVPS_LTU1_762_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(40, 2); } /* State 3 -- OK */ if ( HVPS_LTU1_762_HIGH_FAULT && HVPS_LTU1_762_LOW_FAULT) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(40, 3); } /* OTRH2 Position And TDUND Not In */ /* State 0 -- Moving */ if (!OTRH2_IN_LIMIT_STATE && !OTRH2_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(229, 0); } /* State 1 -- Out */ if (!OTRH2_IN_LIMIT_STATE && OTRH2_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(229, 1); } /* State 2 -- In */ if ( OTRH2_IN_LIMIT_STATE && !OTRH2_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(229, 2); } /* State 3 -- Broken */ if ( OTRH2_IN_LIMIT_STATE && OTRH2_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(229, 3); } /* BLM Raw Charge Thresholds: LTU1 772 */ /* State 0 -- Broken */ if (!BLM_LTU1_772_LOSS_H_THRESHOLD && !BLM_LTU1_772_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(101, 0); } /* State 1 -- Over High Threshold */ if (!BLM_LTU1_772_LOSS_H_THRESHOLD && BLM_LTU1_772_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(101, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_LTU1_772_LOSS_H_THRESHOLD && !BLM_LTU1_772_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(101, 2); } /* State 3 -- OK */ if ( BLM_LTU1_772_LOSS_H_THRESHOLD && BLM_LTU1_772_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(101, 3); } /* BLM Pedestal Thresholds: UND 1121 */ /* State 0 -- Broken */ if (!BLM_UND1_1121_PED_H_THRESHOLD && !BLM_UND1_1121_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(59, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1121_PED_H_THRESHOLD && BLM_UND1_1121_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(59, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1121_PED_H_THRESHOLD && !BLM_UND1_1121_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(59, 2); } /* State 3 -- OK */ if ( BLM_UND1_1121_PED_H_THRESHOLD && BLM_UND1_1121_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(59, 3); } /* OTRH1 Position And TDUND Not In */ /* State 0 -- Moving */ if (!OTRH1_IN_LIMIT_STATE && !OTRH1_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(226, 0); } /* State 1 -- Out */ if (!OTRH1_IN_LIMIT_STATE && OTRH1_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(226, 1); } /* State 2 -- In */ if ( OTRH1_IN_LIMIT_STATE && !OTRH1_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(226, 2); } /* State 3 -- Broken */ if ( OTRH1_IN_LIMIT_STATE && OTRH1_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(226, 3); } /* BLM Argonne Heartbeat (LN36) */ /* State 0 -- Broken */ if (!BLM_2520_QTH_THRESHOLD && !BLM_2520_QTL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(38, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2520_QTH_THRESHOLD && BLM_2520_QTL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(38, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2520_QTH_THRESHOLD && !BLM_2520_QTL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(38, 2); } /* State 3 -- OK */ if ( BLM_2520_QTH_THRESHOLD && BLM_2520_QTL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(38, 3); } /* OTR BL621 Position and TDUND Not In */ /* State 0 -- Moving */ if (!OT_BL621_IN_LIMIT_STATE && !OT_BL621_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(213, 0); } /* State 1 -- Out */ if (!OT_BL621_IN_LIMIT_STATE && OT_BL621_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(213, 1); } /* State 2 -- In */ if ( OT_BL621_IN_LIMIT_STATE && !OT_BL621_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(213, 2); } /* State 3 -- Broken */ if ( OT_BL621_IN_LIMIT_STATE && OT_BL621_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(213, 3); } /* OTR21 Position And TDUND Not In */ /* State 0 -- Moving */ if (!OTR21_IN_STATE && !OTR21_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(217, 0); } /* State 1 -- Out */ if (!OTR21_IN_STATE && OTR21_OUT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(217, 1); } /* State 2 -- In */ if ( OTR21_IN_STATE && !OTR21_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(217, 2); } /* State 3 -- Broken */ if ( OTR21_IN_STATE && OTR21_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(217, 3); } /* BLM Raw Charge Thresholds: UND 921 */ /* State 0 -- Broken */ if (!BLM_UND1_921_LOSS_H_THRESHOLD && !BLM_UND1_921_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(140, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_921_LOSS_H_THRESHOLD && BLM_UND1_921_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(140, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_921_LOSS_H_THRESHOLD && !BLM_UND1_921_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(140, 2); } /* State 3 -- OK */ if ( BLM_UND1_921_LOSS_H_THRESHOLD && BLM_UND1_921_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(140, 3); } /* BLM Raw Charge Thresholds: LTU1 762 */ /* State 0 -- Broken */ if (!BLM_LTU1_762_LOSS_H_THRESHOLD && !BLM_LTU1_762_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(100, 0); } /* State 1 -- Over High Threshold */ if (!BLM_LTU1_762_LOSS_H_THRESHOLD && BLM_LTU1_762_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(100, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_LTU1_762_LOSS_H_THRESHOLD && !BLM_LTU1_762_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(100, 2); } /* State 3 -- OK */ if ( BLM_LTU1_762_LOSS_H_THRESHOLD && BLM_LTU1_762_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(100, 3); } /* BLM Pedestal Thresholds: UND 1521 */ /* State 0 -- Broken */ if (!BLM_UND1_1521_PED_H_THRESHOLD && !BLM_UND1_1521_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(65, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1521_PED_H_THRESHOLD && BLM_UND1_1521_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(65, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1521_PED_H_THRESHOLD && !BLM_UND1_1521_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(65, 2); } /* State 3 -- OK */ if ( BLM_UND1_1521_PED_H_THRESHOLD && BLM_UND1_1521_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(65, 3); } /* BLM Argonne Heartbeat (LN33) */ /* State 0 -- Broken */ if (!BLM_UND1_920_TEST_H_THRESHOLD && !BLM_UND1_920_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(36, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_920_TEST_H_THRESHOLD && BLM_UND1_920_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(36, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_920_TEST_H_THRESHOLD && !BLM_UND1_920_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(36, 2); } /* State 3 -- OK */ if ( BLM_UND1_920_TEST_H_THRESHOLD && BLM_UND1_920_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(36, 3); } /* BFW 2110 Position */ /* State 0 -- Moving */ if (!BFW_UND1_2110_IN_STATE && !BFW_UND1_2110_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(14, 0); } /* State 1 -- Out */ if (!BFW_UND1_2110_IN_STATE && BFW_UND1_2110_OUT_STATE) { setNewTruthTableState(14, 1); } /* State 2 -- In */ if ( BFW_UND1_2110_IN_STATE && !BFW_UND1_2110_OUT_STATE) { setNewTruthTableState(14, 2); } /* State 3 -- Broken */ if ( BFW_UND1_2110_IN_STATE && BFW_UND1_2110_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(14, 3); } /* BLM Raw Charge Thresholds: UND 2821 */ /* State 0 -- Broken */ if (!BLM_2820_QBH_THRESHOLD && !BLM_2820_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(126, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2820_QBH_THRESHOLD && BLM_2820_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(126, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2820_QBH_THRESHOLD && !BLM_2820_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(126, 2); } /* State 3 -- OK */ if ( BLM_2820_QBH_THRESHOLD && BLM_2820_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(126, 3); } /* BLM Raw Charge Thresholds: UND 821 */ /* State 0 -- Broken */ if (!BLM_UND1_821_LOSS_H_THRESHOLD && !BLM_UND1_821_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(138, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_821_LOSS_H_THRESHOLD && BLM_UND1_821_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(138, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_821_LOSS_H_THRESHOLD && !BLM_UND1_821_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(138, 2); } /* State 3 -- OK */ if ( BLM_UND1_821_LOSS_H_THRESHOLD && BLM_UND1_821_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(138, 3); } /* BLM Pedestal Thresholds: UND 321 */ /* State 0 -- Broken */ if (!BLM_UND1_321_PED_H_THRESHOLD && !BLM_UND1_321_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(85, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_321_PED_H_THRESHOLD && BLM_UND1_321_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(85, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_321_PED_H_THRESHOLD && !BLM_UND1_321_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(85, 2); } /* State 3 -- OK */ if ( BLM_UND1_321_PED_H_THRESHOLD && BLM_UND1_321_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(85, 3); } /* BFW 1910 Position */ /* State 0 -- Moving */ if (!BFW_UND1_1910_IN_STATE && !BFW_UND1_1910_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(11, 0); } /* State 1 -- Out */ if (!BFW_UND1_1910_IN_STATE && BFW_UND1_1910_OUT_STATE) { setNewTruthTableState(11, 1); } /* State 2 -- In */ if ( BFW_UND1_1910_IN_STATE && !BFW_UND1_1910_OUT_STATE) { setNewTruthTableState(11, 2); } /* State 3 -- Broken */ if ( BFW_UND1_1910_IN_STATE && BFW_UND1_1910_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(11, 3); } /* BFW 2710 Position */ /* State 0 -- Moving */ if (!BFW_UND1_2710_IN_STATE && !BFW_UND1_2710_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(20, 0); } /* State 1 -- Out */ if (!BFW_UND1_2710_IN_STATE && BFW_UND1_2710_OUT_STATE) { setNewTruthTableState(20, 1); } /* State 2 -- In */ if ( BFW_UND1_2710_IN_STATE && !BFW_UND1_2710_OUT_STATE) { setNewTruthTableState(20, 2); } /* State 3 -- Broken */ if ( BFW_UND1_2710_IN_STATE && BFW_UND1_2710_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(20, 3); } /* BLM Trigger Missed (LN36) */ /* State 0 -- Missed */ if (!BLM_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(147, 0); } /* State 1 -- OK */ if ( BLM_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(147, 1); } /* BLM Pedestal Thresholds: UND 721 */ /* State 0 -- Broken */ if (!BLM_UND1_721_PED_H_THRESHOLD && !BLM_UND1_721_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(92, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_721_PED_H_THRESHOLD && BLM_UND1_721_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(92, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_721_PED_H_THRESHOLD && !BLM_UND1_721_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(92, 2); } /* State 3 -- OK */ if ( BLM_UND1_721_PED_H_THRESHOLD && BLM_UND1_721_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(92, 3); } /* BFW 710 Position */ /* State 0 -- Moving */ if (!BFW_UND1_710_IN_STATE && !BFW_UND1_710_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(31, 0); } /* State 1 -- Out */ if (!BFW_UND1_710_IN_STATE && BFW_UND1_710_OUT_STATE) { setNewTruthTableState(31, 1); } /* State 2 -- In */ if ( BFW_UND1_710_IN_STATE && !BFW_UND1_710_OUT_STATE) { setNewTruthTableState(31, 2); } /* State 3 -- Broken */ if ( BFW_UND1_710_IN_STATE && BFW_UND1_710_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(31, 3); } /* Toroid Comparator Power Status (B921) */ /* State 0 -- Powered Off */ if (!COMP_STAT_ON_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(259, 0); } /* State 1 -- Powered On */ if ( COMP_STAT_ON_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(259, 1); } /* Magnet Power: QUM4 */ /* State 0 -- Off */ if (!QUAD_LTU1_880_STATE_STATUS) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(202, 0); } /* State 1 -- On */ if ( QUAD_LTU1_880_STATE_STATUS) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(202, 1); } /* BLM Raw Charge Thresholds: UND 1221 */ /* State 0 -- Broken */ if (!BLM_UND1_1221_LOSS_H_THRESHOLD && !BLM_UND1_1221_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(107, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1221_LOSS_H_THRESHOLD && BLM_UND1_1221_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(107, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1221_LOSS_H_THRESHOLD && !BLM_UND1_1221_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(107, 2); } /* State 3 -- OK */ if ( BLM_UND1_1221_LOSS_H_THRESHOLD && BLM_UND1_1221_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(107, 3); } /* LION585 Threshold */ /* State 0 -- Exceeded */ if (!LION585_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(175, 0); } /* State 1 -- OK */ if ( LION585_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(175, 1); } /* BFW 2210 Position */ /* State 0 -- Moving */ if (!BFW_UND1_2210_IN_STATE && !BFW_UND1_2210_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(15, 0); } /* State 1 -- Out */ if (!BFW_UND1_2210_IN_STATE && BFW_UND1_2210_OUT_STATE) { setNewTruthTableState(15, 1); } /* State 2 -- In */ if ( BFW_UND1_2210_IN_STATE && !BFW_UND1_2210_OUT_STATE) { setNewTruthTableState(15, 2); } /* State 3 -- Broken */ if ( BFW_UND1_2210_IN_STATE && BFW_UND1_2210_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(15, 3); } /* BLM PEP Timing Check (LN35) */ /* State 0 -- Broken */ if (!BLM_UND1_1421_TEST_H_THRESHOLD && !BLM_UND1_1421_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(50, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1421_TEST_H_THRESHOLD && BLM_UND1_1421_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(50, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1421_TEST_H_THRESHOLD && !BLM_UND1_1421_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(50, 2); } /* State 3 -- OK */ if ( BLM_UND1_1421_TEST_H_THRESHOLD && BLM_UND1_1421_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(50, 3); } /* BLM Raw Charge Thresholds: UND BLF17 */ /* State 0 -- Broken */ if (!BLM_UND1_BLF17_LOSS_H_THRESHOLD && !BLM_UND1_BLF17_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(142, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_BLF17_LOSS_H_THRESHOLD && BLM_UND1_BLF17_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(142, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_BLF17_LOSS_H_THRESHOLD && !BLM_UND1_BLF17_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(142, 2); } /* State 3 -- OK */ if ( BLM_UND1_BLF17_LOSS_H_THRESHOLD && BLM_UND1_BLF17_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(142, 3); } /* BLM Pedestal Threshold: LTU1 772 */ /* State 0 -- Broken */ if (!BLM_LTU1_772_PED_H_THRESHOLD && !BLM_LTU1_772_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(56, 0); } /* State 1 -- Over High Threshold */ if (!BLM_LTU1_772_PED_H_THRESHOLD && BLM_LTU1_772_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(56, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_LTU1_772_PED_H_THRESHOLD && !BLM_LTU1_772_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(56, 2); } /* State 3 -- OK */ if ( BLM_LTU1_772_PED_H_THRESHOLD && BLM_LTU1_772_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(56, 3); } /* BLM Raw Charge Thresholds: LTU1 722 */ /* State 0 -- Broken */ if (!BLM_LTU1_722_LOSS_H_THRESHOLD && !BLM_LTU1_722_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(98, 0); } /* State 1 -- Over High Threshold */ if (!BLM_LTU1_722_LOSS_H_THRESHOLD && BLM_LTU1_722_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(98, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_LTU1_722_LOSS_H_THRESHOLD && !BLM_LTU1_722_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(98, 2); } /* State 3 -- OK */ if ( BLM_LTU1_722_LOSS_H_THRESHOLD && BLM_LTU1_722_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(98, 3); } /* BLM Pedestal Thresholds: UND 1721 */ /* State 0 -- Broken */ if (!BLM_UND1_1721_PED_H_THRESHOLD && !BLM_UND1_1721_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(68, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1721_PED_H_THRESHOLD && BLM_UND1_1721_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(68, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1721_PED_H_THRESHOLD && !BLM_UND1_1721_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(68, 2); } /* State 3 -- OK */ if ( BLM_UND1_1721_PED_H_THRESHOLD && BLM_UND1_1721_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(68, 3); } /* BLM Raw Charge Thresholds: UND 1821 */ /* State 0 -- Broken */ if (!BLM_UND1_1821_LOSS_H_THRESHOLD && !BLM_UND1_1821_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(114, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1821_LOSS_H_THRESHOLD && BLM_UND1_1821_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(114, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1821_LOSS_H_THRESHOLD && !BLM_UND1_1821_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(114, 2); } /* State 3 -- OK */ if ( BLM_UND1_1821_LOSS_H_THRESHOLD && BLM_UND1_1821_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(114, 3); } /* BLM Raw Charge Thresholds: UND 120 */ /* State 0 -- Broken */ if (!BLM_UND1_120_LOSS_H_THRESHOLD && !BLM_UND1_120_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(105, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_120_LOSS_H_THRESHOLD && BLM_UND1_120_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(105, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_120_LOSS_H_THRESHOLD && !BLM_UND1_120_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(105, 2); } /* State 3 -- OK */ if ( BLM_UND1_120_LOSS_H_THRESHOLD && BLM_UND1_120_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(105, 3); } /* BLM Raw Charge Thresholds: UND 1921 */ /* State 0 -- Broken */ if (!BLM_UND1_1921_LOSS_H_THRESHOLD && !BLM_UND1_1921_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(115, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1921_LOSS_H_THRESHOLD && BLM_UND1_1921_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(115, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1921_LOSS_H_THRESHOLD && !BLM_UND1_1921_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(115, 2); } /* State 3 -- OK */ if ( BLM_UND1_1921_LOSS_H_THRESHOLD && BLM_UND1_1921_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(115, 3); } /* BFW 110 Position */ /* State 0 -- Moving */ if (!BFW_UND1_110_IN_STATE && !BFW_UND1_110_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(2, 0); } /* State 1 -- Out */ if (!BFW_UND1_110_IN_STATE && BFW_UND1_110_OUT_STATE) { setNewTruthTableState(2, 1); } /* State 2 -- In */ if ( BFW_UND1_110_IN_STATE && !BFW_UND1_110_OUT_STATE) { setNewTruthTableState(2, 2); } /* State 3 -- Broken */ if ( BFW_UND1_110_IN_STATE && BFW_UND1_110_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(2, 3); } /* BFW 1210 Position */ /* State 0 -- Moving */ if (!BFW_UND1_1210_IN_STATE && !BFW_UND1_1210_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(4, 0); } /* State 1 -- Out */ if (!BFW_UND1_1210_IN_STATE && BFW_UND1_1210_OUT_STATE) { setNewTruthTableState(4, 1); } /* State 2 -- In */ if ( BFW_UND1_1210_IN_STATE && !BFW_UND1_1210_OUT_STATE) { setNewTruthTableState(4, 2); } /* State 3 -- Broken */ if ( BFW_UND1_1210_IN_STATE && BFW_UND1_1210_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(4, 3); } /* BLM Pedestal Thresholds: UND 1621 */ /* State 0 -- Broken */ if (!BLM_UND1_1621_PED_H_THRESHOLD && !BLM_UND1_1621_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(66, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1621_PED_H_THRESHOLD && BLM_UND1_1621_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(66, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1621_PED_H_THRESHOLD && !BLM_UND1_1621_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(66, 2); } /* State 3 -- OK */ if ( BLM_UND1_1621_PED_H_THRESHOLD && BLM_UND1_1621_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(66, 3); } /* LION584 Threshold */ /* State 0 -- Exceeded */ if (!LION584_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(174, 0); } /* State 1 -- OK */ if ( LION584_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(174, 1); } /* BLM Raw Charge Thresholds: UND 721 */ /* State 0 -- Broken */ if (!BLM_UND1_721_LOSS_H_THRESHOLD && !BLM_UND1_721_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(137, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_721_LOSS_H_THRESHOLD && BLM_UND1_721_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(137, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_721_LOSS_H_THRESHOLD && !BLM_UND1_721_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(137, 2); } /* State 3 -- OK */ if ( BLM_UND1_721_LOSS_H_THRESHOLD && BLM_UND1_721_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(137, 3); } /* BFW 2010 Position */ /* State 0 -- Moving */ if (!BFW_UND1_2010_IN_STATE && !BFW_UND1_2010_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(12, 0); } /* State 1 -- Out */ if (!BFW_UND1_2010_IN_STATE && BFW_UND1_2010_OUT_STATE) { setNewTruthTableState(12, 1); } /* State 2 -- In */ if ( BFW_UND1_2010_IN_STATE && !BFW_UND1_2010_OUT_STATE) { setNewTruthTableState(12, 2); } /* State 3 -- Broken */ if ( BFW_UND1_2010_IN_STATE && BFW_UND1_2010_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(12, 3); } /* BLM Raw Charge Thresholds: UND 1021 */ /* State 0 -- Broken */ if (!BLM_UND1_1021_LOSS_H_THRESHOLD && !BLM_UND1_1021_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(103, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1021_LOSS_H_THRESHOLD && BLM_UND1_1021_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(103, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1021_LOSS_H_THRESHOLD && !BLM_UND1_1021_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(103, 2); } /* State 3 -- OK */ if ( BLM_UND1_1021_LOSS_H_THRESHOLD && BLM_UND1_1021_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(103, 3); } /* BLM Pedestal Thresholds: UND 2520 */ /* State 0 -- Broken */ if (!BLM_2520_QBLH_THRESHOLD && !BLM_2520_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(77, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2520_QBLH_THRESHOLD && BLM_2520_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(77, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2520_QBLH_THRESHOLD && !BLM_2520_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(77, 2); } /* State 3 -- OK */ if ( BLM_2520_QBLH_THRESHOLD && BLM_2520_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(77, 3); } /* BLM Pedestal Thresholds: UND 1021 */ /* State 0 -- Broken */ if (!BLM_UND1_1021_PED_H_THRESHOLD && !BLM_UND1_1021_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(58, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1021_PED_H_THRESHOLD && BLM_UND1_1021_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(58, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1021_PED_H_THRESHOLD && !BLM_UND1_1021_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(58, 2); } /* State 3 -- OK */ if ( BLM_UND1_1021_PED_H_THRESHOLD && BLM_UND1_1021_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(58, 3); } /* Magnet In Tolerance: QE31 */ /* State 0 -- No */ if (!QUAD_LTU1_720_INTOL_STATUS) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(192, 0); } /* State 1 -- Yes */ if ( QUAD_LTU1_720_INTOL_STATUS) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(192, 1); } /* BLM PEP Timing Check (LN30) */ /* State 0 -- Broken */ if (!BLM_LTU1_722_TEST_H_THRESHOLD && !BLM_LTU1_722_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(47, 0); } /* State 1 -- Over High Threshold */ if (!BLM_LTU1_722_TEST_H_THRESHOLD && BLM_LTU1_722_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(47, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_LTU1_722_TEST_H_THRESHOLD && !BLM_LTU1_722_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(47, 2); } /* State 3 -- OK */ if ( BLM_LTU1_722_TEST_H_THRESHOLD && BLM_LTU1_722_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(47, 3); } /* BLM Argonne Heartbeat (LN37) */ /* State 0 -- Broken */ if (!BLM_UND1_3320_TEST_H_THRESHOLD && !BLM_UND1_3320_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(39, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_3320_TEST_H_THRESHOLD && BLM_UND1_3320_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(39, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_3320_TEST_H_THRESHOLD && !BLM_UND1_3320_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(39, 2); } /* State 3 -- OK */ if ( BLM_UND1_3320_TEST_H_THRESHOLD && BLM_UND1_3320_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(39, 3); } /* BLM Raw Charge Thresholds: UND 1321 */ /* State 0 -- Broken */ if (!BLM_UND1_1321_LOSS_H_THRESHOLD && !BLM_UND1_1321_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(108, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1321_LOSS_H_THRESHOLD && BLM_UND1_1321_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(108, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1321_LOSS_H_THRESHOLD && !BLM_UND1_1321_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(108, 2); } /* State 3 -- OK */ if ( BLM_UND1_1321_LOSS_H_THRESHOLD && BLM_UND1_1321_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(108, 3); } /* BLM Pedestal Thresholds: UND 3021 */ /* State 0 -- Broken */ if (!BLM_UND1_3021_PED_H_THRESHOLD && !BLM_UND1_3021_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(83, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_3021_PED_H_THRESHOLD && BLM_UND1_3021_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(83, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_3021_PED_H_THRESHOLD && !BLM_UND1_3021_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(83, 2); } /* State 3 -- OK */ if ( BLM_UND1_3021_PED_H_THRESHOLD && BLM_UND1_3021_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(83, 3); } /* BLM Pedestal Thresholds: UND 920 */ /* State 0 -- Broken */ if (!BLM_UND1_920_PED_H_THRESHOLD && !BLM_UND1_920_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(94, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_920_PED_H_THRESHOLD && BLM_UND1_920_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(94, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_920_PED_H_THRESHOLD && !BLM_UND1_920_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(94, 2); } /* State 3 -- OK */ if ( BLM_UND1_920_PED_H_THRESHOLD && BLM_UND1_920_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(94, 3); } /* BLM Raw Charge Thresholds: UND 321 */ /* State 0 -- Broken */ if (!BLM_UND1_321_LOSS_H_THRESHOLD && !BLM_UND1_321_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(130, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_321_LOSS_H_THRESHOLD && BLM_UND1_321_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(130, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_321_LOSS_H_THRESHOLD && !BLM_UND1_321_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(130, 2); } /* State 3 -- OK */ if ( BLM_UND1_321_LOSS_H_THRESHOLD && BLM_UND1_321_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(130, 3); } /* BPM Summary (10-18) */ /* State 0 -- Faulted */ if (!BPM_SUM2_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(150, 0); } /* State 1 -- OK */ if ( BPM_SUM2_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(150, 1); } /* BFW 1810 Position */ /* State 0 -- Moving */ if (!BFW_UND1_1810_IN_STATE && !BFW_UND1_1810_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(10, 0); } /* State 1 -- Out */ if (!BFW_UND1_1810_IN_STATE && BFW_UND1_1810_OUT_STATE) { setNewTruthTableState(10, 1); } /* State 2 -- In */ if ( BFW_UND1_1810_IN_STATE && !BFW_UND1_1810_OUT_STATE) { setNewTruthTableState(10, 2); } /* State 3 -- Broken */ if ( BFW_UND1_1810_IN_STATE && BFW_UND1_1810_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(10, 3); } /* BLM Pedestal Thresholds: UND 221 */ /* State 0 -- Broken */ if (!BLM_UND1_221_PED_H_THRESHOLD && !BLM_UND1_221_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(73, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_221_PED_H_THRESHOLD && BLM_UND1_221_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(73, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_221_PED_H_THRESHOLD && !BLM_UND1_221_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(73, 2); } /* State 3 -- OK */ if ( BLM_UND1_221_PED_H_THRESHOLD && BLM_UND1_221_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(73, 3); } /* BLM Pedestal Thresholds: UND 1821 */ /* State 0 -- Broken */ if (!BLM_UND1_1821_PED_H_THRESHOLD && !BLM_UND1_1821_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(69, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1821_PED_H_THRESHOLD && BLM_UND1_1821_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(69, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1821_PED_H_THRESHOLD && !BLM_UND1_1821_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(69, 2); } /* State 3 -- OK */ if ( BLM_UND1_1821_PED_H_THRESHOLD && BLM_UND1_1821_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(69, 3); } /* BPM Summary (1-9) */ /* State 0 -- Faulted */ if (!BPM_SUM1_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(149, 0); } /* State 1 -- OK */ if ( BPM_SUM1_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(149, 1); } /* BLM Pedestal Thresholds: LTU1 980 */ /* State 0 -- Broken */ if (!BLM_LTU1_980_PED_H_THRESHOLD && !BLM_LTU1_980_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(57, 0); } /* State 1 -- Over High Threshold */ if (!BLM_LTU1_980_PED_H_THRESHOLD && BLM_LTU1_980_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(57, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_LTU1_980_PED_H_THRESHOLD && !BLM_LTU1_980_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(57, 2); } /* State 3 -- OK */ if ( BLM_LTU1_980_PED_H_THRESHOLD && BLM_LTU1_980_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(57, 3); } /* Magnet Power: QUM1 */ /* State 0 -- Off */ if (!QUAD_LTU1_820_STATE_STATUS) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(199, 0); } /* State 1 -- On */ if ( QUAD_LTU1_820_STATE_STATUS) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(199, 1); } /* BFW Inserted Count */ state = (unsigned int) -1; /* Initialize to an unlikely state number */ { unsigned int beamFinderWireInCount = 0; /* "BFW UND1 XXX" is IN when BFW_UND1_XXX == 0 */ if (!( BFW_UND1_110_OUT_STATE)) { beamFinderWireInCount++; } if (!( BFW_UND1_210_OUT_STATE)) { beamFinderWireInCount++; } if (!( BFW_UND1_310_OUT_STATE)) { beamFinderWireInCount++; } if (!( BFW_UND1_410_OUT_STATE)) { beamFinderWireInCount++; } if (!( BFW_UND1_510_OUT_STATE)) { beamFinderWireInCount++; } if (!( BFW_UND1_610_OUT_STATE)) { beamFinderWireInCount++; } if (!( BFW_UND1_710_OUT_STATE)) { beamFinderWireInCount++; } if (!( BFW_UND1_810_OUT_STATE)) { beamFinderWireInCount++; } if (!( BFW_UND1_910_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_1010_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_1110_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_1210_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_1310_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_1410_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_1510_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_1610_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_1710_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_1810_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_1910_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_2010_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_2110_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_2210_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_2310_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_2410_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_2510_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_2610_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_2710_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_2810_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_2910_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_3010_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_3110_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_3210_OUT_STATE)) { beamFinderWireInCount++; } if (!(BFW_UND1_3310_OUT_STATE)) { beamFinderWireInCount++; } switch(beamFinderWireInCount) { case 0: state = 0; break; /* No BFWs in */ case 1: state = 1; break; /* One BFW in */ default: state = 2; break; /* More than one BFW in */ } } switch(state) { /* No BFWs In */ case 0: setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(34, 0); break; /* One BFW In */ case 1: setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(34, 1); break; /* More Than One BFW In */ case 2: default: setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(34, 2); break; } /* BFW 2910 Position */ /* State 0 -- Moving */ if (!BFW_UND1_2910_IN_STATE && !BFW_UND1_2910_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(22, 0); } /* State 1 -- Out */ if (!BFW_UND1_2910_IN_STATE && BFW_UND1_2910_OUT_STATE) { setNewTruthTableState(22, 1); } /* State 2 -- In */ if ( BFW_UND1_2910_IN_STATE && !BFW_UND1_2910_OUT_STATE) { setNewTruthTableState(22, 2); } /* State 3 -- Broken */ if ( BFW_UND1_2910_IN_STATE && BFW_UND1_2910_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(22, 3); } /* OTR BL571 Position and TDUND Not In */ /* State 0 -- Moving */ if (!OT_BL571_IN_LIMIT_STATE && !OT_BL571_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(211, 0); } /* State 1 -- Out */ if (!OT_BL571_IN_LIMIT_STATE && OT_BL571_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(211, 1); } /* State 2 -- In */ if ( OT_BL571_IN_LIMIT_STATE && !OT_BL571_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(211, 2); } /* State 3 -- Broken */ if ( OT_BL571_IN_LIMIT_STATE && OT_BL571_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(211, 3); } /* LION752 Threshold */ /* State 0 -- Exceeded */ if (!LION752_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(180, 0); } /* State 1 -- OK */ if ( LION752_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(180, 1); } /* BLM PEP Timing Check (LN37) */ /* State 0 -- Broken */ if (!BLM_UND1_3021_TEST_H_THRESHOLD && !BLM_UND1_3021_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(52, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_3021_TEST_H_THRESHOLD && BLM_UND1_3021_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(52, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_3021_TEST_H_THRESHOLD && !BLM_UND1_3021_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(52, 2); } /* State 3 -- OK */ if ( BLM_UND1_3021_TEST_H_THRESHOLD && BLM_UND1_3021_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(52, 3); } /* OTR BL541 Position and TDUND Not In */ /* State 0 -- Moving */ if (!OT_BL541_IN_LIMIT_STATE && !OT_BL541_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(209, 0); } /* State 1 -- Out */ if (!OT_BL541_IN_LIMIT_STATE && OT_BL541_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(209, 1); } /* State 2 -- In */ if ( OT_BL541_IN_LIMIT_STATE && !OT_BL541_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(209, 2); } /* State 3 -- Broken */ if ( OT_BL541_IN_LIMIT_STATE && OT_BL541_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(209, 3); } /* BLM Raw Charge Thresholds: UND 521 */ /* State 0 -- Broken */ if (!BLM_UND1_521_LOSS_H_THRESHOLD && !BLM_UND1_521_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(135, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_521_LOSS_H_THRESHOLD && BLM_UND1_521_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(135, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_521_LOSS_H_THRESHOLD && !BLM_UND1_521_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(135, 2); } /* State 3 -- OK */ if ( BLM_UND1_521_LOSS_H_THRESHOLD && BLM_UND1_521_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(135, 3); } /* BLM Trigger Missed (LN33) */ /* State 0 -- Missed */ if (!BLM_UND1_6_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(145, 0); } /* State 1 -- OK */ if ( BLM_UND1_6_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(145, 1); } /* BLM Raw Charge Thresholds: UND 621 */ /* State 0 -- Broken */ if (!BLM_UND1_621_LOSS_H_THRESHOLD && !BLM_UND1_621_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(136, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_621_LOSS_H_THRESHOLD && BLM_UND1_621_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(136, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_621_LOSS_H_THRESHOLD && !BLM_UND1_621_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(136, 2); } /* State 3 -- OK */ if ( BLM_UND1_621_LOSS_H_THRESHOLD && BLM_UND1_621_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(136, 3); } /* BLM Trigger Missed (LN35) */ /* State 0 -- Missed */ if (!BLM_UND1_14_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(146, 0); } /* State 1 -- OK */ if ( BLM_UND1_14_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(146, 1); } /* BLM HVPS UND1 120 */ /* State 0 -- Broken */ if (!HVPS_UND1_120_HIGH_FAULT && !HVPS_UND1_120_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(41, 0); } /* State 1 -- Over High Threshold */ if (!HVPS_UND1_120_HIGH_FAULT && HVPS_UND1_120_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(41, 1); } /* State 2 -- Under Low Threshold */ if ( HVPS_UND1_120_HIGH_FAULT && !HVPS_UND1_120_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(41, 2); } /* State 3 -- OK */ if ( HVPS_UND1_120_HIGH_FAULT && HVPS_UND1_120_LOW_FAULT) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(41, 3); } /* Magnet In Tolerance: QUM1 */ /* State 0 -- No */ if (!QUAD_LTU1_820_INTOL_STATUS) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(193, 0); } /* State 1 -- Yes */ if ( QUAD_LTU1_820_INTOL_STATUS) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(193, 1); } /* BFW 1310 Position */ /* State 0 -- Moving */ if (!BFW_UND1_1310_IN_STATE && !BFW_UND1_1310_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(5, 0); } /* State 1 -- Out */ if (!BFW_UND1_1310_IN_STATE && BFW_UND1_1310_OUT_STATE) { setNewTruthTableState(5, 1); } /* State 2 -- In */ if ( BFW_UND1_1310_IN_STATE && !BFW_UND1_1310_OUT_STATE) { setNewTruthTableState(5, 2); } /* State 3 -- Broken */ if ( BFW_UND1_1310_IN_STATE && BFW_UND1_1310_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(5, 3); } /* BLM HVPS UND1 2221 */ /* State 0 -- Broken */ if (!HVPS_UND1_2221_HIGH_FAULT && !HVPS_UND1_2221_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(43, 0); } /* State 1 -- Over High Threshold */ if (!HVPS_UND1_2221_HIGH_FAULT && HVPS_UND1_2221_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(43, 1); } /* State 2 -- Under Low Threshold */ if ( HVPS_UND1_2221_HIGH_FAULT && !HVPS_UND1_2221_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(43, 2); } /* State 3 -- OK */ if ( HVPS_UND1_2221_HIGH_FAULT && HVPS_UND1_2221_LOW_FAULT) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(43, 3); } /* BLM Raw Charge Thresholds: UND 1721 */ /* State 0 -- Broken */ if (!BLM_UND1_1721_LOSS_H_THRESHOLD && !BLM_UND1_1721_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(113, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1721_LOSS_H_THRESHOLD && BLM_UND1_1721_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(113, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1721_LOSS_H_THRESHOLD && !BLM_UND1_1721_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(113, 2); } /* State 3 -- OK */ if ( BLM_UND1_1721_LOSS_H_THRESHOLD && BLM_UND1_1721_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(113, 3); } /* BFW 1110 Position */ /* State 0 -- Moving */ if (!BFW_UND1_1110_IN_STATE && !BFW_UND1_1110_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(3, 0); } /* State 1 -- Out */ if (!BFW_UND1_1110_IN_STATE && BFW_UND1_1110_OUT_STATE) { setNewTruthTableState(3, 1); } /* State 2 -- In */ if ( BFW_UND1_1110_IN_STATE && !BFW_UND1_1110_OUT_STATE) { setNewTruthTableState(3, 2); } /* State 3 -- Broken */ if ( BFW_UND1_1110_IN_STATE && BFW_UND1_1110_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(3, 3); } /* LION717 Threshold */ /* State 0 -- Exceeded */ if (!LION717_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(177, 0); } /* State 1 -- OK */ if ( LION717_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(177, 1); } /* BLM Raw Charge Thresholds: UND 421 */ /* State 0 -- Broken */ if (!BLM_UND1_421_LOSS_H_THRESHOLD && !BLM_UND1_421_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(134, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_421_LOSS_H_THRESHOLD && BLM_UND1_421_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(134, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_421_LOSS_H_THRESHOLD && !BLM_UND1_421_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(134, 2); } /* State 3 -- OK */ if ( BLM_UND1_421_LOSS_H_THRESHOLD && BLM_UND1_421_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(134, 3); } /* BLM Raw Charge Thresholds: UND 2121 */ /* State 0 -- Broken */ if (!BLM_UND1_2121_LOSS_H_THRESHOLD && !BLM_UND1_2121_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(117, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_2121_LOSS_H_THRESHOLD && BLM_UND1_2121_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(117, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_2121_LOSS_H_THRESHOLD && !BLM_UND1_2121_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(117, 2); } /* State 3 -- OK */ if ( BLM_UND1_2121_LOSS_H_THRESHOLD && BLM_UND1_2121_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(117, 3); } /* BLM Pedestal Thresholds: UND 421 */ /* State 0 -- Broken */ if (!BLM_UND1_421_PED_H_THRESHOLD && !BLM_UND1_421_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(89, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_421_PED_H_THRESHOLD && BLM_UND1_421_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(89, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_421_PED_H_THRESHOLD && !BLM_UND1_421_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(89, 2); } /* State 3 -- OK */ if ( BLM_UND1_421_PED_H_THRESHOLD && BLM_UND1_421_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(89, 3); } /* BLM Raw Charge Thresholds: UND 3221 */ /* State 0 -- Broken */ if (!BLM_UND1_3221_LOSS_H_THRESHOLD && !BLM_UND1_3221_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(131, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_3221_LOSS_H_THRESHOLD && BLM_UND1_3221_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(131, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_3221_LOSS_H_THRESHOLD && !BLM_UND1_3221_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(131, 2); } /* State 3 -- OK */ if ( BLM_UND1_3221_LOSS_H_THRESHOLD && BLM_UND1_3221_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(131, 3); } /* OTR BL711 Position and TDUND Not In */ /* State 0 -- Moving */ if (!OT_BL711_IN_LIMIT_STATE && !OT_BL711_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(215, 0); } /* State 1 -- Out */ if (!OT_BL711_IN_LIMIT_STATE && OT_BL711_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(215, 1); } /* State 2 -- In */ if ( OT_BL711_IN_LIMIT_STATE && !OT_BL711_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(215, 2); } /* State 3 -- Broken */ if ( OT_BL711_IN_LIMIT_STATE && OT_BL711_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(215, 3); } /* BLM Raw Charge Thresholds: UND 2321 */ /* State 0 -- Broken */ if (!BLM_2320_QBH_THRESHOLD && !BLM_2320_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(120, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2320_QBH_THRESHOLD && BLM_2320_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(120, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2320_QBH_THRESHOLD && !BLM_2320_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(120, 2); } /* State 3 -- OK */ if ( BLM_2320_QBH_THRESHOLD && BLM_2320_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(120, 3); } /* BLM Raw Charge Thresholds: UND 920 */ /* State 0 -- Broken */ if (!BLM_UND1_920_LOSS_H_THRESHOLD && !BLM_UND1_920_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(139, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_920_LOSS_H_THRESHOLD && BLM_UND1_920_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(139, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_920_LOSS_H_THRESHOLD && !BLM_UND1_920_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(139, 2); } /* State 3 -- OK */ if ( BLM_UND1_920_LOSS_H_THRESHOLD && BLM_UND1_920_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(139, 3); } /* Magnet In Tolerance: QUM2 */ /* State 0 -- No */ if (!QUAD_LTU1_840_INTOL_STATUS) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(194, 0); } /* State 1 -- Yes */ if ( QUAD_LTU1_840_INTOL_STATUS) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(194, 1); } /* BFW 3210 Position */ /* State 0 -- Moving */ if (!BFW_UND1_3210_IN_STATE && !BFW_UND1_3210_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(26, 0); } /* State 1 -- Out */ if (!BFW_UND1_3210_IN_STATE && BFW_UND1_3210_OUT_STATE) { setNewTruthTableState(26, 1); } /* State 2 -- In */ if ( BFW_UND1_3210_IN_STATE && !BFW_UND1_3210_OUT_STATE) { setNewTruthTableState(26, 2); } /* State 3 -- Broken */ if ( BFW_UND1_3210_IN_STATE && BFW_UND1_3210_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(26, 3); } /* Magnet Power: QUM3 */ /* State 0 -- Off */ if (!QUAD_LTU1_860_STATE_STATUS) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(201, 0); } /* State 1 -- On */ if ( QUAD_LTU1_860_STATE_STATUS) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(201, 1); } /* BLM Pedestal Thresholds: UND 2421 */ /* State 0 -- Broken */ if (!BLM_2420_QBLH_THRESHOLD && !BLM_2420_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(76, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2420_QBLH_THRESHOLD && BLM_2420_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(76, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2420_QBLH_THRESHOLD && !BLM_2420_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(76, 2); } /* State 3 -- OK */ if ( BLM_2420_QBLH_THRESHOLD && BLM_2420_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(76, 3); } /* BLM Pedestal Thresholds: UND BLF17 */ /* State 0 -- Broken */ if (!BLM_UND1_BLF17_PED_H_THRESHOLD && !BLM_UND1_BLF17_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(97, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_BLF17_PED_H_THRESHOLD && BLM_UND1_BLF17_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(97, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_BLF17_PED_H_THRESHOLD && !BLM_UND1_BLF17_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(97, 2); } /* State 3 -- OK */ if ( BLM_UND1_BLF17_PED_H_THRESHOLD && BLM_UND1_BLF17_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(97, 3); } /* BLM Pedestal Threshold: LTU1 732 */ /* State 0 -- Broken */ if (!BLM_LTU1_732_PED_H_THRESHOLD && !BLM_LTU1_732_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(54, 0); } /* State 1 -- Over High Threshold */ if (!BLM_LTU1_732_PED_H_THRESHOLD && BLM_LTU1_732_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(54, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_LTU1_732_PED_H_THRESHOLD && !BLM_LTU1_732_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(54, 2); } /* State 3 -- OK */ if ( BLM_LTU1_732_PED_H_THRESHOLD && BLM_LTU1_732_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(54, 3); } /* BFW 3010 Position */ /* State 0 -- Moving */ if (!BFW_UND1_3010_IN_STATE && !BFW_UND1_3010_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(23, 0); } /* State 1 -- Out */ if (!BFW_UND1_3010_IN_STATE && BFW_UND1_3010_OUT_STATE) { setNewTruthTableState(23, 1); } /* State 2 -- In */ if ( BFW_UND1_3010_IN_STATE && !BFW_UND1_3010_OUT_STATE) { setNewTruthTableState(23, 2); } /* State 3 -- Broken */ if ( BFW_UND1_3010_IN_STATE && BFW_UND1_3010_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(23, 3); } /* BLM Pedestal Thresholds: UND 2321 */ /* State 0 -- Broken */ if (!BLM_2320_QBLH_THRESHOLD && !BLM_2320_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(75, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2320_QBLH_THRESHOLD && BLM_2320_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(75, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2320_QBLH_THRESHOLD && !BLM_2320_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(75, 2); } /* State 3 -- OK */ if ( BLM_2320_QBLH_THRESHOLD && BLM_2320_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(75, 3); } /* BLM Raw Charge Thresholds: LTU1 980 */ /* State 0 -- Broken */ if (!BLM_LTU1_980_LOSS_H_THRESHOLD && !BLM_LTU1_980_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(102, 0); } /* State 1 -- Over High Threshold */ if (!BLM_LTU1_980_LOSS_H_THRESHOLD && BLM_LTU1_980_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(102, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_LTU1_980_LOSS_H_THRESHOLD && !BLM_LTU1_980_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(102, 2); } /* State 3 -- OK */ if ( BLM_LTU1_980_LOSS_H_THRESHOLD && BLM_LTU1_980_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(102, 3); } /* BLM Raw Charge Thresholds: UND 2921 */ /* State 0 -- Broken */ if (!BLM_2920_QBH_THRESHOLD && !BLM_2920_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(127, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2920_QBH_THRESHOLD && BLM_2920_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(127, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2920_QBH_THRESHOLD && !BLM_2920_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(127, 2); } /* State 3 -- OK */ if ( BLM_2920_QBH_THRESHOLD && BLM_2920_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(127, 3); } /* BLM Pedestal Thresholds: UND 3221 */ /* State 0 -- Broken */ if (!BLM_UND1_3221_PED_H_THRESHOLD && !BLM_UND1_3221_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(86, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_3221_PED_H_THRESHOLD && BLM_UND1_3221_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(86, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_3221_PED_H_THRESHOLD && !BLM_UND1_3221_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(86, 2); } /* State 3 -- OK */ if ( BLM_UND1_3221_PED_H_THRESHOLD && BLM_UND1_3221_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(86, 3); } /* BLM Raw Charge Thresholds: UND 121 */ /* State 0 -- Broken */ if (!BLM_UND1_121_LOSS_H_THRESHOLD && !BLM_UND1_121_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(106, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_121_LOSS_H_THRESHOLD && BLM_UND1_121_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(106, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_121_LOSS_H_THRESHOLD && !BLM_UND1_121_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(106, 2); } /* State 3 -- OK */ if ( BLM_UND1_121_LOSS_H_THRESHOLD && BLM_UND1_121_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(106, 3); } /* BLM Raw Charge Thresholds: UND 2520 */ /* State 0 -- Broken */ if (!BLM_2520_QBH_THRESHOLD && !BLM_2520_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(122, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2520_QBH_THRESHOLD && BLM_2520_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(122, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2520_QBH_THRESHOLD && !BLM_2520_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(122, 2); } /* State 3 -- OK */ if ( BLM_2520_QBH_THRESHOLD && BLM_2520_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(122, 3); } /* BLM Pedestal Thresholds: UND 2521 */ /* State 0 -- Broken */ if (!BLM_UND1_2521_PED_H_THRESHOLD && !BLM_UND1_2521_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(78, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_2521_PED_H_THRESHOLD && BLM_UND1_2521_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(78, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_2521_PED_H_THRESHOLD && !BLM_UND1_2521_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(78, 2); } /* State 3 -- OK */ if ( BLM_UND1_2521_PED_H_THRESHOLD && BLM_UND1_2521_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(78, 3); } /* Magnet Power: QUM2 */ /* State 0 -- Off */ if (!QUAD_LTU1_840_STATE_STATUS) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(200, 0); } /* State 1 -- On */ if ( QUAD_LTU1_840_STATE_STATUS) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(200, 1); } /* BLM Pedestal Thresholds: UND 3121 */ /* State 0 -- Broken */ if (!BLM_UND1_3121_PED_H_THRESHOLD && !BLM_UND1_3121_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(84, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_3121_PED_H_THRESHOLD && BLM_UND1_3121_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(84, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_3121_PED_H_THRESHOLD && !BLM_UND1_3121_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(84, 2); } /* State 3 -- OK */ if ( BLM_UND1_3121_PED_H_THRESHOLD && BLM_UND1_3121_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(84, 3); } /* BLM PEP Timing Check (LN32) */ /* State 0 -- Broken */ if (!BLM_LTU1_762_TEST_H_THRESHOLD && !BLM_LTU1_762_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(48, 0); } /* State 1 -- Over High Threshold */ if (!BLM_LTU1_762_TEST_H_THRESHOLD && BLM_LTU1_762_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(48, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_LTU1_762_TEST_H_THRESHOLD && !BLM_LTU1_762_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(48, 2); } /* State 3 -- OK */ if ( BLM_LTU1_762_TEST_H_THRESHOLD && BLM_LTU1_762_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(48, 3); } /* LION753 Threshold */ /* State 0 -- Exceeded */ if (!LION753_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(181, 0); } /* State 1 -- OK */ if ( LION753_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(181, 1); } /* BFW 2310 Position */ /* State 0 -- Moving */ if (!BFW_UND1_2310_IN_STATE && !BFW_UND1_2310_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(16, 0); } /* State 1 -- Out */ if (!BFW_UND1_2310_IN_STATE && BFW_UND1_2310_OUT_STATE) { setNewTruthTableState(16, 1); } /* State 2 -- In */ if ( BFW_UND1_2310_IN_STATE && !BFW_UND1_2310_OUT_STATE) { setNewTruthTableState(16, 2); } /* State 3 -- Broken */ if ( BFW_UND1_2310_IN_STATE && BFW_UND1_2310_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(16, 3); } /* LION405 Threshold */ /* State 0 -- Exceeded */ if (!LION405_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(171, 0); } /* State 1 -- OK */ if ( LION405_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(171, 1); } /* Magnet Power: QE31 */ /* State 0 -- Off */ if (!QUAD_LTU1_720_STATE_STATUS) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(198, 0); } /* State 1 -- On */ if ( QUAD_LTU1_720_STATE_STATUS) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(198, 1); } /* BLM HVPS UND1 920 */ /* State 0 -- Broken */ if (!HVPS_UND1_920_HIGH_FAULT && !HVPS_UND1_920_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(46, 0); } /* State 1 -- Over High Threshold */ if (!HVPS_UND1_920_HIGH_FAULT && HVPS_UND1_920_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(46, 1); } /* State 2 -- Under Low Threshold */ if ( HVPS_UND1_920_HIGH_FAULT && !HVPS_UND1_920_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(46, 2); } /* State 3 -- OK */ if ( HVPS_UND1_920_HIGH_FAULT && HVPS_UND1_920_LOW_FAULT) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(46, 3); } /* BLM Pedestal Thresholds: UND 2821 */ /* State 0 -- Broken */ if (!BLM_2820_QBLH_THRESHOLD && !BLM_2820_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(81, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2820_QBLH_THRESHOLD && BLM_2820_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(81, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2820_QBLH_THRESHOLD && !BLM_2820_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(81, 2); } /* State 3 -- OK */ if ( BLM_2820_QBLH_THRESHOLD && BLM_2820_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(81, 3); } /* BLM Raw Charge Thresholds: UND 3021 */ /* State 0 -- Broken */ if (!BLM_UND1_3021_LOSS_H_THRESHOLD && !BLM_UND1_3021_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(128, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_3021_LOSS_H_THRESHOLD && BLM_UND1_3021_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(128, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_3021_LOSS_H_THRESHOLD && !BLM_UND1_3021_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(128, 2); } /* State 3 -- OK */ if ( BLM_UND1_3021_LOSS_H_THRESHOLD && BLM_UND1_3021_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(128, 3); } /* BLM Raw Charge Thresholds: UND 1621 */ /* State 0 -- Broken */ if (!BLM_UND1_1621_LOSS_H_THRESHOLD && !BLM_UND1_1621_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(111, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1621_LOSS_H_THRESHOLD && BLM_UND1_1621_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(111, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1621_LOSS_H_THRESHOLD && !BLM_UND1_1621_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(111, 2); } /* State 3 -- OK */ if ( BLM_UND1_1621_LOSS_H_THRESHOLD && BLM_UND1_1621_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(111, 3); } /* BLM Trigger Missed (LN32) */ /* State 0 -- Missed */ if (!BLM_LTU1_762_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(144, 0); } /* State 1 -- OK */ if ( BLM_LTU1_762_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(144, 1); } /* BLM Pedestal Thresholds: UND 2221 */ /* State 0 -- Broken */ if (!BLM_2220_QBLH_THRESHOLD && !BLM_2220_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(74, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2220_QBLH_THRESHOLD && BLM_2220_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(74, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2220_QBLH_THRESHOLD && !BLM_2220_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(74, 2); } /* State 3 -- OK */ if ( BLM_2220_QBLH_THRESHOLD && BLM_2220_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(74, 3); } /* BLM Raw Charge Thresholds: UND 2521 */ /* State 0 -- Broken */ if (!BLM_UND1_2521_LOSS_H_THRESHOLD && !BLM_UND1_2521_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(123, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_2521_LOSS_H_THRESHOLD && BLM_UND1_2521_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(123, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_2521_LOSS_H_THRESHOLD && !BLM_UND1_2521_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(123, 2); } /* State 3 -- OK */ if ( BLM_UND1_2521_LOSS_H_THRESHOLD && BLM_UND1_2521_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(123, 3); } /* BLM Pedestal Thresholds: UND 3321 */ /* State 0 -- Broken */ if (!BLM_UND1_3321_PED_H_THRESHOLD && !BLM_UND1_3321_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(88, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_3321_PED_H_THRESHOLD && BLM_UND1_3321_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(88, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_3321_PED_H_THRESHOLD && !BLM_UND1_3321_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(88, 2); } /* State 3 -- OK */ if ( BLM_UND1_3321_PED_H_THRESHOLD && BLM_UND1_3321_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(88, 3); } /* BLM Raw Charge Thresholds: UND 2421 */ /* State 0 -- Broken */ if (!BLM_2420_QBH_THRESHOLD && !BLM_2420_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(121, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2420_QBH_THRESHOLD && BLM_2420_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(121, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2420_QBH_THRESHOLD && !BLM_2420_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(121, 2); } /* State 3 -- OK */ if ( BLM_2420_QBH_THRESHOLD && BLM_2420_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(121, 3); } /* BLM Argonne Heartbeat (LN32) */ /* State 0 -- Broken */ if (!BLM_UND1_120_TEST_H_THRESHOLD && !BLM_UND1_120_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(35, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_120_TEST_H_THRESHOLD && BLM_UND1_120_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(35, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_120_TEST_H_THRESHOLD && !BLM_UND1_120_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(35, 2); } /* State 3 -- OK */ if ( BLM_UND1_120_TEST_H_THRESHOLD && BLM_UND1_120_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(35, 3); } /* BLM Pedestal Thresholds: UND 1421 */ /* State 0 -- Broken */ if (!BLM_UND1_1421_PED_H_THRESHOLD && !BLM_UND1_1421_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(64, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1421_PED_H_THRESHOLD && BLM_UND1_1421_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(64, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1421_PED_H_THRESHOLD && !BLM_UND1_1421_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(64, 2); } /* State 3 -- OK */ if ( BLM_UND1_1421_PED_H_THRESHOLD && BLM_UND1_1421_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(64, 3); } /* BLM Pedestal Thresholds: UND BLF1 */ /* State 0 -- Broken */ if (!BLM_UND1_BLF1_PED_H_THRESHOLD && !BLM_UND1_BLF1_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(96, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_BLF1_PED_H_THRESHOLD && BLM_UND1_BLF1_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(96, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_BLF1_PED_H_THRESHOLD && !BLM_UND1_BLF1_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(96, 2); } /* State 3 -- OK */ if ( BLM_UND1_BLF1_PED_H_THRESHOLD && BLM_UND1_BLF1_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(96, 3); } /* BFW 1710 Position */ /* State 0 -- Moving */ if (!BFW_UND1_1710_IN_STATE && !BFW_UND1_1710_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(9, 0); } /* State 1 -- Out */ if (!BFW_UND1_1710_IN_STATE && BFW_UND1_1710_OUT_STATE) { setNewTruthTableState(9, 1); } /* State 2 -- In */ if ( BFW_UND1_1710_IN_STATE && !BFW_UND1_1710_OUT_STATE) { setNewTruthTableState(9, 2); } /* State 3 -- Broken */ if ( BFW_UND1_1710_IN_STATE && BFW_UND1_1710_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(9, 3); } /* BLM Raw Charge Thresholds: UND 221 */ /* State 0 -- Broken */ if (!BLM_UND1_221_LOSS_H_THRESHOLD && !BLM_UND1_221_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(118, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_221_LOSS_H_THRESHOLD && BLM_UND1_221_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(118, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_221_LOSS_H_THRESHOLD && !BLM_UND1_221_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(118, 2); } /* State 3 -- OK */ if ( BLM_UND1_221_LOSS_H_THRESHOLD && BLM_UND1_221_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(118, 3); } /* BFW 1410 Position */ /* State 0 -- Moving */ if (!BFW_UND1_1410_IN_STATE && !BFW_UND1_1410_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(6, 0); } /* State 1 -- Out */ if (!BFW_UND1_1410_IN_STATE && BFW_UND1_1410_OUT_STATE) { setNewTruthTableState(6, 1); } /* State 2 -- In */ if ( BFW_UND1_1410_IN_STATE && !BFW_UND1_1410_OUT_STATE) { setNewTruthTableState(6, 2); } /* State 3 -- Broken */ if ( BFW_UND1_1410_IN_STATE && BFW_UND1_1410_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(6, 3); } /* BLM Pedestal Thresholds: UND 2721 */ /* State 0 -- Broken */ if (!BLM_2720_QBLH_THRESHOLD && !BLM_2720_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(80, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2720_QBLH_THRESHOLD && BLM_2720_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(80, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2720_QBLH_THRESHOLD && !BLM_2720_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(80, 2); } /* State 3 -- OK */ if ( BLM_2720_QBLH_THRESHOLD && BLM_2720_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(80, 3); } /* BLM Pedestal Thresholds: UND 821 */ /* State 0 -- Broken */ if (!BLM_UND1_821_PED_H_THRESHOLD && !BLM_UND1_821_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(93, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_821_PED_H_THRESHOLD && BLM_UND1_821_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(93, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_821_PED_H_THRESHOLD && !BLM_UND1_821_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(93, 2); } /* State 3 -- OK */ if ( BLM_UND1_821_PED_H_THRESHOLD && BLM_UND1_821_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(93, 3); } /* BLM Pedestal Thresholds: UND 921 */ /* State 0 -- Broken */ if (!BLM_UND1_921_PED_H_THRESHOLD && !BLM_UND1_921_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(95, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_921_PED_H_THRESHOLD && BLM_UND1_921_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(95, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_921_PED_H_THRESHOLD && !BLM_UND1_921_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(95, 2); } /* State 3 -- OK */ if ( BLM_UND1_921_PED_H_THRESHOLD && BLM_UND1_921_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(95, 3); } /* BLM Raw Charge Thresholds: UND 1720 */ /* State 0 -- Broken */ if (!BLM_UND1_1720_LOSS_H_THRESHOLD && !BLM_UND1_1720_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(112, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1720_LOSS_H_THRESHOLD && BLM_UND1_1720_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(112, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1720_LOSS_H_THRESHOLD && !BLM_UND1_1720_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(112, 2); } /* State 3 -- OK */ if ( BLM_UND1_1720_LOSS_H_THRESHOLD && BLM_UND1_1720_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(112, 3); } /* BPM Summary (28-36) */ /* State 0 -- Faulted */ if (!BPM_SUM4_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(152, 0); } /* State 1 -- OK */ if ( BPM_SUM4_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(152, 1); } /* BLM Pedestal Thresholds: UND 120 */ /* State 0 -- Broken */ if (!BLM_UND1_120_PED_H_THRESHOLD && !BLM_UND1_120_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(60, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_120_PED_H_THRESHOLD && BLM_UND1_120_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(60, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_120_PED_H_THRESHOLD && !BLM_UND1_120_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(60, 2); } /* State 3 -- OK */ if ( BLM_UND1_120_PED_H_THRESHOLD && BLM_UND1_120_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(60, 3); } /* BFW 2410 Position */ /* State 0 -- Moving */ if (!BFW_UND1_2410_IN_STATE && !BFW_UND1_2410_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(17, 0); } /* State 1 -- Out */ if (!BFW_UND1_2410_IN_STATE && BFW_UND1_2410_OUT_STATE) { setNewTruthTableState(17, 1); } /* State 2 -- In */ if ( BFW_UND1_2410_IN_STATE && !BFW_UND1_2410_OUT_STATE) { setNewTruthTableState(17, 2); } /* State 3 -- Broken */ if ( BFW_UND1_2410_IN_STATE && BFW_UND1_2410_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(17, 3); } /* BFW 1010 Position */ /* State 0 -- Moving */ if (!BFW_UND1_1010_IN_STATE && !BFW_UND1_1010_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(1, 0); } /* State 1 -- Out */ if (!BFW_UND1_1010_IN_STATE && BFW_UND1_1010_OUT_STATE) { setNewTruthTableState(1, 1); } /* State 2 -- In */ if ( BFW_UND1_1010_IN_STATE && !BFW_UND1_1010_OUT_STATE) { setNewTruthTableState(1, 2); } /* State 3 -- Broken */ if ( BFW_UND1_1010_IN_STATE && BFW_UND1_1010_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(1, 3); } /* BLM Raw Charge Thresholds: UND 1521 */ /* State 0 -- Broken */ if (!BLM_UND1_1521_LOSS_H_THRESHOLD && !BLM_UND1_1521_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(110, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1521_LOSS_H_THRESHOLD && BLM_UND1_1521_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(110, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1521_LOSS_H_THRESHOLD && !BLM_UND1_1521_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(110, 2); } /* State 3 -- OK */ if ( BLM_UND1_1521_LOSS_H_THRESHOLD && BLM_UND1_1521_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(110, 3); } /* Magnet In Tolerance: QUM4 */ /* State 0 -- No */ if (!QUAD_LTU1_880_INTOL_STATUS) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(196, 0); } /* State 1 -- Yes */ if ( QUAD_LTU1_880_INTOL_STATUS) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(196, 1); } /* BFW 210 Position */ /* State 0 -- Moving */ if (!BFW_UND1_210_IN_STATE && !BFW_UND1_210_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(13, 0); } /* State 1 -- Out */ if (!BFW_UND1_210_IN_STATE && BFW_UND1_210_OUT_STATE) { setNewTruthTableState(13, 1); } /* State 2 -- In */ if ( BFW_UND1_210_IN_STATE && !BFW_UND1_210_OUT_STATE) { setNewTruthTableState(13, 2); } /* State 3 -- Broken */ if ( BFW_UND1_210_IN_STATE && BFW_UND1_210_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(13, 3); } /* BLM PEP Timing Check (LN36) */ /* State 0 -- Broken */ if (!BLM_2220_QTH_THRESHOLD && !BLM_2220_QTL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(51, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2220_QTH_THRESHOLD && BLM_2220_QTL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(51, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2220_QTH_THRESHOLD && !BLM_2220_QTL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(51, 2); } /* State 3 -- OK */ if ( BLM_2220_QTH_THRESHOLD && BLM_2220_QTL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(51, 3); } /* LION716 Threshold */ /* State 0 -- Exceeded */ if (!LION716_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(176, 0); } /* State 1 -- OK */ if ( LION716_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(176, 1); } /* BLM Raw Charge Thresholds: UND 1121 */ /* State 0 -- Broken */ if (!BLM_UND1_1121_LOSS_H_THRESHOLD && !BLM_UND1_1121_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(104, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1121_LOSS_H_THRESHOLD && BLM_UND1_1121_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(104, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1121_LOSS_H_THRESHOLD && !BLM_UND1_1121_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(104, 2); } /* State 3 -- OK */ if ( BLM_UND1_1121_LOSS_H_THRESHOLD && BLM_UND1_1121_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(104, 3); } /* BLM Pedestal Threshold: LTU1 722 */ /* State 0 -- Broken */ if (!BLM_LTU1_722_PED_H_THRESHOLD && !BLM_LTU1_722_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(53, 0); } /* State 1 -- Over High Threshold */ if (!BLM_LTU1_722_PED_H_THRESHOLD && BLM_LTU1_722_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(53, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_LTU1_722_PED_H_THRESHOLD && !BLM_LTU1_722_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(53, 2); } /* State 3 -- OK */ if ( BLM_LTU1_722_PED_H_THRESHOLD && BLM_LTU1_722_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(53, 3); } /* BLM Pedestal Thresholds: UND 2121 */ /* State 0 -- Broken */ if (!BLM_UND1_2121_PED_H_THRESHOLD && !BLM_UND1_2121_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(72, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_2121_PED_H_THRESHOLD && BLM_UND1_2121_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(72, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_2121_PED_H_THRESHOLD && !BLM_UND1_2121_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(72, 2); } /* State 3 -- OK */ if ( BLM_UND1_2121_PED_H_THRESHOLD && BLM_UND1_2121_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(72, 3); } /* BLM HVPS UND1 1720 */ /* State 0 -- Broken */ if (!HVPS_UND1_1720_HIGH_FAULT && !HVPS_UND1_1720_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(42, 0); } /* State 1 -- Over High Threshold */ if (!HVPS_UND1_1720_HIGH_FAULT && HVPS_UND1_1720_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(42, 1); } /* State 2 -- Under Low Threshold */ if ( HVPS_UND1_1720_HIGH_FAULT && !HVPS_UND1_1720_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(42, 2); } /* State 3 -- OK */ if ( HVPS_UND1_1720_HIGH_FAULT && HVPS_UND1_1720_LOW_FAULT) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(42, 3); } /* BLM PEP Timing Check (LN33) */ /* State 0 -- Broken */ if (!BLM_UND1_621_TEST_H_THRESHOLD && !BLM_UND1_621_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(49, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_621_TEST_H_THRESHOLD && BLM_UND1_621_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(49, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_621_TEST_H_THRESHOLD && !BLM_UND1_621_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(49, 2); } /* State 3 -- OK */ if ( BLM_UND1_621_TEST_H_THRESHOLD && BLM_UND1_621_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(49, 3); } /* BFW 510 Position */ /* State 0 -- Moving */ if (!BFW_UND1_510_IN_STATE && !BFW_UND1_510_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(29, 0); } /* State 1 -- Out */ if (!BFW_UND1_510_IN_STATE && BFW_UND1_510_OUT_STATE) { setNewTruthTableState(29, 1); } /* State 2 -- In */ if ( BFW_UND1_510_IN_STATE && !BFW_UND1_510_OUT_STATE) { setNewTruthTableState(29, 2); } /* State 3 -- Broken */ if ( BFW_UND1_510_IN_STATE && BFW_UND1_510_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(29, 3); } /* OTR22 Position And TDUND Not In */ /* State 0 -- Moving */ if (!OTR22_IN_STATE && !OTR22_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(219, 0); } /* State 1 -- Out */ if (!OTR22_IN_STATE && OTR22_OUT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(219, 1); } /* State 2 -- In */ if ( OTR22_IN_STATE && !OTR22_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(219, 2); } /* State 3 -- Broken */ if ( OTR22_IN_STATE && OTR22_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(219, 3); } /* BLM Raw Charge Thresholds: UND BLF1 */ /* State 0 -- Broken */ if (!BLM_UND1_BLF1_LOSS_H_THRESHOLD && !BLM_UND1_BLF1_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(141, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_BLF1_LOSS_H_THRESHOLD && BLM_UND1_BLF1_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(141, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_BLF1_LOSS_H_THRESHOLD && !BLM_UND1_BLF1_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(141, 2); } /* State 3 -- OK */ if ( BLM_UND1_BLF1_LOSS_H_THRESHOLD && BLM_UND1_BLF1_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(141, 3); } /* LION505 Threshold */ /* State 0 -- Exceeded */ if (!LION505_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(173, 0); } /* State 1 -- OK */ if ( LION505_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(173, 1); } /* LION732 Threshold */ /* State 0 -- Exceeded */ if (!LION732_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(178, 0); } /* State 1 -- OK */ if ( LION732_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(178, 1); } /* BLM Pedestal Thresholds: UND 1720 */ /* State 0 -- Broken */ if (!BLM_UND1_1720_PED_H_THRESHOLD && !BLM_UND1_1720_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(67, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1720_PED_H_THRESHOLD && BLM_UND1_1720_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(67, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1720_PED_H_THRESHOLD && !BLM_UND1_1720_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(67, 2); } /* State 3 -- OK */ if ( BLM_UND1_1720_PED_H_THRESHOLD && BLM_UND1_1720_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(67, 3); } /* LION404 Threshold */ /* State 0 -- Exceeded */ if (!LION404_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(170, 0); } /* State 1 -- OK */ if ( LION404_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(170, 1); } /* BLM HVPS UND1 3320 */ /* State 0 -- Broken */ if (!HVPS_UND1_3320_HIGH_FAULT && !HVPS_UND1_3320_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(45, 0); } /* State 1 -- Over High Threshold */ if (!HVPS_UND1_3320_HIGH_FAULT && HVPS_UND1_3320_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(45, 1); } /* State 2 -- Under Low Threshold */ if ( HVPS_UND1_3320_HIGH_FAULT && !HVPS_UND1_3320_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(45, 2); } /* State 3 -- OK */ if ( HVPS_UND1_3320_HIGH_FAULT && HVPS_UND1_3320_LOW_FAULT) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(45, 3); } /* BLM Pedestal Thresholds: UND 621 */ /* State 0 -- Broken */ if (!BLM_UND1_621_PED_H_THRESHOLD && !BLM_UND1_621_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(91, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_621_PED_H_THRESHOLD && BLM_UND1_621_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(91, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_621_PED_H_THRESHOLD && !BLM_UND1_621_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(91, 2); } /* State 3 -- OK */ if ( BLM_UND1_621_PED_H_THRESHOLD && BLM_UND1_621_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(91, 3); } /* BFW 810 Position */ /* State 0 -- Moving */ if (!BFW_UND1_810_IN_STATE && !BFW_UND1_810_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(32, 0); } /* State 1 -- Out */ if (!BFW_UND1_810_IN_STATE && BFW_UND1_810_OUT_STATE) { setNewTruthTableState(32, 1); } /* State 2 -- In */ if ( BFW_UND1_810_IN_STATE && !BFW_UND1_810_OUT_STATE) { setNewTruthTableState(32, 2); } /* State 3 -- Broken */ if ( BFW_UND1_810_IN_STATE && BFW_UND1_810_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(32, 3); } /* BLM Pedestal Thresholds: UND 2621 */ /* State 0 -- Broken */ if (!BLM_2620_QBLH_THRESHOLD && !BLM_2620_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(79, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2620_QBLH_THRESHOLD && BLM_2620_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(79, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2620_QBLH_THRESHOLD && !BLM_2620_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(79, 2); } /* State 3 -- OK */ if ( BLM_2620_QBLH_THRESHOLD && BLM_2620_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(79, 3); } /* LION733 Threshold */ /* State 0 -- Exceeded */ if (!LION733_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(179, 0); } /* State 1 -- OK */ if ( LION733_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(179, 1); } /* BLM Pedestal Thresholds: UND 1221 */ /* State 0 -- Broken */ if (!BLM_UND1_1221_PED_H_THRESHOLD && !BLM_UND1_1221_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(62, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1221_PED_H_THRESHOLD && BLM_UND1_1221_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(62, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1221_PED_H_THRESHOLD && !BLM_UND1_1221_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(62, 2); } /* State 3 -- OK */ if ( BLM_UND1_1221_PED_H_THRESHOLD && BLM_UND1_1221_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(62, 3); } /* BFW 1610 Position */ /* State 0 -- Moving */ if (!BFW_UND1_1610_IN_STATE && !BFW_UND1_1610_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(8, 0); } /* State 1 -- Out */ if (!BFW_UND1_1610_IN_STATE && BFW_UND1_1610_OUT_STATE) { setNewTruthTableState(8, 1); } /* State 2 -- In */ if ( BFW_UND1_1610_IN_STATE && !BFW_UND1_1610_OUT_STATE) { setNewTruthTableState(8, 2); } /* State 3 -- Broken */ if ( BFW_UND1_1610_IN_STATE && BFW_UND1_1610_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(8, 3); } /* BLM Trigger Missed (LN30) */ /* State 0 -- Missed */ if (!BLM_LTU1_722_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(143, 0); } /* State 1 -- OK */ if ( BLM_LTU1_722_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(143, 1); } /* BLM Argonne Heartbeat (LN35) */ /* State 0 -- Broken */ if (!BLM_UND1_1720_TEST_H_THRESHOLD && !BLM_UND1_1720_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(37, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1720_TEST_H_THRESHOLD && BLM_UND1_1720_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(37, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1720_TEST_H_THRESHOLD && !BLM_UND1_1720_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(37, 2); } /* State 3 -- OK */ if ( BLM_UND1_1720_TEST_H_THRESHOLD && BLM_UND1_1720_TEST_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(37, 3); } /* BPM Summary (19-27) */ /* State 0 -- Faulted */ if (!BPM_SUM3_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(151, 0); } /* State 1 -- OK */ if ( BPM_SUM3_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(151, 1); } /* OTR BL237 Position and TDUND Not In */ /* State 0 -- Moving */ if (!OT_BL237_IN_LIMIT_STATE && !OT_BL237_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(205, 0); } /* State 1 -- Out */ if (!OT_BL237_IN_LIMIT_STATE && OT_BL237_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(205, 1); } /* State 2 -- In */ if ( OT_BL237_IN_LIMIT_STATE && !OT_BL237_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(205, 2); } /* State 3 -- Broken */ if ( OT_BL237_IN_LIMIT_STATE && OT_BL237_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(205, 3); } /* BFW 2510 Position */ /* State 0 -- Moving */ if (!BFW_UND1_2510_IN_STATE && !BFW_UND1_2510_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(18, 0); } /* State 1 -- Out */ if (!BFW_UND1_2510_IN_STATE && BFW_UND1_2510_OUT_STATE) { setNewTruthTableState(18, 1); } /* State 2 -- In */ if ( BFW_UND1_2510_IN_STATE && !BFW_UND1_2510_OUT_STATE) { setNewTruthTableState(18, 2); } /* State 3 -- Broken */ if ( BFW_UND1_2510_IN_STATE && BFW_UND1_2510_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(18, 3); } /* BLM Pedestal Thresholds: UND 1321 */ /* State 0 -- Broken */ if (!BLM_UND1_1321_PED_H_THRESHOLD && !BLM_UND1_1321_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(63, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1321_PED_H_THRESHOLD && BLM_UND1_1321_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(63, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1321_PED_H_THRESHOLD && !BLM_UND1_1321_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(63, 2); } /* State 3 -- OK */ if ( BLM_UND1_1321_PED_H_THRESHOLD && BLM_UND1_1321_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(63, 3); } /* BLM Pedestal Thresholds: UND 121 */ /* State 0 -- Broken */ if (!BLM_UND1_121_PED_H_THRESHOLD && !BLM_UND1_121_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(61, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_121_PED_H_THRESHOLD && BLM_UND1_121_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(61, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_121_PED_H_THRESHOLD && !BLM_UND1_121_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(61, 2); } /* State 3 -- OK */ if ( BLM_UND1_121_PED_H_THRESHOLD && BLM_UND1_121_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(61, 3); } /* BFW 1510 Position */ /* State 0 -- Moving */ if (!BFW_UND1_1510_IN_STATE && !BFW_UND1_1510_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(7, 0); } /* State 1 -- Out */ if (!BFW_UND1_1510_IN_STATE && BFW_UND1_1510_OUT_STATE) { setNewTruthTableState(7, 1); } /* State 2 -- In */ if ( BFW_UND1_1510_IN_STATE && !BFW_UND1_1510_OUT_STATE) { setNewTruthTableState(7, 2); } /* State 3 -- Broken */ if ( BFW_UND1_1510_IN_STATE && BFW_UND1_1510_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(7, 3); } /* BLM Raw Charge Thresholds: UND 2021 */ /* State 0 -- Broken */ if (!BLM_UND1_2021_LOSS_H_THRESHOLD && !BLM_UND1_2021_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(116, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_2021_LOSS_H_THRESHOLD && BLM_UND1_2021_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(116, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_2021_LOSS_H_THRESHOLD && !BLM_UND1_2021_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(116, 2); } /* State 3 -- OK */ if ( BLM_UND1_2021_LOSS_H_THRESHOLD && BLM_UND1_2021_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(116, 3); } /* Magnet In Tolerance: QUM3 */ /* State 0 -- No */ if (!QUAD_LTU1_860_INTOL_STATUS) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(195, 0); } /* State 1 -- Yes */ if ( QUAD_LTU1_860_INTOL_STATUS) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(195, 1); } /* BFW 610 Position */ /* State 0 -- Moving */ if (!BFW_UND1_610_IN_STATE && !BFW_UND1_610_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(30, 0); } /* State 1 -- Out */ if (!BFW_UND1_610_IN_STATE && BFW_UND1_610_OUT_STATE) { setNewTruthTableState(30, 1); } /* State 2 -- In */ if ( BFW_UND1_610_IN_STATE && !BFW_UND1_610_OUT_STATE) { setNewTruthTableState(30, 2); } /* State 3 -- Broken */ if ( BFW_UND1_610_IN_STATE && BFW_UND1_610_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(30, 3); } /* BLM Raw Charge Thresholds: UND 2621 */ /* State 0 -- Broken */ if (!BLM_2620_QBH_THRESHOLD && !BLM_2620_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(124, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2620_QBH_THRESHOLD && BLM_2620_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(124, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2620_QBH_THRESHOLD && !BLM_2620_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(124, 2); } /* State 3 -- OK */ if ( BLM_2620_QBH_THRESHOLD && BLM_2620_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(124, 3); } /* BFW 2810 Position */ /* State 0 -- Moving */ if (!BFW_UND1_2810_IN_STATE && !BFW_UND1_2810_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(21, 0); } /* State 1 -- Out */ if (!BFW_UND1_2810_IN_STATE && BFW_UND1_2810_OUT_STATE) { setNewTruthTableState(21, 1); } /* State 2 -- In */ if ( BFW_UND1_2810_IN_STATE && !BFW_UND1_2810_OUT_STATE) { setNewTruthTableState(21, 2); } /* State 3 -- Broken */ if ( BFW_UND1_2810_IN_STATE && BFW_UND1_2810_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(21, 3); } /* BLM Raw Charge Thresholds: UND 3321 */ /* State 0 -- Broken */ if (!BLM_UND1_3321_LOSS_H_THRESHOLD && !BLM_UND1_3321_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(133, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_3321_LOSS_H_THRESHOLD && BLM_UND1_3321_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(133, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_3321_LOSS_H_THRESHOLD && !BLM_UND1_3321_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(133, 2); } /* State 3 -- OK */ if ( BLM_UND1_3321_LOSS_H_THRESHOLD && BLM_UND1_3321_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(133, 3); } /* OTR BL291 Position and TDUND Not In */ /* State 0 -- Moving */ if (!OT_BL291_IN_LIMIT_STATE && !OT_BL291_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(207, 0); } /* State 1 -- Out */ if (!OT_BL291_IN_LIMIT_STATE && OT_BL291_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(207, 1); } /* State 2 -- In */ if ( OT_BL291_IN_LIMIT_STATE && !OT_BL291_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(207, 2); } /* State 3 -- Broken */ if ( OT_BL291_IN_LIMIT_STATE && OT_BL291_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(207, 3); } /* BFW 310 Position */ /* State 0 -- Moving */ if (!BFW_UND1_310_IN_STATE && !BFW_UND1_310_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(24, 0); } /* State 1 -- Out */ if (!BFW_UND1_310_IN_STATE && BFW_UND1_310_OUT_STATE) { setNewTruthTableState(24, 1); } /* State 2 -- In */ if ( BFW_UND1_310_IN_STATE && !BFW_UND1_310_OUT_STATE) { setNewTruthTableState(24, 2); } /* State 3 -- Broken */ if ( BFW_UND1_310_IN_STATE && BFW_UND1_310_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(24, 3); } /* OTR30 Position And TDUND Not In */ /* State 0 -- Moving */ if (!OTR30_0449_IN_STATE && !OTR30_0449_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(221, 0); } /* State 1 -- Out */ if (!OTR30_0449_IN_STATE && OTR30_0449_OUT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(221, 1); } /* State 2 -- In */ if ( OTR30_0449_IN_STATE && !OTR30_0449_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(221, 2); } /* State 3 -- Broken */ if ( OTR30_0449_IN_STATE && OTR30_0449_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(221, 3); } /* Toroid Comparator (IMUNDO vs IMDUMP) */ /* State 0 -- Broken */ if (!IMUNDO_COMP_L2_STATE && !IMUNDO_COMP_L1_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(258, 0); } /* State 1 -- 3E8 ppb Gain */ if (!IMUNDO_COMP_L2_STATE && IMUNDO_COMP_L1_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(258, 1); } /* State 2 -- 3E8 ppb Loss */ if ( IMUNDO_COMP_L2_STATE && !IMUNDO_COMP_L1_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(258, 2); } /* State 3 -- Under 3E8 ppb Loss */ if ( IMUNDO_COMP_L2_STATE && IMUNDO_COMP_L1_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(258, 3); } /* BFW 2610 Position */ /* State 0 -- Moving */ if (!BFW_UND1_2610_IN_STATE && !BFW_UND1_2610_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(19, 0); } /* State 1 -- Out */ if (!BFW_UND1_2610_IN_STATE && BFW_UND1_2610_OUT_STATE) { setNewTruthTableState(19, 1); } /* State 2 -- In */ if ( BFW_UND1_2610_IN_STATE && !BFW_UND1_2610_OUT_STATE) { setNewTruthTableState(19, 2); } /* State 3 -- Broken */ if ( BFW_UND1_2610_IN_STATE && BFW_UND1_2610_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(19, 3); } /* BLM Pedestal Thresholds: UND 3320 */ /* State 0 -- Broken */ if (!BLM_UND1_3320_PED_H_THRESHOLD && !BLM_UND1_3320_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(87, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_3320_PED_H_THRESHOLD && BLM_UND1_3320_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(87, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_3320_PED_H_THRESHOLD && !BLM_UND1_3320_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(87, 2); } /* State 3 -- OK */ if ( BLM_UND1_3320_PED_H_THRESHOLD && BLM_UND1_3320_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(87, 3); } /* BLM Pedestal Thresholds: UND 2921 */ /* State 0 -- Broken */ if (!BLM_2920_QBLH_THRESHOLD && !BLM_2920_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(82, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2920_QBLH_THRESHOLD && BLM_2920_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(82, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2920_QBLH_THRESHOLD && !BLM_2920_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(82, 2); } /* State 3 -- OK */ if ( BLM_2920_QBLH_THRESHOLD && BLM_2920_QBLL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(82, 3); } /* BLM HVPS UND1 2520 */ /* State 0 -- Broken */ if (!HVPS_UND1_2520_HIGH_FAULT && !HVPS_UND1_2520_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(44, 0); } /* State 1 -- Over High Threshold */ if (!HVPS_UND1_2520_HIGH_FAULT && HVPS_UND1_2520_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(44, 1); } /* State 2 -- Under Low Threshold */ if ( HVPS_UND1_2520_HIGH_FAULT && !HVPS_UND1_2520_LOW_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(44, 2); } /* State 3 -- OK */ if ( HVPS_UND1_2520_HIGH_FAULT && HVPS_UND1_2520_LOW_FAULT) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(44, 3); } /* BLM Pedestal Thresholds: UND 1921 */ /* State 0 -- Broken */ if (!BLM_UND1_1921_PED_H_THRESHOLD && !BLM_UND1_1921_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(70, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1921_PED_H_THRESHOLD && BLM_UND1_1921_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(70, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1921_PED_H_THRESHOLD && !BLM_UND1_1921_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(70, 2); } /* State 3 -- OK */ if ( BLM_UND1_1921_PED_H_THRESHOLD && BLM_UND1_1921_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(70, 3); } /* BLM Pedestal Thresholds: UND 521 */ /* State 0 -- Broken */ if (!BLM_UND1_521_PED_H_THRESHOLD && !BLM_UND1_521_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(90, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_521_PED_H_THRESHOLD && BLM_UND1_521_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(90, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_521_PED_H_THRESHOLD && !BLM_UND1_521_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(90, 2); } /* State 3 -- OK */ if ( BLM_UND1_521_PED_H_THRESHOLD && BLM_UND1_521_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(90, 3); } /* BLM Pedestal Thresholds: UND 2021 */ /* State 0 -- Broken */ if (!BLM_UND1_2021_PED_H_THRESHOLD && !BLM_UND1_2021_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(71, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_2021_PED_H_THRESHOLD && BLM_UND1_2021_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(71, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_2021_PED_H_THRESHOLD && !BLM_UND1_2021_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(71, 2); } /* State 3 -- OK */ if ( BLM_UND1_2021_PED_H_THRESHOLD && BLM_UND1_2021_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(71, 3); } /* BLM Raw Charge Thresholds: UND 3121 */ /* State 0 -- Broken */ if (!BLM_UND1_3121_LOSS_H_THRESHOLD && !BLM_UND1_3121_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(129, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_3121_LOSS_H_THRESHOLD && BLM_UND1_3121_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(129, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_3121_LOSS_H_THRESHOLD && !BLM_UND1_3121_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(129, 2); } /* State 3 -- OK */ if ( BLM_UND1_3121_LOSS_H_THRESHOLD && BLM_UND1_3121_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(129, 3); } /* BLM Raw Charge Thresholds: LTU1 732 */ /* State 0 -- Broken */ if (!BLM_LTU1_732_LOSS_H_THRESHOLD && !BLM_LTU1_732_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(99, 0); } /* State 1 -- Over High Threshold */ if (!BLM_LTU1_732_LOSS_H_THRESHOLD && BLM_LTU1_732_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(99, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_LTU1_732_LOSS_H_THRESHOLD && !BLM_LTU1_732_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(99, 2); } /* State 3 -- OK */ if ( BLM_LTU1_732_LOSS_H_THRESHOLD && BLM_LTU1_732_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(99, 3); } /* Toroid Comparator (IMUNDI vs IMUNDO) */ /* State 0 -- Broken */ if (!IMUNDI_COMP_L2_STATE && !IMUNDI_COMP_L1_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(257, 0); } /* State 1 -- 3E8 ppb Gain */ if (!IMUNDI_COMP_L2_STATE && IMUNDI_COMP_L1_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(257, 1); } /* State 2 -- 3E8 ppb Loss */ if ( IMUNDI_COMP_L2_STATE && !IMUNDI_COMP_L1_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(257, 2); } /* State 3 -- Under 3E8 ppb Loss */ if ( IMUNDI_COMP_L2_STATE && IMUNDI_COMP_L1_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(257, 3); } /* BLM Trigger Missed (LN37) */ /* State 0 -- Missed */ if (!BLM_UND1_30_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(148, 0); } /* State 1 -- OK */ if ( BLM_UND1_30_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(148, 1); } /* BFW 3110 Position */ /* State 0 -- Moving */ if (!BFW_UND1_3110_IN_STATE && !BFW_UND1_3110_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(25, 0); } /* State 1 -- Out */ if (!BFW_UND1_3110_IN_STATE && BFW_UND1_3110_OUT_STATE) { setNewTruthTableState(25, 1); } /* State 2 -- In */ if ( BFW_UND1_3110_IN_STATE && !BFW_UND1_3110_OUT_STATE) { setNewTruthTableState(25, 2); } /* State 3 -- Broken */ if ( BFW_UND1_3110_IN_STATE && BFW_UND1_3110_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(25, 3); } /* BFW 910 Position */ /* State 0 -- Moving */ if (!BFW_UND1_910_IN_STATE && !BFW_UND1_910_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(33, 0); } /* State 1 -- Out */ if (!BFW_UND1_910_IN_STATE && BFW_UND1_910_OUT_STATE) { setNewTruthTableState(33, 1); } /* State 2 -- In */ if ( BFW_UND1_910_IN_STATE && !BFW_UND1_910_OUT_STATE) { setNewTruthTableState(33, 2); } /* State 3 -- Broken */ if ( BFW_UND1_910_IN_STATE && BFW_UND1_910_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(33, 3); } /* BFW 3310 Position */ /* State 0 -- Moving */ if (!BFW_UND1_3310_IN_STATE && !BFW_UND1_3310_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(27, 0); } /* State 1 -- Out */ if (!BFW_UND1_3310_IN_STATE && BFW_UND1_3310_OUT_STATE) { setNewTruthTableState(27, 1); } /* State 2 -- In */ if ( BFW_UND1_3310_IN_STATE && !BFW_UND1_3310_OUT_STATE) { setNewTruthTableState(27, 2); } /* State 3 -- Broken */ if ( BFW_UND1_3310_IN_STATE && BFW_UND1_3310_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(27, 3); } /* OTR33 Position And TDUND Not In */ /* State 0 -- Moving */ if (!OTR33_0745_IN_STATE && !OTR33_0745_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(223, 0); } /* State 1 -- Out */ if (!OTR33_0745_IN_STATE && OTR33_0745_OUT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(223, 1); } /* State 2 -- In */ if ( OTR33_0745_IN_STATE && !OTR33_0745_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(223, 2); } /* State 3 -- Broken */ if ( OTR33_0745_IN_STATE && OTR33_0745_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(223, 3); } /* LION765 Threshold */ /* State 0 -- Exceeded */ if (!LION765_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(182, 0); } /* State 1 -- OK */ if ( LION765_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(182, 1); } /* BFW 410 Position */ /* State 0 -- Moving */ if (!BFW_UND1_410_IN_STATE && !BFW_UND1_410_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(28, 0); } /* State 1 -- Out */ if (!BFW_UND1_410_IN_STATE && BFW_UND1_410_OUT_STATE) { setNewTruthTableState(28, 1); } /* State 2 -- In */ if ( BFW_UND1_410_IN_STATE && !BFW_UND1_410_OUT_STATE) { setNewTruthTableState(28, 2); } /* State 3 -- Broken */ if ( BFW_UND1_410_IN_STATE && BFW_UND1_410_OUT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(28, 3); } /* BLM Raw Charge Thresholds: UND 2221 */ /* State 0 -- Broken */ if (!BLM_2220_QBH_THRESHOLD && !BLM_2220_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(119, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2220_QBH_THRESHOLD && BLM_2220_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(119, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2220_QBH_THRESHOLD && !BLM_2220_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(119, 2); } /* State 3 -- OK */ if ( BLM_2220_QBH_THRESHOLD && BLM_2220_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(119, 3); } /* BLM Pedestal Threshold: LTU1 762 */ /* State 0 -- Broken */ if (!BLM_LTU1_762_PED_H_THRESHOLD && !BLM_LTU1_762_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(55, 0); } /* State 1 -- Over High Threshold */ if (!BLM_LTU1_762_PED_H_THRESHOLD && BLM_LTU1_762_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(55, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_LTU1_762_PED_H_THRESHOLD && !BLM_LTU1_762_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(55, 2); } /* State 3 -- OK */ if ( BLM_LTU1_762_PED_H_THRESHOLD && BLM_LTU1_762_PED_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(55, 3); } /* BLM Raw Charge Thresholds: UND 1421 */ /* State 0 -- Broken */ if (!BLM_UND1_1421_LOSS_H_THRESHOLD && !BLM_UND1_1421_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(109, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_1421_LOSS_H_THRESHOLD && BLM_UND1_1421_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(109, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_1421_LOSS_H_THRESHOLD && !BLM_UND1_1421_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(109, 2); } /* State 3 -- OK */ if ( BLM_UND1_1421_LOSS_H_THRESHOLD && BLM_UND1_1421_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(109, 3); } /* LION504 Threshold */ /* State 0 -- Exceeded */ if (!LION504_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(172, 0); } /* State 1 -- OK */ if ( LION504_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(172, 1); } /* BLM Raw Charge Thresholds: UND 3320 */ /* State 0 -- Broken */ if (!BLM_UND1_3320_LOSS_H_THRESHOLD && !BLM_UND1_3320_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(132, 0); } /* State 1 -- Over High Threshold */ if (!BLM_UND1_3320_LOSS_H_THRESHOLD && BLM_UND1_3320_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(132, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_UND1_3320_LOSS_H_THRESHOLD && !BLM_UND1_3320_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(132, 2); } /* State 3 -- OK */ if ( BLM_UND1_3320_LOSS_H_THRESHOLD && BLM_UND1_3320_LOSS_L_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(132, 3); } /* BLM Raw Charge Thresholds: UND 2721 */ /* State 0 -- Broken */ if (!BLM_2720_QBH_THRESHOLD && !BLM_2720_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(125, 0); } /* State 1 -- Over High Threshold */ if (!BLM_2720_QBH_THRESHOLD && BLM_2720_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(125, 1); } /* State 2 -- Under Low Threshold */ if ( BLM_2720_QBH_THRESHOLD && !BLM_2720_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(125, 2); } /* State 3 -- OK */ if ( BLM_2720_QBH_THRESHOLD && BLM_2720_QBL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(125, 3); } /* LION766 Threshold */ /* State 0 -- Exceeded */ if (!LION766_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(183, 0); } /* State 1 -- OK */ if ( LION766_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(183, 1); } /* PIC Raw Charge Thresholds: DMP1 698 */ /* State 0 -- Broken */ if (!PICS_DMP1_100_LOSSH_THRESHOLD && !PICS_DMP1_100_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(234, 0); } /* State 1 -- Over High Threshold */ if (!PICS_DMP1_100_LOSSH_THRESHOLD && PICS_DMP1_100_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(234, 1); } /* State 2 -- Under Low Threshold */ if ( PICS_DMP1_100_LOSSH_THRESHOLD && !PICS_DMP1_100_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(234, 2); } /* State 3 -- OK */ if ( PICS_DMP1_100_LOSSH_THRESHOLD && PICS_DMP1_100_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(234, 3); } /* PIC Raw Charge Thresholds: DMP1 699 */ /* State 0 -- Broken */ if (!PICS_DMP2_200_LOSSH_THRESHOLD && !PICS_DMP2_200_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(235, 0); } /* State 1 -- Over High Threshold */ if (!PICS_DMP2_200_LOSSH_THRESHOLD && PICS_DMP2_200_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(235, 1); } /* State 2 -- Under Low Threshold */ if ( PICS_DMP2_200_LOSSH_THRESHOLD && !PICS_DMP2_200_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(235, 2); } /* State 3 -- OK */ if ( PICS_DMP2_200_LOSSH_THRESHOLD && PICS_DMP2_200_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(235, 3); } /* PIC Trigger Missed (LN34) */ /* State 0 -- Missed */ if (!PICS_DMP1_100_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(249, 0); } /* State 1 -- OK */ if ( PICS_DMP1_100_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(249, 1); } /* PIC HVPS B921 */ /* State 0 -- Off */ if (!PIC_HV_ON_B921_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(233, 0); } /* State 1 -- On */ if ( PIC_HV_ON_B921_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(233, 1); } } /* * Logic Ignored When Laser Heater Attenuator Is In */ if (LHATTEN_IN_LIMIT_STATE) { /* Ignore Laser Heater Photodiode Shutter Position */ setNewTruthTableState(186, MPSTruthTableStateIgnored); /* Ignore OTRH2 Position (Laser Heater) */ setNewTruthTableState(228, MPSTruthTableStateIgnored); /* Ignore OTRH1 Position (Laser Heater) */ setNewTruthTableState(225, MPSTruthTableStateIgnored); } else { /* Laser Heater Photodiode Shutter Position */ /* State 0 -- Moving */ if (!LHPHD_IN_LIMIT_STATE && !LHPHD_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceFuture); setNewTruthTableState(186, 0); } /* State 1 -- Out */ if (!LHPHD_IN_LIMIT_STATE && LHPHD_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceFuture); setNewTruthTableState(186, 1); } /* State 2 -- In */ if ( LHPHD_IN_LIMIT_STATE && !LHPHD_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceFuture); setNewTruthTableState(186, 2); } /* State 3 -- Broken */ if ( LHPHD_IN_LIMIT_STATE && LHPHD_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceFuture); setNewTruthTableState(186, 3); } /* OTRH2 Position (Laser Heater) */ /* State 0 -- Moving */ if (!OTRH2_IN_LIMIT_STATE && !OTRH2_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceFuture); setNewTruthTableState(228, 0); } /* State 1 -- Out */ if (!OTRH2_IN_LIMIT_STATE && OTRH2_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceFuture); setNewTruthTableState(228, 1); } /* State 2 -- In */ if ( OTRH2_IN_LIMIT_STATE && !OTRH2_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceFuture); setNewTruthTableState(228, 2); } /* State 3 -- Broken */ if ( OTRH2_IN_LIMIT_STATE && OTRH2_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceFuture); setNewTruthTableState(228, 3); } /* OTRH1 Position (Laser Heater) */ /* State 0 -- Moving */ if (!OTRH1_IN_LIMIT_STATE && !OTRH1_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceFuture); setNewTruthTableState(225, 0); } /* State 1 -- Out */ if (!OTRH1_IN_LIMIT_STATE && OTRH1_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceFuture); setNewTruthTableState(225, 1); } /* State 2 -- In */ if ( OTRH1_IN_LIMIT_STATE && !OTRH1_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceFuture); setNewTruthTableState(225, 2); } /* State 3 -- Broken */ if ( OTRH1_IN_LIMIT_STATE && OTRH1_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceFuture); setNewTruthTableState(225, 3); } } /* * Logic Ignored When TD11 Is In or YG BL211 Is In */ if (TD11_IN_LIMIT_STATE || YG_BL211_IN_LIMIT_STATE && !YG_BL211_OUT_LIMIT_STATE) { /* Ignore Magnet In Tolerance: BYD1 */ setNewTruthTableState(191, MPSTruthTableStateIgnored); /* Ignore Magnet Power: BYD1 */ setNewTruthTableState(197, MPSTruthTableStateIgnored); /* Ignore BYKIK 30 Hz Abort Trigger */ setNewTruthTableState(153, MPSTruthTableStateIgnored); /* Ignore BYKIK Readback Signal */ setNewTruthTableState(155, MPSTruthTableStateIgnored); /* Ignore BYKIK 30 Hz Standby Trigger */ setNewTruthTableState(154, MPSTruthTableStateIgnored); /* Ignore PIC Raw Charge Thresholds: LTU1 772 */ setNewTruthTableState(245, MPSTruthTableStateIgnored); /* Ignore PIC Raw Charge Thresholds: LTU1 220 */ setNewTruthTableState(236, MPSTruthTableStateIgnored); /* Ignore PIC Raw Charge Thresholds: LTU1 252 */ setNewTruthTableState(237, MPSTruthTableStateIgnored); /* Ignore PIC Raw Charge Thresholds: LTU1 762 */ setNewTruthTableState(244, MPSTruthTableStateIgnored); /* Ignore PIC Raw Charge Thresholds: LTU1 280 */ setNewTruthTableState(238, MPSTruthTableStateIgnored); /* Ignore PIC Raw Charge Thresholds: LTU1 420 */ setNewTruthTableState(239, MPSTruthTableStateIgnored); /* Ignore PIC Raw Charge Thresholds: LTU1 450 */ setNewTruthTableState(240, MPSTruthTableStateIgnored); /* Ignore PIC Raw Charge Thresholds: LTU1 722 */ setNewTruthTableState(242, MPSTruthTableStateIgnored); /* Ignore PIC Raw Charge Thresholds: LTU1 480 */ setNewTruthTableState(241, MPSTruthTableStateIgnored); /* Ignore PIC Raw Charge Thresholds: LTU1 732 */ setNewTruthTableState(243, MPSTruthTableStateIgnored); /* Ignore PIC Trigger Missed (LN31) */ setNewTruthTableState(248, MPSTruthTableStateIgnored); /* Ignore PIC Trigger Missed (LN29) */ setNewTruthTableState(247, MPSTruthTableStateIgnored); /* Ignore PIC Trigger Missed (LN28) */ setNewTruthTableState(246, MPSTruthTableStateIgnored); /* Ignore PIC HVPS B913 */ setNewTruthTableState(232, MPSTruthTableStateIgnored); /* Ignore PIC HVPS B911 */ setNewTruthTableState(230, MPSTruthTableStateIgnored); /* Ignore PIC HVPS B912 */ setNewTruthTableState(231, MPSTruthTableStateIgnored); } else { /* Magnet In Tolerance: BYD1 */ /* State 0 -- No */ if (!BEND_DMP1_400_INTOL_STATUS) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(191, 0); } /* State 1 -- Yes */ if ( BEND_DMP1_400_INTOL_STATUS) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(191, 1); } /* Magnet Power: BYD1 */ /* State 0 -- Off */ if (!BEND_DMP1_400_STATE_STATUS) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(197, 0); } /* State 1 -- On */ if ( BEND_DMP1_400_STATE_STATUS) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(197, 1); } /* BYKIK 30 Hz Abort Trigger */ /* State 0 -- Missed */ if (!BYKIK_30HZ_ABRT_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(153, 0); } /* State 1 -- OK */ if ( BYKIK_30HZ_ABRT_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(153, 1); } /* BYKIK Readback Signal */ /* State 0 -- Broken */ if (!BYKIK_THRESHOLD_OVER_FAULT && !BYKIK_THRESHOLD_UNDER_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(155, 0); } /* State 1 -- Over Threshold */ if (!BYKIK_THRESHOLD_OVER_FAULT && BYKIK_THRESHOLD_UNDER_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(155, 1); } /* State 2 -- Under Threshold */ if ( BYKIK_THRESHOLD_OVER_FAULT && !BYKIK_THRESHOLD_UNDER_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(155, 2); } /* State 3 -- OK */ if ( BYKIK_THRESHOLD_OVER_FAULT && BYKIK_THRESHOLD_UNDER_FAULT) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(155, 3); } /* BYKIK 30 Hz Standby Trigger */ /* State 0 -- Missed */ if (!BYKIK_30HZ_STBY_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(154, 0); } /* State 1 -- OK */ if ( BYKIK_30HZ_STBY_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(154, 1); } /* PIC Raw Charge Thresholds: LTU1 772 */ /* State 0 -- Broken */ if (!PICS_LTU1_772_LOSSH_THRESHOLD && !PICS_LTU1_772_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(245, 0); } /* State 1 -- Over High Threshold */ if (!PICS_LTU1_772_LOSSH_THRESHOLD && PICS_LTU1_772_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(245, 1); } /* State 2 -- Under Low Threshold */ if ( PICS_LTU1_772_LOSSH_THRESHOLD && !PICS_LTU1_772_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(245, 2); } /* State 3 -- OK */ if ( PICS_LTU1_772_LOSSH_THRESHOLD && PICS_LTU1_772_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(245, 3); } /* PIC Raw Charge Thresholds: LTU1 220 */ /* State 0 -- Broken */ if (!PICS_LTU1_220_LOSSH_THRESHOLD && !PICS_LTU1_220_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(236, 0); } /* State 1 -- Over High Threshold */ if (!PICS_LTU1_220_LOSSH_THRESHOLD && PICS_LTU1_220_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(236, 1); } /* State 2 -- Under Low Threshold */ if ( PICS_LTU1_220_LOSSH_THRESHOLD && !PICS_LTU1_220_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(236, 2); } /* State 3 -- OK */ if ( PICS_LTU1_220_LOSSH_THRESHOLD && PICS_LTU1_220_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(236, 3); } /* PIC Raw Charge Thresholds: LTU1 252 */ /* State 0 -- Broken */ if (!PICS_LTU1_252_LOSSH_THRESHOLD && !PICS_LTU1_252_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(237, 0); } /* State 1 -- Over High Threshold */ if (!PICS_LTU1_252_LOSSH_THRESHOLD && PICS_LTU1_252_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(237, 1); } /* State 2 -- Under Low Threshold */ if ( PICS_LTU1_252_LOSSH_THRESHOLD && !PICS_LTU1_252_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(237, 2); } /* State 3 -- OK */ if ( PICS_LTU1_252_LOSSH_THRESHOLD && PICS_LTU1_252_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(237, 3); } /* PIC Raw Charge Thresholds: LTU1 762 */ /* State 0 -- Broken */ if (!PICS_LTU1_762_LOSSH_THRESHOLD && !PICS_LTU1_762_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(244, 0); } /* State 1 -- Over High Threshold */ if (!PICS_LTU1_762_LOSSH_THRESHOLD && PICS_LTU1_762_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(244, 1); } /* State 2 -- Under Low Threshold */ if ( PICS_LTU1_762_LOSSH_THRESHOLD && !PICS_LTU1_762_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(244, 2); } /* State 3 -- OK */ if ( PICS_LTU1_762_LOSSH_THRESHOLD && PICS_LTU1_762_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(244, 3); } /* PIC Raw Charge Thresholds: LTU1 280 */ /* State 0 -- Broken */ if (!PICS_LTU1_280_LOSSH_THRESHOLD && !PICS_LTU1_280_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(238, 0); } /* State 1 -- Over High Threshold */ if (!PICS_LTU1_280_LOSSH_THRESHOLD && PICS_LTU1_280_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(238, 1); } /* State 2 -- Under Low Threshold */ if ( PICS_LTU1_280_LOSSH_THRESHOLD && !PICS_LTU1_280_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(238, 2); } /* State 3 -- OK */ if ( PICS_LTU1_280_LOSSH_THRESHOLD && PICS_LTU1_280_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(238, 3); } /* PIC Raw Charge Thresholds: LTU1 420 */ /* State 0 -- Broken */ if (!PICS_LTU1_420_LOSSH_THRESHOLD && !PICS_LTU1_420_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(239, 0); } /* State 1 -- Over High Threshold */ if (!PICS_LTU1_420_LOSSH_THRESHOLD && PICS_LTU1_420_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(239, 1); } /* State 2 -- Under Low Threshold */ if ( PICS_LTU1_420_LOSSH_THRESHOLD && !PICS_LTU1_420_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(239, 2); } /* State 3 -- OK */ if ( PICS_LTU1_420_LOSSH_THRESHOLD && PICS_LTU1_420_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(239, 3); } /* PIC Raw Charge Thresholds: LTU1 450 */ /* State 0 -- Broken */ if (!PICS_LTU1_450_LOSSH_THRESHOLD && !PICS_LTU1_450_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(240, 0); } /* State 1 -- Over High Threshold */ if (!PICS_LTU1_450_LOSSH_THRESHOLD && PICS_LTU1_450_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(240, 1); } /* State 2 -- Under Low Threshold */ if ( PICS_LTU1_450_LOSSH_THRESHOLD && !PICS_LTU1_450_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(240, 2); } /* State 3 -- OK */ if ( PICS_LTU1_450_LOSSH_THRESHOLD && PICS_LTU1_450_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(240, 3); } /* PIC Raw Charge Thresholds: LTU1 722 */ /* State 0 -- Broken */ if (!PICS_LTU1_722_LOSSH_THRESHOLD && !PICS_LTU1_722_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(242, 0); } /* State 1 -- Over High Threshold */ if (!PICS_LTU1_722_LOSSH_THRESHOLD && PICS_LTU1_722_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(242, 1); } /* State 2 -- Under Low Threshold */ if ( PICS_LTU1_722_LOSSH_THRESHOLD && !PICS_LTU1_722_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(242, 2); } /* State 3 -- OK */ if ( PICS_LTU1_722_LOSSH_THRESHOLD && PICS_LTU1_722_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(242, 3); } /* PIC Raw Charge Thresholds: LTU1 480 */ /* State 0 -- Broken */ if (!PICS_LTU1_480_LOSSH_THRESHOLD && !PICS_LTU1_480_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(241, 0); } /* State 1 -- Over High Threshold */ if (!PICS_LTU1_480_LOSSH_THRESHOLD && PICS_LTU1_480_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(241, 1); } /* State 2 -- Under Low Threshold */ if ( PICS_LTU1_480_LOSSH_THRESHOLD && !PICS_LTU1_480_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(241, 2); } /* State 3 -- OK */ if ( PICS_LTU1_480_LOSSH_THRESHOLD && PICS_LTU1_480_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(241, 3); } /* PIC Raw Charge Thresholds: LTU1 732 */ /* State 0 -- Broken */ if (!PICM_LTU1_732_LOSSH_THRESHOLD && !PICM_LTU1_732_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(243, 0); } /* State 1 -- Over High Threshold */ if (!PICM_LTU1_732_LOSSH_THRESHOLD && PICM_LTU1_732_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(243, 1); } /* State 2 -- Under Low Threshold */ if ( PICM_LTU1_732_LOSSH_THRESHOLD && !PICM_LTU1_732_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(243, 2); } /* State 3 -- OK */ if ( PICM_LTU1_732_LOSSH_THRESHOLD && PICM_LTU1_732_LOSSL_THRESHOLD) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(243, 3); } /* PIC Trigger Missed (LN31) */ /* State 0 -- Missed */ if (!PICS_LTU1_762_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(248, 0); } /* State 1 -- OK */ if ( PICS_LTU1_762_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(248, 1); } /* PIC Trigger Missed (LN29) */ /* State 0 -- Missed */ if (!PICS_LTU1_480_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(247, 0); } /* State 1 -- OK */ if ( PICS_LTU1_480_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(247, 1); } /* PIC Trigger Missed (LN28) */ /* State 0 -- Missed */ if (!PICS_LTU1_220_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(246, 0); } /* State 1 -- OK */ if ( PICS_LTU1_220_NO_TRIG_MISSED) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(246, 1); } /* PIC HVPS B913 */ /* State 0 -- Off */ if (!PIC_HV_ON_B913_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(232, 0); } /* State 1 -- On */ if ( PIC_HV_ON_B913_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(232, 1); } /* PIC HVPS B911 */ /* State 0 -- Off */ if (!PIC_HV_ON_B911_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(230, 0); } /* State 1 -- On */ if ( PIC_HV_ON_B911_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(230, 1); } /* PIC HVPS B912 */ /* State 0 -- Off */ if (!PIC_HV_ON_B912_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(231, 0); } /* State 1 -- On */ if ( PIC_HV_ON_B912_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(231, 1); } } /* * Always Evaluated */ /* Bypass Recover */ /* State 0 -- Recovering */ if (!LP_BYPASS_RECOVER) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceFuture); setNewTruthTableState(156, 0); } /* State 1 -- OK */ if ( LP_BYPASS_RECOVER) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceFuture); setNewTruthTableState(156, 1); } /* Laser Heater Attenuator Position */ /* State 0 -- Moving */ if (!LHATTEN_IN_LIMIT_STATE && !LHATTEN_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceFuture); setNewTruthTableState(185, 0); } /* State 1 -- Out */ if (!LHATTEN_IN_LIMIT_STATE && LHATTEN_OUT_LIMIT_STATE) { setNewTruthTableState(185, 1); } /* State 2 -- In */ if ( LHATTEN_IN_LIMIT_STATE && !LHATTEN_OUT_LIMIT_STATE) { setNewTruthTableState(185, 2); } /* State 3 -- Broken */ if ( LHATTEN_IN_LIMIT_STATE && LHATTEN_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceFuture); setNewTruthTableState(185, 3); } /* MPS Beam Permit: BYKIK */ /* State 0 -- Not Permitted */ if (!LP_ALLOWS_BEAM_BYKIK) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(187, 0); } /* State 1 -- Permitted */ if ( LP_ALLOWS_BEAM_BYKIK) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(187, 1); } /* MPS Beam Permit: Heater Shutter */ /* State 0 -- Not Permitted */ if (!LP_ALLOWS_BEAM_LH_SHUT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceFuture); setNewTruthTableState(188, 0); } /* State 1 -- Permitted */ if ( LP_ALLOWS_BEAM_LH_SHUT) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceFuture); setNewTruthTableState(188, 1); } /* MPS Beam Permit: Mechanical Shutter */ /* State 0 -- Not Permitted */ if (!LP_ALLOWS_BEAM_MECH_SHUT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setNewTruthTableState(189, 0); } /* State 1 -- Permitted */ if ( LP_ALLOWS_BEAM_MECH_SHUT) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setNewTruthTableState(189, 1); } /* MPS Beam Permit: Pockels Cell */ /* State 0 -- Not Permitted */ if (!LP_ALLOWS_BEAM_POCKELS_CELL) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setNewTruthTableState(190, 0); } /* State 1 -- Permitted */ if ( LP_ALLOWS_BEAM_POCKELS_CELL) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setNewTruthTableState(190, 1); } /* Mechanical Shutter Position */ /* State 0 -- Moving */ if (!MPS_IN20_200_MSHT1_IN_FAULT && !MPS_IN20_200_MSHT1_OUT_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(203, 0); } /* State 1 -- Out */ if (!MPS_IN20_200_MSHT1_IN_FAULT && MPS_IN20_200_MSHT1_OUT_FAULT) { setNewTruthTableState(203, 1); } /* State 2 -- In */ if ( MPS_IN20_200_MSHT1_IN_FAULT && !MPS_IN20_200_MSHT1_OUT_FAULT) { setNewTruthTableState(203, 2); } /* State 3 -- Broken */ if ( MPS_IN20_200_MSHT1_IN_FAULT && MPS_IN20_200_MSHT1_OUT_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(203, 3); } /* Pockels Cell AND Gate */ /* State 0 -- Bypassed */ if (!MPS_IN20_200_ANDALLACTV_FAULT) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(252, 0); } /* State 1 -- Active */ if ( MPS_IN20_200_ANDALLACTV_FAULT) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(252, 1); } /* YG BL211 Position */ /* State 0 -- Moving */ if (!YG_BL211_IN_LIMIT_STATE && !YG_BL211_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(281, 0); } /* State 1 -- Out */ if (!YG_BL211_IN_LIMIT_STATE && YG_BL211_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate120Hz, MPSMitigationDeviceBykik); setNewTruthTableState(281, 1); } /* State 2 -- In */ if ( YG_BL211_IN_LIMIT_STATE && !YG_BL211_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate10Hz, MPSMitigationDeviceBykik); setNewTruthTableState(281, 2); } /* State 3 -- Broken */ if ( YG_BL211_IN_LIMIT_STATE && YG_BL211_OUT_LIMIT_STATE) { setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDevicePockelsCell); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceMechanicalShutter); setMaxRateAfterDevice(MPSRate0Hz, MPSMitigationDeviceBykik); setNewTruthTableState(281, 3); } /* * Determine if the truth tables are in states that will ignore other tables */ /* Laser Heater Attenuator Is In */ if (LHATTEN_IN_LIMIT_STATE) { setNewTruthTableState(184, MPSTruthTableIgnoreIgnoring); } else { setNewTruthTableState(184, MPSTruthTableIgnoreNotIgnoring); } /* ST1/ST2 Are In */ if (STPR_FEE1_1_ST1ST2IN_POSITION && !STPR_FEE1_1_ST1ST2OUT_POSITION) { setNewTruthTableState(253, MPSTruthTableIgnoreIgnoring); } else { setNewTruthTableState(253, MPSTruthTableIgnoreNotIgnoring); } /* TD11 Is In */ if (TD11_IN_LIMIT_STATE) { setNewTruthTableState(254, MPSTruthTableIgnoreIgnoring); } else { setNewTruthTableState(254, MPSTruthTableIgnoreNotIgnoring); } /* TDUND Is In */ if (TDUND_IN_POSITION) { setNewTruthTableState(255, MPSTruthTableIgnoreIgnoring); } else { setNewTruthTableState(255, MPSTruthTableIgnoreNotIgnoring); } /* YG BL211 Is In */ if (YG_BL211_IN_LIMIT_STATE && !YG_BL211_OUT_LIMIT_STATE) { setNewTruthTableState(280, MPSTruthTableIgnoreIgnoring); } else { setNewTruthTableState(280, MPSTruthTableIgnoreNotIgnoring); }