#=============================================================================== # # Pyrodetector (LCLS-II) Filter and Shutter Controls # #=============================================================================== # # These records interface between the user control layer and the FPGA. # The FPGA expects the MoverOnOff control register to have specific bits set for # each of the filters and shutters. These records take as input the _CTRL PV and # the state of the MoverOnOff register to determine what number should be # written out. # # The MoverOnOff register is 6 bits wide with the following layout # # BIT 5 4 3 2 1 0 # DEV | - FLT4 - | - FLT3 - | - FLT2 - | - FLT1 - | - SHT1 - | - SHT0 - | # # For the 4 FLT bits: # 0 = Mover Removed # 1 = Mover Inserted # For the 2 SHT bits: # 0 = Mover Inserted # 1 = Mover Inserted #Shutter motor/solenoide was changed thus these are oposit to filters record(calcout, "$(P):0:SHT_MOVE") { field(OUT, "$(P):MoverOnOff PP") field(OOPT, "Every Time") field(DOPT, "Use CALC") field(INPA, "$(P):0:SHT_CTRL") field(INPB, "$(P):MoverOnOffRBV") field(INPC, "0") field(INPD, "0x1") # bit 0 set field(INPE, "0x3e") # bit 0 unset field(CALC, "(A = C) ? B|D : B&E") field(SCAN, "Passive") } #Shutter motor/solenoide was changed thus these are oposit to filters record(calcout, "$(P):1:SHT_MOVE") { field(OUT, "$(P):MoverOnOff PP") field(OOPT, "Every Time") field(DOPT, "Use CALC") field(INPA, "$(P):1:SHT_CTRL") field(INPB, "$(P):MoverOnOffRBV") field(INPC, "0") field(INPD, "0x2") # bit 1 set field(INPE, "0x3d") # bit 1 unset field(CALC, "(A = C) ? B|D : B&E") field(SCAN, "Passive") } record(calcout, "$(P):FLT1_MOVE") { field(OUT, "$(P):MoverOnOff PP") field(OOPT, "Every Time") field(DOPT, "Use CALC") field(INPA, "$(P):FLT1_CTRL") field(INPB, "$(P):MoverOnOffRBV") field(INPC, "1") field(INPD, "0x4") # bit 2 set field(INPE, "0x3b") # bit 2 unset field(CALC, "(A = C) ? B|D : B&E") field(SCAN, "Passive") } #record(calcout, "$(P):FLT2_MOVE") #{ # field(OUT, "$(P):MoverOnOff PP") # field(OOPT, "Every Time") # field(DOPT, "Use CALC") # field(INPA, "$(P):FLT2_CTRL") # field(INPB, "$(P):MoverOnOffRBV") # field(INPC, "1") # field(INPD, "0x8") # bit 3 set # field(INPE, "0x37") # bit 3 unset # field(CALC, "(A = C) ? B|D : B&E") # field(SCAN, "Passive") #} record(calcout, "$(P):FLT3_MOVE") { field(OUT, "$(P):MoverOnOff PP") field(OOPT, "Every Time") field(DOPT, "Use CALC") field(INPA, "$(P):FLT3_CTRL") field(INPB, "$(P):MoverOnOffRBV") field(INPC, "1") field(INPD, "0x10") # bit 4 set field(INPE, "0x2f") # bit 4 unset field(CALC, "(A = C) ? B|D : B&E") field(SCAN, "Passive") } record(calcout, "$(P):FLT4_MOVE") { field(OUT, "$(P):MoverOnOff PP") field(OOPT, "Every Time") field(DOPT, "Use CALC") field(INPA, "$(P):FLT4_CTRL") field(INPB, "$(P):MoverOnOffRBV") field(INPC, "1") field(INPD, "0x20") # bit 5 set field(INPE, "0x1f") # bit 5 unset field(CALC, "(A = C) ? B|D : B&E") field(SCAN, "Passive") } # # Control (CTRL) values: # 0 = OUT # 1 = IN # #Shutter motor/solenoide was changed thus these are oposit to filters record(mbbo, "$(P):0:SHT_CTRL") { # field(VAL, "0") field(ZRVL, "1") field(ZRST, "OUT") field(ONVL, "0") field(ONST, "IN") field(OUT, "$(P):0:SHT_MOVE PP") field(DISV, "0") # field(PINI, "YES") info(autosaveFields, "VAL RVAL DESC") } #Shutter motor/solenoide was changed thus these are oposit to filters record(mbbo, "$(P):1:SHT_CTRL") { # field(VAL, "0") field(ZRVL, "1") field(ZRST, "OUT") field(ONVL, "0") field(ONST, "IN") field(OUT, "$(P):1:SHT_MOVE PP") field(DISV, "0") # field(PINI, "YES") info(autosaveFields, "VAL RVAL DESC") } record(mbbo, "$(P):FLT1_CTRL") { field(DESC, "Neutral Density Filter") # field(VAL, "0") field(ZRVL, "0") field(ZRST, "OUT") field(ONVL, "1") field(ONST, "IN") field(OUT, "$(P):FLT1_MOVE PP") field(DISV, "0") # field(PINI, "YES") info(autosaveFields, "VAL RVAL DESC") } #record(mbbo, "$(P):FLT2_CTRL") #{ # field(DESC, "Neutral Density Filter") ## field(VAL, "0") # field(ZRVL, "0") # field(ZRST, "OUT") # field(ONVL, "1") # field(ONST, "IN") # field(OUT, "$(P):FLT2_MOVE PP") # field(DISV, "0") ## field(PINI, "YES") # info(autosaveFields, "VAL RVAL DESC") #} record(mbbo, "$(P):FLT3_CTRL") { field(DESC, "Band-Pass Filter") # field(VAL, "0") field(ZRVL, "0") field(ZRST, "OUT") field(ONVL, "1") field(ONST, "IN") field(OUT, "$(P):FLT3_MOVE PP") field(DISV, "0") # field(PINI, "YES") info(autosaveFields, "VAL RVAL DESC") } record(mbbo, "$(P):FLT4_CTRL") { field(DESC, "Band-Reject Filter") # field(VAL, "0") field(ZRVL, "0") field(ZRST, "OUT") field(ONVL, "1") field(ONST, "IN") field(OUT, "$(P):FLT4_MOVE PP") field(DISV, "0") # field(PINI, "YES") info(autosaveFields, "VAL RVAL DESC") }