(********************************************* Import-Export Version := RSLogix 5000 v15.01 Owner := SLAC, Stanford Linear Accelerator Center Exported := Wed Sep 30 15:16:07 2009 **********************************************) IE_VER := 2.6; CONTROLLER SD38020554C3_0_0 (Description := "LCLS Laser Safety System logic", ProcessorType := 1756-L55, Major := 15, TimeSlice := 10, PowerLossProgram := Powerup_Program, CommPath := AB_ETHIP-1\134.79.219.80\Backplane\0, RedundancyEnabled := 0, KeepTestEditsOnSwitchOver := 0, DataTablePadPercentage := 50, SecurityCode := 0, SFCExecutionControl := CurrentActive, SFCRestartPosition := MostRecent, SFCLastScan := DontScan, SerialNumber := 16#0013_6818, MatchProjectToController := No) DATATYPE DATA_ARRAY (Description := "Array for passing data to the control system", FamilyType := NoFamily) DINT Data_00; DINT Data_01; DINT Data_02; DINT Data_03; DINT Data_04; DINT Data_05; DINT Data_06; DINT Data_07; END_DATATYPE DATATYPE FAULTRECORD (FamilyType := NoFamily) DINT Time_Low (Description := "lower 32 bits of the fault timestamp value"); DINT Time_High (Description := "upper 32 bits of the fault timestamp value"); INT Type (Description := "fault type (program, I/O, etc.)"); INT Code (Description := "unique code for the fault"); DINT Info[8] (Description := "fault specifiic information", Radix := Hex); END_DATATYPE MODULE Local (Parent := Local, ParentModPortId := 1, CatalogNumber := 1756-L55, Vendor := 1, ProductType := 14, ProductCode := 51, Major := 15, Minor := 5, PortLabel := RxBACKPLANE, ChassisSize := 7, Slot := 0, Mode := 2#0000_0000_0000_0001, CompatibleModule := 0, KeyMask := 2#0000_0000_0001_1111) END_MODULE MODULE Remote_0 (Description := "ControlNet Bridge N1", Parent := Local, ParentModPortId := 1, CatalogNumber := 1756-CNB/D, Vendor := 1, ProductType := 12, ProductCode := 7, Major := 5, Minor := 5, PortLabel := RxBACKPLANE, Slot := 1, Mode := 2#0000_0000_0000_0000, CompatibleModule := 1, KeyMask := 2#0000_0000_0001_1111, ControlNetSignature := 16#6b2a_9cb3) END_MODULE MODULE Remote_1 (Description := "Remote Comm N2", Parent := Remote_0, ParentModPortId := 2, CatalogNumber := 1756-CNBR/D, Vendor := 1, ProductType := 12, ProductCode := 8, Major := 5, Minor := 5, PortLabel := CNet, ChassisSize := 7, Slot := 0, NodeAddress := 2, CommMethod := 805306369, Mode := 2#0000_0000_0000_0000, CompatibleModule := 1, KeyMask := 2#0000_0000_0001_1111) CONNECTION Output (Rate := 5000, EventID := 0) InputData := [-1,[[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0],[-1,0]]]; InputForceData := [-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,-1,-1,-1,-1,0,0,0,0,-1,-1,-1,-1,0,0,0,0,-1,-1,-1,-1,0,0,0,0,-1,-1,-1,-1,0,0,0,0,-1,-1,-1,-1,0,0,0,0,-1 ,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; OutputData := [-1,[[0],[0],[0],[0],[0],[0],[0]]]; OutputForceData := [-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; END_CONNECTION END_MODULE MODULE Output_0 (Description := "Diagnostic Output N3/S1", Parent := Remote_1, ParentModPortId := 1, CatalogNumber := 1756-OB16D, Vendor := 1, ProductType := 7, ProductCode := 4, Major := 2, Minor := 1, PortLabel := RxBACKPLANE, Slot := 1, CommMethod := 536870914, ConfigMethod := 8388612, Mode := 2#0000_0000_0000_0000, CompatibleModule := 1, KeyMask := 2#0000_0000_0001_1111) ConfigData := [44,19,1,1,0,0,0,0,0,0,0,0,65535,0]; CONNECTION Diagnostic (Rate := 10000, EventID := 0, ControlNetScheduled := Yes) InputData := [0,2736,[0,-2147483648],0,0,0,0]; InputForceData := [0,0,0,0,-80,10,0,0,0,0,0,0,0,0,0,-128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; OutputData := [0]; OutputForceData := [-80,10,0,0,0,0,0,0,0,0,0,0]; END_CONNECTION END_MODULE MODULE Output_1 (Description := "Diagnostic Output N3/S2", Parent := Remote_1, ParentModPortId := 1, CatalogNumber := 1756-OB16D, Vendor := 1, ProductType := 7, ProductCode := 4, Major := 2, Minor := 1, PortLabel := RxBACKPLANE, Slot := 2, CommMethod := 536870914, ConfigMethod := 8388612, Mode := 2#0000_0000_0000_0000, CompatibleModule := 1, KeyMask := 2#0000_0000_0001_1111) ConfigData := [44,19,1,1,0,0,0,0,0,0,0,0,65535,0]; CONNECTION Diagnostic (Rate := 10000, EventID := 0, ControlNetScheduled := Yes) InputData := [0,32768,[0,-2147483648],0,0,0,0]; InputForceData := [0,0,0,0,0,-128,0,0,0,0,0,0,0,0,0,-128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; OutputData := [0]; OutputForceData := [0,-128,0,0,0,0,0,0,0,0,0,0]; END_CONNECTION END_MODULE MODULE Output_2 (Description := "Diagnostic Output N3/S4", Parent := Remote_1, ParentModPortId := 1, CatalogNumber := 1756-OB16D, Vendor := 1, ProductType := 7, ProductCode := 4, Major := 2, Minor := 1, PortLabel := RxBACKPLANE, Slot := 3, CommMethod := 536870914, ConfigMethod := 8388612, Mode := 2#0000_0000_0000_0000, CompatibleModule := 1, KeyMask := 2#0000_0000_0001_1111) ConfigData := [44,19,1,0,0,0,0,0,0,0,65535,0,0,0]; CONNECTION Diagnostic (Rate := 10000, EventID := 0, ControlNetScheduled := Yes) InputData := [0,18688,[0,-2147483648],0,0,0,0]; InputForceData := [0,0,0,0,0,73,0,0,0,0,0,0,0,0,0,-128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; OutputData := [16384]; OutputForceData := [0,73,0,0,0,0,0,0,0,0,0,0]; END_CONNECTION END_MODULE MODULE Output_3 (Description := "Diagnostic Ouput N3/S5", Parent := Remote_1, ParentModPortId := 1, CatalogNumber := 1756-OB16D, Vendor := 1, ProductType := 7, ProductCode := 4, Major := 2, Minor := 1, PortLabel := RxBACKPLANE, Slot := 4, CommMethod := 536870914, ConfigMethod := 8388612, Mode := 2#0000_0000_0000_0000, CompatibleModule := 1, KeyMask := 2#0000_0000_0001_1111) ConfigData := [44,19,1,0,0,0,0,0,0,0,65535,0,0,0]; CONNECTION Diagnostic (Rate := 10000, EventID := 0, ControlNetScheduled := Yes) InputData := [0,128,[0,-2147483648],0,0,0,0]; InputForceData := [0,0,0,0,-128,0,0,0,0,0,0,0,0,0,0,-128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; OutputData := [0]; OutputForceData := [-128,0,0,0,0,0,0,0,0,0,0,0]; END_CONNECTION END_MODULE MODULE PanelView (Description := "Operator Terminal", Parent := Remote_0, ParentModPortId := 2, CatalogNumber := PanelView, Vendor := 1, ProductType := 24, ProductCode := 2, Major := 2, Minor := 4, PortLabel := CNet, NodeAddress := 4, CommMethod := 536870913, Mode := 2#0000_0000_0000_0000, CompatibleModule := 1, KeyMask := 2#0000_0000_0001_1111) CONNECTION Standard (Rate := 250000, EventID := 0) InputData (COMMENT.DATA[0].0 := "Oscillator_Shtr_Open", COMMENT.DATA[0].1 := "Oscillator_Shtr_Close", COMMENT.DATA[0].2 := "JEDI1_Shutter_Open", COMMENT.DATA[0].3 := "JEDI1_Shutter_Close", COMMENT.DATA[0].6 := "JEDI2_Shutter_Open", COMMENT.DATA[0].7 := "JEDI2_Shutter_Close", COMMENT.DATA[0].8 := "Alignment_Shutter_Open", COMMENT.DATA[0].9 := "Alignment_Shutter_Close", COMMENT.DATA[0].10 := "Heater_Shtr_PVOpen", COMMENT.DATA[0].11 := "Heater_Shtr_PVClose", COMMENT.DATA[0].12 := "Photo_Shtr_PVOpen", COMMENT.DATA[0].13 := "Photo_Shtr_PVClose", COMMENT.DATA[1].0 := "Laser_Bay_Mode_Select", COMMENT.DATA[1].1 := "He_Ne_Alignment_Select", COMMENT.DATA[1].2 := "Tunnel_Alignment_Select", COMMENT.DATA[1].3 := "LB_Green_Mode_Select", COMMENT.DATA[1].4 := "Normal_Operation_Select", COMMENT.DATA[1].5 := "LB_Reset_Command", COMMENT.DATA[1].6 := "LB_Safe_Mode_Select") := [0,-1,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]; InputForceData := [0,0,0,0,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; OutputData (COMMENT.DATA[0].0 := "Oscillator_Shtr_Status", COMMENT.DATA[0].1 := "JEDI1_Shutter_Status", COMMENT.DATA[0].3 := "JEDI2_Shtr_Status", COMMENT.DATA[0].4 := "Alignment_Shtr_Status", COMMENT.DATA[0].6 := "Heater_Shtr_Status", COMMENT.DATA[0].7 := "Photo_Shtr_Status", COMMENT.DATA[0].8 := "Oscillator_Shutter_Pwr", COMMENT.DATA[0].9 := "JEDI1_Shutter_Pwr", COMMENT.DATA[0].11 := "JEDI2_Shutter_Pwr", COMMENT.DATA[0].12 := "Alignment_Shutter_Pwr", COMMENT.DATA[0].14 := "Heater_Shtr_Pwr", COMMENT.DATA[0].15 := "Photocathode_Shtr_Pwr", COMMENT.DATA[1].0 := "LB_Door_ILock_Cmplt", COMMENT.DATA[1].2 := "LB_EE_Latch", COMMENT.DATA[1].4 := "LB_EStop_Latch", COMMENT.DATA[1].6 := "LB_EE_EO_Cmplt", COMMENT.DATA[1].8 := "Master_Key_Enable", COMMENT.DATA[1].10 := "LB_System_Ready", COMMENT.DATA[2].0 := "Mode_Laser_Bay_Only", COMMENT.DATA[2].1 := "Mode_He_Ne_Alignment", COMMENT.DATA[2].2 := "Mode_Tunnel_Alignment", COMMENT.DATA[2].3 := "Mode_LB_Green", COMMENT.DATA[2].4 := "Mode_Normal_Operation", COMMENT.DATA[2].6 := "LB_Safe_Mode", COMMENT.DATA[2].7 := "PPS_Permit", COMMENT.DATA[3].0 := "PV_Shutter_Permit", COMMENT.DATA[3].1 := "PV_Contactor_Permit", COMMENT.DATA[3].2 := "PV_Laser_PS_Permit", COMMENT.DATA[3].3 := "PV_save") := [[36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]; OutputForceData := [-1,0,85,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; END_CONNECTION END_MODULE MODULE Input_0 (Description := "Diagnostic Input N1/S2", Parent := Local, ParentModPortId := 1, CatalogNumber := 1756-IB16D, Vendor := 1, ProductType := 7, ProductCode := 2, Major := 2, Minor := 1, PortLabel := RxBACKPLANE, Slot := 2, CommMethod := 536870913, ConfigMethod := 8388610, Mode := 2#0000_0000_0000_0000, CompatibleModule := 1, KeyMask := 2#0000_0000_0001_1111) ConfigData := [44,17,1,0,0,0,1,1,1,1,0,0,0,0,65535,65535,65535,0,0,0]; CONNECTION StandardInput (Rate := 20000, EventID := 0) InputData := [0,12288,[-1510820815,-2147483606],0,0,0,0]; InputForceData := [0,0,0,0,-71,-118,0,0,49,-76,-14,-91,42,0,0,-128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; END_CONNECTION END_MODULE MODULE Input_1 (Description := "Diagnostic Input N1/S3", Parent := Local, ParentModPortId := 1, CatalogNumber := 1756-IB16D, Vendor := 1, ProductType := 7, ProductCode := 2, Major := 2, Minor := 1, PortLabel := RxBACKPLANE, Slot := 3, CommMethod := 536870913, ConfigMethod := 8388610, Mode := 2#0000_0000_0000_0000, CompatibleModule := 1, KeyMask := 2#0000_0000_0001_1111) ConfigData := [44,17,1,0,0,0,1,1,1,1,0,0,0,0,65535,65535,65535,0,0,0]; CONNECTION StandardInput (Rate := 20000, EventID := 0) InputData := [0,0,[0,-2147483648],0,0,0,0]; InputForceData := [0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,-128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; END_CONNECTION END_MODULE MODULE Input_2 (Description := "Diagnostic Input N1/S5", Parent := Local, ParentModPortId := 1, CatalogNumber := 1756-IB16D, Vendor := 1, ProductType := 7, ProductCode := 2, Major := 2, Minor := 1, PortLabel := RxBACKPLANE, Slot := 4, CommMethod := 536870913, ConfigMethod := 8388610, Mode := 2#0000_0000_0000_0000, CompatibleModule := 1, KeyMask := 2#0000_0000_0001_1111) ConfigData := [44,17,1,0,0,0,1,1,1,1,0,0,0,0,65535,65535,65535,0,0,0]; CONNECTION StandardInput (Rate := 20000, EventID := 0) InputData := [0,0,[0,-2147483648],0,0,0,0]; InputForceData := [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; END_CONNECTION END_MODULE MODULE Input_3 (Parent := Local, ParentModPortId := 1, CatalogNumber := 1756-IB16D, Vendor := 1, ProductType := 7, ProductCode := 2, Major := 2, Minor := 1, PortLabel := RxBACKPLANE, Slot := 5, CommMethod := 536870913, ConfigMethod := 8388610, Mode := 2#0000_0000_0000_0000, CompatibleModule := 1, KeyMask := 2#0000_0000_0001_1111) ConfigData := [44,17,1,0,0,0,1,1,1,1,0,0,0,0,65535,65535,65535,0,0,0]; CONNECTION StandardInput (Rate := 5000, EventID := 0) InputData := [0,0,[0,-2147483648],0,0,0,0]; InputForceData := [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; END_CONNECTION END_MODULE MODULE Ethernet (Parent := Local, ParentModPortId := 1, CatalogNumber := 1756-ENET/A, Vendor := 1, ProductType := 12, ProductCode := 20, Major := 1, Minor := 1, PortLabel := RxBACKPLANE, Slot := 6, Mode := 2#0000_0000_0000_0000, CompatibleModule := 1, KeyMask := 2#0000_0000_0001_1111) END_MODULE TAG EPICS_Out_0 : DATA_ARRAY (Description := "data for EPICS display") := [0,0,0,0,0,0,0,0]; Input_Module_0 OF Local:2:I ; Input_Module_1 OF Local:3:I ; Input_Module_2 OF Local:4:I ; Input_Module_3 OF Local:5:I ; Output_Module_0 OF Remote_1:1:O ; Output_Module_1 OF Remote_1:2:O ; Output_Module_2 OF Remote_1:3:O ; Output_Module_3 OF Remote_1:4:O ; PLCADMIN_PLC_IN20_LS01 : DINT[40] (Description := "PLC Admin: Main PLC Admin array. $NUsed for monitoring of PLC by the EPICS control system.", RADIX := Decimal) := [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,380,205,54,2,0,0,3,0]; PLCADMIN_UPTIMETIMER : TIMER (Description := "PLC Admin: Uptime counter. Used for monitoring of PLC by EPICS control system.") := [-1071850904,1000000000,0]; END_TAG PROGRAM MainProgram (MAIN := MainRoutine, MODE := 0, DisableFlag := 0) TAG Data_Out_0 OF EPICS_Out_0 (Description := "data for EPICS display"); Evolution_Shtr_PVClose OF PanelView:I.Data[0].9 (Description := "panel control", RADIX := Decimal); Evolution_Shtr_PVOpen OF PanelView:I.Data[0].8 (Description := "panel control", RADIX := Decimal); Evolution_Shtr_PVPwr OF PanelView:O.Data[0].12 (Description := "panel status", RADIX := Decimal); Evolution_Shtr_PVStatus OF PanelView:O.Data[0].4 (Description := "panel status", RADIX := Decimal); Evolution_Shutter OF Output_Module_0.Data.15 (Description := "control shutter open", RADIX := Decimal); Evolution_Shutter_Command : BOOL (Description := "command latch", RADIX := Decimal) := 0; Evolution_Shutter_Synch OF Input_Module_0.Data.10 (Description := "shutter readback", RADIX := Decimal); Evolution_Shutter_Timer : TIMER (Description := "warning timer") := [0,15000,0]; Heater_Command : BOOL (Description := "command latch", RADIX := Decimal) := 0; Heater_IN_button OF Input_Module_2.Data.11 (RADIX := Decimal); Heater_IN_Status OF Output_Module_2.Data.11 (RADIX := Decimal); Heater_Key_Status OF Output_Module_2.Data.10 (RADIX := Decimal); Heater_Key_Switch OF Input_Module_2.Data.10 (RADIX := Decimal); Heater_OUT_Button OF Input_Module_2.Data.12 (RADIX := Decimal); Heater_OUT_Status OF Output_Module_2.Data.12 (RADIX := Decimal); Heater_Remote_IN OF Input_Module_3.Data.2 (RADIX := Decimal); Heater_Remote_OUT OF Input_Module_3.Data.3 (RADIX := Decimal); Heater_Shtr_PVClose OF PanelView:I.Data[0].11 (Description := "panel control", RADIX := Decimal); Heater_Shtr_PVOpen OF PanelView:I.Data[0].10 (Description := "panel control", RADIX := Decimal); Heater_Shtr_PVPwr OF PanelView:O.Data[0].14 (Description := "panel status", RADIX := Decimal); Heater_Shtr_PVStatus OF PanelView:O.Data[0].6 (Description := "panel status", RADIX := Decimal); Heater_Shutter OF Output_Module_1.Data.2 (Description := "control shutter open", RADIX := Decimal); Heater_Shutter_Synch OF Input_Module_0.Data.13 (Description := "shutter readback", RADIX := Decimal); Heater_Shutter_Timer : TIMER (Description := "shutter delay timer") := [2949796,15000,0]; He_Ne_Alignment_Select OF PanelView:I.Data[1].1 (Description := "panel control", RADIX := Decimal); JEDI1_Shtr_PVClose OF PanelView:I.Data[0].3 (Description := "panel control", RADIX := Decimal); JEDI1_Shtr_PVOpen OF PanelView:I.Data[0].2 (Description := "panel control", RADIX := Decimal); JEDI1_Shtr_PVPwr OF PanelView:O.Data[0].9 (Description := "panel status", RADIX := Decimal); JEDI1_Shtr_PVStatus OF PanelView:O.Data[0].1 (Description := "panel status", RADIX := Decimal); JEDI1_Shutter OF Output_Module_0.Data.14 (Description := "control shutter open", RADIX := Decimal); JEDI1_Shutter_Command : BOOL (Description := "command latch", RADIX := Decimal) := 0; JEDI1_Shutter_Synch OF Input_Module_0.Data.9 (Description := "shutter readback", RADIX := Decimal); JEDI1_Shutter_Timer : TIMER (Description := "warning timer") := [0,15000,0]; JEDI2_Shtr_PVClose OF PanelView:I.Data[0].7 (Description := "panel control", RADIX := Decimal); JEDI2_Shtr_PVOpen OF PanelView:I.Data[0].6 (Description := "panel control", RADIX := Decimal); JEDI2_Shtr_PVPwr OF PanelView:O.Data[0].11 (Description := "panel status", RADIX := Decimal); JEDI2_Shtr_PVStatus OF PanelView:O.Data[0].3 (Description := "panel status", RADIX := Decimal); JEDI2_Shutter OF Output_Module_1.Data.0 (Description := "control shutter open", RADIX := Decimal); JEDI2_Shutter_Command : BOOL (Description := "command latch", RADIX := Decimal) := 0; JEDI2_Shutter_Synch OF Input_Module_0.Data.11 (Description := "shutter readback", RADIX := Decimal); JEDI2_Shutter_Timer : TIMER (Description := "warning timer") := [0,15000,0]; Laser_Bay_Interlocks_Reset : BOOL (Description := "reset signal", RADIX := Decimal) := 0; Laser_Bay_Mode_Select OF PanelView:I.Data[1].0 (Description := "panel control", RADIX := Decimal); Laser_PS1_Status OF Input_Module_1.Data.8 (Description := "laser power supply", RADIX := Decimal); Laser_PS2_Status OF Input_Module_1.Data.9 (Description := "laser power supply", RADIX := Decimal); Laser_PS3_Status OF Input_Module_1.Data.10 (Description := "laser power supply", RADIX := Decimal); Laser_PS_Permit OF Output_Module_1.Data.14 (Description := "laser external interlocks", RADIX := Decimal); Laser_PS_Rack_Contactor OF Output_Module_1.Data.15 (Description := "rack power", RADIX := Decimal); LB_Audible_Warning OF Output_Module_0.Data.0 (RADIX := Decimal); LB_Caution_Standby : BOOL (Description := "warning annunciator", RADIX := Decimal) := 0; LB_Caution_Yellow OF Output_Module_0.Data.11 (Description := "warning annunciator", RADIX := Decimal); LB_Danger_Green_Laser OF Output_Module_0.Data.12 (Description := "warning annunciator", RADIX := Decimal); LB_Door_Bypass_Timer_Warning OF Output_Module_0.Data.6 (Description := "buzzer for timed bypass", RADIX := Decimal); LB_Door_ILock_Cmplt OF PanelView:O.Data[1].0 (Description := "panel status", RADIX := Decimal); LB_Door_Interlock_Bypass OF Input_Module_0.Data.6 (Description := "inner door bypass", RADIX := Decimal); LB_Door_Timer : TIMER (Description := "inner door bypass timer") := [3180797,15000,15000]; LB_EExit_Door_interlock_switch OF Input_Module_0.Data.7 (Description := "door interlock swtich", RADIX := Decimal); LB_EE_EO_Cmplt OF PanelView:O.Data[1].6 (Description := "panel status", RADIX := Decimal); LB_EE_Latch OF PanelView:O.Data[1].2 (Description := "panel status", RADIX := Decimal); LB_Emergency_Exit_device OF Input_Module_0.Data.4 (Description := "ee switch", RADIX := Decimal); LB_Emergency_Stop OF Input_Module_0.Data.0 (RADIX := Decimal); LB_Emergency_Stop_Sum : BOOL (Description := "laser bay emergency stop summary", RADIX := Decimal) := 0; LB_Eq_Door1_Interlock OF Input_Module_1.Data.0 (Description := "equipment door", RADIX := Decimal); LB_Eq_Door2_Interlock OF Input_Module_1.Data.1 (Description := "equipment door", RADIX := Decimal); LB_EStop_Latch OF PanelView:O.Data[1].4 (Description := "panel status", RADIX := Decimal); LB_Flashing_Light OF Output_Module_0.Data.1 (RADIX := Decimal); LB_Green_Light : BOOL (RADIX := Decimal) := 0; LB_Green_Mode_Select OF PanelView:I.Data[1].3 (Description := "panel control", RADIX := Decimal); LB_Green_Warning_Timer : TIMER := [0,15000,0]; LB_Inner_DoorClosed OF Output_Module_0.Data.5 (Description := "inner door closed indicator", RADIX := Decimal); LB_Inner_Door_interlock_switch OF Input_Module_0.Data.5 (RADIX := Decimal); LB_Laser_ON OF Output_Module_0.Data.8 (Description := "warning annunciator", RADIX := Decimal); LB_Magnalock OF Output_Module_0.Data.4 (Description := "door magnalock", RADIX := Decimal); LB_Maserkey_Sence OF Input_Module_0.Data.15 (Description := "master key detect", RADIX := Decimal); LB_Outer_DoorClosed OF Output_Module_0.Data.7 (Description := "outer door closed indicator", RADIX := Decimal); LB_Outer_Door_Interlock_Switch OF Input_Module_0.Data.3 (RADIX := Decimal); LB_Outer_Door_Release_Dwell : TIMER := [0,5000,0]; LB_Outer_Door_Release_Switch OF Input_Module_0.Data.2 (Description := "door control switch", RADIX := Decimal); LB_Reset_Command OF PanelView:I.Data[1].5 (Description := "panel control", RADIX := Decimal); LB_Reset_Oneshot : BOOL (Description := "reset gate", RADIX := Decimal) := 0; LB_Reset_Temp : BOOL (Description := "Temporary reset command", RADIX := Decimal) := 0; LB_Safe_Green OF Output_Module_0.Data.10 (Description := "warning annunciator", RADIX := Decimal); LB_System_Ready OF PanelView:O.Data[1].10 (Description := "panel status", RADIX := Decimal); LB_Warning_Spare OF Output_Module_0.Data.9 (Description := "warning annunciator", RADIX := Decimal); LB_Warning_Timer : TIMER (Description := "warning timer") := [1424688,15000,0]; Magnalock_Latch : BOOL (RADIX := Decimal) := 0; Manway_Warning_Caution_Yellow OF Output_Module_3.Data.3 (Description := "manway warning annunciator", RADIX := Decimal); Manway_Warning_Danger_HeNe OF Output_Module_3.Data.4 (Description := "manway warning annunciator", RADIX := Decimal); Manway_Warning_Danger_IR OF Output_Module_3.Data.1 (Description := "manway warning annunciator", RADIX := Decimal); Manway_Warning_Danger_UV OF Output_Module_3.Data.0 (Description := "manway warning annunciator", RADIX := Decimal); Manway_Warning_Safe_Green OF Output_Module_3.Data.2 (Description := "manway warning annunciator", RADIX := Decimal); Master_Key_Armed OF Output_Module_0.Data.2 (Description := "master key reset status", RADIX := Decimal); Master_Key_Enable OF PanelView:O.Data[1].8 (Description := "panel status", RADIX := Decimal); Master_Key_Oneshot : BOOL (RADIX := Decimal) := 1; Master_Key_Switch OF Input_Module_0.Data.1 (RADIX := Decimal); Mode_He_Ne_Alignment OF PanelView:O.Data[2].1 (Description := "panel status", RADIX := Decimal); Mode_Laser_Bay_Only OF PanelView:O.Data[2].0 (Description := "panel status", RADIX := Decimal); Mode_LB_Green OF PanelView:O.Data[2].3 (Description := "panel status", RADIX := Decimal); Mode_Normal_Operation OF PanelView:O.Data[2].4 (Description := "panel status", RADIX := Decimal); Mode_Tunnel_Alignment OF PanelView:O.Data[2].2 (Description := "panel status", RADIX := Decimal); noop : BOOL (RADIX := Decimal) := 0; Normal_Operation_Select OF PanelView:I.Data[1].4 (Description := "panel control", RADIX := Decimal); Oscillator_Shtr_PVClose OF PanelView:I.Data[0].1 (Description := "panel control", RADIX := Decimal); Oscillator_Shtr_PVOpen OF PanelView:I.Data[0].0 (Description := "panel control", RADIX := Decimal); Oscillator_Shtr_PVPwr OF PanelView:O.Data[0].8 (Description := "panel status", RADIX := Decimal); Oscillator_Shtr_PVStatus OF PanelView:O.Data[0].0 (Description := "panel status", RADIX := Decimal); Oscillator_Shutter OF Output_Module_0.Data.13 (Description := "control shutter open", RADIX := Decimal); Oscillator_Shutter_Command : BOOL (Description := "command latch", RADIX := Decimal) := 0; Oscillator_Shutter_Synch OF Input_Module_0.Data.8 (Description := "shutter readback", RADIX := Decimal); Oscillator_Shutter_Timer : TIMER (Description := "warning timer") := [1400273,15000,0]; Photocathode_Command : BOOL (Description := "command latch", RADIX := Decimal) := 0; Photocathode_IN_Button OF Input_Module_2.Data.8 (RADIX := Decimal); Photocathode_IN_Status OF Output_Module_2.Data.8 (RADIX := Decimal); Photocathode_Key_Status OF Output_Module_2.Data.7 (RADIX := Decimal); Photocathode_Key_Switch OF Input_Module_2.Data.7 (RADIX := Decimal); Photocathode_OUT_Button OF Input_Module_2.Data.9 (RADIX := Decimal); Photocathode_OUT_Status OF Output_Module_2.Data.9 (RADIX := Decimal); Photocathode_Remote_IN OF Input_Module_3.Data.0 (RADIX := Decimal); Photocathode_Remote_OUT OF Input_Module_3.Data.1 (RADIX := Decimal); Photocathode_Shtr_PVPwr OF PanelView:O.Data[0].15 (Description := "panel status", RADIX := Decimal); Photocathode_Shutter OF Output_Module_1.Data.1 (Description := "control shutter open", RADIX := Decimal); Photocathode_Shutter_Synch OF Input_Module_0.Data.12 (Description := "shutter readback", RADIX := Decimal); Photocathode_Shutter_Timer : TIMER (Description := "shutter delay timer") := [2949797,15000,0]; Photo_Shtr_PVClose OF PanelView:I.Data[0].13 (Description := "panel control", RADIX := Decimal); Photo_Shtr_PVOpen OF PanelView:I.Data[0].12 (Description := "panel control", RADIX := Decimal); Photo_Shtr_PVStatus OF PanelView:O.Data[0].7 (Description := "panel status", RADIX := Decimal); PPS_Injector_Laser_Permit OF Input_Module_3.Data.15 (RADIX := Decimal); PV_Contactor_Permit OF PanelView:O.Data[3].1 (Description := "panel view status", RADIX := Decimal); PV_Laser_PS_Permit OF PanelView:O.Data[3].2 (Description := "panel view status", RADIX := Decimal); PV_Shutter_Permit OF PanelView:O.Data[3].0 (Description := "panel view status", RADIX := Decimal); Shutter_Enable : BOOL (RADIX := Decimal) := 0; System_Normal : BOOL (Description := "diagnostics", RADIX := Decimal) := 0; Transport_Permit OF PanelView:O.Data[2].7 (Description := "panel status", RADIX := Decimal); Tunnel_Alignment_Mode : BOOL (RADIX := Decimal) := 0; Tunnel_Alignment_Mode_Set OF Output_Module_2.Data.2 (RADIX := Decimal); Tunnel_Alignment_Select OF PanelView:I.Data[1].2 (Description := "panel control", RADIX := Decimal); Tunnel_Doorlock_Switch OF Input_Module_2.Data.2 (Description := "set to lock door", RADIX := Decimal); Tunnel_Door_ILock_Cmplt : BOOL (Description := "latched door interlock", RADIX := Decimal) := 0; Tunnel_Door_Interlock_Switch OF Input_Module_2.Data.5 (RADIX := Decimal); Tunnel_Door_Locked_Indicator OF Output_Module_2.Data.3 (Description := "indicator", RADIX := Decimal); Tunnel_Door_Release_Switch OF Input_Module_2.Data.4 (Description := "release and bypass", RADIX := Decimal); Tunnel_EE_Device OF Input_Module_2.Data.6 (RADIX := Decimal); Tunnel_EE_Reset : BOOL (Description := "latched tunnel EE", RADIX := Decimal) := 0; Tunnel_EOff OF Input_Module_2.Data.0 (RADIX := Decimal); Tunnel_EStop_Latch : BOOL (Description := "latched e_stop", RADIX := Decimal) := 0; Tunnel_Interlocks_Cmplt : BOOL (Description := "interlock summary", RADIX := Decimal) := 0; Tunnel_Interlock_Reset : BOOL (Description := "reset signal", RADIX := Decimal) := 0; Tunnel_LSS_Alignment OF Input_Module_2.Data.1 (Description := "tunnel alignment mode", RADIX := Decimal); Tunnel_Magnalock OF Output_Module_2.Data.6 (Description := "output to magnalock", RADIX := Decimal); Tunnel_Magnalock_Latch : BOOL (RADIX := Decimal) := 0; Tunnel_Reset_Button_A OF Input_Module_2.Data.3 (RADIX := Decimal); Tunnel_Reset_Indicator OF Output_Module_2.Data.4 (RADIX := Decimal); Tunnel_Reset_Oneshot : BOOL (Description := "reset gate", RADIX := Decimal) := 0; Tunnel_Warning_Audio OF Output_Module_2.Data.0 (Description := "transport shutter warning", RADIX := Decimal); Tunnel_Warning_Caution_yellow OF Output_Module_3.Data.6 (Description := "housing warning annunciator", RADIX := Decimal); Tunnel_Warning_Danger_red OF Output_Module_3.Data.7 (Description := "housing warning annunciator", RADIX := Decimal); Tunnel_Warning_Flashing_Light OF Output_Module_2.Data.1 (Description := "transport shutter warning", RADIX := Decimal); Tunnel_Warning_Safe_green OF Output_Module_3.Data.5 (Description := "housing warning annunciator", RADIX := Decimal); Tunnel_Warning_Timer_A : TIMER (Description := "warning timer") := [2982324,15000,0]; END_TAG ROUTINE Data_Injector RC: "***************************************************************************$N" "Injector data for EPICS display$N" "***************************************************************************"; N: XIC(Tunnel_EE_Reset)OTE(Data_Out_0.Data_00.0); N: XIC(Tunnel_Door_Interlock_Switch)OTE(Data_Out_0.Data_00.1); N: XIC(Tunnel_Door_ILock_Cmplt)OTE(Data_Out_0.Data_00.2); N: XIC(Tunnel_Door_Locked_Indicator)OTE(Data_Out_0.Data_00.3); N: XIC(Tunnel_EStop_Latch)OTE(Data_Out_0.Data_00.4); N: XIC(Tunnel_Interlocks_Cmplt)OTE(Data_Out_0.Data_00.5); N: XIC(Tunnel_Reset_Indicator)OTE(Data_Out_0.Data_00.6); N: XIC(Manway_Warning_Safe_Green)OTE(Data_Out_0.Data_00.7); N: XIC(Manway_Warning_Caution_Yellow)OTE(Data_Out_0.Data_00.8); N: XIC(Manway_Warning_Danger_HeNe)OTE(Data_Out_0.Data_00.9); N: XIC(Manway_Warning_Danger_IR)OTE(Data_Out_0.Data_00.10); N: XIC(Manway_Warning_Danger_UV)OTE(Data_Out_0.Data_00.11); N: XIC(Tunnel_LSS_Alignment)OTE(Data_Out_0.Data_00.12); N: XIC(Tunnel_Alignment_Mode_Set)OTE(Data_Out_0.Data_00.13); END_ROUTINE ROUTINE Data_Laser_Bay RC: "***************************************************************************$N" "Laser Bay data for EPICS display$N" "***************************************************************************"; N: XIC(LB_Audible_Warning)OTE(Data_Out_0.Data_01.0); N: XIC(LB_Safe_Green)OTE(Data_Out_0.Data_01.1); N: XIC(LB_Caution_Yellow)OTE(Data_Out_0.Data_01.2); N: XIC(LB_Warning_Spare)OTE(Data_Out_0.Data_01.3); N: XIC(LB_Laser_ON)OTE(Data_Out_0.Data_01.4); N: XIC(LB_Danger_Green_Laser)OTE(Data_Out_0.Data_01.5); N: XIC(LB_Door_ILock_Cmplt)OTE(Data_Out_0.Data_01.6); N: XIC(LB_EE_Latch)OTE(Data_Out_0.Data_01.7); N: XIC(LB_EExit_Door_interlock_switch)OTE(Data_Out_0.Data_01.8); N: XIC(LB_EStop_Latch)OTE(Data_Out_0.Data_01.9); N: XIC(LB_Emergency_Stop_Sum)OTE(Data_Out_0.Data_01.10); N: XIC(LB_Inner_Door_interlock_switch)OTE(Data_Out_0.Data_01.11); N: XIC(LB_Inner_DoorClosed)OTE(Data_Out_0.Data_01.12); N: XIC(LB_Outer_Door_Interlock_Switch)OTE(Data_Out_0.Data_01.13); N: XIC(LB_Outer_DoorClosed)OTE(Data_Out_0.Data_01.14); N: XIC(Master_Key_Switch)OTE(Data_Out_0.Data_01.15); N: XIC(Master_Key_Armed)OTE(Data_Out_0.Data_01.16); N: XIC(PPS_Injector_Laser_Permit)OTE(Data_Out_0.Data_01.17); END_ROUTINE ROUTINE Injector_Interlocks RC: "***************************************************************************$N" "EMERGENCY EXIT$N" "***************************************************************************$N" "$N" ""; N: XIC(Tunnel_EE_Device)[XIC(Tunnel_EE_Reset) ,XIC(Tunnel_Interlock_Reset) ]OTE(Tunnel_EE_Reset); RC: "***************************************************************************$N" "DOOR INTERLOCKS $N" "***************************************************************************$N" "$N" ""; N: XIC(Tunnel_Door_Interlock_Switch)[XIC(Tunnel_Door_ILock_Cmplt) ,XIC(Tunnel_Interlock_Reset) ]OTE(Tunnel_Door_ILock_Cmplt); RC: "***************************************************************************$N" "OUTER DOOR MAGNALOCK CONTROL $N" "***************************************************************************$N" ""; N: XIC(Tunnel_LSS_Alignment)XIO(Tunnel_Door_Release_Switch)XIC(Tunnel_EE_Reset)[XIC(Tunnel_Magnalock_Latch) ,XIC(Tunnel_Interlock_Reset) ]OTE(Tunnel_Magnalock_Latch); N: XIC(Tunnel_Magnalock_Latch)OTE(Tunnel_Magnalock); N: XIC(Tunnel_Magnalock)OTE(Tunnel_Door_Locked_Indicator); RC: "***************************************************************************$N" "EMERGENCY OFF INTERLOCKS $N" "***************************************************************************$N" ""; N: XIC(Tunnel_EOff)[XIC(Tunnel_EStop_Latch) ,XIC(Tunnel_Interlock_Reset) ]OTE(Tunnel_EStop_Latch); RC: "***************************************************************************$N" "INTERLOCK SUMMARY $N" "***************************************************************************$N" "$N" ""; N: XIC(Tunnel_EE_Reset)XIC(Tunnel_Door_ILock_Cmplt)XIC(Tunnel_EStop_Latch)XIC(Tunnel_Magnalock_Latch)OTE(Tunnel_Interlocks_Cmplt); N: XIC(Tunnel_Interlocks_Cmplt)OTE(Tunnel_Reset_Indicator); END_ROUTINE ROUTINE Injector_Shutters RC: "$N" "***************************************************************************$N" "TUNNEL ALIGNMENT MODE CONTROL $N" "***************************************************************************"; N: [XIC(Mode_Tunnel_Alignment) ,XIC(Mode_He_Ne_Alignment) ]XIC(Tunnel_LSS_Alignment)XIC(Tunnel_Interlocks_Cmplt)OTE(Tunnel_Alignment_Mode); N: XIC(Tunnel_Alignment_Mode)XIC(Tunnel_Warning_Timer_A.DN)OTE(Tunnel_Alignment_Mode_Set); RC: "***************************************************************************$N" "TUNNEL WARNING TIMER $N" "***************************************************************************"; N: XIC(Tunnel_Alignment_Mode)XIO(Laser_Bay_Mode_Select)TON(Tunnel_Warning_Timer_A,?,?); N: [XIC(Tunnel_Warning_Timer_A.TT) ,XIC(Heater_Shutter_Timer.TT) ,XIC(Photocathode_Shutter_Timer.TT) ]OTE(Tunnel_Warning_Audio); N: XIC(Tunnel_Warning_Audio)OTE(Tunnel_Warning_Flashing_Light); RC: "***************************************************************************$N" " TRANSPORT SHUTTER CONTROL$N" "***************************************************************************$N" "$N" "***************************************************************************$N" "LASER HEATER SHUTTERS $N" "***************************************************************************$N" "$N" ""; N: XIC(Tunnel_Warning_Timer_A.DN)XIC(Heater_Key_Switch)XIC(Heater_IN_button)[XIC(Heater_OUT_Button) ,XIC(Heater_Command) ]OTE(Heater_Command); N: XIC(Tunnel_Warning_Timer_A.DN)XIC(Heater_Key_Switch)OTE(Heater_Key_Status); N: XIC(Heater_Command)TON(Heater_Shutter_Timer,?,?); N: [XIC(Heater_Shutter_Timer.DN) ,[XIC(Mode_Normal_Operation) ,XIC(Mode_LB_Green) ] XIC(PPS_Injector_Laser_Permit) XIO(Heater_Remote_IN) XIO(Heater_Shtr_PVClose) [XIC(Heater_Remote_OUT) ,XIC(Heater_Shtr_PVOpen) ,XIC(Heater_Shutter) ] ][OTE(Heater_Shutter) ,OTE(Heater_Shtr_PVPwr) ]; N: XIO(Heater_Shutter_Synch)OTE(Heater_IN_Status); N: XIC(Heater_Shutter_Synch)OTE(Heater_OUT_Status); RC: "***************************************************************************$N" "PHOTOCATHODE SHUTTERS $N" "***************************************************************************$N" "$N" ""; N: XIC(Tunnel_Warning_Timer_A.DN)XIC(Photocathode_Key_Switch)XIC(Photocathode_IN_Button)[XIC(Photocathode_OUT_Button) ,XIC(Photocathode_Command) ]OTE(Photocathode_Command); N: XIC(Tunnel_Warning_Timer_A.DN)XIC(Photocathode_Key_Switch)OTE(Photocathode_Key_Status); N: XIC(Photocathode_Command)TON(Photocathode_Shutter_Timer,?,?); N: [XIC(Photocathode_Shutter_Timer.DN) ,[XIC(Mode_Normal_Operation) ,XIC(Mode_LB_Green) ] XIC(PPS_Injector_Laser_Permit) XIO(Photocathode_Remote_IN) XIO(Photo_Shtr_PVClose) [XIC(Photocathode_Remote_OUT) ,XIC(Photo_Shtr_PVOpen) ,XIC(Photocathode_Shutter) ] ][OTE(Photocathode_Shutter) ,OTE(Photocathode_Shtr_PVPwr) ]; N: XIO(Photocathode_Shutter_Synch)OTE(Photocathode_IN_Status); N: XIC(Photocathode_Shutter_Synch)OTE(Photocathode_OUT_Status); RC: "***************************************************************************$N" "ANNUNCIATOR WARNING SIGNS $N" "***************************************************************************$N" "$N" "***************************************************************************$N" "INJECTOR HOUSING $N" "***************************************************************************$N" "$N" ""; N: XIO(Heater_Shutter_Synch)XIO(Photocathode_Shutter_Synch)XIO(Tunnel_Warning_Caution_yellow)XIO(Tunnel_Warning_Danger_red)OTE(Tunnel_Warning_Safe_green); N: XIC(Tunnel_Alignment_Mode)XIO(Tunnel_Warning_Danger_red)OTE(Tunnel_Warning_Caution_yellow); N: [XIC(Heater_Shutter_Synch) ,XIC(Photocathode_Shutter_Synch) ]OTE(Tunnel_Warning_Danger_red); RC: "$N" "***************************************************************************$N" "MANWAY $N" "***************************************************************************"; N: XIC(Tunnel_Warning_Safe_green)OTE(Manway_Warning_Safe_Green); N: XIC(Tunnel_Warning_Caution_yellow)OTE(Manway_Warning_Caution_Yellow); N: XIC(Mode_He_Ne_Alignment)XIC(Tunnel_Warning_Danger_red)OTE(Manway_Warning_Danger_HeNe); N: [XIC(Mode_Tunnel_Alignment) ,XIC(Mode_Normal_Operation) ]XIC(Heater_Shutter_Synch)OTE(Manway_Warning_Danger_IR); N: [XIC(Mode_Tunnel_Alignment) ,XIC(Mode_Normal_Operation) ]XIC(Photocathode_Shutter_Synch)OTE(Manway_Warning_Danger_UV); END_ROUTINE ROUTINE Laser_Bay_Interlocks RC: "***************************************************************************$N" "INNER DOOR BYPASS$N" "***************************************************************************"; N: XIC(LB_Door_Interlock_Bypass)TOF(LB_Door_Timer,?,?); N: XIC(LB_Door_Timer.DN)OTE(LB_Door_Bypass_Timer_Warning); RC: "***************************************************************************$N" "DOOR INTERLOCKS$N" " ***************************************************************************$N" "$N" ""; N: [XIC(LB_Inner_Door_interlock_switch) ,XIC(LB_Door_Timer.DN) ][XIC(LB_Outer_Door_Interlock_Switch) ,XIC(LB_Inner_Door_interlock_switch) ]XIC(LB_Eq_Door1_Interlock)XIC(LB_Eq_Door2_Interlock)[XIC(LB_Door_ILock_Cmplt) ,XIC(Laser_Bay_Interlocks_Reset) ]OTE(LB_Door_ILock_Cmplt); N: XIC(LB_Inner_Door_interlock_switch)OTE(LB_Inner_DoorClosed); N: XIC(LB_Outer_Door_Interlock_Switch)OTE(LB_Outer_DoorClosed); RC: "***************************************************************************$N" "EMERGENCY EXIT$N" "***************************************************************************$N" "$N" "$N" ""; N: XIC(LB_EExit_Door_interlock_switch)XIC(LB_Emergency_Exit_device)[XIC(LB_EE_Latch) ,XIO(Master_Key_Switch) XIC(Laser_Bay_Interlocks_Reset) ]OTE(LB_EE_Latch); N: XIC(LB_Emergency_Exit_device)[XIC(Magnalock_Latch) ,XIC(Laser_Bay_Interlocks_Reset) ]OTE(Magnalock_Latch); N: XIC(LB_Outer_Door_Release_Switch)TON(LB_Outer_Door_Release_Dwell,?,?); N: XIO(LB_Outer_Door_Release_Switch)XIO(LB_Outer_Door_Release_Dwell.TT)XIC(Magnalock_Latch)OTE(LB_Magnalock); RC: "***************************************************************************$N" "EMERGENCY STOP INTERLOCKS$N" "***************************************************************************$N" ""; N: XIC(LB_Emergency_Stop)[XIC(LB_EStop_Latch) ,XIO(Master_Key_Switch) XIC(Laser_Bay_Interlocks_Reset) ]OTE(LB_EStop_Latch); RC: "***************************************************************************$N" "INTERLOCK SUM EE AND EO$N" "***************************************************************************$N" ""; N: XIC(LB_EE_Latch)XIC(LB_EStop_Latch)OTE(LB_EE_EO_Cmplt); END_ROUTINE ROUTINE Laser_Bay_Shutters RC: "***************************************************************************$N" "MASTER KEY CONTROL$N" "***************************************************************************"; N: XIC(Master_Key_Switch)XIC(LB_EE_EO_Cmplt)OTE(Master_Key_Enable); N: XIC(Master_Key_Enable)XIC(LB_Warning_Timer.DN)OTE(Master_Key_Armed); RC: "***************************************************************************$N" "LASER BAY WARNING TIMER$N" "***************************************************************************"; N: XIC(Master_Key_Enable)TON(LB_Warning_Timer,?,?); N: XIC(Mode_LB_Green)TON(LB_Green_Warning_Timer,?,?); N: [XIC(LB_Warning_Timer.TT) ,XIC(LB_Green_Warning_Timer.TT) ,XIC(Evolution_Shutter_Timer.TT) ,XIC(Oscillator_Shutter_Timer.TT) ,XIC(JEDI1_Shutter_Timer.TT) ,XIC(JEDI2_Shutter_Timer.TT) ]OTE(LB_Audible_Warning); N: XIC(LB_Audible_Warning)OTE(LB_Flashing_Light); N: XIC(LB_Warning_Timer.DN)XIC(LB_Door_ILock_Cmplt)[XIC(Mode_Normal_Operation) ,XIC(Mode_Tunnel_Alignment) ,XIC(Mode_Laser_Bay_Only) ,XIC(Mode_LB_Green) ][OTE(Shutter_Enable) ,OTE(PV_Shutter_Permit) ]; RC: "***************************************************************************$N" "LASER BAY POWER SUPPLY ENABLE$N" "***************************************************************************"; N: XIC(LB_Warning_Timer.DN)[XIC(LB_Door_ILock_Cmplt) ,XIO(Mode_LB_Green) ][OTE(Laser_PS_Permit) ,OTE(PV_Laser_PS_Permit) ]; N: XIC(LB_EE_EO_Cmplt)[OTE(Laser_PS_Rack_Contactor) ,OTE(PV_Contactor_Permit) ]; RC: "***************************************************************************$N" "LASER BAY SHUTTER CONTROL$N" "***************************************************************************$N" "***************************************************************************$N" "EVOLUTION SHUTTER $N" "***************************************************************************"; N: XIC(Shutter_Enable)XIO(Mode_He_Ne_Alignment)[XIC(Evolution_Shtr_PVOpen) ,XIC(Evolution_Shutter_Command) ]XIO(Evolution_Shtr_PVClose)OTE(Evolution_Shutter_Command); N: XIC(Evolution_Shutter_Command)TON(Evolution_Shutter_Timer,?,?); N: XIC(Evolution_Shutter_Timer.DN)[OTE(Evolution_Shutter) ,OTE(Evolution_Shtr_PVPwr) ]; RC: "$N" "***************************************************************************$N" "OSCILLATOR SHUTTER $N" "***************************************************************************"; N: XIC(Shutter_Enable)XIO(Mode_He_Ne_Alignment)[XIC(Oscillator_Shtr_PVOpen) ,XIC(Oscillator_Shutter_Command) ]XIO(Oscillator_Shtr_PVClose)OTE(Oscillator_Shutter_Command); N: XIC(Oscillator_Shutter_Command)TON(Oscillator_Shutter_Timer,?,?); N: XIC(Oscillator_Shutter_Timer.DN)[OTE(Oscillator_Shutter) ,OTE(Oscillator_Shtr_PVPwr) ]; RC: "***************************************************************************$N" "JEDI 1 LASER SHUTTER$N" "***************************************************************************"; N: XIC(Shutter_Enable)XIO(Mode_He_Ne_Alignment)[XIC(JEDI1_Shtr_PVOpen) ,XIC(JEDI1_Shutter_Command) ]XIO(JEDI1_Shtr_PVClose)OTE(JEDI1_Shutter_Command); N: XIC(JEDI1_Shutter_Command)TON(JEDI1_Shutter_Timer,?,?); N: XIC(JEDI1_Shutter_Timer.DN)[OTE(JEDI1_Shutter) ,OTE(JEDI1_Shtr_PVPwr) ]; RC: "***************************************************************************$N" "JEDI 2 LASER SHUTTER$N" "***************************************************************************$N" ""; N: XIC(Shutter_Enable)XIO(Mode_He_Ne_Alignment)[XIC(JEDI2_Shtr_PVOpen) ,XIC(JEDI2_Shutter_Command) ]XIO(JEDI2_Shtr_PVClose)OTE(JEDI2_Shutter_Command); N: XIC(JEDI2_Shutter_Command)TON(JEDI2_Shutter_Timer,?,?); N: XIC(JEDI2_Shutter_Timer.DN)[OTE(JEDI2_Shutter) ,OTE(JEDI2_Shtr_PVPwr) ]; END_ROUTINE ROUTINE Laser_Bay_Status (Description := "Status for Display") RC: "***************************************************************************$N" "LASER BAY SHUTTER STATUS $N" "***************************************************************************$N" "PanelView and EPICS data for display$N" "***************************************************************************$N" ""; N: XIO(Oscillator_Shutter_Synch)[OTE(Oscillator_Shtr_PVStatus) ,OTE(Data_Out_0.Data_02.0) ]; N: XIC(JEDI1_Shutter_Synch)[OTE(JEDI1_Shtr_PVStatus) ,OTE(Data_Out_0.Data_02.1) ]; N: XIC(JEDI2_Shutter_Synch)[OTE(JEDI2_Shtr_PVStatus) ,OTE(Data_Out_0.Data_02.3) ]; N: XIO(Evolution_Shutter_Synch)[OTE(Evolution_Shtr_PVStatus) ,OTE(Data_Out_0.Data_02.4) ]; N: XIO(Heater_Shutter_Synch)[OTE(Heater_Shtr_PVStatus) ,OTE(Data_Out_0.Data_02.6) ]; N: XIO(Photocathode_Shutter_Synch)[OTE(Photo_Shtr_PVStatus) ,OTE(Data_Out_0.Data_02.7) ]; N: XIC(Master_Key_Armed)XIC(LB_Door_ILock_Cmplt)[OTE(LB_System_Ready) ,OTE(Data_Out_0.Data_02.8) ]; N: XIC(Mode_Normal_Operation)XIC(PPS_Injector_Laser_Permit)[OTE(Transport_Permit) ,OTE(Data_Out_0.Data_02.9) ]; RC: "***************************************************************************$N" "LASER BAY ANNUNCIATOR SIGN$N" "***************************************************************************$N" ""; N: XIO(Master_Key_Armed)XIO(LB_Maserkey_Sence)XIO(LB_Caution_Yellow)XIO(LB_Laser_ON)XIO(LB_Danger_Green_Laser)OTE(LB_Safe_Green); N: [XIC(Master_Key_Armed) ,XIC(LB_Maserkey_Sence) ]XIO(LB_Laser_ON)XIO(LB_Danger_Green_Laser)OTE(LB_Caution_Yellow); N: XIC(noop)OTE(LB_Warning_Spare); N: [XIC(Oscillator_Shutter_Command) ,XIC(JEDI1_Shutter_Command) ,XIC(JEDI2_Shutter_Command) ,XIC(Evolution_Shutter_Command) ]XIO(LB_Danger_Green_Laser)OTE(LB_Laser_ON); N: XIC(Mode_LB_Green)XIC(Master_Key_Armed)OTE(LB_Danger_Green_Laser); END_ROUTINE ROUTINE LCLS_LSS_Data RC: "***************************************************************************$N" "Routine to load data for EPICS display$N" "***************************************************************************"; N: JSR(Data_Injector,0); N: JSR(Data_Laser_Bay,0); END_ROUTINE ROUTINE LCLS_LSS_Injector RC: "***************************************************************************$N" "INJECTOR TUNNEL INTERLOCK RESET$N" "***************************************************************************"; N: XIC(Tunnel_LSS_Alignment)ONS(Tunnel_Reset_Oneshot)OTE(Tunnel_Interlock_Reset); N: JSR(Injector_Interlocks,0); N: JSR(Injector_Shutters,0); END_ROUTINE ROUTINE LCLS_LSS_Laser_Bay RC: "$N" "***************************************************************************$N" "LASER BAY INTERLOCK RESET$N" "***************************************************************************$N" ""; N: XIC(LB_Reset_Command)ONS(LB_Reset_Oneshot)OTE(Laser_Bay_Interlocks_Reset); N: JSR(Laser_Bay_Interlocks,0); N: JSR(Laser_Bay_Shutters,0); N: JSR(Laser_Bay_Status,0); END_ROUTINE ROUTINE LCLS_LSS_Mode RC: "$N" "***************************************************************************$N" "LSS MODE SELECTION$N" "DEFAULTS TO Laser Bay Only operation$N" "***************************************************************************$N" ""; N: [XIC(Laser_Bay_Mode_Select) ,XIC(Mode_Laser_Bay_Only) XIO(Mode_He_Ne_Alignment) XIO(Mode_Tunnel_Alignment) XIO(Mode_LB_Green) XIO(Mode_Normal_Operation) ,XIO(Mode_Laser_Bay_Only) XIO(Mode_He_Ne_Alignment) XIO(Mode_Tunnel_Alignment) XIO(Mode_LB_Green) XIO(Mode_Normal_Operation) ]OTE(Mode_Laser_Bay_Only); N: [XIC(He_Ne_Alignment_Select) ,XIC(Mode_He_Ne_Alignment) XIO(Laser_Bay_Mode_Select) XIO(Tunnel_Alignment_Select) XIO(LB_Green_Mode_Select) XIO(Normal_Operation_Select) ]OTE(Mode_He_Ne_Alignment); N: [XIC(Tunnel_Alignment_Select) ,XIC(Mode_Tunnel_Alignment) XIO(Laser_Bay_Mode_Select) XIO(He_Ne_Alignment_Select) XIO(LB_Green_Mode_Select) XIO(Normal_Operation_Select) ]OTE(Mode_Tunnel_Alignment); N: [XIC(LB_Green_Mode_Select) ,XIC(Mode_LB_Green) XIO(Laser_Bay_Mode_Select) XIO(He_Ne_Alignment_Select) XIO(Tunnel_Alignment_Select) XIO(Normal_Operation_Select) ]OTE(Mode_LB_Green); N: [XIC(Normal_Operation_Select) ,XIC(Mode_Normal_Operation) XIO(Laser_Bay_Mode_Select) XIO(He_Ne_Alignment_Select) XIO(Tunnel_Alignment_Select) XIO(LB_Green_Mode_Select) ]OTE(Mode_Normal_Operation); END_ROUTINE ROUTINE MainRoutine N: JSR(LCLS_LSS_Mode,0); N: JSR(LCLS_LSS_Laser_Bay,0); N: JSR(LCLS_LSS_Injector,0); N: JSR(LCLS_LSS_Data,0); END_ROUTINE END_PROGRAM PROGRAM plcAdminProgram (MAIN := plcAdmin, MODE := 0, DisableFlag := 0) TAG PLCADMIN_DOCBASE OF PLCADMIN_PLC_IN20_LS01[33] (Description := "PLC Admin - EDITABLE: Base field of SLAC document number.", RADIX := Decimal); PLCADMIN_DOCPREFIX OF PLCADMIN_PLC_IN20_LS01[31] (Description := "PLC Admin - EDITABLE: Prefix field of SLAC doc number.$NN/A=0,$NSD=1,BD=2,DL=3,EI=4,FC=5,FS=6,IM=7,LD=8,OM=9,QT=10,WD=11", RADIX := Decimal); PLCADMIN_DOCREV OF PLCADMIN_PLC_IN20_LS01[35] (Description := "PLC Admin - EDITABLE: Rev field of SLAC document number.", RADIX := Decimal); PLCADMIN_DOCSERIES OF PLCADMIN_PLC_IN20_LS01[32] (Description := "PLC Admin - EDITABLE: Series field of SLAC document number.", RADIX := Decimal); PLCADMIN_DOCSUFFIX OF PLCADMIN_PLC_IN20_LS01[34] (Description := "PLC Admin - EDITABLE: Suffix field of SLAC document number.", RADIX := Decimal); PLCADMIN_FWVERSIONRAW OF PLCADMIN_PLC_IN20_LS01[7] (Description := "PLC Admin: Two byte hex word corresponding to firmware version of controller.", RADIX := Decimal, UNUSED_COMMENT.DATA := "ion pumps 111-965 state"); PLCADMIN_HEARTBEATRAW OF PLCADMIN_PLC_IN20_LS01[19] (Description := "PLC Admin: Heartbeat tag, which switches from 0 to 1 every second.", RADIX := Decimal); PLCADMIN_MAJORFAULTRAW OF PLCADMIN_PLC_IN20_LS01[8] (Description := "PLC Admin: Word containing information about major faults.", RADIX := Decimal); PLCADMIN_MINORFAULTRAW OF PLCADMIN_PLC_IN20_LS01[9] (Description := "PLC Admin: Word containing information about minor faults.", RADIX := Decimal); PLCADMIN_MODELRAW OF PLCADMIN_PLC_IN20_LS01[6] (Description := "PLC Admin: Integer $Ncorresponding to model of PLC controller. Each model has a unique integer associated with it.", RADIX := Decimal); PLCADMIN_PLCADMINV1 OF PLCADMIN_PLC_IN20_LS01[0] (Description := "PLC Admin: Internally used by PLC Admin. Do not edit this tag.", RADIX := Decimal); PLCADMIN_PLCADMINV2 OF PLCADMIN_PLC_IN20_LS01[1] (Description := "PLC Admin: Internally used by PLC Admin. Do not edit this tag.", RADIX := Decimal); PLCADMIN_PLCADMINV3 OF PLCADMIN_PLC_IN20_LS01[2] (Description := "PLC Admin: Internally used by PLC Admin. Do not edit this tag.", RADIX := Decimal); PLCADMIN_PROG1TLST OF PLCADMIN_PLC_IN20_LS01[24] (Description := "PLC Admin: Processing time for program #1 on the last cycle.", RADIX := Decimal); PLCADMIN_PROG1TMAX OF PLCADMIN_PLC_IN20_LS01[25] (Description := "PLC Admin: Processing time for program #1 on the slowest cycle since reset.", RADIX := Decimal); PLCADMIN_PROG2TLST OF PLCADMIN_PLC_IN20_LS01[26] (Description := "PLC Admin: Processing time for program #2 on the last cycle.", RADIX := Decimal); PLCADMIN_PROG2TMAX OF PLCADMIN_PLC_IN20_LS01[27] (Description := "PLC Admin: Processing time for program #2 on the slowest cycle since reset.", RADIX := Decimal); PLCADMIN_PROG3TLST OF PLCADMIN_PLC_IN20_LS01[28] (Description := "PLC Admin: Processing time for program #3 on the last cycle.", RADIX := Decimal); PLCADMIN_PROG3TMAX OF PLCADMIN_PLC_IN20_LS01[29] (Description := "PLC Admin: Processing time for program #3 on the slowest cycle since reset.", RADIX := Decimal); PLCADMIN_PROGPLCATLST OF PLCADMIN_PLC_IN20_LS01[22] (Description := "PLC Admin: Processing time for plcAdmin program on the last cycle.", RADIX := Decimal); PLCADMIN_PROGPLCATMAX OF PLCADMIN_PLC_IN20_LS01[23] (Description := "PLC Admin: Processing time for plcAdmin program on the slowest cycle since reset.", RADIX := Decimal); PLCADMIN_SERIALNUMBER OF PLCADMIN_PLC_IN20_LS01[4] (Description := "PLC Admin: Serial number of the controller module. Note that serial numbers are hexadecimal.", RADIX := Decimal); PLCADMIN_STATUSRAW OF PLCADMIN_PLC_IN20_LS01[5] (Description := "PLC Admin: Hex word providing keyswitch position, run/program mode, and fault information.", RADIX := Decimal); PLCADMIN_TASKMAINTLST OF PLCADMIN_PLC_IN20_LS01[20] (Description := "PLC Admin: Processing time for the main task on the last cycle.", RADIX := Decimal); PLCADMIN_TASKMAINTMAX OF PLCADMIN_PLC_IN20_LS01[21] (Description := "PLC Admin: Processing time for the main task on the slowest cycle since reset.", RADIX := Decimal); PLCADMIN_TODDATE OF PLCADMIN_PLC_IN20_LS01[12] (Description := "PLC Admin: Current day of the month. Part of PLC date/time.", RADIX := Decimal); PLCADMIN_TODHOUR OF PLCADMIN_PLC_IN20_LS01[13] (Description := "PLC Admin: Current hour. Part of PLC date/time.", RADIX := Decimal); PLCADMIN_TODMICROSECOND OF PLCADMIN_PLC_IN20_LS01[16] (Description := "PLC Admin: Current microsecond. Part of PLC date/time.", RADIX := Decimal); PLCADMIN_TODMINUTE OF PLCADMIN_PLC_IN20_LS01[14] (Description := "PLC Admin: Current minute. Part of PLC date/time.", RADIX := Decimal); PLCADMIN_TODMONTH OF PLCADMIN_PLC_IN20_LS01[11] (Description := "PLC Admin: Current month. Part of PLC date/time.", RADIX := Decimal); PLCADMIN_TODSECOND OF PLCADMIN_PLC_IN20_LS01[15] (Description := "PLC Admin: Current second. Part of PLC date/time.", RADIX := Decimal); PLCADMIN_TODYEAR OF PLCADMIN_PLC_IN20_LS01[10] (Description := "PLC Admin: Current year. Part of PLC date/time.", RADIX := Decimal); PLCADMIN_UPTIMEDAY OF PLCADMIN_PLC_IN20_LS01[18] (Description := "PLC Admin: PLC uptime in days. See also the UPTIMESEC tag.", RADIX := Decimal); PLCADMIN_UPTIMESEC OF PLCADMIN_PLC_IN20_LS01[17] (Description := "PLC Admin: PLC uptime in seconds. See also the UPTIMEDAY tag.", RADIX := Decimal); PLCADMIN_VERSIONMAJOR OF PLCADMIN_PLC_IN20_LS01[36] (Description := "PLC Admin - EDITABLE: The first part of the PLC program version number. Version number has the form $NMajor.Minor.Rev", RADIX := Decimal); PLCADMIN_VERSIONMINOR OF PLCADMIN_PLC_IN20_LS01[37] (Description := "PLC Admin - EDITABLE: The second part of the PLC program version number. Version number has the form $NMajor.Minor.Rev", RADIX := Decimal); PLCADMIN_VERSIONREV OF PLCADMIN_PLC_IN20_LS01[38] (Description := "PLC Admin - EDITABLE: The third part of the PLC program version number. Version number has the form $NMajor.Minor.Rev", RADIX := Decimal); END_TAG ROUTINE plcAdmin RC: "This ladder is part of the PLC Admin package.$N" "$N" "$N" "$N" "Read the serial number from the controller and write to a tag for EPICS."; N: GSV(CONTROLLERDEVICE,,SerialNumber,PLCADMIN_SERIALNUMBER); RC: "Read the PLC controller status and write to a tag for EPICS. This provides keyswitch position, run/program mode, and fault information."; N: GSV(CONTROLLERDEVICE,?,Status,PLCADMIN_STATUSRAW); RC: "Read the controller model and write to a tag for EPICS. This tag contains an integer that is translated to a product name in EPICS."; N: GSV(CONTROLLERDEVICE,,ProductCode,PLCADMIN_MODELRAW); RC: "Read the controller firmware version and write to a tag for EPICS. This tag contains a two byte hex number that is translated to a decimal firmware version in EPICS."; N: GSV(CONTROLLERDEVICE,,ProductRev,PLCADMIN_FWVERSIONRAW); RC: "Read the major fault information and write to a tag for EPICS. This tag contains a hex number that is translated to a list of major faults in EPICS.$N" ""; N: GSV(FAULTLOG,,MajorFaultBits,PLCADMIN_MAJORFAULTRAW); RC: "Read the minor fault information and write to a tag for EPICS. This tag contains a hex number that is translated to a list of minor faults in EPICS.$N" ""; N: GSV(FAULTLOG,,MinorFaultBits,PLCADMIN_MINORFAULTRAW); RC: "Copy PLC $QWall clock time$Q to TOD array. This operation copies data to array elements 10-16.$N" ""; N: GSV(WALLCLOCKTIME,,DateTime,PLCADMIN_TODYEAR); RC: "Count PLC uptime in milliseconds"; N: TON(PLCADMIN_UPTIMETIMER,?,?); RC: "If the uptime reaches 86400000 milliseconds (1 day), add one to the day counter and reset the number of seconds."; N: GRT(PLCADMIN_UPTIMETIMER.ACC,86400000)SUB(PLCADMIN_UPTIMETIMER.ACC,86400000,PLCADMIN_UPTIMETIMER.ACC)ADD(PLCADMIN_UPTIMEDAY,1,PLCADMIN_UPTIMEDAY); RC: "Convert the uptime in milliseconds to uptime in seconds"; N: DIV(PLCADMIN_UPTIMETIMER.ACC,1000,PLCADMIN_UPTIMESEC); RC: "create a PLC heartbeat tag that changes from 0 to 1 every second. The EPICS IOC uses this heartbeat tag to determine whether or not the PLC is running.$N" ""; N: MOD(PLCADMIN_UPTIMESEC,2,PLCADMIN_HEARTBEATRAW); RC: "Read the scan time for the main task and copy to EPICS$N" ""; N: GSV(TASK,MainTask,LastScanTime,PLCADMIN_TASKMAINTLST); N: GSV(TASK,MainTask,MaxScanTime,PLCADMIN_TASKMAINTMAX); RC: "Read the scan time for plcAdmin program and copy to EPICS$N" ""; N: GSV(PROGRAM,plcAdminProgram,LastScanTime,PLCADMIN_PROGPLCATLST); N: GSV(PROGRAM,plcAdminProgram,MaxScanTime,PLCADMIN_PROGPLCATMAX); RC: "Read the scan time for program #1 and copy to EPICS$N" ""; N: GSV(PROGRAM,MainProgram,LastScanTime,PLCADMIN_PROG1TLST); N: GSV(PROGRAM,MainProgram,MaxScanTime,PLCADMIN_PROG1TMAX); RC: "Read the scan time for program #2 and copy to EPICS$N" ""; N: GSV(PROGRAM,MainProgram,LastScanTime,PLCADMIN_PROG2TLST); N: GSV(PROGRAM,MainProgram,MaxScanTime,PLCADMIN_PROG2TMAX); RC: "Read the scan time for program #3 and copy to EPICS$N" ""; N: GSV(PROGRAM,MainProgram,LastScanTime,PLCADMIN_PROG3TLST); N: GSV(PROGRAM,MainProgram,MaxScanTime,PLCADMIN_PROG3TMAX); END_ROUTINE END_PROGRAM PROGRAM Powerup_Program (MAIN := Powerup_Routine, MODE := 0, DisableFlag := 0) TAG PLCADMIN_FAULTRECORD : FAULTRECORD := [0,0,0,0,[0,0,0,0,0,0,0,0]]; PLCADMIN_UPTIMEDAY OF PLCADMIN_PLC_IN20_LS01[18] (Description := "PLC Admin: PLC uptime in days. See also the UPTIMESEC tag.", RADIX := Decimal); PLCADMIN_UPTIMESEC OF PLCADMIN_PLC_IN20_LS01[17] (Description := "PLC Admin: PLC uptime in seconds. See also the UPTIMEDAY tag.", RADIX := Decimal); END_TAG ROUTINE Powerup_Routine RC: "These rungs clear the fault on the processor when power is cycled while the key is in Run Mode.$N" "Refer to: AB PUB 1756-pm001i-en-p, chapter 16"; N: GSV(PROGRAM,THIS,MAJORFAULTRECORD,PLCADMIN_FAULTRECORD.Time_Low); N: EQU(PLCADMIN_FAULTRECORD.Type,1)EQU(PLCADMIN_FAULTRECORD.Code,1)CLR(PLCADMIN_FAULTRECORD.Type)CLR(PLCADMIN_FAULTRECORD.Code); N: SSV(PROGRAM,THIS,MAJORFAULTRECORD,PLCADMIN_FAULTRECORD.Time_Low); N: MOV(0,PLCADMIN_UPTIMETIMER.ACC); N: MOV(0,PLCADMIN_UPTIMESEC); N: MOV(0,PLCADMIN_UPTIMEDAY); END_ROUTINE END_PROGRAM TASK MainTask (Type := CONTINUOUS, Rate := 10, Priority := 10, Watchdog := 500, DisableUpdateOutputs := No, InhibitTask := No) MainProgram; plcAdminProgram; END_TASK CONFIG ASCII(XONXOFFEnable := 0, DeleteMode := 0, EchoMode := 0, TerminationChars := 65293, AppendChars := 2573, BufferSize := 82) END_CONFIG CONFIG ControllerDevice END_CONFIG CONFIG CST(SystemTimeMasterID := 0) END_CONFIG CONFIG DF1(DuplicateDetection := 1, ErrorDetection := BCC Error, EmbeddedResponseEnable := 0, DF1Mode := Pt to Pt, ACKTimeout := 50, NAKReceiveLimit := 3, ENQTransmitLimit := 3, TransmitRetries := 3, StationAddress := 0, ReplyMessageWait := 5, PollingMode := 1, MasterMessageTransmit := 0, NormalPollNodeFile := , NormalPollGroupSize := 0, PriorityPollNodeFile := , ActiveStationFile := , SlavePollTimeout := 3000, EOTSuppression := 0, MaxStationAddress := 31, TokenHoldFactor := 1) END_CONFIG CONFIG ExtendedDevice END_CONFIG CONFIG FaultLog END_CONFIG CONFIG FileManager END_CONFIG CONFIG ICP END_CONFIG CONFIG PCCC END_CONFIG CONFIG Redundancy END_CONFIG CONFIG SerialPort(BaudRate := 19200, Parity := No Parity, DataBits := 8 Bits of Data, StopBits := 1 Stop Bit, ComDriverId := DF1, PendingComDriverId := DF1, RTSOffDelay := 0, RTSSendDelay := 0, ControlLine := No Handshake, PendingControlLine := No Handshake, RemoteModeChangeFlag := 0, PendingRemoteModeChangeFlag := 0, ModeChangeAttentionChar := 27, PendingModeChangeAttentionChar := 27, SystemModeCharacter := 83, PendingSystemModeCharacter := 83, UserModeCharacter := 85, PendingUserModeCharacter := 85) END_CONFIG CONFIG UserMemory END_CONFIG CONFIG WallClockTime(LocalTimeAdjustment := 0, TimeZone := 0) END_CONFIG END_CONTROLLER