
Logic 2022-06-27-a
-------------
* Rename logic for YAGS:LI21:995 to YAGS:IN20:995

Logic 2022-06-24-a
-------------
* "Remove" (set all mitigation to 120 Hz) log per D. Zhu area physicist for:
1.  XPP SB2 VGC 02 Gate Valve Position
2.  XPP SB2 VGC 03 Gate Valve Position
3.  XPP SB2 VGC 04 Gate Valve Position

Logic 2022-04-21-a
-------------
* No logic changes

Logic 2022-04-07-b
-------------
* Change TDUNDB In to 10 Hz limit

Logic 2022-04-07-a
-------------
* Add PEPPEX Zone Plate mover logic 
* Make TDUNDB IN = 30 Hz rate limit

Logic 2022-03-16-a
-------------
* Add logic for VVMG UNDS 4998

Logic 2022-01-13-b
-------------
BLMH47 logic pointed to wrong database entry.  It pointed to BLMH27.  Fixed it

Logic 2022-01-13-a
-------------
* Add Logic for CBXFEL:
  * CBLM:UNDH:4775 Single Shot and 500 ms
  * BPMS:UNDH:4790 Position
  * SIOC:UNDH:MP11:HEARTBEAT Watchdog

Logic 2021-11-16-a
-------------
* Fix SXRSS Mode Logic Code -> if{} if{} changed to if{} else if{}

Logic 2021-09-23-a
-------------
* TDUNDB mitigated to 10 Hz

Logic 2021-09-21-b
-------------
* Update SXRSS Mode to include SLIT mode
* Chance SXRSS Watchdog logic to affect BYKIKS instead of Hard Line mitigation devices

Logic 2021-09-21-a
-------------
* No logic changes

Logic 2021-09-20-c
-------------
Add in SXRSS Mode

Logic 2021-09-20-b
-------------
* Logic for SXR Guardian and CBLM watchdog faults

Logic 2021-09-20-a
-------------
* New logic for the configuration

Logic 2021-09-19-a
-------------
* Replace CBLM ALIVE and RMON faults with summary faults
* Add back SXRSS logic
* Add logic for 2 CRIX fast faults from LN 216

Logic 2021-06-29-b
-------------
* Same as previous but 30 Hz TDUNDB

Logic 2021-06-29-a
-------------
* Fix misconfiguration so that RIX vacuum fast fault points to RIX Vacuum input instead of RIX motion input

Logic 2021-04-30-b
-------------
* Change TDUNDB In to 10 Hz rate limit

Logic 2021-04-30-a
-------------
* No new logic yet.  IN20 Power Meter will come later

Logic 2021-04-27-b
-------------
* Remove logic for BLM/PIC Watchdoe Downstream of TDUND.  No PIC / BLM link nodes exist downstream of TDUND anymore.

Logic 2021-04-27-a
-------------
* RFBHX35 and RFBHX36
  * Add all UNDH HXR ignore devices which were missing for these 2 pieces of logic
* VVMG UNDH 1498, 1798,2838, and 2844
  * Remove GUNH mitigation from these 4 truth tables to make these valves consistent with all other VVMG in UNDH area
* SLSXS1 Position
  * Change state 0 to Broken and state 3 to Moving.  This is opposite of other "profile monitor"-like devices, but the in-vacuum switches of these slits works slightly differently.  Also, the interface box between the in-vacuum switches and the MPS requires AC power.  If AC power is lost, both switches go to "0", so the state should read Broken.  It is also verified that in the "Moving" state, both switches read high.

Logic 2021-04-26-a
-------------
* Fix bug from previous version where HXRSS Modes were 1, 2, 3 instead of 0, 1, 2.  Do not use previous version.

Logic 2021-04-24-a
-------------
Add 6 pieces of logic for HXRSS:
1.  VVMG UNDH 2838 Position
2.  VVMG UNDH 2844 Position
3.  HXRSS Mode (code)
4.  HXRSS Crystal Position
5.  HXRSS Cryatal Encoder Valid State
6.  HXRSS Magnet ON/OFF

Logic 2021-03-25-b
-------------
* ALternate logic with TDUNDB Position limited to 30 Hz.

Logic 2021-03-25-a
-------------
Remove logic for inputs from LN125 and LN196

Logic 2021-03-23-a
-------------
No new logic - just same logic with new input channels

Logic 2021-03-18-a
-------------
* Add logic for XRT HOMS Fast Fault 1, fault at BYKIK

Logic 2021-03-02-b
-------------
TDUNDB IN Position limit SXR to 10 Hz

Logic 2021-03-02-a
-------------
Activate logic for VVMG LTUS 505 and VVMG LTUS 656

Logic 2021-02-24-b
-------------
Change TDUNDB IN logic to reduce rate to 30 Hz instead of 10.

Logic 2021-02-24-a
-------------
* Change RIX logic to use new MR1K1 OUT ignore logic
    * Applies to RIX Vacuum, MC, and Optics Faults

Logic 2021-01-27-b
-------------
TDUNDB IN mitigates BYKIKS to 10 Hz

Logic 2021-01-27-a
-------------
Change TDUNDB to mitigate at BYKIKS to 30 Hz.

Logic 2021-01-11-a
-------------
* Add logic to monitor power on TDUNDB when it is IN
* Add 2 logic tables to handle 10 Hz vs 30 Hz at TDUNDB IN depending on Wire Scanner mode setting 

Logic 2020-12-11-a
-------------
* Add temporary logic for all SXRSS insertable devices so that beam is inhibited if device is not OUT.  Keep this until system is commissioned


Logic 2020-12-10-a
-------------
* Add standard RFBHX logic for RFBHX12, 13, 14, 16, 17, and 18
* Re-enable logic for VVMG UNDH 1498 and VVMG UNDH 1798

Logic 2020-12-01-b
-------------
TDUNDB Position limits to 10 Hz

Logic 2020-12-01-a
-------------
* Add logic for MPLN_FEES_1_RIXVACFASTFLT
                MPLN_FEES_1_RIXOPTFASTFLT
                MPLN_FEES_1_RIXMCFASTFLT

Logic 2020-11-30-b
-------------
TDUNDB Position IN = 30 Hz rate limit at BYKIKS

Logic 2020-11-30-a
-------------
Change name of ignore logic ST1K4 to ST3K4 per PCDS.

Logic 2020-11-12-b
-------------
TDUNDB in at 10 Hz

Logic 2020-11-12-a
-------------
* Add ignore devices ST1K4 Is In,
                     MR1K1 Is In,
                     ST1K2 Is In
* ST1K4 IN	    MR1K1 IN	    ST1K2 IN
TMO Fast Shutter Fault 2 (Vacuum FFO 4)	RIX Motion Fast Fault 1 (no-fault)	RIX Motion Fast Fault 2 (no-fault)
TMO Vacuum Fast Fault 2	TMO Vacuum Fast Fault 1	RIX Vacuum Fast Fault 1 (no-fault)
TMO Motion Fast Fault 1	TMO Vacuum Fast Fault 2	
TMO Motion Fast Fault 2	TMO Motion Fast Fault 1	
	TMO Motion Fast Fault 2	
	TMO Fast Shutter Fault 1 (Vacuum FFO 3)	
	TMO Fast Shutter Fault 2 (Vacuum FFO 4)	

Logic 2020-11-09-b
-------------
* TDUNDB Position In limit SXR to 30 Hz

Logic 2020-11-09-a
-------------
Logic associated with removed inputs is also deletec.

Logic 2020-10-26-b
-------------
* Change TDUNDB Position IN logic to rate limit SXR to 10 Hz

Logic 2020-10-26-a
-------------
* Add logic for RFBHX19 and RFBHX20
* Change name of VVPG UNDH 1998 to VVPG UNDH 2098 and set to active

Logic 2020-10-23-a
-------------
* Change logic to allow 30 Hz to TDUNDB

Logic 2020-10-16-a
-------------
* Add logic for VVPM:UNDH:2298
* Add logic for RFBHX15, 22, and 23
* Change verbiage of HXR and SXR Arbiter faults to PMPS Rate Limit

Logic 2020-10-08-a
-------------
* Add logic for TMO Fast Shutter Fault 1 and 2

Logic 2020-10-06-b
-------------
* TDUNGB In to 10 Hz

Logic 2020-10-06-a
-------------
* Logic for changes to magnet names
* TDUNDB at 30 Hz

Logic 2020-10-03-b
-------------
* TDUNDB Position 10 Hz when TDUNDB Is In

Logic 2020-10-03-a
-------------
* Add logic for new devices
* Change TDUNDB Position to 30 Hz when TDUNDB Is In
* Change PIC Raw CHarge Thresholds: LTUH 420, 452, 480, 722 to mitigate only at BYKIK

Logic 2020-09-23-a
-------------
* Add ignore logic to BKRCUS Current and BRCUSDC Current such that they are ignored when the other is on

Logic 2020-09-08-d
-------------
* No logic for MPS / Timing agreement
* TDUNDB 10 Hz

Logic 2020-09-08-c
-------------
* TDUNDB Position 30 Hz
* No logic that matters for Timing / Mps Ageement

Logic 2020-09-08-b
-------------
* Include EVG / MPS agree logic, TDUNDB Position 30 Hz limit

Logic 2020-09-08-a
-------------
No Changes - new LP version

Logic 2020-09-06-a
-------------
* Add logic to fault beam if either condition in config is met.

Logic 2020-09-03-a
-------------
* Add logic for vac valves
* add logic for xleap positions

Logic 2020-08-28-b
-------------
* TDUNDB Position to 10 Hz

Logic 2020-08-28-a
-------------
* Move RFBHX35 and RFBHX36 from SXR logic to HXR logic - copy mistake problem.
* Remove gun mitigation for TDUND and TDUNDB positions
* TDUNDB Position 30 Hz limit

Logic 2020-08-24-b
-------------
* Remove GMD and XGMD until PMPS is ready
* TDUNDB to 10 Hz

Logic 2020-08-24-a
-------------
* Remove GMD and XGMD logic until PMPS is ready
* TDUND Position 30 Hz

Logic 2020-08-22-b
-------------
*TDUNDB Position regulates to 10 Hz

Logic 2020-08-22-a
-------------
* Remove "Destination SXR / Destination HXR" Ignore logig from all undulator BLM faults
* TDUNDB Position rate limits to 30 Hz

Logic 2020-08-19-b
-------------
* New mitigation strategy where everything downstream of fast abort kickers aborts only at kickers
* TDUNDB Position regulates to 10 Hz at BYKIKS

Logic 2020-08-19-a
-------------
* Change Mitigation Strategy so that everything downstream of fast abort kicker aborts only at fast abort kicker
* TDUNDB Position regulates to 30 Hz at BYKIKS
* Add necessary logic based on BPM inputs that were removed and re-added at new channels
* Add TDES and TREF faults for all three kickers to monitor timing

Logic 2020-08-07-c
-------------
* Move TDUNDB head to 10 Hz limit.

Logic 2020-08-07-b
-------------
Set TDUNDB to 30 Hz at BYKIKS

Logic 2020-08-07-a
-------------
* Fix RFBPM SXR faults 16, 19, 51 for real.
* move the head for TDUNDB Position to 10 Hz from 30 Hz

Logic 2020-08-06-b
-------------
* Change TDUNDB to 30 Hz rate limit.

Logic 2020-08-06-a
-------------
Add logic for CLTS magnets BKRCUS, BLRCUS, BRCUSDC, BRCUS1 currents.
Change BYKIK logic to look like BYKIKS logic - no more in link processor

Logic 2020-08-05-a
-------------
Add logic for VVPG CLTS 685 POSITION STATE

Logic 2020-07-31-c
-------------
ran out of disk space the first time.  trying again.

Logic 2020-07-31-b
-------------
Remove CXI DG4 VGC Gate Valve Position

Logic 2020-07-31-a
-------------
* Add logic for SXR BPM orbit
* Rename some badly named FEE logic

Logic 2020-07-25-b
-------------
Remove BLMS48 Threshold I0 HXR fault missed in previous version

Logic 2020-07-25-a
-------------
* Fix SH2 PPS Stopper Logic so no rate limit when In
* Remove BLMS HXR faults - not needed

Logic 2020-07-24-a
-------------
* Add logic for Soft BPM orbit faults
* Change name of ignore logic for ST1 to ST1L0
* Add logic fo SH2 Position
* Change name of FEE summary faults to make it more clear
* Remove BLMH SXR faults

Logic 2020-07-09-d
-------------
Try one more time to figure out how to do CVS.  This is hopefully for real sending 30 hx past BYKIK when TDUND is in

Logic 2020-07-09-c
-------------
Ignore 2020-07-09-b.  This one changes TDUND to 30 Hz allowed past BYKIK

Logic 2020-07-09-b
-------------
Allow 30 Hz past BYKIK

Logic 2020-07-09-a
-------------
Change ignore conditions for BCS PIC in DMP (DMP997 and DMP998) to not be ignored when split beam stoppers are in.  These devices are common to HXR and SXR.

Logic 2020-07-02-a
-------------
No logic changes

Logic 2020-06-30-a
-------------
Move BPM 2190 to card 5 channel 5
Remove VVPG DMPH/S 424 - this is handled by PCDS

Logic 2020-06-29-a
-------------
Release a version for TDUND proper mitigation after releasing the 30 Hz version

Logic 2020-06-27-b
-------------
This is a temporary version that allows beam to TDUND past BYKIK of 30 Hz for low charge commissioning only.

Logic 2020-06-27-a
-------------
Change TDUND Position to mitigate 10 Hz from BYKIK only, not the gun because of the gun / mps dropouts.

Logic 2020-06-26-b
-------------
Change TDUND Position to be 10 Hz rate limit at gun HXR and BYKIK

Logic 2020-06-26-a
-------------
No config changes.  This is a version that temporarily allows operations to send 30 Hz to TDUND with logic "TDUND Position".  It is only to be used for commissioning, and only with strict administrative controls on the charge.

Logic 2020-06-20-a
-------------
Fix up config and logic for beam to TDUND:
* Change the name of VVPG LTUH 102 to VVPG LTUH 100

Logic 2020-06-14-a
-------------
* Fix logic for all SBST Ready - input was off by one for all logic tables i.e Sub Booster 21 logic looked at input from SBST22
* Add logic for sioc bsys mp01, mp02, mp03 watchdogs now that they are in correct link nodes
* remove logic for slit 10/30 and hydrogen recombiner as they no longer exist


Logic 2020-06-09-a
-------------
Fix mechanical shutter bootstrapping problem.  When the shutter was removed, the shutter position logic tried to put it back in again.  The shutter needs to be not affected by its position logic.  only linac permits and bykik permits are affected.

Logic 2020-06-08-a
-------------
Fix truth table for Gun RF Peak Power Fault which is reversed - 0 is good and 1 is bad.

Logic 2020-06-01-a
-------------
Add logic associated with SXR FEE inputs in LN216
Add logic back for HXR FEE fast faults (x2) in LN145

Logic 2020-05-22-b
-------------
* Remove BYKIK_WD LP EPICS Input
* Change BEND:DMP1 to BEND:DMPH for 4 EPICS PV LP Faults

Logic 2020-05-22-a
-------------
Modify logic to support LTUH MP03, MP04, MP05, and MP06 now being at the correct input channels in configuration.

Logic 2020-05-21-a
-------------
Change EPICS PV Inputs of type QUAD:LTU1 to QUAD:LTUH.  Change associated device name as well

Logic 2020-05-04-a
-------------
Add Logic entries for LP_BYKIK_OK and LP_BYKIKS_OK
Add truth table for BYKIK Current that is associated with LP_BYKIK_OK, but no truth table added yet for BYKIKS Current.

Logic 2020-04-30-a
-------------
* Add Logic to support new inputs.  All inputs are single input.  All either are 120 Hz or 0 Hz permits.

Logic 2020-03-24-a
-------------
Logic associated with these inputs is gone:
SXR_GMD_VGC_01_OPN_DI_POSITION
SXR_GMD_VGC_01_CLS_DI_POSITION

Logic 2020-03-23-b
-------------
No new logic.

Logic 2020-03-23-a
-------------
Add locig for HXR Arbiter and HXR PCDS Fast Faults.

Logic 2020-03-20-b
-------------
No new logic in this version.  New logic to support FEEH configuration in next version

Logic 2020-03-20-a
-------------
Add Logic for XPP_SB2_VGC_04_OPN_DI and new PPS stoppers ST1L0 and ST1L1

Logic 2020-03-19-b
-------------
Incremental Change for LCDS.  Move Stopper SH1 Is In input 0 to STPR_FEE1_ST1_IN_POSITION using logic editor.

Logic 2020-03-19-a
-------------
Incremental Change - Remove PCDS Devices from LN38 and LN39 per Alex Wallace.  Remove Ignore Logic no longer used.

Logic 2020-03-18-a
-------------
There was a bug beginning with version 2020-01-27-a that corrupted the database.  This release captures everything that was done in 2020-01-27-a, 2020-03-12-a, and 2020-02-26-a.  The database is not corrputed.

Logic 2020-03-12-a
-------------
Add HXR Vac logic for XTCAV Manual (Pneumatic) Valve VVPG:DMPH:355 to Link Node 141
Add HXR Stopper logic for Dechirper THz Mirror In/Out switches to LN 134

Logic 2020-02-26-a
-------------
Make inactive:
"VVFS SLTH 130 POSITION" 0
"VVPG SLTH 115 POSITION" 0
"VVPG SLTH 291 POSITION" 0
"VVPG UNDH 1998 POSITION" 0
"VVPG UNDH 2198 POSITION" 0
VVMG UNDH 1498 POSITION" 0
VVMG UNDH 1698 POSITION" 0
VVMG UNDH 2838 POSITION" 0
"VVMG UNDH 2843 POSITION" 0
"VVFS SLTS 130 POSITION" 0
VVPG SLTS 115 POSITION" 0
VVPG SLTS 581 POSITION" 0
VVMG LTUS 656 POSITION" 0
Devices to be installed during upcomming PAMMs

Change STCLTS In limit from 10 Hz to 120 Hz

Change MCC E-stop button to fault ALL mitigation devices

Logic 2020-01-27-a
-------------
*Change linac logic to make BYKIKS mirror behavior for BYKIK.
*Change some HXR device logic, especially downstream PICs, to mirror new HXR behavior - kill at Gun HXR and not trip the shutter so delivery can still happen to SXR
*Set PCAP1-4 collimator thresholds and flowswitch to inactive

*See attached text files for complete list of what was done.

Logic 2020-01-03-b
-------------
Add logic for PICM:CLTS:280 at BLRCUS

Logic 2020-01-03-a
-------------
Add much new logic associated with the new link nodes and the new LCLS2 SXR and HXR beamlines.  Please see the json patch files for a list of all the pieces of logic that were added.  This will serve as the foundation of the system checkout that will be conducted prior to operation.

Logic 2020-01-02-h
-------------
Add ignore devices needed for new SXR beamline
Change input for existing ignore devices TDUND and D2

Logic 2020-01-02-g
-------------
Still trying to fix issue where database gets corrupted after using logic editor to set pieces of logic to inactive.  What has been done here is a new script in version1-0-11 called mpslogicsetactive.py is used to set the active state of logic to 0 writing to the db directly.  Hopefully this fixes the problem.

Logic 2020-01-02-f
-------------
Still having trouble deactivating 2 pieces of logic.  Base of this version is 2020-01-02-c

Logic 2020-01-02-e
-------------
There was an error in the logic sql database for version 2020-01-02-d.  This version uses 2020-01-02-c as input in an attempt to fix the problem

Logic 2020-01-02-d
-------------
Deactivate logic that is temporarily not needed per LCLS2 upgrade.  These logic will come back once devices are re-established.

Logic 2020-01-02-c
-------------
Logic changes associated with renaming certain devices that remain after LCLS2 upgrade

Logic 2020-01-02-b
-------------
Logic changes after deleting devices from legacy link nodes.

Logic 2020-01-02-a
-------------
No new logic.  Support new configuration for new link nodes.

Logic 2019-12-02-a
-------------
In this version, I add all the inputs to support the SXR beamlines, but I have not yet removed the un-needed inputs from the old link nodes.  This is initially for testing and commissioning purposes.  No logic has been added yet.
Logic 2019-11-12-a
-------------
* New device LP_BKRCUS_FIRE

Logic 2019-04-17-a
-------------
* New scripts version1-0-10:
  Add 1 Hz rate option to mpslogicpatch.py
* New truth tables:
      MPS Beam Permit: Gun RF HXR
      MPS Beam Permit: Gun RF SXR
      MPS Beam Permit: BYKIKS
      Rate Request: Gun RF HXR 1 Hz
      Rate Request: Gun RF HXR 10 Hz
      Rate Request: Gun RF HXR 30 Hz
      Rate Request: Gun RF HXR 60 Hz
      Rate Request: Gun RF HXR Burst
      Rate Request: Gun RF HXR Single Shot
      Rate Request: Gun RF SXR 1 Hz
      Rate Request: Gun RF SXR 10 Hz
      Rate Request: Gun RF SXR 30 Hz
      Rate Request: Gun RF SXR 60 Hz
      Rate Request: Gun RF SXR Burst
      Rate Request: Gun RF SXR Single Shot
      Rate Request: BYKIKS 1 Hz
      Rate Request: BYKIKS 10 Hz
      Rate Request: BYKIKS 30 Hz
      Rate Request: BYKIKS 60 Hz
      Rate Request: BYKIKS Burst
      Rate Request: BYKIKS Single Shot
      Beam Destination: HXR
      Beam Destination: SXR  

Logic 2019-04-16-a
-------------
* New LP internal faults
(did not successfully add to logic
in last version)
      ALLOWS_BEAM_BYKIKS
      ALLOWS_BEAM_GUN_HXR
      ALLOWS_BEAM_GUN_SXR
      MAX_RATE_BYKIKS_10_HZ
      MAX_RATE_BYKIKS_1_HZ
      MAX_RATE_BYKIKS_30_HZ
      MAX_RATE_BYKIKS_60_HZ
      MAX_RATE_BYKIKS_BURST
      MAX_RATE_BYKIKS_SINGLE_SHOT
      MAX_RATE_GUN_HXR_10_HZ
      MAX_RATE_GUN_HXR_1_HZ
      MAX_RATE_GUN_HXR_30_HZ
      MAX_RATE_GUN_HXR_60_HZ
      MAX_RATE_GUN_HXR_BURST
      MAX_RATE_GUN_HXR_SINGLE_SHOT
      MAX_RATE_GUN_SXR_10_HZ
      MAX_RATE_GUN_SXR_1_HZ
      MAX_RATE_GUN_SXR_30_HZ
      MAX_RATE_GUN_SXR_60_HZ
      MAX_RATE_GUN_SXR_BURST
      MAX_RATE_GUN_SXR_SINGLE_SHOT
      DESTINATION_HXR
      DESTINATION_SXR



Logic 2019-03-19-a
-------------
* Use new version:
    scripts/version1-0-9
* New LP internal faults
      ALLOWS_BEAM_BYKIKS
      ALLOWS_BEAM_GUN_HXR
      ALLOWS_BEAM_GUN_SXR
      MAX_RATE_BYKIKS_10_HZ
      MAX_RATE_BYKIKS_1_HZ
      MAX_RATE_BYKIKS_30_HZ
      MAX_RATE_BYKIKS_60_HZ
      MAX_RATE_BYKIKS_BURST
      MAX_RATE_BYKIKS_SINGLE_SHOT
      MAX_RATE_GUN_HXR_10_HZ
      MAX_RATE_GUN_HXR_1_HZ
      MAX_RATE_GUN_HXR_30_HZ
      MAX_RATE_GUN_HXR_60_HZ
      MAX_RATE_GUN_HXR_BURST
      MAX_RATE_GUN_HXR_SINGLE_SHOT
      MAX_RATE_GUN_SXR_10_HZ
      MAX_RATE_GUN_SXR_1_HZ
      MAX_RATE_GUN_SXR_30_HZ
      MAX_RATE_GUN_SXR_60_HZ
      MAX_RATE_GUN_SXR_BURST
      MAX_RATE_GUN_SXR_SINGLE_SHOT
      DESTINATION_HXR
      DESTINATION_SXR


Logic 2019-03-18-b
-------------
* Use new version:
    scripts/version1-0-8
* Update mitigation device name:
    Pockels Cell to Gun Linac (PC to GUNL)
    *except* in places that affect LP code

Logic 2019-03-18-a
-------------
* Use new versions:
    mps-R1-1-1-branch-clts-R0-0
    scripts/version1-0-7
    algorithmCommon/version1-0-3
* Add new mitigation devices
    Gun HXR
    Gun SXR
    BYKIKS
  and add these for each macro state with
  rate of 'Ignore'

Logic 2018-09-25-a
-------------
* New truth table
  LTU Dechirper - MIRR LTU1 548 Position (MIRDVDHCP)

Logic 2018-08-28-a
-------------
* Remove XLEAP Wiggler - Downstream End Vertical Gap Too Small
         XLEAP Wiggler - Upstream End Vertical Gap Too Small
* Remove ignore logic XCS Is Not In Main Line
  Affected truth tables: 
	 XCS SB1 VGC 01 Gate Valve Position
	 XCS SB1 VGC 02 Gate Valve Position
	 XCS SB2 VGC 01 Gate Valve Position
	 XCS SB1 Diagnostic Stopper Position

Logic 2018-03-21-a
-------------
* Set OTR30 truth tables inactive:
  OTR30 LTU1 449 Position
  OTR30 LTU1 449 Position When TDUND Not In

NOTE: Do not use MpsConfiguration-R2-77


Logic 2018-03-02-a
-------------
* Remove MFX Beam Focusing Interlock (Beryllium Lens)

Logic 2017-12-13-a
-------------
* XLEAP MIRXL - MIRR LTU1 829 Position:
  Make 3 mm position allowed (change rate from 0 -> 120 Hz)

Logic 2017-10-17-a
-------------
* Set 'Main Manifold Gauge: LI30 Station 9' Inactive
* Set 'XCS Gate Valve Summary - XRT Periscope Line' Inactive
* Rename FEE camera 852 and 913 logic to be more accurate


Logic 2017-07-24-a
-------------
* New truth table
  XCS Gate Valve Summary - XRT Persicope Line

Logic 2017-06-19-a
-------------
* Swap XLEAP mirror 3mm and 5mm position
  inputs (they are currently reversed).


Logic 2017-06-08-b
-------------
* Rename M3H to XRT-M2 in logic truth 
  table names and state names
* XRT-M2 (aka M3H) no longer has valid
  in position; deactivated related logic
* FEE camera 852 and 913 FEE PLC interlock
  logic now does photon transmission check;
  updated truth table names and state names
  accordingly
* Updated truth table names for A-line kickers
  now that kickers have been re-named as part
  of BSY Reconfiguration. (LN inputs still
  need rename eventually.)

Logic 2017-06-08-a
-------------
* New logic for XLEAP wiggler gap
  and insertable devices

Logic 2017-05-24-a
-------------
* Remove obsolete truth tables:
    THz Radiator Beryllium Foil
    FEE Camera 1561 Position

Logic 2017-05-22-a
-------------
* Add logic for XLEAP LTU Beam Loss Fiber

Logic 2017-05-18-h
-------------
* Add D2 as ignore device for 
  PIC Trigger Missed (LN31)

Logic 2017-05-18-g
-------------
* Add YAG01, YAG02, TD11 as ignore devices
  for Linac PIC truth tables

Logic 2017-05-18-f
-------------
* Add TD11 as ignore device for Linac 
  truth tables downstream of TD11

Logic 2017-05-18-e
-------------
* Reinstate TDUND as an ignore
  device for some end-of-LTU BLMs.
  (It was removed in 2017-05-18-a.)
  See changes.log for more details.

Logic 2017-05-18-d
-------------
* Add missing ignore devices for
  PIC Trigger Missed (LN25)
  BCS PIC RAW Charge Threshold DMP 997
  BCS PIC RAW Charge Threshold DMP 998

Logic 2017-05-18-c
-------------
* Add missing D2 ignore device
  to more LTU truth tables.

Logic 2017-05-18-b
-------------
* More ignore logic cleanup. Add D2
  as ignore device for injector OTRs
  when 'TDUND Not In'

Logic 2017-05-18-a
-------------
* Fix: Remove TDUND as ignore condition
  for many LTU truth tables. Unclear why
  it was in the list originally.

Logic 2017-05-17-a
-------------
* Add D2 Stopper Summary In as ignore condition
  for many LTU, UND, DMP truth tables.
* Add TD11 as ignore condition for 
  VVMG LTU1 505 Position  

Logic 2017-05-16-a
-------------
* Allow 120 Hz beam when D2 is IN

Logic 2017-05-13-a
-------------
* Remove OTR22 truth tables:
    OTR22 Position
    OTR22 Position When TDUND Not In
* For 2017 FEE reconfiguration, many changes.
    See changes.log and supporting files for details.


Logic 2017-05-10-b
-------------
* Logic for new A-line valve:
  VVPG BSYA 340 Position
* Remove inactive obsolete logic
  DEV 50PR3 Position
* Per K. Jobe, remove logic associated
  with A-line copper target:
    A-Line Secondary Target Position
    A-Line Secondary Target Flow Switch
    A-Line Secondary Target Klixon
    A-Line Secondary Target Is Out

Logic 2017-05-10-a
-------------
* Remove references to obsolete FEE Spoiler SP0
  and Stoppers ST1/ST2:
  - Remove truth tables:
      Spoiler SP0 DMP1 765 Position
      Stopper: ST1/ST2 Position
  - Remove ignore logic:
      Spoiler SP0 Is In
      ST1/ST2 Are In


Logic 2017-04-28-a
-------------
* Remove:
  PIC Raw Charge Thresholds: BSYH 520 PCBSYH/A
  Flowswitch: COLL BSYH 520 (PCBSYH/A)
  Flowswitch: COLL BSYH 479 (PCAPM1)
  Flowswitch: COLL BSYH 495 (PCAPM3)
  Flowswitch: COLL BSYH 487 (PCAPM2)
* Add:
  Flowswitch: COLL BSYH 479, 487, 495, 503  (PCAPM1-4)

Logic 2017-04-17-a
-------------
Many changes to support 2017 downtime BSY Reconfiguration of LCLS common-line,
including some A-line related changes. More details can be found in changes.log
and the other supporting documents. 

* Change 'A-Line B1/B2 Is Not On AND A-Line Kicker Is Not Enabled' 
    to 'A-Line Kicker Is Not Enabled'
* Change 'BSY GLAST Target' to 'A-Line Secondary Target'
    (target now in A-line; no longer in common-line)
* Add new truth tables:
    Flowswitch: COLL BSYH 479 (PCAPM1)
    Flowswitch: COLL BSYH 487 (PCAPM2)
    Flowswitch: COLL BSYH 495 (PCAPM3)
    Flowswitch: COLL BSYH 503 (PCAPM4)
    Flowswitch: COLL BSYH 520 (PCBSYH/A)
    PIC Raw Charge Thresholds: BSYH 479 (PCAPM1)
    PIC Raw Charge Thresholds: BSYH 487 (PCAPM2)
    PIC Raw Charge Thresholds: BSYH 495 (PCAPM3)
    PIC Raw Charge Thresholds: BSYH 503 (PCAPM4)
    PIC Raw Charge Thresholds: BSYH 520 PCBSYH/A
    PIC Raw Charge Thresholds: BSYH 762 PC90
    PIC Raw Charge Thresholds: BSYH 836 PC119
    Temperature RTD Summary: BSY Common Line
    VVFS CLTH 101 Position
    VVPG BSYH 470 Position
    VVPG BSYH 541 Position
    VVPG BSYH 837 Position
    VVPG CLTH 178 Position
    VVPG CLTH 375 Position
* Remove obsolete truth tables
    PIC Raw Charge Thresholds: BSY0 16
    PIC Raw Charge Thresholds: BSY0 33
    PIC Raw Charge Thresholds: BSY0 45
    PIC Raw Charge Thresholds: BSY0 59
    PIC Raw Charge Thresholds: BSY0 78A
    PIC Raw Charge Thresholds: BSY0 78B
    DPS Temperature LI30
    Fast Shutter FV2A LI30 Position
    Fast Shutter FV2 LI30 Position
    VVPG BSY0 IV2 Position
    VVPG BSY0 IV3 Position
    VVPG BSY0 IV4 Position
    Temperature RTD Summary: BSY Common Line Before D2
    Temperature RTD Summary: BSY Common Line Past D2
    Ion Chamber Gas Flowswitch BSY A
    Ion Chamber Gas Flowswitch BSY B
    Ion Chamber Gas Flowswitch BSY C
    Flowswitch: BSY PC320
    Flowswitch: BSY PC90
    Flowswitch: COLL BSY0 16 (50PC20)
    Flowswitch: COLL BSY0 33 (50PC30)
    Flowswitch: COLL BSY0 45 (50PC-45)
    Flowswitch: COLL BSY0 59 (PC0119)
    Flowswitch: COLL BSY0 65 (PC0145)
    Flowswitch: COLL BSY0 67 (PC0155)
    Flowswitch: COLL BSY0 69 (PC0165)
    Flowswitch: COLL BSY0 71 (PC0175)
    Flowswitch: COLL BSY0 73 (PC0185)
    Flowswitch: COLL BSY0 75 (PC0195)


Logic 2016-11-09-a
-------------
* Remove 'MFX Gate Valves Not All Open - PLC Summary Status' 
* Rename 'Toroid Comparator Dogleg (IM02 vs IM03)'
  to 'Toroid Comparator Dogleg 1 (IM02 vs IM03)'


Logic 2016-11-03-a
-------------
* Modify titles of toroid comparator truth table 
  names for clarity

Logic 2016-10-20-a
-------------
* Add ignore condition 'BSY GLAST Target Is Out'
* Modify 'BSY GLAST Target Klixon' and 'BSY GLAST Target Flow Switch'
  to use above ignore condition instead of using the target
  position in the actual truth table

Logic 2016-10-19-a
-------------
* Delete obsolete and inactive logic:
    Profile Monitor BSY0 55

Logic 2016-10-18-a
-------------
* Remove truth tables:
  Profile Monitor BSY0 45 Position When D2 or TDUND Not In
  Profile Monitor BSY0 45 Position

Logic 2016-10-17-a
-------------
* New MFX interlocks
* Add new analog link node inputs (not yet used in logic)

Logic 2016-08-25-a
-------------
* Build against database 2016-08-25-a in order to test analog
  link node inputs. No logic changes.

Logic 2016-05-10-a
-------------
* Again, minor change to state names for these truth tables:
  FEE Spectrometer Crystal - Beam Energy Too Low When Crystal Not Out
  FEE Spectrometer Crystal - Pulse Energy Too High When Crystal Not Out 
  Gas Detector Problem When FEE Spectrometer Crystal Not Out


Logic 2016-05-02-a
-------------
* Remove unused and obsolete device
   TIUKEYSW aka TIU:IN20:1:KEY_SWITCH_STATE
* Rename Spoiler: SP0 DMP1 765 Position to Spoiler SP0 DMP1 765 Position



Logic 2016-04-29-a
-------------
* Minor change to state names for these truth tables:
  FEE Spectrometer Crystal - Beam Energy Too Low When Crystal Not Out
  FEE Spectrometer Crystal - Pulse Energy Too High When Crystal Not Out 
  Gas Detector Problem When FEE Spectrometer Crystal Not Out
Logic 2016-04-26-a
-------------
* New truth tables for FEE spectrometer crystal protection
  FEE Spectrometer Crystal - Pulse Energy Too High When Crystal Not Out
  Gas Detector Problem When FEE Spectrometer Crystal Not Out
**Linear parent logic unless otherwise noted**

Logic 2016-04-24-a
-------------
* No logic changes. Modify Makfile to use scripts/version1-0-6

Logic 2016-03-01-a
-------------
* "FEE Solid Attenuators - Gas Pressure Interlock": allow SATTs 3 and 4 
  to be IN

Logic 2016-02-26-a
-------------
* Remove obsolete inputs and associated logic - should not affect algorithm

Logic 2016-02-25-a
-------------
* Remove obsolete inputs and associated logic - should not affect algorithm

Logic 2016-02-24-a
-------------
* Remove Dechirper BPM interlocks
* Remove dangling unused database objects - should not affect algorithm

Logic 2016-02-12-a
-------------
* Update LTU Horizontal Dechirper Gap truth table now that
  we have 2 independent gap switches

Logic 2016-01-22-b
-------------
Remove LTU Dechirper - 10 Hz Rate Limit if Dechirper Not Out

Logic 2016-01-22-a - BASED ON 2015-12-17-a
-------------
Rename some inputs to match their PV names. See changes.log
for details.

Logic 2015-12-17-b
-------------
Remove LTU Dechirper - 10 Hz Rate Limit if Dechirper Not Out

Logic 2015-12-17-a - BASED ON 2015-11-09-a
-------------
* Remove unused duplicate truth table
* Fix XRT S5 state names (Moving and Broken were swapped)
* Update LTU Vertical Dechirper Gap truth table now that
  we have 2 independent gap switches

Logic 2015-11-09-b
-------------
Remove LTU Dechirper - 10 Hz Rate Limit if Dechirper Not Out

Logic 2015-11-09-a - BASED ON 2015-10-10-a
-------------
* Remove photon logic:
	  HXX:HXM:VGC:01 Gate Valve Position
          HXX:HXM:VGC:02 Gate Valve Position
          HXX:HXM:VGC:03 Gate Valve Position
	  XRT HXRAY MXT Isolation Valve HXX-MXT-VGC-01
	  NEH AMO Focusing Optics Entrance Gate Valve KBO-VGC-01
	  NEH AMO Focusing Optics Exit Gate Valve KBO-VGC-02
	  NEH AMO LAMP Gate Valve VGC 30 Position
	  NEH AMO LAMP Gate Valve VGC 30 Is In Beam
	  NEH AMO LAMP Gate Valve VGC 30 Is Out of Beam
* Add photon logic:
	  NEH AMO Valves Ok for Beam - Summary From PLC	
	  MEC BXL VGC 01 Gate Valve Position
	  XRT HXRAY MXT Gate Valve HXX:MXT:VGC:01
	  XRT HXRAY MXT Gate Valve HXX:MXT:VGC:02
	  XRT HXRAY MXT Gate Valve HXX:MXT:VGC:03
	  XRT HXRAY MXT Gate Valve HXX:MXT:VGC:05 
* Add ignore devices to  TDUND Position 
* Remove B4C Position
* Remove Temperature RTD Summary: North Arc

Logic 2015-10-10-b
-------------
Remove LTU Dechirper - 10 Hz Rate Limit if Dechirper Not Out

Logic 2015-10-10-a
-------------
Remove LTU Dechirper - Undulators Must Be Out If Dechirper Not Out

Logic 2015-10-09-a - BASED ON 2015-09-08-a
-------------
Add MEC DV4 VCG 01 Gate Valve Position
Use database version 2015-10-09-a

Logic 2015-09-08-z: NON-LINEAR LOGIC
-------------
This is a version to be used ONLY for LTU Dechirper commissioning.
It is based on 2015-09-04-a with these changes:
* Add commissioning Dechirper logic:
  LTU Dechirper Commissioning - BPM 550 Watchdog
  LTU Dechirper Commissioning - BPM 550 X/Y Position
  LTU Dechirper Commissioning - TDUND Must Be In

Logic 2015-09-08-a
-------------
* Add production Dechirper logic:
  LTU Dechirper - Undulators Must Be Out If Dechirper In
  LTU Dechirper - 10 Hz Raw Limit if Jaws Not Out
  LTU Dechirper - BPM 550 Watchdog
  LTU Dechirper - BPM 550 X/Y Position
  LTU Dechirper - Horizontal Gap Too Small
  LTU Dechirper - Vertical Gap Too Small
  Ignore device: LTU Dechirper Is Out

Logic 2015-09-04-a
-------------
* Add truth table "MFX Gate Valves Not All Open - PLC Summary Status"

Logic 2015-09-03-a
-------------
* Add truth table "VVFV IN20 785 Position"
* Add Dechirper BLF truth tables:
    "BLM Heartbeat: Dechirper LTU1 BLF545"  
    "BLM Pedestal Thresholds: Dechirper LTU1 BLF545"
    "BLM Raw Charge Thresholds: Dechirper LTU1 BLF545"
* Set "XPP CS-PAD 1 Detector Damage Fault" inactive

Logic 2015-07-13-b
-------------
* Explicity add inputs for is-code logic (those that were missing)
  to support MPS GUI improvements
* Update logic for CXI:SC3:VGC:01. See changelog for details.

Logic 2015-07-13-a
-------------
* Add new truth table for CXI gate valve: 
    "CXI:SC3:VGC:01 Gate Valve Position"
* Modify BC1 toroid comparator state names to reflect new threshold

Logic 2015-05-18-a
-------------
* Add new truth table FEE Solid Attenuators - Gas Pressure Interlock
* Modify ignore device lists for: 
    HXR - Beam Energy Too Low With M1S Out
    FEE Spectrometer Crystal - Beam Energy Too Low When Crystal Not Out

Logic 2015-05-04-a
-------------
* Add new devices: LN42 trigger; LTU dechirper BLF
* Add truth table PIC Trigger Missed (LN42)
* Remove duplicate truth table Mirror BL21 Position 
* Per CATER request, add MAD names to OTR/YAG truth tables.
  Then, to be consistent, add unit numbers to other OTR/YAG
  truth tables

Logic 2015-03-04-a
-------------
* Add TD11 Position truth table to fault moving/broken state

Logic 2015-03-02-c
-------------
* Remove BX01/BX02 and BXG from ignore device lists
  for truth tables also ignored by TD11
* Remove duplicate Flowswitch: COLL BSYA 1015 (PC10)
* Rename BSY GLAST Target to BSY GLAST Target Position
* Remove duplicate Linac slow and fast valves

Logic 2015-03-02-b
-------------
* Rename TIU, flow switch, IMPS Heartbeat, Pockels Cell
  truth tables for clarity and consistency

Logic 2015-03-02-a
-------------
* Remove duplicate truth tables:
  TIU: DPS Temperature
  TIU: Fast Shutter 2 Position: LI30
  TIU: Fast Shutter 2A Position: LI30
  YG BL241 Position
  YG BL351 Position
* Change TIU:MCC Emergency Radiation Stopper
  to be always evaluated (never ignored)
* Add D2 as ignore device for HXRSS logic

Logic 2015-02-27-a
-------------
* New truth table 'YAG02 Is In'
* New ignore device 'YAG02 Is In'
* Add 'YAG02 Is In' ignore device to all devices ignored by YAG01
  *except* 
	Wakefield Shield Gun Spectrometer
	Wakefield Shield Straight Ahead
	BXG Status
	Toroid Peak Current Monitor IM01
	YG BL241 Position
	YAG IN20 241 Position
* Change 'BLM/PIC Watchdog: IN20' and 'TIU: VVS: Circuit Breaker: LI20"
  to be always evaluated (previously ignored by YAG01)
* Remove obsolete truth table Profile Monitor BSY0 45 - Deprecated

Logic 2015-02-26-a
-------------
* Rename ignore device 'YG BL211 Is In' to 'YAG01 Is In'

*************Out-of-band release******************
Logic 2015-01-07-b
-------------
* NOTE: this version is a pseudo-branch, containing 
  just 2 changes from 2015-01-07-a. 
  Last-minute release to support LCLS MD activities:
    - Ignore 30-9 slow valve if TD11 is IN	 
  This algorithm was unloaded at the end of the MD
  and the logic changes in this release are NOT
  included in any subsequent releases
**************************************************

Logic 2015-01-07-a
-------------
* Add TDUND flow switch logic
* Reorganize Profile Monitor BSY0 45 logic to 
  take advantage of ignore devices instead of 
  using stopper positions as inputs to logic.
  Set 'Profile Monitor BSY0 45' logic to Not Active
  Add 2 new truth tables: 'Profile Monitor BSY0 45 Position'
  and 'Profile Monitor BSY0 45 Position When D2 or TDUND Not In'
* Fix typo in truth table name. Change 'FEE Spectrometer Crystal - 
  Beam Energy Too Low With Crystal Out' to 'FEE Spectrometer 
  Crystal - Beam Energy Too Low When Crystal Not Out'

Logic 2014-12-05-a
-------------
* Add logic to protect
  FEE spectrometer crystal
  from low energy beam

Logic 2014-10-24-a
------------
* Add truth tables
  XPP SB2 VGC 02 Gate Valve Position
  XPP SB2 VGC 03 Gate Valve Position

Logic 2014-10-16-a
------------
* BCS PIC RAW Charge Threshold DMP 997/998: 
  add D2 to ignore list
* OTR21/OTR22 Position:
  add TD11 To ignore list
* OTR30/OTR33 Position:
  add TD11 and D2 to ignore list

Logic 2014-10-10-a
------------
* Set 'Stopper: ST1/ST2 Position' to only
be ignored if D2 IN

Logic 2014-10-01-a
------------
* Add HXR Beam Energy with M1S Out truth table

Logic 2014-09-24-a
------------
* Cleanup of photon logic ignore device lists
  See changes.log for more information

Logic 2014-09-23-a
------------
* Add new ignore device SP0 spoiler, add it as
  ignore device to appropriate truth tables

Logic 2014-07-02-a
------------
* Modify D2 logic to rate-limit beam to 10 Hz 
  (from 120) when D2 is IN
* Update PIC HVPS input names to be consistent
* Add truth tables for missing PIC HVPS inputs: 
  LI20, LI24, BSY
* Fix ignore devices for LI24 BLM/PIC watchdog

Logic 2014-06-09-a
------------
* Added logic for DMP SP0 Spoiler Position

Logic 2014-05-30-a
------------
* Remove photon M3H from lists of ignore devices

Logic 2014-05-13-a
------------
* Remove CXI Detector Damage truth tables
* Set B4C Protection of ST1/ST2 inactive
* Update B4C Position
* BSY RTD truth table name cleanup
* Fix incorrect LHS mitigation rate assignment for 
  some non-LHS-related truth tables

Logic 2014-03-31-a
------------
* Update CXI valve logic per A. Wallace

Logic 2014-03-12-a
------------
* Update CXI Configurations 2 and 7 per A. Wallace

Logic 2014-02-28-a
------------
* Changed names and removed channels for CXI.
* Updated CXI configuration summary logic
* Added D2 as Ignore Device for many CXI truth tables

Logic 2014-02-26-a
------------
* Update SXRSS Mode logic; remove temporary mode truth tables that
  were created for commissioning

Logic 2014-02-21-a
------------
* Cleaned up FEE1 M1S Mirror Beam Energy Upper Limit truth table

Logic 2014-02-06-a
------------
* No logic changes
* Use database 2014-01-06-a to pick up databaseCommon/version1-0-4,
  which adds channel access security to MPS bypasses

Logic 2014-01-06-a
------------
* 50PC30, 50PC45, PC0119 - no longer ignore when 
  A-Line B1/B2 Is Not On AND A-Line Kicker Is Not Enabled
  (never should have been the case)
* SXRSS: Add individual truth tables for each insertable device;
  Modify mode logic to take advantage of these new tables

Logic 2013-12-17-a
------------
* SXRSS Mode: Seeded Mode: Allow M3 to be either IN or OUT
  (previously required to be IN)

Logic 2013-12-02-a
------------
* Modifications to HXR Beam Energy Lower Limit for future use and
  set inactive for now
* Add FEE1 M1S Mirror State to check for inconsistencies
* Add S5B to ignore list for HF4 LAM VGC 01 Gate Valve Position
* Add D2  to ignore list for B4C Protection of ST1/ST2  

Logic 2013-11-11-a
------------
* Enable production SXRSS Mode State; 
  disable temporary SXRSS Mode State - Chicane, Slit, and M3 Active

Logic 2013-10-28-a
------------
* A-line IV40: Ignore when 'SL10 Closed' or 'B1/B2 Off and
  A-line Kicker not enabled'

Logic 2013-10-15-a
------------
* Changes for next AMO run:
  -Remove NEH AMO Diagnostics Chamber Gate Valve
  -Remove ANEH AMO HFP Beam Stop
  -Remove NEH AMO End Station Ready
  -Remove NEH AMO High Field Physics Chamber Gate Valve Summary
  -Add NEH AMO LAMP VGC 30 Position truth tables

Logic 2013-10-10-a
------------
* Modify PSI Profile Monitor truth table to use YAGS:LTU1:743 inputs
  instead of OTRS:LTU1:743 inputs; changed truth table name to use 
  YAG instead of OTR

Logic 2013-10-04-a
------------
* Add logic for SXRSS with Chicane, Slit, and M3 Active (for M3 test)
* Remove previous M3 standalone logic; not needed
* Add LTU PSI profile monitor logic

Logic 2013-09-24-a
------------
* Add logic for BSY GLAST Target Flow Switch
* Add logic for SXRSS M3 (temporary for test of mirror only)
* Modify logic for BSY collimator 65, 67, 69, 71, 73, 75) flow switches
  so that they are not masked by "A-Line B1/B2 Is Not On AND A-Line Kicker Is Not Enabled"
* Revive Inactive BSY GLAST Target Klixon with new logic

Logic 2013-08-28-a
------------
* Modify Ignore Device A-Line B1/B2 Is Not ON and A-Line Kicker Is Not Enabled:
  - Replace power supply ON status with 2 new OFF status inputs from PPS
* Per R. Iverson, modify BSY PR45 logic to require D2 or TDUND to be IN if PR45 IN
* Per R. Iverson, M. Stanek remove SXR lower energy limit

Logic 2013-08-02-a
------------
* Add SXRSS logic and devices
* Active SXRSS logic assumes only slit and chicane are installed
* Inactive SXRSS logic added for potential future use:
  - All SXRSS devices installed
  - slit, chicane, M2, M3 installed

Logic 2013-07-19-a
------------
* Per CATER 109696, add fault if A-line IV26 NOT_OUT
* Add missing state names for B4C protection

Logic 2013-07-08-a
------------
* Per CATER request 109199, add fault if B4C IN 
  Existing B4C and ST1_ST2 interlocks remain in place
* Add protection of M1S mirror; cause fault if energy high and mirror not out

Logic 2013-06-15-a
------------
* Per Cater#108919
	Regarding mitigating potential B4C damage while running low energy.  
	In attendance were Rad Physics, Paul Miller, John Arthur, Roger, 
	Jim Turner, and M. Stanek.

	The interim solution for allowing low energy running without a BAS 2 mJ 
	limit was an agreement that we would not allow photons on the ST0 B4C piece 
	at all.  Sayed Rokni accepted that as an interim measure, we would use MPS 
	to ensure this condition.  

 	What is need required:
	If ST1/ST2 = Not OUT,  Zero rate fault the Gun.
 	This fault should have an 'ignore condition' when TDUND is in, 
	D2 is in, TD11 is in, BX01/02 is NOT ON, YAG BL211 is IN, BXG is ON.
	
	Existing B4C ST1_ST2 shall stay in place.




Logic 2013-06-13-a
------------
* Change D2 Stopper State Strings. Bit 0 and 1 were reversed. Change does not affect logic only readback status string

Logic 2013-06-03-a
------------
* Add logic for GLAST Target in BSY
* Add logic for Vac Valve BSY 4005 (IV40)

Logic 2013-05-27-a
------------
* Add New STPR 60 System C-code logic, all must be IN or OUT. 
	Change Ignore logic status to use new D2 IN bits and
	De-Activate D2 Logic from BCS
* Add TDUND IN to Prof BSY 45 logic per R.Iverson
* De-Activate A-Line LGPS/COR magnets from A-Line logic per R. Iverson and J. Nelson
	- lgps ab01 1010, 1090, 1950, 2050, 2750, 2850, and xcor 2890, 3212, 
	and ycor 2911, 3313.
* De-Activate A-Line GLAST Klixon per R. Iverson and J. Nelson



Logic 2012-12-10-a
------------
* Change logic for HXRSS Mode logic per Heinz-Dieter Nuhn:
	- HXRSS bend lints changed from 12.7<E < 14.2 to 10<E <15
	- Changed Seeded Mode definition to require Crystal to be IN
	- Changed Phase Shifter Mode to all HXRSS Bend to be at ANY state

Logic 2012-11-12-a
------------
* Add THZR:LTU1:741:IN_LMTSW, OUT_LMSW limit switches for new THZ-2
* removed a spare vacuum valve on LN 31, card 1, ch 9 so that we could add
  these limit switches

Logic    2012-10-a5-a
---------------------
* Add new logic to set lower limit of Beam Energy for Undulator per R. Iverson. 
	Interlocks monitors BEND:DMP1:400:INTOL_BLIM and will prevent E<2.3 GeV from
	Undulator.



Logic    2012-09-30-a
---------------------
* Modify logic for SXR:GMD:VGC_01, add S2 Stopper to ignore logic and renamed 
	logic table to include NEH at the beginning like the rest of NEH tables.
* Included upstream beam destinations to BCS PIC/LION inputs per HVS,
	and changed the logic name to BCS PIC/LION Raw Charge Threshold


Logic   2012-09-25-a from 2012-09-18-a
------------
* add new NEH SXR GMD Vacuum valve per Photon controls

Logic   2012-09-25-a DO NOT USE THIS VERSION
------------
* add new Dump PICMs 380, 381 at X-TCAV
* add new NEH SXR GMD Vacuum valve per Photon controls

Logic   2012-09-18-a
------------
* add new Dump Vacuum valve 355 at X-TCAV
* add new NEH XPP SH3 stopper status (no logic yet) per Photon controls

Logic   2012-06-29-a
------------
* Fixed bug in SL10 IS IN state, state # is 15 (ie 1111) not 4.
* Fixed a bug in HXRSS Mode Logic (is code=True) became false in Logic 2012-06-25-a, 
	Logic 2012-06-25-a should NO Longer be used!!

Logic   2012-06-25-a
------------
* De-activate some BSYA logic  per R. Iverson and C. hast
* Added PPS STOPPER Inputs	
* De-Activated A-Line Profile Monitor Summary logic per R. Iverson 

Logic   2012-06-05-a
------------
* De-activate some BSY PICS in Logic per R. Iverson
	PIC Unit numbers:
	LCLS  SLC 
	65	145	Trips often if PM1 is on-bypassed			
	67	155				
	69	165				
	71	175				
	73	185				
	75	195				
	76	205	

2012-05-21-a
------------
* Changes for CXI and MEC
* Logic for A-Line, removed unused inputs


2012-05-05-a
------------
    Add A-line FAST Valve VVFS:BSYA:2855 logic (past SL10)
    De-Activate 20-9 Slow Valve logic CATER # 99890
    A-Line_PICM_Logic_patch.json
    A-Line_Patch_Logic_Past_SL10_Apr2012_r1.json
    A-Line_Patch_Logic_Past_SL10_Apr2012_2_r1.json
    A-Line_Patch_Logic_Past_SL10_Apr2012_3_r1.json
    A-Line_Patch_Logic_Pre_SL10_Apr2012_r1.json
    MEC_XRT_Patch_Logic_File_May2012_R1.json
    XCOR BSYA  database input and logic
       
    A-LINE Devices that have not been implemented in Logic
    ######################################################
    #VGFS_BSYA_1410_FSG22_OK_STATE
    #VGFS_BSYA_3320_FSG29_OK_STATE  



2012-03-20-b
------------
* based on 2012-03-20-a and includes new CXI valve logic

2012-03-20-a
------------
* same logic as 2012-01-06-a but includes the config typo fix

2012-01-03-b
------------
* Added VVFS:DMP1:107 Fast Shutter
* New MEC Stopper XRT S6 Is In ignore device and logic


2011-11-29-b
------------
Same as 2011-11-29-a but all HXRSS logic Active.

2011-11-29-a
------------
* Logic Based of 2011-11-15-b, but De-Activated HXRSS not installed device logic
* Added new MEC Logic per Mark Arndt
* Add veto condition "M3H Mirror Is In Beam" to the following logic sections:
	** CXI KB2 VGC 02 Gate Valve Position
	** HF4 LAM VGC 01 Gate Valve Position

*And make one change to a description:
	* The logic in Section 18.2 of the 2011-11-15a version of the logic doc should be retitled "MEC XRT Attenuator Inspection Mirror Position".


2011-11-15-b
------------
*Same as 2011-11-07-b, but added CXI_MEC logic patch from 2011-11-15-a
*New devices inputs for A-LINK Kicker included in database 2011-11-15-a was not added to logic input list

2011-11-15-a
------------
*Same as 2011-11-07-a, but added new CXI_MEC logic patch 
*New devices inputs for A-LINK Kicker included in database 2011-11-15-a was not added to logic input list

2011-11-07-b
------------
*Same as 2011-10-31-b, 
*corrects "BXG is On" 0 bit input error which was set to BEND_IN20_751_OFF, corrected it to be BEND_IN20_231_OFF.
* Add new CXI and MEC inputs, but no associated logic.
* De-Activated TIU Sub-booster Ready for LI23 and LI24 per Stanek, these are now solid state and logic is not needed.

2011-11-07-a
------------
Same as 2011-10-31-a but HXRSS logic is all Activate
*corrects "BXG is On" 0 bit input error which was set to BEND_IN20_751_OFF, corrected it to be BEND_IN20_231_OFF.
* Add new CXI and MEC inputs, but no associated logic.
* De-Activated TIU Sub-booster Ready for LI23 and LI24 per Stanek, these are now solid state and logic is not needed.

2011-10-31-b
------------
Same as 2011-10-31-a but HXRSS logic is all Activate

2011-10-31-a
------------
Add HXRSS logic, but De-Activate all logic expect Raft (BMLN) IN/OUT logic table and Chicane Bend ON/OFF

2011-09-19-a
------------
Per Mark Arndt:
* New logic patch file for one new MEC logic loop.

* A diamond window was put in on XPP. We need to change the logic in "XPP SB2 VGC 01 Gate Valve Position" such that beam is allowed up to 120 Hz when the valve is Open or Closed, but dumped when Moving or Broken.


2011-08-10-a
------------
Fixed error in M3H Ignore logic definitions. 

2011-08-09-a
------------
* Per Mark Arndt, made lots of edits to CXI, XPP,MEC logic tables and added new ignore devices M3H Mirror Is In Beam and M3H Mirror Is Out of Beam. See 2011-08-09-a/logic_log for details.


2011-08-01-a
------------
* Per Iverson, updated logic for "BYKIK Readback Signal" to be ignored when D2 is IN
* Updated the following logic table names to fix typo
	DG2 Diagnostic Stopper Position  from	DG2 Diagnostic Stopper Poistion
	UM6 Diagnostic Stopper Position	 from	UM6 Diagnostic Stopper Poistion
	PPS Stopper S5B Position	 from 	PPS Stopper S5B Poistion

2011-07-12-a
------------
* Per Mark Arndt, 
Config and Logic changes are:

Link Node 40 card 1, channel 16  is now CXI_DSU_MMM_07_B_POSITION 
	becomes   CXI_DSD_MMS_07_B_POSITION
Link Node 40 card 6, channel 2   is now XCS_DG3_VGC_01_OPN_DI_POSITION
	becomes   CXI_DSU_MMS_07_B_POSITION

*XCS_DG3_VGC_01_OPN_DI_POSITION is removed from configuration 
	DB and logic DB device list. It was not used on any
	logic tables.

* Add new device (rename a junk name to new device
	CXI_DSD_MMS_07_B_POSITION)
* Change name of CXI_DSU_MMM_07_B_POSITION to CXI_DSU_MMS_07_B_POSITION
* Add revised CXI_Config4 logic C code
* Update CXI_Config5 with name modification (CXI_DSU_MMM_07_B_POSITION 
	to CXI_DSU_MMS_07_B_POSITION)


2011-07-05-a
------------
* Per Mark Arndt, add ignore devices:

  to "UM6 Diagnostic Stopper Poistion" [sic]:
    "Stopper SH1 Is In",
    "Stopper SH2 Is In",
    "TD11 Is In",
    "TDUND Is In",
    "ST1/ST2 Are In"  

  to "DG2 Diagnostic Stopper Poistion" [sic]:
    "Stopper SH1 Is In",
    "Stopper SH2 Is In",
    "TD11 Is In",
    "TDUND Is In",
    "ST1/ST2 Are In",
    "Diag Stopper HFX UM6 Is In"  

  to "XCS SB1 VGC 01 Gate Valve Position":
    "Stopper XRT S5 Is In"

  to "XCS SB1 VGC 02 Gate Valve Position":
    "Stopper XRT S5 Is In"

  to "XCS SB2 VGC 01 Gate Valve Position":
    "Stopper XRT S5 Is In"

  to "XCS SB1 Diagnostic Stopper Position":
    "Stopper XRT S5 Is In"

  and add new devices:

    HXX_HXM_MMS_01_B_POSITION
    HXX_MPS_PLC_01_OK_STATUS
    STPR_XRT1_1_S4IN_POSITION
    STPR_XRT1_1_S4OUT_POSITION
    STPR_XRT1_1_S6IN_POSITION
    STPR_XRT1_1_S6OUT_POSITION
    XCS_MPS_PLC_01_OK_STATUS
    XPP_MPS_PLC_01_OK_STATUS

2011-06-28-a
------------
* Per Mark Arndt, add logic tables:

"XCS SB1 VGC 01 Gate Valve Position"
"XCS SB1 VGC 02 Gate Valve Position"
"XCS SB2 VGC 01 Gate Valve Position"
"XCS SB1 Diagnostic Stopper Position"

  and remove logic tables:

"NEH AMO Beam Shutter Summary"
"HFX:MON:VGC:03 Gate Valve Position"

  and add ignore devices:

"Diag Stopper XCS SB1 Is In"
"XCS Is Not In Main Line"

2011-06-17-a
------------
* Fix bug introduced in 2011-06-15-a:
  Remove ignore condition XPP SB2 VGC 01 Gate Valve Position

2011-06-16-a **Bug in this version; DO NOT USE**
------------
* Fix bug introduced in 2011-06-15-a:
  Restored ignore condition XPP-NH3-POS-00 Beamline Is In, which had been inadvertently deleted.
   

2011-06-15-a **Bug in this version; DO NOT USE**
------------
* Per Mark Arndt
* Add XPP logic table:
  "XPP SB2 BGC 01 Gate Valve Position"
* Add ignore condition:
  "XPP-NH3-POS0-00 Beamline Is Not In" 
* Remove obsolete CXI logic table:
  "CXI CS PAD Damage Fault"

2011-05-31-a
------------
* Per Mark Arndt and XPP, add logic tables:
"HX3 MON VGC 01 Gate Valve Position" 
"HX2 UVD VGC 01 Gate Valve Position"

2011-05-25-b
------------
* Per Mark Arndt and CXI request, added new CXI inputs. 
*Added D2 stopper inputs,  Add D2 as ignore logic device.
*RTD past D2.
*ADD TD11 to Ignore logic for BSY valves per Iverson.

2011-05-25-a
------------
*IMPORTANT IMPORTANT IMPORTANT 
	NOTE: reverted back to logic 2010-09-28-a because 
	everything in logic sqlite files from then till 
	now was malformed. Recreated all logic changes 
	so that logic 2011-02-26-a and 2011-05-25-a 
	are equivalent, but 2011-05-25-a has db issues 
	resolve and extra S5 Position Logic. Added 
	AutoIncroment to sqlite Mpslogic.mpl tables.

2011-02-26-a
------------
* Per Mark Arndt and CXI request, reverted back to CXI MPS CFG 4 CONFID logic from "CXI Configuration 4 Summary". Created new logic for "CXI CS-PAD-Damge Fault" based on EPICS input. After down input should move to hardwired. This logic is based on parent logic 2011-02-02-a.

2011-02-25-a
------------
* Per Mark Arndt and CXI request, temporarily changed CXI MPS CFG 4 CONFID logic from "CXI Configuration 4 Summary" to "CXI CS-PAD-Damge Fault". Changes should be backed out when CXI changes can support a proper protection design.

2011-02-02-a
------------
* Deactivate "PR1_2 Prof Summary" and "Dev 50PR3 Prof" from active logic per R. Iverson Jan 2011.

2011-01-08-a
------------
* Changed logic table for  table "Gun RF Peak Power 20-6", signal is OK in the low state and FAULTED in high state.

2010-12-06-a
------------
* Add logic for CXI Config 1-7 and PLC_OK Status logic 


2010-12-01-a
------------
* Removed extra HXX:MXT:VGC_01:OPN_DI Position input and removed from logic 


2010-11-29-a
------------
* Added CXI logic per Mark Arndt,
* De-activated logic table TIU:PLIC Summary in LI29

2010-09-28-a
------------
* Changed name of input TRHZ:DMP1:310 to THZR:DMP1:350

2010-09-24-a
------------
* Add new VVMG:DMP1:743
* UnActivate Logic for, BSY Fast Gauges G1, G10, G12, G4 
* UnActivate Logic for, BSY BEND B11 (new supple not connected)

2010-08-30-a
------------
* Modified "NEH2 HXRAY StrongBack 1 Isolation Valve HX2:SB1:VGC:01" to inactive 
* Added "NEH AMO End Station Ready AMO-EXP-MPS-01"

2010-08-17-a
------------
* Added BYKICK Watchdog (no logic added, only device)

2010-08-11-a
------------
* Added BSYA PICS 1701A and 1701B

2010-08-09-a
------------
* Modified BSYA device logic to ignore BYKICK rates.

2010-08-05-a
------------
* Modified LN25 BSYA PIC truth tables to be ignored when BSYA B1/B2 is NOT_ON
* Added BSYA Prof Summary

2010-07-09-b
------------
* Added LN25 PIC truth tables

2010-07-09-a
------------
* Added LN11 and LN22 PIC truth tables

2010-07-06-a
------------
* Added LN16 PIC truth tables

2010-06-30-a
------------
* !!! Parent: 2010-06-21-a
* !!! Does not include updates from 2010-06-22-a
* Corrects "Flowswitch CE11" logic

2010-06-22-a
------------
* Added PIC truth tables for LNs 11, 16, and 22

2010-06-21-a
------------
* Renamed truth tables

2010-06-14-a
------------
* Combined toroid comparator logic tables.
* Updated toroid comparator logic table and state names.
* Ignoring IM02/IM03 when BX01/BX02 is off.

2010-05-25-a
------------
* Reversed "MPS Mechanical Shutter Position" logic.  Device is not fail-safe.

2010-05-20-a
------------
* Applied patch patch-bsy.json

2010-05-19-b
------------
* Added BLM:UND1:4 timing check

2010-05-19-a
------------
* Wakefield shield straight ahead is ignored when BXG is on

2010-05-18-b
------------
* Corrected toroid logic polarity

2010-05-18-a
------------
* Added patch patch-in20-li24

2010-05-17-a
------------
* Added BX01/BX02 and BXG on/off ignore conditions and rate limiting

2010-05-12-a
------------
* Removed "Fast Valve VVFS LI20 Position"
