#! Generated by VisualDCT v2.5
#! DBDSTART
#! DBDEND


record(ai, "PLC:GUNB:TM01:STATUSRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[5]")
  field(FLNK, "PLC:GUNB:TM01:DEVICESTATUSRAW")
}

record(ai, "PLC:GUNB:TM01:MODELRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[6]")
  field(FLNK, "PLC:GUNB:TM01:MODELCALC")
}

record(ai, "PLC:GUNB:TM01:UPTIMESEC") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[17]")
  field(FLNK, "PLC:GUNB:TM01:UPTIMEHOURS PP MS")
}

record(calc, "PLC:GUNB:TM01:UPTIMEHOURS") {
  field(FLNK, "PLC:GUNB:TM01:UPTIMEMINUTES PP MS")
  field(CALC, "FLOOR(A/3600)")
  field(INPA, "PLC:GUNB:TM01:UPTIMESEC")
  field(EGU, "Hours")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC NPP MS")
}

record(calc, "PLC:GUNB:TM01:UPTIMEMINUTES") {
  field(FLNK, "PLC:GUNB:TM01:UPTIMESECONDS PP MS")
  field(CALC, "FLOOR((A%3600)/60)")
  field(INPA, "PLC:GUNB:TM01:UPTIMESEC")
  field(EGU, "Minutes")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:UPTIMESECONDS") {
  field(CALC, "A%60")
  field(INPA, "PLC:GUNB:TM01:UPTIMESEC")
  field(EGU, "Seconds")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(bi, "PLC:GUNB:TM01:HEARTBEATRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[19] B 0")
  field(ZNAM, "ZERO")
  field(ONAM, "ONE")
  field(FLNK, "PLC:GUNB:TM01:COMMLINK")
}

record(mbbi, "PLC:GUNB:TM01:MODEL") {
  field(INP, "PLC:GUNB:TM01:MODELCALC NPP MS")
  field(ZRST, "UNKNOWN")
  field(ONST, "CTL_LGX_L61")
  field(TWST, "CTL_LGX_5555")
  field(THST, "CTL_LTX_5550")
  field(FRST, "CMP_LGX_L32")
}

record(ai, "PLC:GUNB:TM01:FWVERSIONRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[7]")
  field(FLNK, "PLC:GUNB:TM01:FWVERSIONMAJ")
}

record(calc, "PLC:GUNB:TM01:FWVERSIONMAJ") {
  field(FLNK, "PLC:GUNB:TM01:FWVERSIONMIN")
  field(CALC, "A%16")
  field(INPA, "PLC:GUNB:TM01:FWVERSIONRAW NPP MS")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:FWVERSIONMIN") {
  field(CALC, "(A/256)%16")
  field(INPA, "PLC:GUNB:TM01:FWVERSIONRAW NPP MS")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:MODELCALC") {
  field(FLNK, "PLC:GUNB:TM01:MODEL")
  field(CALC, "A=54?1:A=51?2:A=3?3:A=77?4:0")
  field(INPA, "PLC:GUNB:TM01:MODELRAW NPP MS")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:DEVICESTATUSCALC") {
  field(FLNK, "PLC:GUNB:TM01:DEVICESTATUS")
  field(CALC, "A=B?1:A=C?2:A=D?3:A=E?4:A=F?5:A=G?6:0")
  field(INPA, "PLC:GUNB:TM01:DEVICESTATUSRAW NPP MS")
  field(INPB, "0x7")
  field(INPC, "0x6")
  field(INPD, "0x5")
  field(INPE, "0x4")
  field(INPF, "0x1")
}

record(calc, "PLC:GUNB:TM01:DEVICESTATUSRAW") {
  field(FLNK, "PLC:GUNB:TM01:DEVICESTATUSCALC")
  field(CALC, "A>>4&B")
  field(INPA, "PLC:GUNB:TM01:STATUSRAW")
  field(INPB, "0xF")
  field(INPC, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(mbbi, "PLC:GUNB:TM01:DEVICESTATUS") {
  field(FLNK, "PLC:GUNB:TM01:FAULTSTATUSRAW")
  field(INP, "PLC:GUNB:TM01:DEVICESTATUSCALC NPP MS")
  field(ZRST, "UNKNOWN")
  field(ONST, "PROGRAM")
  field(TWST, "RUN")
  field(THST, "FAULTED")
  field(FRST, "FLASH_ERROR")
  field(FVST, "FLASHING")
  field(ZRSV, "MAJOR")
  field(ONSV, "MAJOR")
  field(TWSV, "NO_ALARM")
  field(THSV, "MAJOR")
  field(FRSV, "MAJOR")
  field(FVSV, "MAJOR")
}

record(calc, "PLC:GUNB:TM01:FAULTSTATUSRAW") {
  field(FLNK, "PLC:GUNB:TM01:FAULTSTATUSCALC")
  field(CALC, "A>>8&B")
  field(INPA, "PLC:GUNB:TM01:STATUSRAW")
  field(INPB, "0xF")
  field(INPC, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:FAULTSTATUSCALC") {
  field(FLNK, "PLC:GUNB:TM01:FAULTSTATUS")
  field(CALC, "A=B?1:A=C?2:A=D?3:A=E?4:0")
  field(INPA, "PLC:GUNB:TM01:FAULTSTATUSRAW NPP MS")
  field(INPB, "0x0004")
  field(INPC, "0x0003")
  field(INPD, "0x0002")
  field(INPE, "0x0001")
}

record(mbbi, "PLC:GUNB:TM01:FAULTSTATUS") {
  field(FLNK, "PLC:GUNB:TM01:KEYSTATUSRAW")
  field(INP, "PLC:GUNB:TM01:FAULTSTATUSCALC NPP MS")
  field(ZRST, "NONE")
  field(ONST, "MAJOR_UNRECOVBL")
  field(TWST, "MAJOR_RECOVBL")
  field(THST, "MINOR_UNRECOVBL")
  field(FRST, "MINOR_RECOVBL")
  field(ZRSV, "NO_ALARM")
  field(ONSV, "MAJOR")
  field(TWSV, "MAJOR")
  field(THSV, "MINOR")
  field(FRSV, "NO_ALARM")
}

record(calc, "PLC:GUNB:TM01:KEYSTATUSRAW") {
  field(FLNK, "PLC:GUNB:TM01:KEYSTATUSCALC")
  field(CALC, "A>>12&B")
  field(INPA, "PLC:GUNB:TM01:STATUSRAW")
  field(INPB, "0x3")
  field(INPC, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:KEYSTATUSCALC") {
  field(FLNK, "PLC:GUNB:TM01:KEYSTATUS")
  field(CALC, "A=B?1:A=C?2:A=D?3:0")
  field(INPA, "PLC:GUNB:TM01:KEYSTATUSRAW NPP MS")
  field(INPB, "0x3")
  field(INPC, "0x2")
  field(INPD, "0x1")
}

record(mbbi, "PLC:GUNB:TM01:KEYSTATUS") {
  field(INP, "PLC:GUNB:TM01:KEYSTATUSCALC NPP MS")
  field(ZRST, "UNKNOWN")
  field(ONST, "REMOTE")
  field(TWST, "PROGRAM")
  field(THST, "RUN")
  field(ZRSV, "MAJOR")
  field(ONSV, "MINOR")
  field(TWSV, "MAJOR")
  field(THSV, "NO_ALARM")
}

record(ai, "PLC:GUNB:TM01:MAJORFAULTRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[8]")
  field(FLNK, "PLC:GUNB:TM01:FAULTPOWERCALC")
}

record(ai, "PLC:GUNB:TM01:MINORFAULTRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[9]")
}

record(calc, "PLC:GUNB:TM01:FAULTPOWERCALC") {
  field(FLNK, "PLC:GUNB:TM01:FAULTPOWER")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:GUNB:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:GUNB:TM01:MINORFAULTRAW")
  field(INPC, "0x2")
  field(INPD, "PLC:GUNB:TM01:HEARTBEATCLC NPP MS")
}

record(mbbi, "PLC:GUNB:TM01:FAULTPOWER") {
  field(FLNK, "PLC:GUNB:TM01:FAULTIOCALC")
  field(INP, "PLC:GUNB:TM01:FAULTPOWERCALC NPP MS")
  field(ZRST, "NONE")
  field(ONST, "MINOR")
  field(TWST, "MAJOR")
  field(ZRSV, "NO_ALARM")
  field(ONSV, "MINOR")
  field(TWSV, "MAJOR")
}

record(calc, "PLC:GUNB:TM01:FAULTIOCALC") {
  field(FLNK, "PLC:GUNB:TM01:FAULTIO")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:GUNB:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:GUNB:TM01:MINORFAULTRAW")
  field(INPC, "0x8")
  field(INPD, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(mbbi, "PLC:GUNB:TM01:FAULTIO") {
  field(FLNK, "PLC:GUNB:TM01:FAULTPROGRAMCALC")
  field(INP, "PLC:GUNB:TM01:FAULTIOCALC NPP MS")
  field(ZRST, "NONE")
  field(ONST, "MINOR")
  field(TWST, "MAJOR")
  field(ZRSV, "NO_ALARM")
  field(ONSV, "MINOR")
  field(TWSV, "MAJOR")
}

record(calc, "PLC:GUNB:TM01:FAULTPROGRAMCALC") {
  field(FLNK, "PLC:GUNB:TM01:FAULTPROGRAM")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:GUNB:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:GUNB:TM01:MINORFAULTRAW")
  field(INPC, "0x10")
  field(INPD, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(mbbi, "PLC:GUNB:TM01:FAULTPROGRAM") {
  field(FLNK, "PLC:GUNB:TM01:FAULTFLTHNDLCALC")
  field(INP, "PLC:GUNB:TM01:FAULTPROGRAMCALC NPP MS")
  field(ZRST, "NONE")
  field(ONST, "MINOR")
  field(TWST, "MAJOR")
  field(ZRSV, "NO_ALARM")
  field(ONSV, "MINOR")
  field(TWSV, "MAJOR")
}

record(mbbi, "PLC:GUNB:TM01:FAULTFLTHNDL") {
  field(FLNK, "PLC:GUNB:TM01:FAULTWTCHDOGCALC")
  field(INP, "PLC:GUNB:TM01:FAULTFLTHNDLCALC NPP MS")
  field(ZRST, "NONE")
  field(ONST, "MINOR")
  field(TWST, "MAJOR")
  field(ZRSV, "NO_ALARM")
  field(ONSV, "MINOR")
  field(TWSV, "MAJOR")
}

record(calc, "PLC:GUNB:TM01:FAULTFLTHNDLCALC") {
  field(FLNK, "PLC:GUNB:TM01:FAULTFLTHNDL")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:GUNB:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:GUNB:TM01:MINORFAULTRAW")
  field(INPC, "0x20")
  field(INPD, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:FAULTWTCHDOGCALC") {
  field(FLNK, "PLC:GUNB:TM01:FAULTWTCHDOG")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:GUNB:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:GUNB:TM01:MINORFAULTRAW")
  field(INPC, "0x40")
  field(INPD, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(mbbi, "PLC:GUNB:TM01:FAULTWTCHDOG") {
  field(FLNK, "PLC:GUNB:TM01:FAULTSTACKCALC")
  field(INP, "PLC:GUNB:TM01:FAULTWTCHDOGCALC NPP MS")
  field(ZRST, "NONE")
  field(ONST, "MINOR")
  field(TWST, "MAJOR")
  field(ZRSV, "NO_ALARM")
  field(ONSV, "MINOR")
  field(TWSV, "MAJOR")
}

record(calc, "PLC:GUNB:TM01:FAULTSTACKCALC") {
  field(FLNK, "PLC:GUNB:TM01:FAULTSTACK")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:GUNB:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:GUNB:TM01:MINORFAULTRAW")
  field(INPC, "0x80")
  field(INPD, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}


record(mbbi, "PLC:GUNB:TM01:FAULTSTACK") {
  field(FLNK, "PLC:GUNB:TM01:FAULTMODECHGCALC")
  field(INP, "PLC:GUNB:TM01:FAULTSTACKCALC NPP MS")
  field(ZRST, "NONE")
  field(ONST, "MINOR")
  field(TWST, "MAJOR")
  field(ZRSV, "NO_ALARM")
  field(ONSV, "NO_ALARM")
  field(TWSV, "MAJOR")
}

record(calc, "PLC:GUNB:TM01:FAULTMODECHGCALC") {
  field(FLNK, "PLC:GUNB:TM01:FAULTMODECHG")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:GUNB:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:GUNB:TM01:MINORFAULTRAW")
  field(INPC, "0x100")
  field(INPD, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(mbbi, "PLC:GUNB:TM01:FAULTMODECHG") {
  field(FLNK, "PLC:GUNB:TM01:FAULTSERIALCALC")
  field(INP, "PLC:GUNB:TM01:FAULTMODECHGCALC NPP MS")
  field(ZRST, "NONE")
  field(ONST, "MINOR")
  field(TWST, "MAJOR")
  field(ZRSV, "NO_ALARM")
  field(ONSV, "MINOR")
  field(TWSV, "MAJOR")
}

record(calc, "PLC:GUNB:TM01:FAULTSERIALCALC") {
  field(FLNK, "PLC:GUNB:TM01:FAULTSERIAL")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:GUNB:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:GUNB:TM01:MINORFAULTRAW")
  field(INPC, "0x200")
  field(INPD, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(mbbi, "PLC:GUNB:TM01:FAULTSERIAL") {
  field(FLNK, "PLC:GUNB:TM01:FAULTBATTERYCALC")
  field(INP, "PLC:GUNB:TM01:FAULTSERIALCALC NPP MS")
  field(ZRST, "NONE")
  field(ONST, "MINOR")
  field(TWST, "MAJOR")
  field(ZRSV, "NO_ALARM")
  field(ONSV, "MINOR")
  field(TWSV, "MAJOR")
}

record(mbbi, "PLC:GUNB:TM01:FAULTBATTERY") {
  field(FLNK, "PLC:GUNB:TM01:FAULTMOTIONCALC")
  field(INP, "PLC:GUNB:TM01:FAULTBATTERYCALC NPP MS")
  field(ZRST, "NONE")
  field(ONST, "MINOR")
  field(TWST, "MAJOR")
  field(ZRSV, "NO_ALARM")
  field(ONSV, "MINOR")
  field(TWSV, "MAJOR")
}

record(calc, "PLC:GUNB:TM01:FAULTBATTERYCALC") {
  field(FLNK, "PLC:GUNB:TM01:FAULTBATTERY")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:GUNB:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:GUNB:TM01:MINORFAULTRAW")
  field(INPC, "0x400")
  field(INPD, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:FAULTMOTIONCALC") {
  field(FLNK, "PLC:GUNB:TM01:FAULTMOTION")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:GUNB:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:GUNB:TM01:MINORFAULTRAW")
  field(INPC, "0x800")
  field(INPD, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(mbbi, "PLC:GUNB:TM01:FAULTMOTION") {
  field(INP, "PLC:GUNB:TM01:FAULTMOTIONCALC NPP MS")
  field(ZRST, "NONE")
  field(ONST, "MINOR")
  field(TWST, "MAJOR")
  field(ZRSV, "NO_ALARM")
  field(ONSV, "MINOR")
  field(TWSV, "MAJOR")
}

record(ai, "PLC:GUNB:TM01:VERSIONMAJORDES") {
  field(PINI, "YES")
  field(FLNK, "PLC:GUNB:TM01:VERSIONMAJORCALCHI")
  field(VAL, "1")
  field(PREC, "0")
}

record(calcout, "PLC:GUNB:TM01:VERSIONMAJORCALCHI") {
  field(FLNK, "PLC:GUNB:TM01:VERSIONMAJORCALCLO")
  field(CALC, "A+1")
  field(INPA, "PLC:GUNB:TM01:VERSIONMAJORDES")
  field(OUT, "PLC:GUNB:TM01:VERSIONMAJOR.HIGH")
}

record(calcout, "PLC:GUNB:TM01:VERSIONMAJORCALCLO") {
  field(CALC, "A-1")
  field(INPA, "PLC:GUNB:TM01:VERSIONMAJORDES")
  field(OUT, "PLC:GUNB:TM01:VERSIONMAJOR.LOW")
}

record(ai, "PLC:GUNB:TM01:VERSIONMINORDES") {
  field(PINI, "YES")
  field(FLNK, "PLC:GUNB:TM01:VERSIONMINORCALCHI")
  field(VAL, "0")
  field(PREC, "0")
}

record(calcout, "PLC:GUNB:TM01:VERSIONMINORCALCLO") {
  field(CALC, "A-1")
  field(INPA, "PLC:GUNB:TM01:VERSIONMINORDES.VAL")
  field(OUT, "PLC:GUNB:TM01:VERSIONMINOR.LOW")
}

record(calcout, "PLC:GUNB:TM01:VERSIONMINORCALCHI") {
  field(FLNK, "PLC:GUNB:TM01:VERSIONMINORCALCLO")
  field(CALC, "A+1")
  field(INPA, "PLC:GUNB:TM01:VERSIONMINORDES.VAL")
  field(OUT, "PLC:GUNB:TM01:VERSIONMINOR.HIGH")
}

record(ai, "PLC:GUNB:TM01:VERSIONREVDES") {
  field(PINI, "YES")
  field(FLNK, "PLC:GUNB:TM01:VERSIONREVCALCHI")
  field(VAL, "0")
  field(PREC, "0")
}

record(calcout, "PLC:GUNB:TM01:VERSIONREVCALCHI") {
  field(FLNK, "PLC:GUNB:TM01:VERSIONREVCALCLO")
  field(CALC, "A+1")
  field(INPA, "PLC:GUNB:TM01:VERSIONREVDES.VAL")
  field(OUT, "PLC:GUNB:TM01:VERSIONREV.HIGH")
}

record(calcout, "PLC:GUNB:TM01:VERSIONREVCALCLO") {
  field(CALC, "A-1")
  field(INPA, "PLC:GUNB:TM01:VERSIONREVDES.VAL")
  field(OUT, "PLC:GUNB:TM01:VERSIONREV.LOW")
}

record(calc, "PLC:GUNB:TM01:HEARTBEATCALC") {
  field(FLNK, "PLC:GUNB:TM01:HEARTBEATERR")
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:HEARTBEATRAW")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCALC")
}

record(bi, "PLC:GUNB:TM01:HEARTBEATOK") {
  field(FLNK, "PLC:GUNB:TM01:HEARTBEATE01")
  field(INP, "PLC:GUNB:TM01:HEARTBEATERR.VAL")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(calc, "PLC:GUNB:TM01:HEARTBEATERR") {
  field(FLNK, "PLC:GUNB:TM01:HEARTBEATOK")
  field(CALC, "A=B?1:0")
  field(INPA, "PLC:GUNB:TM01:HEARTBEATCALC.A")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCALC.B")
}

record(calc, "PLC:GUNB:TM01:HEARTBEATECT") {
  field(FLNK, "PLC:GUNB:TM01:HEARTBEATSUM")
  field(CALC, "A+B+C+D+E+F+G+H+I+J")
  field(INPA, "PLC:GUNB:TM01:HEARTBEATE01")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATE02")
  field(INPC, "PLC:GUNB:TM01:HEARTBEATE03")
  field(INPD, "PLC:GUNB:TM01:HEARTBEATE04")
  field(INPE, "PLC:GUNB:TM01:HEARTBEATE05")
  field(INPF, "PLC:GUNB:TM01:HEARTBEATE06")
  field(INPG, "PLC:GUNB:TM01:HEARTBEATE07")
  field(INPH, "PLC:GUNB:TM01:HEARTBEATE08")
  field(INPI, "PLC:GUNB:TM01:HEARTBEATE09")
  field(INPJ, "PLC:GUNB:TM01:HEARTBEATE10")
  field(HIHI, "7")
  field(LOLO, "-1")
  field(HIGH, "5")
  field(LOW, "-1")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MAJOR")
}

record(calc, "PLC:GUNB:TM01:HEARTBEATE09") {
  field(FLNK, "PLC:GUNB:TM01:HEARTBEATE10")
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:HEARTBEATE08.B")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATE09.VAL")
}

record(calc, "PLC:GUNB:TM01:HEARTBEATE08") {
  field(FLNK, "PLC:GUNB:TM01:HEARTBEATE09")
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:HEARTBEATE07.B")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATE08.VAL")
}

record(calc, "PLC:GUNB:TM01:HEARTBEATE07") {
  field(FLNK, "PLC:GUNB:TM01:HEARTBEATE08")
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:HEARTBEATE06.B")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATE07.VAL")
}

record(calc, "PLC:GUNB:TM01:HEARTBEATE06") {
  field(FLNK, "PLC:GUNB:TM01:HEARTBEATE07")
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:HEARTBEATE05.B")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATE06.VAL")
}

record(calc, "PLC:GUNB:TM01:HEARTBEATE05") {
  field(FLNK, "PLC:GUNB:TM01:HEARTBEATE06")
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:HEARTBEATE04.B")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATE05.VAL")
}

record(calc, "PLC:GUNB:TM01:HEARTBEATE04") {
  field(FLNK, "PLC:GUNB:TM01:HEARTBEATE05")
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:HEARTBEATE03.B")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATE04.VAL")
}

record(calc, "PLC:GUNB:TM01:HEARTBEATE03") {
  field(FLNK, "PLC:GUNB:TM01:HEARTBEATE04")
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:HEARTBEATE02.B")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATE03.VAL")
}

record(calc, "PLC:GUNB:TM01:HEARTBEATE02") {
  field(FLNK, "PLC:GUNB:TM01:HEARTBEATE03")
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:HEARTBEATE01.B")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATE02.VAL")
}

record(calc, "PLC:GUNB:TM01:HEARTBEATE01") {
  field(FLNK, "PLC:GUNB:TM01:HEARTBEATE02")
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:HEARTBEATERR")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATE01.VAL")
}

record(calc, "PLC:GUNB:TM01:HEARTBEATCLC") {
  field(CALC, "A=0?0:A=1?0:A-2?3:A=3?3:4")
  field(INPA, "PLC:GUNB:TM01:HEARTBEATECT.SEVR")
  field(HIHI, "4")
  field(HHSV, "INVALID")
}

record(mbbi, "PLC:GUNB:TM01:HEARTBEATSUM") {
  field(FLNK, "PLC:GUNB:TM01:HEARTBEATCLC")
  field(INP, "PLC:GUNB:TM01:HEARTBEATECT.SEVR")
  field(ZRSV, "NO_ALARM")
  field(ONSV, "MINOR")
  field(TWSV, "MAJOR")
  field(ZRST, "PRESENT")
  field(ONST, "INTERMITTENT")
  field(TWST, "ABSENT")
}

record(ai, "PLC:GUNB:TM01:UPTIMEDAYRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[18]")
  field(FLNK, "PLC:GUNB:TM01:UPTIMEDAY")
}

record(calc, "PLC:GUNB:TM01:UPTIMEDAY") {
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:UPTIMEDAYRAW")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(ai, "PLC:GUNB:TM01:TODYEARRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[10]")
  field(FLNK, "PLC:GUNB:TM01:TODYEAR")
}

record(ai, "PLC:GUNB:TM01:TODDAYRAW") {
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[12]")
  field(SCAN, "1 second")
  field(FLNK, "PLC:GUNB:TM01:TODDAY")
}

record(ai, "PLC:GUNB:TM01:TODMONTHRAW") {
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[11]")
  field(FLNK, "PLC:GUNB:TM01:TODMONTH")
  field(SCAN, "1 second")
}

record(ai, "PLC:GUNB:TM01:TODHOURRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[13]")
  field(FLNK, "PLC:GUNB:TM01:TODHOUR")
}

record(ai, "PLC:GUNB:TM01:TODMINUTERAW") {
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[14]")
  field(FLNK, "PLC:GUNB:TM01:TODMINUTE")
  field(SCAN, "1 second")
}

record(ai, "PLC:GUNB:TM01:TODSECONDRAW") {
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[15]")
  field(SCAN, "1 second")
  field(FLNK, "PLC:GUNB:TM01:TODSECOND")
}

record(calc, "PLC:GUNB:TM01:TODYEAR") {
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:TODYEARRAW NPP MS")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:TODMONTH") {
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:TODMONTHRAW NPP MS")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:TODDAY") {
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:TODDAYRAW NPP MS")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:TODHOUR") {
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:TODHOURRAW NPP MS")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:TODMINUTE") {
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:TODMINUTERAW NPP MS")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:TODSECOND") {
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:TODSECONDRAW NPP MS")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(ai, "PLC:GUNB:TM01:VERSIONMAJORRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[36]")
  field(HYST, "1")
  field(FLNK, "PLC:GUNB:TM01:VERSIONMAJOR")
}

record(ai, "PLC:GUNB:TM01:VERSIONMINORRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[37]")
  field(FLNK, "PLC:GUNB:TM01:VERSIONMINOR")
}

record(calc, "PLC:GUNB:TM01:VERSIONMAJOR") {
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:VERSIONMAJORRAW NPP MS")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
  field(HSV, "MAJOR")
  field(LSV, "MAJOR")
}

record(calc, "PLC:GUNB:TM01:VERSIONMINOR") {
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:VERSIONMINORRAW NPP MS")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
  field(HSV, "MAJOR")
  field(LSV, "MAJOR")
}

record(ai, "PLC:GUNB:TM01:VERSIONREVRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[38]")
  field(FLNK, "PLC:GUNB:TM01:VERSIONREV")
}

record(calc, "PLC:GUNB:TM01:VERSIONREV") {
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:VERSIONREVRAW NPP MS")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
  field(HSV, "MAJOR")
  field(LSV, "MAJOR")
}

record(ai, "PLC:GUNB:TM01:SERIALNUMBERRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[4]")
  field(FLNK, "PLC:GUNB:TM01:SERIALNUMBER")
}

record(calc, "PLC:GUNB:TM01:SERIALNUMBER") {
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:SERIALNUMBERRAW NPP MS")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(mbbi, "PLC:GUNB:TM01:COMMLINK") {
  field(FLNK, "PLC:GUNB:TM01:HEARTBEATCALC")
  field(INP, "PLC:GUNB:TM01:HEARTBEATRAW.SEVR")
  field(ZRST, "OK")
  field(ONST, "OK")
  field(TWST, "OK")
  field(THST, "FAULT")
  field(ZRSV, "NO_ALARM")
  field(ONSV, "NO_ALARM")
  field(TWSV, "NO_ALARM")
  field(THSV, "MAJOR")
}

record(calc, "PLC:GUNB:TM01:HEARTBEATE10") {
  field(FLNK, "PLC:GUNB:TM01:HEARTBEATECT")
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:HEARTBEATE09.B")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATE10.VAL")
}

record(ai, "PLC:GUNB:TM01:DOCPREFIXRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:DOCPREFIXCALC")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[31]")
}

record(calc, "PLC:GUNB:TM01:DOCPREFIXCALC") {
  field(FLNK, "PLC:GUNB:TM01:DOCPREFIX")
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:DOCPREFIXRAW")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(mbbi, "PLC:GUNB:TM01:DOCPREFIX") {
  field(INP, "PLC:GUNB:TM01:DOCPREFIXCALC NPP MS")
  field(ZRVL, "0")
  field(ONVL, "1")
  field(ZRST, "NONE")
  field(ONST, "SD")
  field(TWVL, "2")
  field(THVL, "3")
  field(FRVL, "4")
  field(FVVL, "5")
  field(SXVL, "6")
  field(SVVL, "7")
  field(EIVL, "8")
  field(NIVL, "9")
  field(TEVL, "10")
  field(ELVL, "11")
  field(TWST, "BD")
  field(THST, "DL")
  field(FRST, "EI")
  field(FVST, "FC")
  field(SXST, "FS")
  field(SVST, "IM")
  field(EIST, "LD")
  field(NIST, "OM")
  field(TEST, "QT")
  field(ELST, "WD")
}

record(ai, "PLC:GUNB:TM01:DOCSERIESRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:DOCSERIES")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[32]")
}

record(calc, "PLC:GUNB:TM01:DOCSERIES") {
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:DOCSERIESRAW.VAL")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(ai, "PLC:GUNB:TM01:DOCBASERAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:DOCBASE")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[33]")
}

record(calc, "PLC:GUNB:TM01:DOCBASE") {
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:DOCBASERAW.VAL")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(ai, "PLC:GUNB:TM01:DOCSUFFIXRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:DOCSUFFIX")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[34]")
}

record(calc, "PLC:GUNB:TM01:DOCSUFFIX") {
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:DOCSUFFIXRAW")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(ai, "PLC:GUNB:TM01:DOCREVRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:DOCREV")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[35]")
}

record(calc, "PLC:GUNB:TM01:DOCREV") {
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:DOCREVRAW")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(stringin, "PLC:GUNB:TM01:SUBSYSTEM") {
  field(PINI, "YES")
  field(VAL, "TEMPERATURE")
}

record(ai, "PLC:GUNB:TM01:PLCADMINVMAJRAW") {
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[0]")
  field(SCAN, "1 second")
  field(FLNK, "PLC:GUNB:TM01:PLCADMINVMAJ")
}

record(calc, "PLC:GUNB:TM01:PLCADMINVMAJ") {
  field(INPA, "PLC:GUNB:TM01:PLCADMINVMAJRAW.VAL")
  field(CALC, "A")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
  field(PREC, "0")
  field(HIHI, "2")
  field(LOLO, "0")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
}

record(ai, "PLC:GUNB:TM01:PLCADMINVMINRAW") {
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[1]")
  field(SCAN, "1 second")
  field(FLNK, "PLC:GUNB:TM01:PLCADMINVMIN")
}

record(calc, "PLC:GUNB:TM01:PLCADMINVMIN") {
  field(INPA, "PLC:GUNB:TM01:PLCADMINVMINRAW.VAL")
  field(CALC, "A")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
  field(PREC, "0")
  field(HIHI, "1")
  field(LOLO, "-1")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
}

record(ai, "PLC:GUNB:TM01:PLCADMINVREVRAW") {
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[2]")
  field(SCAN, "1 second")
  field(FLNK, "PLC:GUNB:TM01:PLCADMINVREV")
}

record(calc, "PLC:GUNB:TM01:PLCADMINVREV") {
  field(INPA, "PLC:GUNB:TM01:PLCADMINVREVRAW.VAL")
  field(CALC, "A")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
  field(PREC, "0")
  field(HIHI, "3")
  field(LOLO, "-1")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
}

record(ai, "PLC:GUNB:TM01:PROGPLCATMAXRAW") {
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[23]")
  field(SCAN, "1 second")
  field(FLNK, "PLC:GUNB:TM01:PROGPLCATMAX")
}

record(ai, "PLC:GUNB:TM01:PROGPLCATLSTRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[22]")
  field(FLNK, "PLC:GUNB:TM01:PROGPLCATLST")
}

record(calc, "PLC:GUNB:TM01:PROGPLCATLST") {
  field(INPA, "PLC:GUNB:TM01:PROGPLCATLSTRAW.VAL")
  field(CALC, "A")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:PROGPLCATMAX") {
  field(INPA, "PLC:GUNB:TM01:PROGPLCATMAXRAW.VAL")
  field(CALC, "A")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(stringin, "PLC:GUNB:TM01:PLCADMINTAG") {
  field(PINI, "YES")
  field(VAL, "PLCADMIN_PLC_GUNB_TM01")
}

record(ai, "PLC:GUNB:TM01:TASKMAINTLSTRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[20]")
  field(FLNK, "PLC:GUNB:TM01:TASKMAINTLST")
}

record(calc, "PLC:GUNB:TM01:TASKMAINTLST") {
  field(INPA, "PLC:GUNB:TM01:TASKMAINTLSTRAW.VAL")
  field(CALC, "A")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(ai, "PLC:GUNB:TM01:TASKMAINTMAXRAW") {
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[21]")
  field(FLNK, "PLC:GUNB:TM01:TASKMAINTMAX")
  field(SCAN, "1 second")
}

record(calc, "PLC:GUNB:TM01:TASKMAINTMAX") {
  field(INPA, "PLC:GUNB:TM01:TASKMAINTMAXRAW.VAL")
  field(CALC, "A")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(ai, "PLC:GUNB:TM01:PROG1TLSTRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[24]")
  field(FLNK, "PLC:GUNB:TM01:PROG1TLST")
}

record(ai, "PLC:GUNB:TM01:PROG1TMAXRAW") {
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[25]")
  field(SCAN, "1 second")
  field(FLNK, "PLC:GUNB:TM01:PROG1TMAX")
}

record(calc, "PLC:GUNB:TM01:PROG1TLST") {
  field(INPA, "PLC:GUNB:TM01:PROG1TLSTRAW.VAL")
  field(CALC, "A")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:PROG1TMAX") {
  field(INPA, "PLC:GUNB:TM01:PROG1TMAXRAW.VAL")
  field(CALC, "A")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(ai, "PLC:GUNB:TM01:PROG2TLSTRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[26]")
  field(FLNK, "PLC:GUNB:TM01:PROG2TLST")
}

record(ai, "PLC:GUNB:TM01:PROG2TMAXRAW") {
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[27]")
  field(SCAN, "1 second")
  field(FLNK, "PLC:GUNB:TM01:PROG2TMAX")
}

record(calc, "PLC:GUNB:TM01:PROG2TLST") {
  field(INPA, "PLC:GUNB:TM01:PROG2TLSTRAW.VAL")
  field(CALC, "A")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:PROG2TMAX") {
  field(INPA, "PLC:GUNB:TM01:PROG2TMAXRAW.VAL")
  field(CALC, "A")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(ai, "PLC:GUNB:TM01:PROG3TLSTRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[28]")
  field(FLNK, "PLC:GUNB:TM01:PROG3TLST")
}

record(ai, "PLC:GUNB:TM01:PROG3TMAXRAW") {
  field(DTYP, "EtherIP")
  field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01[29]")
  field(SCAN, "1 second")
  field(FLNK, "PLC:GUNB:TM01:PROG3TMAX")
}

record(calc, "PLC:GUNB:TM01:PROG3TMAX") {
  field(INPA, "PLC:GUNB:TM01:PROG3TMAXRAW.VAL")
  field(CALC, "A")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:PROG3TLST") {
  field(INPA, "PLC:GUNB:TM01:PROG3TLSTRAW.VAL")
  field(CALC, "A")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATCLC MS")
}

record(calc, "PLC:GUNB:TM01:STATSUMY") {
  field(SCAN, "1 second")
  field(CALC, "A")
  field(INPA, "PLC:GUNB:TM01:STATSUMY.SEVR")
  field(INPB, "PLC:GUNB:TM01:HEARTBEATSUM MS")
  field(INPC, "PLC:GUNB:TM01:FAULTSTATUS MS")
  field(INPD, "PLC:GUNB:TM01:KEYSTATUS MS")
  field(INPE, "PLC:GUNB:TM01:DEVICESTATUS MS")
  field(INPF, "PLC:GUNB:TM01:VERSIONMAJOR MS")
  field(INPG, "PLC:GUNB:TM01:VERSIONMINOR MS")
  field(INPH, "PLC:GUNB:TM01:VERSIONREV MS")
}

#! Further lines contain data used by VisualDCT
#! View(935,906,0.9)
#! Record("PLC:GUNB:TM01:STATUSRAW",2160,3987,0,1,"PLC:GUNB:TM01:STATUSRAW")
#! Field("PLC:GUNB:TM01:STATUSRAW.FLNK",16777215,1,"PLC:GUNB:TM01:STATUSRAW.FLNK")
#! Link("PLC:GUNB:TM01:STATUSRAW.FLNK","PLC:GUNB:TM01:DEVICESTATUSRAW")
#! Field("PLC:GUNB:TM01:STATUSRAW.VAL",16777215,1,"PLC:GUNB:TM01:STATUSRAW.VAL")
#! Record("PLC:GUNB:TM01:MODELRAW",4120,7,0,0,"PLC:GUNB:TM01:MODELRAW")
#! Field("PLC:GUNB:TM01:MODELRAW.FLNK",16777215,1,"PLC:GUNB:TM01:MODELRAW.FLNK")
#! Link("PLC:GUNB:TM01:MODELRAW.FLNK","PLC:GUNB:TM01:MODELCALC")
#! Field("PLC:GUNB:TM01:MODELRAW.VAL",16777215,0,"PLC:GUNB:TM01:MODELRAW.VAL")
#! Record("PLC:GUNB:TM01:UPTIMESEC",4280,1787,0,0,"PLC:GUNB:TM01:UPTIMESEC")
#! Field("PLC:GUNB:TM01:UPTIMESEC.FLNK",16777215,1,"PLC:GUNB:TM01:UPTIMESEC.FLNK")
#! Link("PLC:GUNB:TM01:UPTIMESEC.FLNK","PLC:GUNB:TM01:UPTIMEHOURS")
#! Field("PLC:GUNB:TM01:UPTIMESEC.VAL",16777215,1,"PLC:GUNB:TM01:UPTIMESEC.VAL")
#! Record("PLC:GUNB:TM01:UPTIMEHOURS",4540,1794,0,0,"PLC:GUNB:TM01:UPTIMEHOURS")
#! Field("PLC:GUNB:TM01:UPTIMEHOURS.INPA",16777215,0,"PLC:GUNB:TM01:UPTIMEHOURS.INPA")
#! Link("PLC:GUNB:TM01:UPTIMEHOURS.INPA","PLC:GUNB:TM01:UPTIMESEC.VAL")
#! Field("PLC:GUNB:TM01:UPTIMEHOURS.FLNK",16777215,1,"PLC:GUNB:TM01:UPTIMEHOURS.FLNK")
#! Link("PLC:GUNB:TM01:UPTIMEHOURS.FLNK","PLC:GUNB:TM01:UPTIMEMINUTES")
#! Field("PLC:GUNB:TM01:UPTIMEHOURS.INPB",16777215,0,"PLC:GUNB:TM01:UPTIMEHOURS.INPB")
#! Link("PLC:GUNB:TM01:UPTIMEHOURS.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:UPTIMEMINUTES",4580,2014,0,1,"PLC:GUNB:TM01:UPTIMEMINUTES")
#! Field("PLC:GUNB:TM01:UPTIMEMINUTES.INPA",16777215,0,"PLC:GUNB:TM01:UPTIMEMINUTES.INPA")
#! Link("PLC:GUNB:TM01:UPTIMEMINUTES.INPA","PLC:GUNB:TM01:UPTIMESEC.VAL")
#! Field("PLC:GUNB:TM01:UPTIMEMINUTES.FLNK",16777215,1,"PLC:GUNB:TM01:UPTIMEMINUTES.FLNK")
#! Link("PLC:GUNB:TM01:UPTIMEMINUTES.FLNK","PLC:GUNB:TM01:UPTIMESECONDS")
#! Field("PLC:GUNB:TM01:UPTIMEMINUTES.INPB",16777215,0,"PLC:GUNB:TM01:UPTIMEMINUTES.INPB")
#! Link("PLC:GUNB:TM01:UPTIMEMINUTES.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:UPTIMESECONDS",4620,2227,0,1,"PLC:GUNB:TM01:UPTIMESECONDS")
#! Field("PLC:GUNB:TM01:UPTIMESECONDS.INPA",16777215,0,"PLC:GUNB:TM01:UPTIMESECONDS.INPA")
#! Link("PLC:GUNB:TM01:UPTIMESECONDS.INPA","PLC:GUNB:TM01:UPTIMESEC.VAL")
#! Field("PLC:GUNB:TM01:UPTIMESECONDS.INPB",16777215,0,"PLC:GUNB:TM01:UPTIMESECONDS.INPB")
#! Link("PLC:GUNB:TM01:UPTIMESECONDS.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:HEARTBEATRAW",60,79,0,1,"PLC:GUNB:TM01:HEARTBEATRAW")
#! Field("PLC:GUNB:TM01:HEARTBEATRAW.FLNK",16777215,1,"PLC:GUNB:TM01:HEARTBEATRAW.FLNK")
#! Link("PLC:GUNB:TM01:HEARTBEATRAW.FLNK","PLC:GUNB:TM01:COMMLINK")
#! Field("PLC:GUNB:TM01:HEARTBEATRAW.SEVR",16777215,1,"PLC:GUNB:TM01:HEARTBEATRAW.SEVR")
#! Field("PLC:GUNB:TM01:HEARTBEATRAW.VAL",16777215,1,"PLC:GUNB:TM01:HEARTBEATRAW.VAL")
#! Record("PLC:GUNB:TM01:MODEL",4640,54,0,0,"PLC:GUNB:TM01:MODEL")
#! Field("PLC:GUNB:TM01:MODEL.INP",16777215,0,"PLC:GUNB:TM01:MODEL.INP")
#! Link("PLC:GUNB:TM01:MODEL.INP","PLC:GUNB:TM01:MODELCALC.VAL")
#! Record("PLC:GUNB:TM01:FWVERSIONRAW",4180,227,0,0,"PLC:GUNB:TM01:FWVERSIONRAW")
#! Field("PLC:GUNB:TM01:FWVERSIONRAW.FLNK",16777215,1,"PLC:GUNB:TM01:FWVERSIONRAW.FLNK")
#! Link("PLC:GUNB:TM01:FWVERSIONRAW.FLNK","PLC:GUNB:TM01:FWVERSIONMAJ")
#! Field("PLC:GUNB:TM01:FWVERSIONRAW.VAL",16777215,1,"PLC:GUNB:TM01:FWVERSIONRAW.VAL")
#! Record("PLC:GUNB:TM01:FWVERSIONMAJ",4460,247,0,0,"PLC:GUNB:TM01:FWVERSIONMAJ")
#! Field("PLC:GUNB:TM01:FWVERSIONMAJ.FLNK",16777215,1,"PLC:GUNB:TM01:FWVERSIONMAJ.FLNK")
#! Link("PLC:GUNB:TM01:FWVERSIONMAJ.FLNK","PLC:GUNB:TM01:FWVERSIONMIN")
#! Field("PLC:GUNB:TM01:FWVERSIONMAJ.INPA",16777215,0,"PLC:GUNB:TM01:FWVERSIONMAJ.INPA")
#! Link("PLC:GUNB:TM01:FWVERSIONMAJ.INPA","PLC:GUNB:TM01:FWVERSIONRAW.VAL")
#! Field("PLC:GUNB:TM01:FWVERSIONMAJ.INPB",16777215,0,"PLC:GUNB:TM01:FWVERSIONMAJ.INPB")
#! Link("PLC:GUNB:TM01:FWVERSIONMAJ.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:FWVERSIONMIN",4720,322,0,0,"PLC:GUNB:TM01:FWVERSIONMIN")
#! Field("PLC:GUNB:TM01:FWVERSIONMIN.INPA",16777215,0,"PLC:GUNB:TM01:FWVERSIONMIN.INPA")
#! Link("PLC:GUNB:TM01:FWVERSIONMIN.INPA","PLC:GUNB:TM01:FWVERSIONRAW.VAL")
#! Field("PLC:GUNB:TM01:FWVERSIONMIN.INPB",16777215,0,"PLC:GUNB:TM01:FWVERSIONMIN.INPB")
#! Link("PLC:GUNB:TM01:FWVERSIONMIN.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:MODELCALC",4380,27,0,0,"PLC:GUNB:TM01:MODELCALC")
#! Field("PLC:GUNB:TM01:MODELCALC.INPA",16777215,0,"PLC:GUNB:TM01:MODELCALC.INPA")
#! Link("PLC:GUNB:TM01:MODELCALC.INPA","PLC:GUNB:TM01:MODELRAW.VAL")
#! Field("PLC:GUNB:TM01:MODELCALC.FLNK",16777215,1,"PLC:GUNB:TM01:MODELCALC.FLNK")
#! Link("PLC:GUNB:TM01:MODELCALC.FLNK","PLC:GUNB:TM01:MODEL")
#! Field("PLC:GUNB:TM01:MODELCALC.VAL",16777215,0,"PLC:GUNB:TM01:MODELCALC.VAL")
#! Field("PLC:GUNB:TM01:MODELCALC.INPB",16777215,0,"PLC:GUNB:TM01:MODELCALC.INPB")
#! Link("PLC:GUNB:TM01:MODELCALC.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:DEVICESTATUSCALC",2760,3930,0,0,"PLC:GUNB:TM01:DEVICESTATUSCALC")
#! Field("PLC:GUNB:TM01:DEVICESTATUSCALC.FLNK",16777215,1,"PLC:GUNB:TM01:DEVICESTATUSCALC.FLNK")
#! Link("PLC:GUNB:TM01:DEVICESTATUSCALC.FLNK","PLC:GUNB:TM01:DEVICESTATUS")
#! Field("PLC:GUNB:TM01:DEVICESTATUSCALC.INPA",16777215,0,"PLC:GUNB:TM01:DEVICESTATUSCALC.INPA")
#! Link("PLC:GUNB:TM01:DEVICESTATUSCALC.INPA","PLC:GUNB:TM01:DEVICESTATUSRAW.VAL")
#! Field("PLC:GUNB:TM01:DEVICESTATUSCALC.VAL",16777215,1,"PLC:GUNB:TM01:DEVICESTATUSCALC.VAL")
#! Record("PLC:GUNB:TM01:DEVICESTATUSRAW",2480,3974,0,0,"PLC:GUNB:TM01:DEVICESTATUSRAW")
#! Field("PLC:GUNB:TM01:DEVICESTATUSRAW.FLNK",16777215,1,"PLC:GUNB:TM01:DEVICESTATUSRAW.FLNK")
#! Link("PLC:GUNB:TM01:DEVICESTATUSRAW.FLNK","PLC:GUNB:TM01:DEVICESTATUSCALC")
#! Field("PLC:GUNB:TM01:DEVICESTATUSRAW.INPA",16777215,0,"PLC:GUNB:TM01:DEVICESTATUSRAW.INPA")
#! Link("PLC:GUNB:TM01:DEVICESTATUSRAW.INPA","PLC:GUNB:TM01:STATUSRAW.VAL")
#! Field("PLC:GUNB:TM01:DEVICESTATUSRAW.VAL",16777215,1,"PLC:GUNB:TM01:DEVICESTATUSRAW.VAL")
#! Field("PLC:GUNB:TM01:DEVICESTATUSRAW.INPC",16777215,1,"PLC:GUNB:TM01:DEVICESTATUSRAW.INPC")
#! Link("PLC:GUNB:TM01:DEVICESTATUSRAW.INPC","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:DEVICESTATUS",3040,3926,0,0,"PLC:GUNB:TM01:DEVICESTATUS")
#! Field("PLC:GUNB:TM01:DEVICESTATUS.INP",16777215,0,"PLC:GUNB:TM01:DEVICESTATUS.INP")
#! Link("PLC:GUNB:TM01:DEVICESTATUS.INP","PLC:GUNB:TM01:DEVICESTATUSCALC.VAL")
#! Field("PLC:GUNB:TM01:DEVICESTATUS.FLNK",16777215,0,"PLC:GUNB:TM01:DEVICESTATUS.FLNK")
#! Link("PLC:GUNB:TM01:DEVICESTATUS.FLNK","PLC:GUNB:TM01:FAULTSTATUSRAW")
#! Field("PLC:GUNB:TM01:DEVICESTATUS.VAL",16777215,0,"PLC:GUNB:TM01:DEVICESTATUS.VAL")
#! Record("PLC:GUNB:TM01:FAULTSTATUSRAW",2480,4274,0,1,"PLC:GUNB:TM01:FAULTSTATUSRAW")
#! Field("PLC:GUNB:TM01:FAULTSTATUSRAW.FLNK",16777215,1,"PLC:GUNB:TM01:FAULTSTATUSRAW.FLNK")
#! Link("PLC:GUNB:TM01:FAULTSTATUSRAW.FLNK","PLC:GUNB:TM01:FAULTSTATUSCALC")
#! Field("PLC:GUNB:TM01:FAULTSTATUSRAW.INPA",16777215,0,"PLC:GUNB:TM01:FAULTSTATUSRAW.INPA")
#! Link("PLC:GUNB:TM01:FAULTSTATUSRAW.INPA","PLC:GUNB:TM01:STATUSRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTSTATUSRAW.VAL",16777215,1,"PLC:GUNB:TM01:FAULTSTATUSRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTSTATUSRAW.INPC",16777215,1,"PLC:GUNB:TM01:FAULTSTATUSRAW.INPC")
#! Link("PLC:GUNB:TM01:FAULTSTATUSRAW.INPC","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:FAULTSTATUSCALC",2760,4225,0,0,"PLC:GUNB:TM01:FAULTSTATUSCALC")
#! Field("PLC:GUNB:TM01:FAULTSTATUSCALC.FLNK",16777215,1,"PLC:GUNB:TM01:FAULTSTATUSCALC.FLNK")
#! Link("PLC:GUNB:TM01:FAULTSTATUSCALC.FLNK","PLC:GUNB:TM01:FAULTSTATUS")
#! Field("PLC:GUNB:TM01:FAULTSTATUSCALC.INPA",16777215,0,"PLC:GUNB:TM01:FAULTSTATUSCALC.INPA")
#! Link("PLC:GUNB:TM01:FAULTSTATUSCALC.INPA","PLC:GUNB:TM01:FAULTSTATUSRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTSTATUSCALC.VAL",16777215,1,"PLC:GUNB:TM01:FAULTSTATUSCALC.VAL")
#! Record("PLC:GUNB:TM01:FAULTSTATUS",3040,4254,0,0,"PLC:GUNB:TM01:FAULTSTATUS")
#! Field("PLC:GUNB:TM01:FAULTSTATUS.INP",16777215,0,"PLC:GUNB:TM01:FAULTSTATUS.INP")
#! Link("PLC:GUNB:TM01:FAULTSTATUS.INP","PLC:GUNB:TM01:FAULTSTATUSCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTSTATUS.FLNK",16777215,0,"PLC:GUNB:TM01:FAULTSTATUS.FLNK")
#! Link("PLC:GUNB:TM01:FAULTSTATUS.FLNK","PLC:GUNB:TM01:KEYSTATUSRAW")
#! Field("PLC:GUNB:TM01:FAULTSTATUS.VAL",16777215,0,"PLC:GUNB:TM01:FAULTSTATUS.VAL")
#! Record("PLC:GUNB:TM01:KEYSTATUSRAW",2480,4594,0,1,"PLC:GUNB:TM01:KEYSTATUSRAW")
#! Field("PLC:GUNB:TM01:KEYSTATUSRAW.FLNK",16777215,1,"PLC:GUNB:TM01:KEYSTATUSRAW.FLNK")
#! Link("PLC:GUNB:TM01:KEYSTATUSRAW.FLNK","PLC:GUNB:TM01:KEYSTATUSCALC")
#! Field("PLC:GUNB:TM01:KEYSTATUSRAW.INPA",16777215,0,"PLC:GUNB:TM01:KEYSTATUSRAW.INPA")
#! Link("PLC:GUNB:TM01:KEYSTATUSRAW.INPA","PLC:GUNB:TM01:STATUSRAW.VAL")
#! Field("PLC:GUNB:TM01:KEYSTATUSRAW.VAL",16777215,1,"PLC:GUNB:TM01:KEYSTATUSRAW.VAL")
#! Field("PLC:GUNB:TM01:KEYSTATUSRAW.INPC",16777215,1,"PLC:GUNB:TM01:KEYSTATUSRAW.INPC")
#! Link("PLC:GUNB:TM01:KEYSTATUSRAW.INPC","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:KEYSTATUSCALC",2760,4579,0,0,"PLC:GUNB:TM01:KEYSTATUSCALC")
#! Field("PLC:GUNB:TM01:KEYSTATUSCALC.FLNK",16777215,1,"PLC:GUNB:TM01:KEYSTATUSCALC.FLNK")
#! Link("PLC:GUNB:TM01:KEYSTATUSCALC.FLNK","PLC:GUNB:TM01:KEYSTATUS")
#! Field("PLC:GUNB:TM01:KEYSTATUSCALC.INPA",16777215,0,"PLC:GUNB:TM01:KEYSTATUSCALC.INPA")
#! Link("PLC:GUNB:TM01:KEYSTATUSCALC.INPA","PLC:GUNB:TM01:KEYSTATUSRAW.VAL")
#! Field("PLC:GUNB:TM01:KEYSTATUSCALC.VAL",16777215,1,"PLC:GUNB:TM01:KEYSTATUSCALC.VAL")
#! Record("PLC:GUNB:TM01:KEYSTATUS",3040,4577,0,0,"PLC:GUNB:TM01:KEYSTATUS")
#! Field("PLC:GUNB:TM01:KEYSTATUS.INP",16777215,0,"PLC:GUNB:TM01:KEYSTATUS.INP")
#! Link("PLC:GUNB:TM01:KEYSTATUS.INP","PLC:GUNB:TM01:KEYSTATUSCALC.VAL")
#! Field("PLC:GUNB:TM01:KEYSTATUS.VAL",16777215,0,"PLC:GUNB:TM01:KEYSTATUS.VAL")
#! Record("PLC:GUNB:TM01:MAJORFAULTRAW",4020,2427,0,0,"PLC:GUNB:TM01:MAJORFAULTRAW")
#! Field("PLC:GUNB:TM01:MAJORFAULTRAW.FLNK",16777215,1,"PLC:GUNB:TM01:MAJORFAULTRAW.FLNK")
#! Link("PLC:GUNB:TM01:MAJORFAULTRAW.FLNK","PLC:GUNB:TM01:FAULTPOWERCALC")
#! Field("PLC:GUNB:TM01:MAJORFAULTRAW.VAL",16777215,1,"PLC:GUNB:TM01:MAJORFAULTRAW.VAL")
#! Record("PLC:GUNB:TM01:MINORFAULTRAW",4000,2622,0,0,"PLC:GUNB:TM01:MINORFAULTRAW")
#! Field("PLC:GUNB:TM01:MINORFAULTRAW.VAL",16777215,1,"PLC:GUNB:TM01:MINORFAULTRAW.VAL")
#! Record("PLC:GUNB:TM01:FAULTPOWERCALC",4360,2559,0,0,"PLC:GUNB:TM01:FAULTPOWERCALC")
#! Field("PLC:GUNB:TM01:FAULTPOWERCALC.INPA",16777215,0,"PLC:GUNB:TM01:FAULTPOWERCALC.INPA")
#! Link("PLC:GUNB:TM01:FAULTPOWERCALC.INPA","PLC:GUNB:TM01:MAJORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTPOWERCALC.INPB",16777215,0,"PLC:GUNB:TM01:FAULTPOWERCALC.INPB")
#! Link("PLC:GUNB:TM01:FAULTPOWERCALC.INPB","PLC:GUNB:TM01:MINORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTPOWERCALC.FLNK",16777215,1,"PLC:GUNB:TM01:FAULTPOWERCALC.FLNK")
#! Link("PLC:GUNB:TM01:FAULTPOWERCALC.FLNK","PLC:GUNB:TM01:FAULTPOWER")
#! Field("PLC:GUNB:TM01:FAULTPOWERCALC.VAL",16777215,1,"PLC:GUNB:TM01:FAULTPOWERCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTPOWERCALC.INPD",16777215,0,"PLC:GUNB:TM01:FAULTPOWERCALC.INPD")
#! Link("PLC:GUNB:TM01:FAULTPOWERCALC.INPD","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:FAULTPOWER",4640,2590,0,0,"PLC:GUNB:TM01:FAULTPOWER")
#! Field("PLC:GUNB:TM01:FAULTPOWER.INP",16777215,0,"PLC:GUNB:TM01:FAULTPOWER.INP")
#! Link("PLC:GUNB:TM01:FAULTPOWER.INP","PLC:GUNB:TM01:FAULTPOWERCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTPOWER.FLNK",16777215,0,"PLC:GUNB:TM01:FAULTPOWER.FLNK")
#! Link("PLC:GUNB:TM01:FAULTPOWER.FLNK","PLC:GUNB:TM01:FAULTIOCALC")
#! Record("PLC:GUNB:TM01:FAULTIOCALC",4360,2799,0,1,"PLC:GUNB:TM01:FAULTIOCALC")
#! Field("PLC:GUNB:TM01:FAULTIOCALC.FLNK",16777215,1,"PLC:GUNB:TM01:FAULTIOCALC.FLNK")
#! Link("PLC:GUNB:TM01:FAULTIOCALC.FLNK","PLC:GUNB:TM01:FAULTIO")
#! Field("PLC:GUNB:TM01:FAULTIOCALC.INPA",16777215,0,"PLC:GUNB:TM01:FAULTIOCALC.INPA")
#! Link("PLC:GUNB:TM01:FAULTIOCALC.INPA","PLC:GUNB:TM01:MAJORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTIOCALC.INPB",16777215,0,"PLC:GUNB:TM01:FAULTIOCALC.INPB")
#! Link("PLC:GUNB:TM01:FAULTIOCALC.INPB","PLC:GUNB:TM01:MINORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTIOCALC.VAL",16777215,1,"PLC:GUNB:TM01:FAULTIOCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTIOCALC.INPD",16777215,0,"PLC:GUNB:TM01:FAULTIOCALC.INPD")
#! Link("PLC:GUNB:TM01:FAULTIOCALC.INPD","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:FAULTIO",4640,2830,0,0,"PLC:GUNB:TM01:FAULTIO")
#! Field("PLC:GUNB:TM01:FAULTIO.INP",16777215,0,"PLC:GUNB:TM01:FAULTIO.INP")
#! Link("PLC:GUNB:TM01:FAULTIO.INP","PLC:GUNB:TM01:FAULTIOCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTIO.FLNK",16777215,0,"PLC:GUNB:TM01:FAULTIO.FLNK")
#! Link("PLC:GUNB:TM01:FAULTIO.FLNK","PLC:GUNB:TM01:FAULTPROGRAMCALC")
#! Record("PLC:GUNB:TM01:FAULTPROGRAMCALC",4360,3039,0,1,"PLC:GUNB:TM01:FAULTPROGRAMCALC")
#! Field("PLC:GUNB:TM01:FAULTPROGRAMCALC.FLNK",16777215,1,"PLC:GUNB:TM01:FAULTPROGRAMCALC.FLNK")
#! Link("PLC:GUNB:TM01:FAULTPROGRAMCALC.FLNK","PLC:GUNB:TM01:FAULTPROGRAM")
#! Field("PLC:GUNB:TM01:FAULTPROGRAMCALC.INPA",16777215,0,"PLC:GUNB:TM01:FAULTPROGRAMCALC.INPA")
#! Link("PLC:GUNB:TM01:FAULTPROGRAMCALC.INPA","PLC:GUNB:TM01:MAJORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTPROGRAMCALC.INPB",16777215,0,"PLC:GUNB:TM01:FAULTPROGRAMCALC.INPB")
#! Link("PLC:GUNB:TM01:FAULTPROGRAMCALC.INPB","PLC:GUNB:TM01:MINORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTPROGRAMCALC.VAL",16777215,1,"PLC:GUNB:TM01:FAULTPROGRAMCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTPROGRAMCALC.INPD",16777215,0,"PLC:GUNB:TM01:FAULTPROGRAMCALC.INPD")
#! Link("PLC:GUNB:TM01:FAULTPROGRAMCALC.INPD","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:FAULTPROGRAM",4640,3070,0,0,"PLC:GUNB:TM01:FAULTPROGRAM")
#! Field("PLC:GUNB:TM01:FAULTPROGRAM.INP",16777215,0,"PLC:GUNB:TM01:FAULTPROGRAM.INP")
#! Link("PLC:GUNB:TM01:FAULTPROGRAM.INP","PLC:GUNB:TM01:FAULTPROGRAMCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTPROGRAM.FLNK",16777215,0,"PLC:GUNB:TM01:FAULTPROGRAM.FLNK")
#! Link("PLC:GUNB:TM01:FAULTPROGRAM.FLNK","PLC:GUNB:TM01:FAULTFLTHNDLCALC")
#! Record("PLC:GUNB:TM01:FAULTFLTHNDL",4640,3310,0,0,"PLC:GUNB:TM01:FAULTFLTHNDL")
#! Field("PLC:GUNB:TM01:FAULTFLTHNDL.INP",16777215,0,"PLC:GUNB:TM01:FAULTFLTHNDL.INP")
#! Link("PLC:GUNB:TM01:FAULTFLTHNDL.INP","PLC:GUNB:TM01:FAULTFLTHNDLCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTFLTHNDL.FLNK",16777215,0,"PLC:GUNB:TM01:FAULTFLTHNDL.FLNK")
#! Link("PLC:GUNB:TM01:FAULTFLTHNDL.FLNK","PLC:GUNB:TM01:FAULTWTCHDOGCALC")
#! Record("PLC:GUNB:TM01:FAULTFLTHNDLCALC",4360,3279,0,1,"PLC:GUNB:TM01:FAULTFLTHNDLCALC")
#! Field("PLC:GUNB:TM01:FAULTFLTHNDLCALC.FLNK",16777215,1,"PLC:GUNB:TM01:FAULTFLTHNDLCALC.FLNK")
#! Link("PLC:GUNB:TM01:FAULTFLTHNDLCALC.FLNK","PLC:GUNB:TM01:FAULTFLTHNDL")
#! Field("PLC:GUNB:TM01:FAULTFLTHNDLCALC.INPA",16777215,0,"PLC:GUNB:TM01:FAULTFLTHNDLCALC.INPA")
#! Link("PLC:GUNB:TM01:FAULTFLTHNDLCALC.INPA","PLC:GUNB:TM01:MAJORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTFLTHNDLCALC.INPB",16777215,0,"PLC:GUNB:TM01:FAULTFLTHNDLCALC.INPB")
#! Link("PLC:GUNB:TM01:FAULTFLTHNDLCALC.INPB","PLC:GUNB:TM01:MINORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTFLTHNDLCALC.VAL",16777215,1,"PLC:GUNB:TM01:FAULTFLTHNDLCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTFLTHNDLCALC.INPD",16777215,0,"PLC:GUNB:TM01:FAULTFLTHNDLCALC.INPD")
#! Link("PLC:GUNB:TM01:FAULTFLTHNDLCALC.INPD","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:FAULTWTCHDOGCALC",4360,3499,0,1,"PLC:GUNB:TM01:FAULTWTCHDOGCALC")
#! Field("PLC:GUNB:TM01:FAULTWTCHDOGCALC.FLNK",16777215,1,"PLC:GUNB:TM01:FAULTWTCHDOGCALC.FLNK")
#! Link("PLC:GUNB:TM01:FAULTWTCHDOGCALC.FLNK","PLC:GUNB:TM01:FAULTWTCHDOG")
#! Field("PLC:GUNB:TM01:FAULTWTCHDOGCALC.INPA",16777215,0,"PLC:GUNB:TM01:FAULTWTCHDOGCALC.INPA")
#! Link("PLC:GUNB:TM01:FAULTWTCHDOGCALC.INPA","PLC:GUNB:TM01:MAJORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTWTCHDOGCALC.INPB",16777215,0,"PLC:GUNB:TM01:FAULTWTCHDOGCALC.INPB")
#! Link("PLC:GUNB:TM01:FAULTWTCHDOGCALC.INPB","PLC:GUNB:TM01:MINORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTWTCHDOGCALC.VAL",16777215,1,"PLC:GUNB:TM01:FAULTWTCHDOGCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTWTCHDOGCALC.INPD",16777215,0,"PLC:GUNB:TM01:FAULTWTCHDOGCALC.INPD")
#! Link("PLC:GUNB:TM01:FAULTWTCHDOGCALC.INPD","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:FAULTWTCHDOG",4640,3530,0,0,"PLC:GUNB:TM01:FAULTWTCHDOG")
#! Field("PLC:GUNB:TM01:FAULTWTCHDOG.INP",16777215,0,"PLC:GUNB:TM01:FAULTWTCHDOG.INP")
#! Link("PLC:GUNB:TM01:FAULTWTCHDOG.INP","PLC:GUNB:TM01:FAULTWTCHDOGCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTWTCHDOG.FLNK",16777215,0,"PLC:GUNB:TM01:FAULTWTCHDOG.FLNK")
#! Link("PLC:GUNB:TM01:FAULTWTCHDOG.FLNK","PLC:GUNB:TM01:FAULTSTACKCALC")
#! Record("PLC:GUNB:TM01:FAULTSTACKCALC",4360,3719,0,1,"PLC:GUNB:TM01:FAULTSTACKCALC")
#! Field("PLC:GUNB:TM01:FAULTSTACKCALC.FLNK",16777215,1,"PLC:GUNB:TM01:FAULTSTACKCALC.FLNK")
#! Link("PLC:GUNB:TM01:FAULTSTACKCALC.FLNK","PLC:GUNB:TM01:FAULTSTACK")
#! Field("PLC:GUNB:TM01:FAULTSTACKCALC.INPA",16777215,0,"PLC:GUNB:TM01:FAULTSTACKCALC.INPA")
#! Link("PLC:GUNB:TM01:FAULTSTACKCALC.INPA","PLC:GUNB:TM01:MAJORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTSTACKCALC.INPB",16777215,0,"PLC:GUNB:TM01:FAULTSTACKCALC.INPB")
#! Link("PLC:GUNB:TM01:FAULTSTACKCALC.INPB","PLC:GUNB:TM01:MINORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTSTACKCALC.VAL",16777215,1,"PLC:GUNB:TM01:FAULTSTACKCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTSTACKCALC.INPD",16777215,0,"PLC:GUNB:TM01:FAULTSTACKCALC.INPD")
#! Link("PLC:GUNB:TM01:FAULTSTACKCALC.INPD","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:FAULTSTACK",4640,3750,0,0,"PLC:GUNB:TM01:FAULTSTACK")
#! Field("PLC:GUNB:TM01:FAULTSTACK.INP",16777215,0,"PLC:GUNB:TM01:FAULTSTACK.INP")
#! Link("PLC:GUNB:TM01:FAULTSTACK.INP","PLC:GUNB:TM01:FAULTSTACKCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTSTACK.FLNK",16777215,0,"PLC:GUNB:TM01:FAULTSTACK.FLNK")
#! Link("PLC:GUNB:TM01:FAULTSTACK.FLNK","PLC:GUNB:TM01:FAULTMODECHGCALC")
#! Record("PLC:GUNB:TM01:FAULTMODECHGCALC",4360,3939,0,1,"PLC:GUNB:TM01:FAULTMODECHGCALC")
#! Field("PLC:GUNB:TM01:FAULTMODECHGCALC.FLNK",16777215,1,"PLC:GUNB:TM01:FAULTMODECHGCALC.FLNK")
#! Link("PLC:GUNB:TM01:FAULTMODECHGCALC.FLNK","PLC:GUNB:TM01:FAULTMODECHG")
#! Field("PLC:GUNB:TM01:FAULTMODECHGCALC.INPA",16777215,0,"PLC:GUNB:TM01:FAULTMODECHGCALC.INPA")
#! Link("PLC:GUNB:TM01:FAULTMODECHGCALC.INPA","PLC:GUNB:TM01:MAJORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTMODECHGCALC.INPB",16777215,0,"PLC:GUNB:TM01:FAULTMODECHGCALC.INPB")
#! Link("PLC:GUNB:TM01:FAULTMODECHGCALC.INPB","PLC:GUNB:TM01:MINORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTMODECHGCALC.VAL",16777215,1,"PLC:GUNB:TM01:FAULTMODECHGCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTMODECHGCALC.INPD",16777215,0,"PLC:GUNB:TM01:FAULTMODECHGCALC.INPD")
#! Link("PLC:GUNB:TM01:FAULTMODECHGCALC.INPD","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:FAULTMODECHG",4640,3970,0,0,"PLC:GUNB:TM01:FAULTMODECHG")
#! Field("PLC:GUNB:TM01:FAULTMODECHG.INP",16777215,0,"PLC:GUNB:TM01:FAULTMODECHG.INP")
#! Link("PLC:GUNB:TM01:FAULTMODECHG.INP","PLC:GUNB:TM01:FAULTMODECHGCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTMODECHG.FLNK",16777215,0,"PLC:GUNB:TM01:FAULTMODECHG.FLNK")
#! Link("PLC:GUNB:TM01:FAULTMODECHG.FLNK","PLC:GUNB:TM01:FAULTSERIALCALC")
#! Record("PLC:GUNB:TM01:FAULTSERIALCALC",4360,4159,0,1,"PLC:GUNB:TM01:FAULTSERIALCALC")
#! Field("PLC:GUNB:TM01:FAULTSERIALCALC.FLNK",16777215,1,"PLC:GUNB:TM01:FAULTSERIALCALC.FLNK")
#! Link("PLC:GUNB:TM01:FAULTSERIALCALC.FLNK","PLC:GUNB:TM01:FAULTSERIAL")
#! Field("PLC:GUNB:TM01:FAULTSERIALCALC.INPA",16777215,0,"PLC:GUNB:TM01:FAULTSERIALCALC.INPA")
#! Link("PLC:GUNB:TM01:FAULTSERIALCALC.INPA","PLC:GUNB:TM01:MAJORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTSERIALCALC.INPB",16777215,0,"PLC:GUNB:TM01:FAULTSERIALCALC.INPB")
#! Link("PLC:GUNB:TM01:FAULTSERIALCALC.INPB","PLC:GUNB:TM01:MINORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTSERIALCALC.VAL",16777215,1,"PLC:GUNB:TM01:FAULTSERIALCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTSERIALCALC.INPD",16777215,0,"PLC:GUNB:TM01:FAULTSERIALCALC.INPD")
#! Link("PLC:GUNB:TM01:FAULTSERIALCALC.INPD","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:FAULTSERIAL",4640,4190,0,0,"PLC:GUNB:TM01:FAULTSERIAL")
#! Field("PLC:GUNB:TM01:FAULTSERIAL.INP",16777215,0,"PLC:GUNB:TM01:FAULTSERIAL.INP")
#! Link("PLC:GUNB:TM01:FAULTSERIAL.INP","PLC:GUNB:TM01:FAULTSERIALCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTSERIAL.FLNK",16777215,0,"PLC:GUNB:TM01:FAULTSERIAL.FLNK")
#! Link("PLC:GUNB:TM01:FAULTSERIAL.FLNK","PLC:GUNB:TM01:FAULTBATTERYCALC")
#! Record("PLC:GUNB:TM01:FAULTBATTERY",4640,4410,0,0,"PLC:GUNB:TM01:FAULTBATTERY")
#! Field("PLC:GUNB:TM01:FAULTBATTERY.INP",16777215,0,"PLC:GUNB:TM01:FAULTBATTERY.INP")
#! Link("PLC:GUNB:TM01:FAULTBATTERY.INP","PLC:GUNB:TM01:FAULTBATTERYCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTBATTERY.FLNK",16777215,0,"PLC:GUNB:TM01:FAULTBATTERY.FLNK")
#! Link("PLC:GUNB:TM01:FAULTBATTERY.FLNK","PLC:GUNB:TM01:FAULTMOTIONCALC")
#! Record("PLC:GUNB:TM01:FAULTBATTERYCALC",4360,4379,0,1,"PLC:GUNB:TM01:FAULTBATTERYCALC")
#! Field("PLC:GUNB:TM01:FAULTBATTERYCALC.FLNK",16777215,1,"PLC:GUNB:TM01:FAULTBATTERYCALC.FLNK")
#! Link("PLC:GUNB:TM01:FAULTBATTERYCALC.FLNK","PLC:GUNB:TM01:FAULTBATTERY")
#! Field("PLC:GUNB:TM01:FAULTBATTERYCALC.INPA",16777215,0,"PLC:GUNB:TM01:FAULTBATTERYCALC.INPA")
#! Link("PLC:GUNB:TM01:FAULTBATTERYCALC.INPA","PLC:GUNB:TM01:MAJORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTBATTERYCALC.INPB",16777215,0,"PLC:GUNB:TM01:FAULTBATTERYCALC.INPB")
#! Link("PLC:GUNB:TM01:FAULTBATTERYCALC.INPB","PLC:GUNB:TM01:MINORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTBATTERYCALC.VAL",16777215,1,"PLC:GUNB:TM01:FAULTBATTERYCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTBATTERYCALC.INPD",16777215,0,"PLC:GUNB:TM01:FAULTBATTERYCALC.INPD")
#! Link("PLC:GUNB:TM01:FAULTBATTERYCALC.INPD","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:FAULTMOTIONCALC",4360,4599,0,1,"PLC:GUNB:TM01:FAULTMOTIONCALC")
#! Field("PLC:GUNB:TM01:FAULTMOTIONCALC.FLNK",16777215,1,"PLC:GUNB:TM01:FAULTMOTIONCALC.FLNK")
#! Link("PLC:GUNB:TM01:FAULTMOTIONCALC.FLNK","PLC:GUNB:TM01:FAULTMOTION")
#! Field("PLC:GUNB:TM01:FAULTMOTIONCALC.INPA",16777215,0,"PLC:GUNB:TM01:FAULTMOTIONCALC.INPA")
#! Link("PLC:GUNB:TM01:FAULTMOTIONCALC.INPA","PLC:GUNB:TM01:MAJORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTMOTIONCALC.INPB",16777215,0,"PLC:GUNB:TM01:FAULTMOTIONCALC.INPB")
#! Link("PLC:GUNB:TM01:FAULTMOTIONCALC.INPB","PLC:GUNB:TM01:MINORFAULTRAW.VAL")
#! Field("PLC:GUNB:TM01:FAULTMOTIONCALC.VAL",16777215,1,"PLC:GUNB:TM01:FAULTMOTIONCALC.VAL")
#! Field("PLC:GUNB:TM01:FAULTMOTIONCALC.INPD",16777215,0,"PLC:GUNB:TM01:FAULTMOTIONCALC.INPD")
#! Link("PLC:GUNB:TM01:FAULTMOTIONCALC.INPD","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:FAULTMOTION",4640,4645,0,0,"PLC:GUNB:TM01:FAULTMOTION")
#! Field("PLC:GUNB:TM01:FAULTMOTION.INP",16777215,0,"PLC:GUNB:TM01:FAULTMOTION.INP")
#! Link("PLC:GUNB:TM01:FAULTMOTION.INP","PLC:GUNB:TM01:FAULTMOTIONCALC.VAL")
#! Record("PLC:GUNB:TM01:VERSIONMAJORDES",2160,2867,0,1,"PLC:GUNB:TM01:VERSIONMAJORDES")
#! Field("PLC:GUNB:TM01:VERSIONMAJORDES.FLNK",16777215,1,"PLC:GUNB:TM01:VERSIONMAJORDES.FLNK")
#! Link("PLC:GUNB:TM01:VERSIONMAJORDES.FLNK","PLC:GUNB:TM01:VERSIONMAJORCALCHI")
#! Field("PLC:GUNB:TM01:VERSIONMAJORDES.VAL",16777215,1,"PLC:GUNB:TM01:VERSIONMAJORDES.VAL")
#! Record("PLC:GUNB:TM01:VERSIONMAJORCALCHI",2420,2687,0,0,"PLC:GUNB:TM01:VERSIONMAJORCALCHI")
#! Field("PLC:GUNB:TM01:VERSIONMAJORCALCHI.INPA",16777215,0,"PLC:GUNB:TM01:VERSIONMAJORCALCHI.INPA")
#! Link("PLC:GUNB:TM01:VERSIONMAJORCALCHI.INPA","PLC:GUNB:TM01:VERSIONMAJORDES.VAL")
#! Field("PLC:GUNB:TM01:VERSIONMAJORCALCHI.OUT",16777215,1,"PLC:GUNB:TM01:VERSIONMAJORCALCHI.OUT")
#! Link("PLC:GUNB:TM01:VERSIONMAJORCALCHI.OUT","PLC:GUNB:TM01:VERSIONMAJOR.HIGH")
#! Field("PLC:GUNB:TM01:VERSIONMAJORCALCHI.FLNK",16777215,1,"PLC:GUNB:TM01:VERSIONMAJORCALCHI.FLNK")
#! Link("PLC:GUNB:TM01:VERSIONMAJORCALCHI.FLNK","PLC:GUNB:TM01:VERSIONMAJORCALCLO")
#! Record("PLC:GUNB:TM01:VERSIONMAJORCALCLO",2460,2922,0,1,"PLC:GUNB:TM01:VERSIONMAJORCALCLO")
#! Field("PLC:GUNB:TM01:VERSIONMAJORCALCLO.INPA",16777215,0,"PLC:GUNB:TM01:VERSIONMAJORCALCLO.INPA")
#! Link("PLC:GUNB:TM01:VERSIONMAJORCALCLO.INPA","PLC:GUNB:TM01:VERSIONMAJORDES.VAL")
#! Field("PLC:GUNB:TM01:VERSIONMAJORCALCLO.OUT",16777215,1,"PLC:GUNB:TM01:VERSIONMAJORCALCLO.OUT")
#! Link("PLC:GUNB:TM01:VERSIONMAJORCALCLO.OUT","PLC:GUNB:TM01:VERSIONMAJOR.LOW")
#! Record("PLC:GUNB:TM01:VERSIONMINORDES",2160,3147,0,1,"PLC:GUNB:TM01:VERSIONMINORDES")
#! Field("PLC:GUNB:TM01:VERSIONMINORDES.FLNK",16777215,1,"PLC:GUNB:TM01:VERSIONMINORDES.FLNK")
#! Link("PLC:GUNB:TM01:VERSIONMINORDES.FLNK","PLC:GUNB:TM01:VERSIONMINORCALCHI")
#! Field("PLC:GUNB:TM01:VERSIONMINORDES.VAL",16777215,1,"PLC:GUNB:TM01:VERSIONMINORDES.VAL")
#! Record("PLC:GUNB:TM01:VERSIONMINORCALCLO",2480,3322,0,1,"PLC:GUNB:TM01:VERSIONMINORCALCLO")
#! Field("PLC:GUNB:TM01:VERSIONMINORCALCLO.INPA",16777215,0,"PLC:GUNB:TM01:VERSIONMINORCALCLO.INPA")
#! Link("PLC:GUNB:TM01:VERSIONMINORCALCLO.INPA","PLC:GUNB:TM01:VERSIONMINORDES.VAL")
#! Field("PLC:GUNB:TM01:VERSIONMINORCALCLO.OUT",16777215,1,"PLC:GUNB:TM01:VERSIONMINORCALCLO.OUT")
#! Link("PLC:GUNB:TM01:VERSIONMINORCALCLO.OUT","PLC:GUNB:TM01:VERSIONMINOR.LOW")
#! Record("PLC:GUNB:TM01:VERSIONMINORCALCHI",2440,3087,0,0,"PLC:GUNB:TM01:VERSIONMINORCALCHI")
#! Field("PLC:GUNB:TM01:VERSIONMINORCALCHI.FLNK",16777215,1,"PLC:GUNB:TM01:VERSIONMINORCALCHI.FLNK")
#! Link("PLC:GUNB:TM01:VERSIONMINORCALCHI.FLNK","PLC:GUNB:TM01:VERSIONMINORCALCLO")
#! Field("PLC:GUNB:TM01:VERSIONMINORCALCHI.INPA",16777215,0,"PLC:GUNB:TM01:VERSIONMINORCALCHI.INPA")
#! Link("PLC:GUNB:TM01:VERSIONMINORCALCHI.INPA","PLC:GUNB:TM01:VERSIONMINORDES.VAL")
#! Field("PLC:GUNB:TM01:VERSIONMINORCALCHI.OUT",16777215,1,"PLC:GUNB:TM01:VERSIONMINORCALCHI.OUT")
#! Link("PLC:GUNB:TM01:VERSIONMINORCALCHI.OUT","PLC:GUNB:TM01:VERSIONMINOR.HIGH")
#! Record("PLC:GUNB:TM01:VERSIONREVDES",2180,3547,0,1,"PLC:GUNB:TM01:VERSIONREVDES")
#! Field("PLC:GUNB:TM01:VERSIONREVDES.FLNK",16777215,1,"PLC:GUNB:TM01:VERSIONREVDES.FLNK")
#! Link("PLC:GUNB:TM01:VERSIONREVDES.FLNK","PLC:GUNB:TM01:VERSIONREVCALCHI")
#! Field("PLC:GUNB:TM01:VERSIONREVDES.VAL",16777215,1,"PLC:GUNB:TM01:VERSIONREVDES.VAL")
#! Record("PLC:GUNB:TM01:VERSIONREVCALCHI",2460,3487,0,0,"PLC:GUNB:TM01:VERSIONREVCALCHI")
#! Field("PLC:GUNB:TM01:VERSIONREVCALCHI.FLNK",16777215,1,"PLC:GUNB:TM01:VERSIONREVCALCHI.FLNK")
#! Link("PLC:GUNB:TM01:VERSIONREVCALCHI.FLNK","PLC:GUNB:TM01:VERSIONREVCALCLO")
#! Field("PLC:GUNB:TM01:VERSIONREVCALCHI.INPA",16777215,0,"PLC:GUNB:TM01:VERSIONREVCALCHI.INPA")
#! Link("PLC:GUNB:TM01:VERSIONREVCALCHI.INPA","PLC:GUNB:TM01:VERSIONREVDES.VAL")
#! Field("PLC:GUNB:TM01:VERSIONREVCALCHI.OUT",16777215,1,"PLC:GUNB:TM01:VERSIONREVCALCHI.OUT")
#! Link("PLC:GUNB:TM01:VERSIONREVCALCHI.OUT","PLC:GUNB:TM01:VERSIONREV.HIGH")
#! Record("PLC:GUNB:TM01:VERSIONREVCALCLO",2500,3722,0,1,"PLC:GUNB:TM01:VERSIONREVCALCLO")
#! Field("PLC:GUNB:TM01:VERSIONREVCALCLO.INPA",16777215,0,"PLC:GUNB:TM01:VERSIONREVCALCLO.INPA")
#! Link("PLC:GUNB:TM01:VERSIONREVCALCLO.INPA","PLC:GUNB:TM01:VERSIONREVDES.VAL")
#! Field("PLC:GUNB:TM01:VERSIONREVCALCLO.OUT",16777215,1,"PLC:GUNB:TM01:VERSIONREVCALCLO.OUT")
#! Link("PLC:GUNB:TM01:VERSIONREVCALCLO.OUT","PLC:GUNB:TM01:VERSIONREV.LOW")
#! Record("PLC:GUNB:TM01:HEARTBEATCALC",600,187,0,0,"PLC:GUNB:TM01:HEARTBEATCALC")
#! Field("PLC:GUNB:TM01:HEARTBEATCALC.INPA",16777215,0,"PLC:GUNB:TM01:HEARTBEATCALC.INPA")
#! Link("PLC:GUNB:TM01:HEARTBEATCALC.INPA","PLC:GUNB:TM01:HEARTBEATRAW.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATCALC.VAL",16777215,0,"PLC:GUNB:TM01:HEARTBEATCALC.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATCALC.INPB",16777215,0,"PLC:GUNB:TM01:HEARTBEATCALC.INPB")
#! Link("PLC:GUNB:TM01:HEARTBEATCALC.INPB","PLC:GUNB:TM01:HEARTBEATCALC.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATCALC.FLNK",16777215,1,"PLC:GUNB:TM01:HEARTBEATCALC.FLNK")
#! Link("PLC:GUNB:TM01:HEARTBEATCALC.FLNK","PLC:GUNB:TM01:HEARTBEATERR")
#! Field("PLC:GUNB:TM01:HEARTBEATCALC.A",16777215,1,"PLC:GUNB:TM01:HEARTBEATCALC.A")
#! Field("PLC:GUNB:TM01:HEARTBEATCALC.B",16777215,1,"PLC:GUNB:TM01:HEARTBEATCALC.B")
#! Record("PLC:GUNB:TM01:HEARTBEATOK",1600,299,0,0,"PLC:GUNB:TM01:HEARTBEATOK")
#! Field("PLC:GUNB:TM01:HEARTBEATOK.INP",16777215,0,"PLC:GUNB:TM01:HEARTBEATOK.INP")
#! Link("PLC:GUNB:TM01:HEARTBEATOK.INP","PLC:GUNB:TM01:HEARTBEATERR.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATOK.FLNK",16777215,0,"PLC:GUNB:TM01:HEARTBEATOK.FLNK")
#! Link("PLC:GUNB:TM01:HEARTBEATOK.FLNK","PLC:GUNB:TM01:HEARTBEATE01")
#! Record("PLC:GUNB:TM01:HEARTBEATERR",900,267,0,0,"PLC:GUNB:TM01:HEARTBEATERR")
#! Field("PLC:GUNB:TM01:HEARTBEATERR.INPA",16777215,0,"PLC:GUNB:TM01:HEARTBEATERR.INPA")
#! Link("PLC:GUNB:TM01:HEARTBEATERR.INPA","PLC:GUNB:TM01:HEARTBEATCALC.A")
#! Field("PLC:GUNB:TM01:HEARTBEATERR.INPB",16777215,0,"PLC:GUNB:TM01:HEARTBEATERR.INPB")
#! Link("PLC:GUNB:TM01:HEARTBEATERR.INPB","PLC:GUNB:TM01:HEARTBEATCALC.B")
#! Field("PLC:GUNB:TM01:HEARTBEATERR.FLNK",16777215,1,"PLC:GUNB:TM01:HEARTBEATERR.FLNK")
#! Link("PLC:GUNB:TM01:HEARTBEATERR.FLNK","PLC:GUNB:TM01:HEARTBEATOK")
#! Field("PLC:GUNB:TM01:HEARTBEATERR.VAL",16777215,1,"PLC:GUNB:TM01:HEARTBEATERR.VAL")
#! Record("PLC:GUNB:TM01:HEARTBEATECT",1740,1160,0,0,"PLC:GUNB:TM01:HEARTBEATECT")
#! Field("PLC:GUNB:TM01:HEARTBEATECT.INPA",16777215,0,"PLC:GUNB:TM01:HEARTBEATECT.INPA")
#! Link("PLC:GUNB:TM01:HEARTBEATECT.INPA","PLC:GUNB:TM01:HEARTBEATECT/INPA")
#! Field("PLC:GUNB:TM01:HEARTBEATECT.INPB",16777215,0,"PLC:GUNB:TM01:HEARTBEATECT.INPB")
#! Link("PLC:GUNB:TM01:HEARTBEATECT.INPB","PLC:GUNB:TM01:HEARTBEATECT/INPB")
#! Field("PLC:GUNB:TM01:HEARTBEATECT.INPC",16777215,0,"PLC:GUNB:TM01:HEARTBEATECT.INPC")
#! Link("PLC:GUNB:TM01:HEARTBEATECT.INPC","PLC:GUNB:TM01:HEARTBEATECT/INPC")
#! Field("PLC:GUNB:TM01:HEARTBEATECT.INPD",16777215,0,"PLC:GUNB:TM01:HEARTBEATECT.INPD")
#! Link("PLC:GUNB:TM01:HEARTBEATECT.INPD","PLC:GUNB:TM01:HEARTBEATECT/INPD")
#! Field("PLC:GUNB:TM01:HEARTBEATECT.INPE",16777215,0,"PLC:GUNB:TM01:HEARTBEATECT.INPE")
#! Link("PLC:GUNB:TM01:HEARTBEATECT.INPE","PLC:GUNB:TM01:HEARTBEATECT/INPE")
#! Field("PLC:GUNB:TM01:HEARTBEATECT.INPF",16777215,0,"PLC:GUNB:TM01:HEARTBEATECT.INPF")
#! Link("PLC:GUNB:TM01:HEARTBEATECT.INPF","PLC:GUNB:TM01:HEARTBEATECT/INPF")
#! Field("PLC:GUNB:TM01:HEARTBEATECT.INPG",16777215,0,"PLC:GUNB:TM01:HEARTBEATECT.INPG")
#! Link("PLC:GUNB:TM01:HEARTBEATECT.INPG","PLC:GUNB:TM01:HEARTBEATECT/INPG")
#! Field("PLC:GUNB:TM01:HEARTBEATECT.INPH",16777215,0,"PLC:GUNB:TM01:HEARTBEATECT.INPH")
#! Link("PLC:GUNB:TM01:HEARTBEATECT.INPH","PLC:GUNB:TM01:HEARTBEATECT/INPH")
#! Field("PLC:GUNB:TM01:HEARTBEATECT.INPI",16777215,0,"PLC:GUNB:TM01:HEARTBEATECT.INPI")
#! Link("PLC:GUNB:TM01:HEARTBEATECT.INPI","PLC:GUNB:TM01:HEARTBEATECT/INPI")
#! Field("PLC:GUNB:TM01:HEARTBEATECT.INPJ",16777215,0,"PLC:GUNB:TM01:HEARTBEATECT.INPJ")
#! Link("PLC:GUNB:TM01:HEARTBEATECT.INPJ","PLC:GUNB:TM01:HEARTBEATECT/INPJ")
#! Field("PLC:GUNB:TM01:HEARTBEATECT.FLNK",16777215,1,"PLC:GUNB:TM01:HEARTBEATECT.FLNK")
#! Link("PLC:GUNB:TM01:HEARTBEATECT.FLNK","PLC:GUNB:TM01:HEARTBEATSUM")
#! Field("PLC:GUNB:TM01:HEARTBEATECT.SEVR",16777215,1,"PLC:GUNB:TM01:HEARTBEATECT.SEVR")
#! Connector("PLC:GUNB:TM01:HEARTBEATECT/INPJ","PLC:GUNB:TM01:HEARTBEATE10.VAL",1600,2130,16777215,"",0)
#! Connector("PLC:GUNB:TM01:HEARTBEATECT/INPI","PLC:GUNB:TM01:HEARTBEATE09.VAL",1560,2020,16777215,"",0)
#! Connector("PLC:GUNB:TM01:HEARTBEATECT/INPH","PLC:GUNB:TM01:HEARTBEATE08.VAL",1520,1910,16777215,"",0)
#! Connector("PLC:GUNB:TM01:HEARTBEATECT/INPG","PLC:GUNB:TM01:HEARTBEATE07.VAL",1480,1790,16777215,"",0)
#! Connector("PLC:GUNB:TM01:HEARTBEATECT/INPF","PLC:GUNB:TM01:HEARTBEATE06.VAL",1280,1670,16777215,"",0)
#! Connector("PLC:GUNB:TM01:HEARTBEATECT/INPE","PLC:GUNB:TM01:HEARTBEATE05.VAL",1320,1550,16777215,"",0)
#! Connector("PLC:GUNB:TM01:HEARTBEATECT/INPD","PLC:GUNB:TM01:HEARTBEATE04.VAL",1360,1430,16777215,"",0)
#! Connector("PLC:GUNB:TM01:HEARTBEATECT/INPC","PLC:GUNB:TM01:HEARTBEATE03.VAL",1400,1310,16777215,"",0)
#! Connector("PLC:GUNB:TM01:HEARTBEATECT/INPB","PLC:GUNB:TM01:HEARTBEATE02.VAL",1440,1190,16777215,"",0)
#! Connector("PLC:GUNB:TM01:HEARTBEATECT/INPA","PLC:GUNB:TM01:HEARTBEATE01.VAL",1480,1070,16777215,"",0)
#! Record("PLC:GUNB:TM01:HEARTBEATE09",1060,2227,0,1,"PLC:GUNB:TM01:HEARTBEATE09")
#! Field("PLC:GUNB:TM01:HEARTBEATE09.INPA",16777215,0,"PLC:GUNB:TM01:HEARTBEATE09.INPA")
#! Link("PLC:GUNB:TM01:HEARTBEATE09.INPA","PLC:GUNB:TM01:HEARTBEATE08.B")
#! Field("PLC:GUNB:TM01:HEARTBEATE09.VAL",16777215,1,"PLC:GUNB:TM01:HEARTBEATE09.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE09.FLNK",16777215,1,"PLC:GUNB:TM01:HEARTBEATE09.FLNK")
#! Link("PLC:GUNB:TM01:HEARTBEATE09.FLNK","PLC:GUNB:TM01:HEARTBEATE10")
#! Field("PLC:GUNB:TM01:HEARTBEATE09.INPB",16777215,0,"PLC:GUNB:TM01:HEARTBEATE09.INPB")
#! Link("PLC:GUNB:TM01:HEARTBEATE09.INPB","PLC:GUNB:TM01:HEARTBEATE09.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE09.B",16777215,0,"PLC:GUNB:TM01:HEARTBEATE09.B")
#! Record("PLC:GUNB:TM01:HEARTBEATE08",1040,2007,0,1,"PLC:GUNB:TM01:HEARTBEATE08")
#! Field("PLC:GUNB:TM01:HEARTBEATE08.FLNK",16777215,1,"PLC:GUNB:TM01:HEARTBEATE08.FLNK")
#! Link("PLC:GUNB:TM01:HEARTBEATE08.FLNK","PLC:GUNB:TM01:HEARTBEATE09")
#! Field("PLC:GUNB:TM01:HEARTBEATE08.INPA",16777215,0,"PLC:GUNB:TM01:HEARTBEATE08.INPA")
#! Link("PLC:GUNB:TM01:HEARTBEATE08.INPA","PLC:GUNB:TM01:HEARTBEATE07.B")
#! Field("PLC:GUNB:TM01:HEARTBEATE08.VAL",16777215,1,"PLC:GUNB:TM01:HEARTBEATE08.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE08.INPB",16777215,0,"PLC:GUNB:TM01:HEARTBEATE08.INPB")
#! Link("PLC:GUNB:TM01:HEARTBEATE08.INPB","PLC:GUNB:TM01:HEARTBEATE08.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE08.B",16777215,0,"PLC:GUNB:TM01:HEARTBEATE08.B")
#! Record("PLC:GUNB:TM01:HEARTBEATE07",1020,1787,0,1,"PLC:GUNB:TM01:HEARTBEATE07")
#! Field("PLC:GUNB:TM01:HEARTBEATE07.FLNK",16777215,1,"PLC:GUNB:TM01:HEARTBEATE07.FLNK")
#! Link("PLC:GUNB:TM01:HEARTBEATE07.FLNK","PLC:GUNB:TM01:HEARTBEATE08")
#! Field("PLC:GUNB:TM01:HEARTBEATE07.INPA",16777215,0,"PLC:GUNB:TM01:HEARTBEATE07.INPA")
#! Link("PLC:GUNB:TM01:HEARTBEATE07.INPA","PLC:GUNB:TM01:HEARTBEATE06.B")
#! Field("PLC:GUNB:TM01:HEARTBEATE07.VAL",16777215,1,"PLC:GUNB:TM01:HEARTBEATE07.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE07.INPB",16777215,0,"PLC:GUNB:TM01:HEARTBEATE07.INPB")
#! Link("PLC:GUNB:TM01:HEARTBEATE07.INPB","PLC:GUNB:TM01:HEARTBEATE07.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE07.B",16777215,0,"PLC:GUNB:TM01:HEARTBEATE07.B")
#! Record("PLC:GUNB:TM01:HEARTBEATE06",1020,1567,0,1,"PLC:GUNB:TM01:HEARTBEATE06")
#! Field("PLC:GUNB:TM01:HEARTBEATE06.FLNK",16777215,1,"PLC:GUNB:TM01:HEARTBEATE06.FLNK")
#! Link("PLC:GUNB:TM01:HEARTBEATE06.FLNK","PLC:GUNB:TM01:HEARTBEATE05/FLNK")
#! Field("PLC:GUNB:TM01:HEARTBEATE06.INPA",16777215,0,"PLC:GUNB:TM01:HEARTBEATE06.INPA")
#! Link("PLC:GUNB:TM01:HEARTBEATE06.INPA","PLC:GUNB:TM01:HEARTBEATE05.B")
#! Field("PLC:GUNB:TM01:HEARTBEATE06.VAL",16777215,1,"PLC:GUNB:TM01:HEARTBEATE06.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE06.INPB",16777215,0,"PLC:GUNB:TM01:HEARTBEATE06.INPB")
#! Link("PLC:GUNB:TM01:HEARTBEATE06.INPB","PLC:GUNB:TM01:HEARTBEATE06.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE06.B",16777215,0,"PLC:GUNB:TM01:HEARTBEATE06.B")
#! Connector("PLC:GUNB:TM01:HEARTBEATE05/FLNK","PLC:GUNB:TM01:HEARTBEATE07",1260,1766,16777215,"",0)
#! Record("PLC:GUNB:TM01:HEARTBEATE05",1000,1347,0,1,"PLC:GUNB:TM01:HEARTBEATE05")
#! Field("PLC:GUNB:TM01:HEARTBEATE05.FLNK",16777215,1,"PLC:GUNB:TM01:HEARTBEATE05.FLNK")
#! Link("PLC:GUNB:TM01:HEARTBEATE05.FLNK","PLC:GUNB:TM01:HEARTBEATE06")
#! Field("PLC:GUNB:TM01:HEARTBEATE05.INPA",16777215,0,"PLC:GUNB:TM01:HEARTBEATE05.INPA")
#! Link("PLC:GUNB:TM01:HEARTBEATE05.INPA","PLC:GUNB:TM01:HEARTBEATE04.B")
#! Field("PLC:GUNB:TM01:HEARTBEATE05.VAL",16777215,1,"PLC:GUNB:TM01:HEARTBEATE05.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE05.INPB",16777215,0,"PLC:GUNB:TM01:HEARTBEATE05.INPB")
#! Link("PLC:GUNB:TM01:HEARTBEATE05.INPB","PLC:GUNB:TM01:HEARTBEATE05.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE05.B",16777215,0,"PLC:GUNB:TM01:HEARTBEATE05.B")
#! Record("PLC:GUNB:TM01:HEARTBEATE04",980,1127,0,1,"PLC:GUNB:TM01:HEARTBEATE04")
#! Field("PLC:GUNB:TM01:HEARTBEATE04.FLNK",16777215,1,"PLC:GUNB:TM01:HEARTBEATE04.FLNK")
#! Link("PLC:GUNB:TM01:HEARTBEATE04.FLNK","PLC:GUNB:TM01:HEARTBEATE05")
#! Field("PLC:GUNB:TM01:HEARTBEATE04.INPA",16777215,0,"PLC:GUNB:TM01:HEARTBEATE04.INPA")
#! Link("PLC:GUNB:TM01:HEARTBEATE04.INPA","PLC:GUNB:TM01:HEARTBEATE03.B")
#! Field("PLC:GUNB:TM01:HEARTBEATE04.VAL",16777215,1,"PLC:GUNB:TM01:HEARTBEATE04.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE04.INPB",16777215,0,"PLC:GUNB:TM01:HEARTBEATE04.INPB")
#! Link("PLC:GUNB:TM01:HEARTBEATE04.INPB","PLC:GUNB:TM01:HEARTBEATE04.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE04.B",16777215,0,"PLC:GUNB:TM01:HEARTBEATE04.B")
#! Record("PLC:GUNB:TM01:HEARTBEATE03",960,907,0,1,"PLC:GUNB:TM01:HEARTBEATE03")
#! Field("PLC:GUNB:TM01:HEARTBEATE03.FLNK",16777215,1,"PLC:GUNB:TM01:HEARTBEATE03.FLNK")
#! Link("PLC:GUNB:TM01:HEARTBEATE03.FLNK","PLC:GUNB:TM01:HEARTBEATE04")
#! Field("PLC:GUNB:TM01:HEARTBEATE03.INPA",16777215,0,"PLC:GUNB:TM01:HEARTBEATE03.INPA")
#! Link("PLC:GUNB:TM01:HEARTBEATE03.INPA","PLC:GUNB:TM01:HEARTBEATE02.B")
#! Field("PLC:GUNB:TM01:HEARTBEATE03.VAL",16777215,1,"PLC:GUNB:TM01:HEARTBEATE03.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE03.INPB",16777215,0,"PLC:GUNB:TM01:HEARTBEATE03.INPB")
#! Link("PLC:GUNB:TM01:HEARTBEATE03.INPB","PLC:GUNB:TM01:HEARTBEATE03.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE03.B",16777215,0,"PLC:GUNB:TM01:HEARTBEATE03.B")
#! Record("PLC:GUNB:TM01:HEARTBEATE02",940,687,0,1,"PLC:GUNB:TM01:HEARTBEATE02")
#! Field("PLC:GUNB:TM01:HEARTBEATE02.FLNK",16777215,1,"PLC:GUNB:TM01:HEARTBEATE02.FLNK")
#! Link("PLC:GUNB:TM01:HEARTBEATE02.FLNK","PLC:GUNB:TM01:HEARTBEATE03")
#! Field("PLC:GUNB:TM01:HEARTBEATE02.INPA",16777215,0,"PLC:GUNB:TM01:HEARTBEATE02.INPA")
#! Link("PLC:GUNB:TM01:HEARTBEATE02.INPA","PLC:GUNB:TM01:HEARTBEATE01.B")
#! Field("PLC:GUNB:TM01:HEARTBEATE02.VAL",16777215,1,"PLC:GUNB:TM01:HEARTBEATE02.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE02.INPB",16777215,0,"PLC:GUNB:TM01:HEARTBEATE02.INPB")
#! Link("PLC:GUNB:TM01:HEARTBEATE02.INPB","PLC:GUNB:TM01:HEARTBEATE02.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE02.B",16777215,0,"PLC:GUNB:TM01:HEARTBEATE02.B")
#! Record("PLC:GUNB:TM01:HEARTBEATE01",900,467,0,1,"PLC:GUNB:TM01:HEARTBEATE01")
#! Field("PLC:GUNB:TM01:HEARTBEATE01.INPA",16777215,0,"PLC:GUNB:TM01:HEARTBEATE01.INPA")
#! Link("PLC:GUNB:TM01:HEARTBEATE01.INPA","PLC:GUNB:TM01:HEARTBEATERR.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE01.FLNK",16777215,1,"PLC:GUNB:TM01:HEARTBEATE01.FLNK")
#! Link("PLC:GUNB:TM01:HEARTBEATE01.FLNK","PLC:GUNB:TM01:HEARTBEATE02")
#! Field("PLC:GUNB:TM01:HEARTBEATE01.VAL",16777215,1,"PLC:GUNB:TM01:HEARTBEATE01.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE01.INPB",16777215,0,"PLC:GUNB:TM01:HEARTBEATE01.INPB")
#! Link("PLC:GUNB:TM01:HEARTBEATE01.INPB","PLC:GUNB:TM01:HEARTBEATE01.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE01.B",16777215,0,"PLC:GUNB:TM01:HEARTBEATE01.B")
#! Record("PLC:GUNB:TM01:HEARTBEATCLC",3300,1847,0,0,"PLC:GUNB:TM01:HEARTBEATCLC")
#! Field("PLC:GUNB:TM01:HEARTBEATCLC.INPA",16777215,0,"PLC:GUNB:TM01:HEARTBEATCLC.INPA")
#! Link("PLC:GUNB:TM01:HEARTBEATCLC.INPA","PLC:GUNB:TM01:HEARTBEATECT.SEVR")
#! Field("PLC:GUNB:TM01:HEARTBEATCLC.VAL",16777215,1,"PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:HEARTBEATSUM",2080,1690,0,0,"PLC:GUNB:TM01:HEARTBEATSUM")
#! Field("PLC:GUNB:TM01:HEARTBEATSUM.INP",16777215,0,"PLC:GUNB:TM01:HEARTBEATSUM.INP")
#! Link("PLC:GUNB:TM01:HEARTBEATSUM.INP","PLC:GUNB:TM01:HEARTBEATECT.SEVR")
#! Field("PLC:GUNB:TM01:HEARTBEATSUM.FLNK",16777215,1,"PLC:GUNB:TM01:HEARTBEATSUM.FLNK")
#! Link("PLC:GUNB:TM01:HEARTBEATSUM.FLNK","PLC:GUNB:TM01:HEARTBEATCLC")
#! Field("PLC:GUNB:TM01:HEARTBEATSUM.VAL",16777215,0,"PLC:GUNB:TM01:HEARTBEATSUM.VAL")
#! Record("PLC:GUNB:TM01:UPTIMEDAYRAW",4280,1587,0,0,"PLC:GUNB:TM01:UPTIMEDAYRAW")
#! Field("PLC:GUNB:TM01:UPTIMEDAYRAW.FLNK",16777215,1,"PLC:GUNB:TM01:UPTIMEDAYRAW.FLNK")
#! Link("PLC:GUNB:TM01:UPTIMEDAYRAW.FLNK","PLC:GUNB:TM01:UPTIMEDAY")
#! Field("PLC:GUNB:TM01:UPTIMEDAYRAW.VAL",16777215,1,"PLC:GUNB:TM01:UPTIMEDAYRAW.VAL")
#! Record("PLC:GUNB:TM01:UPTIMEDAY",4560,1622,0,0,"PLC:GUNB:TM01:UPTIMEDAY")
#! Field("PLC:GUNB:TM01:UPTIMEDAY.INPA",16777215,0,"PLC:GUNB:TM01:UPTIMEDAY.INPA")
#! Link("PLC:GUNB:TM01:UPTIMEDAY.INPA","PLC:GUNB:TM01:UPTIMEDAYRAW.VAL")
#! Field("PLC:GUNB:TM01:UPTIMEDAY.INPB",16777215,0,"PLC:GUNB:TM01:UPTIMEDAY.INPB")
#! Link("PLC:GUNB:TM01:UPTIMEDAY.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:TODYEARRAW",4220,487,0,0,"PLC:GUNB:TM01:TODYEARRAW")
#! Field("PLC:GUNB:TM01:TODYEARRAW.FLNK",16777215,1,"PLC:GUNB:TM01:TODYEARRAW.FLNK")
#! Link("PLC:GUNB:TM01:TODYEARRAW.FLNK","PLC:GUNB:TM01:TODYEAR")
#! Field("PLC:GUNB:TM01:TODYEARRAW.VAL",16777215,1,"PLC:GUNB:TM01:TODYEARRAW.VAL")
#! Record("PLC:GUNB:TM01:TODDAYRAW",4220,847,0,0,"PLC:GUNB:TM01:TODDAYRAW")
#! Field("PLC:GUNB:TM01:TODDAYRAW.FLNK",16777215,1,"PLC:GUNB:TM01:TODDAYRAW.FLNK")
#! Link("PLC:GUNB:TM01:TODDAYRAW.FLNK","PLC:GUNB:TM01:TODDAY")
#! Field("PLC:GUNB:TM01:TODDAYRAW.VAL",16777215,1,"PLC:GUNB:TM01:TODDAYRAW.VAL")
#! Record("PLC:GUNB:TM01:TODMONTHRAW",4220,667,0,0,"PLC:GUNB:TM01:TODMONTHRAW")
#! Field("PLC:GUNB:TM01:TODMONTHRAW.FLNK",16777215,1,"PLC:GUNB:TM01:TODMONTHRAW.FLNK")
#! Link("PLC:GUNB:TM01:TODMONTHRAW.FLNK","PLC:GUNB:TM01:TODMONTH")
#! Field("PLC:GUNB:TM01:TODMONTHRAW.VAL",16777215,1,"PLC:GUNB:TM01:TODMONTHRAW.VAL")
#! Record("PLC:GUNB:TM01:TODHOURRAW",4220,1027,0,0,"PLC:GUNB:TM01:TODHOURRAW")
#! Field("PLC:GUNB:TM01:TODHOURRAW.FLNK",16777215,1,"PLC:GUNB:TM01:TODHOURRAW.FLNK")
#! Link("PLC:GUNB:TM01:TODHOURRAW.FLNK","PLC:GUNB:TM01:TODHOUR")
#! Field("PLC:GUNB:TM01:TODHOURRAW.VAL",16777215,1,"PLC:GUNB:TM01:TODHOURRAW.VAL")
#! Record("PLC:GUNB:TM01:TODMINUTERAW",4220,1207,0,0,"PLC:GUNB:TM01:TODMINUTERAW")
#! Field("PLC:GUNB:TM01:TODMINUTERAW.FLNK",16777215,1,"PLC:GUNB:TM01:TODMINUTERAW.FLNK")
#! Link("PLC:GUNB:TM01:TODMINUTERAW.FLNK","PLC:GUNB:TM01:TODMINUTE")
#! Field("PLC:GUNB:TM01:TODMINUTERAW.VAL",16777215,1,"PLC:GUNB:TM01:TODMINUTERAW.VAL")
#! Record("PLC:GUNB:TM01:TODSECONDRAW",4220,1374,0,0,"PLC:GUNB:TM01:TODSECONDRAW")
#! Field("PLC:GUNB:TM01:TODSECONDRAW.FLNK",16777215,1,"PLC:GUNB:TM01:TODSECONDRAW.FLNK")
#! Link("PLC:GUNB:TM01:TODSECONDRAW.FLNK","PLC:GUNB:TM01:TODSECOND")
#! Field("PLC:GUNB:TM01:TODSECONDRAW.VAL",16777215,1,"PLC:GUNB:TM01:TODSECONDRAW.VAL")
#! Record("PLC:GUNB:TM01:TODYEAR",4520,522,0,0,"PLC:GUNB:TM01:TODYEAR")
#! Field("PLC:GUNB:TM01:TODYEAR.INPA",16777215,0,"PLC:GUNB:TM01:TODYEAR.INPA")
#! Link("PLC:GUNB:TM01:TODYEAR.INPA","PLC:GUNB:TM01:TODYEARRAW.VAL")
#! Field("PLC:GUNB:TM01:TODYEAR.INPB",16777215,0,"PLC:GUNB:TM01:TODYEAR.INPB")
#! Link("PLC:GUNB:TM01:TODYEAR.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:TODMONTH",4520,702,0,0,"PLC:GUNB:TM01:TODMONTH")
#! Field("PLC:GUNB:TM01:TODMONTH.INPA",16777215,0,"PLC:GUNB:TM01:TODMONTH.INPA")
#! Link("PLC:GUNB:TM01:TODMONTH.INPA","PLC:GUNB:TM01:TODMONTHRAW.VAL")
#! Field("PLC:GUNB:TM01:TODMONTH.INPB",16777215,0,"PLC:GUNB:TM01:TODMONTH.INPB")
#! Link("PLC:GUNB:TM01:TODMONTH.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:TODDAY",4520,882,0,0,"PLC:GUNB:TM01:TODDAY")
#! Field("PLC:GUNB:TM01:TODDAY.INPA",16777215,0,"PLC:GUNB:TM01:TODDAY.INPA")
#! Link("PLC:GUNB:TM01:TODDAY.INPA","PLC:GUNB:TM01:TODDAYRAW.VAL")
#! Field("PLC:GUNB:TM01:TODDAY.INPB",16777215,0,"PLC:GUNB:TM01:TODDAY.INPB")
#! Link("PLC:GUNB:TM01:TODDAY.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:TODHOUR",4520,1062,0,0,"PLC:GUNB:TM01:TODHOUR")
#! Field("PLC:GUNB:TM01:TODHOUR.INPA",16777215,0,"PLC:GUNB:TM01:TODHOUR.INPA")
#! Link("PLC:GUNB:TM01:TODHOUR.INPA","PLC:GUNB:TM01:TODHOURRAW.VAL")
#! Field("PLC:GUNB:TM01:TODHOUR.INPB",16777215,0,"PLC:GUNB:TM01:TODHOUR.INPB")
#! Link("PLC:GUNB:TM01:TODHOUR.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:TODMINUTE",4520,1242,0,0,"PLC:GUNB:TM01:TODMINUTE")
#! Field("PLC:GUNB:TM01:TODMINUTE.INPA",16777215,0,"PLC:GUNB:TM01:TODMINUTE.INPA")
#! Link("PLC:GUNB:TM01:TODMINUTE.INPA","PLC:GUNB:TM01:TODMINUTERAW.VAL")
#! Field("PLC:GUNB:TM01:TODMINUTE.INPB",16777215,0,"PLC:GUNB:TM01:TODMINUTE.INPB")
#! Link("PLC:GUNB:TM01:TODMINUTE.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:TODSECOND",4520,1422,0,0,"PLC:GUNB:TM01:TODSECOND")
#! Field("PLC:GUNB:TM01:TODSECOND.INPA",16777215,0,"PLC:GUNB:TM01:TODSECOND.INPA")
#! Link("PLC:GUNB:TM01:TODSECOND.INPA","PLC:GUNB:TM01:TODSECONDRAW.VAL")
#! Field("PLC:GUNB:TM01:TODSECOND.INPB",16777215,0,"PLC:GUNB:TM01:TODSECOND.INPB")
#! Link("PLC:GUNB:TM01:TODSECOND.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:VERSIONMAJORRAW",2740,2874,0,1,"PLC:GUNB:TM01:VERSIONMAJORRAW")
#! Field("PLC:GUNB:TM01:VERSIONMAJORRAW.VAL",16777215,1,"PLC:GUNB:TM01:VERSIONMAJORRAW.VAL")
#! Field("PLC:GUNB:TM01:VERSIONMAJORRAW.FLNK",16777215,1,"PLC:GUNB:TM01:VERSIONMAJORRAW.FLNK")
#! Link("PLC:GUNB:TM01:VERSIONMAJORRAW.FLNK","PLC:GUNB:TM01:VERSIONMAJOR")
#! Record("PLC:GUNB:TM01:VERSIONMINORRAW",2760,3287,0,1,"PLC:GUNB:TM01:VERSIONMINORRAW")
#! Field("PLC:GUNB:TM01:VERSIONMINORRAW.VAL",16777215,1,"PLC:GUNB:TM01:VERSIONMINORRAW.VAL")
#! Field("PLC:GUNB:TM01:VERSIONMINORRAW.FLNK",16777215,1,"PLC:GUNB:TM01:VERSIONMINORRAW.FLNK")
#! Link("PLC:GUNB:TM01:VERSIONMINORRAW.FLNK","PLC:GUNB:TM01:VERSIONMINOR")
#! Record("PLC:GUNB:TM01:VERSIONMAJOR",3040,2834,0,0,"PLC:GUNB:TM01:VERSIONMAJOR")
#! Field("PLC:GUNB:TM01:VERSIONMAJOR.INPA",16777215,0,"PLC:GUNB:TM01:VERSIONMAJOR.INPA")
#! Link("PLC:GUNB:TM01:VERSIONMAJOR.INPA","PLC:GUNB:TM01:VERSIONMAJORRAW.VAL")
#! Field("PLC:GUNB:TM01:VERSIONMAJOR.HIGH",16777215,0,"PLC:GUNB:TM01:VERSIONMAJOR.HIGH")
#! Field("PLC:GUNB:TM01:VERSIONMAJOR.LOW",16777215,0,"PLC:GUNB:TM01:VERSIONMAJOR.LOW")
#! Field("PLC:GUNB:TM01:VERSIONMAJOR.INPB",16777215,1,"PLC:GUNB:TM01:VERSIONMAJOR.INPB")
#! Link("PLC:GUNB:TM01:VERSIONMAJOR.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Field("PLC:GUNB:TM01:VERSIONMAJOR.VAL",16777215,0,"PLC:GUNB:TM01:VERSIONMAJOR.VAL")
#! Record("PLC:GUNB:TM01:VERSIONMINOR",3060,3194,0,0,"PLC:GUNB:TM01:VERSIONMINOR")
#! Field("PLC:GUNB:TM01:VERSIONMINOR.HIGH",16777215,0,"PLC:GUNB:TM01:VERSIONMINOR.HIGH")
#! Field("PLC:GUNB:TM01:VERSIONMINOR.INPA",16777215,0,"PLC:GUNB:TM01:VERSIONMINOR.INPA")
#! Link("PLC:GUNB:TM01:VERSIONMINOR.INPA","PLC:GUNB:TM01:VERSIONMINORRAW.VAL")
#! Field("PLC:GUNB:TM01:VERSIONMINOR.LOW",16777215,0,"PLC:GUNB:TM01:VERSIONMINOR.LOW")
#! Field("PLC:GUNB:TM01:VERSIONMINOR.INPB",16777215,1,"PLC:GUNB:TM01:VERSIONMINOR.INPB")
#! Link("PLC:GUNB:TM01:VERSIONMINOR.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Field("PLC:GUNB:TM01:VERSIONMINOR.VAL",16777215,0,"PLC:GUNB:TM01:VERSIONMINOR.VAL")
#! Record("PLC:GUNB:TM01:VERSIONREVRAW",2780,3687,0,1,"PLC:GUNB:TM01:VERSIONREVRAW")
#! Field("PLC:GUNB:TM01:VERSIONREVRAW.FLNK",16777215,1,"PLC:GUNB:TM01:VERSIONREVRAW.FLNK")
#! Link("PLC:GUNB:TM01:VERSIONREVRAW.FLNK","PLC:GUNB:TM01:VERSIONREV")
#! Field("PLC:GUNB:TM01:VERSIONREVRAW.VAL",16777215,1,"PLC:GUNB:TM01:VERSIONREVRAW.VAL")
#! Record("PLC:GUNB:TM01:VERSIONREV",3060,3594,0,0,"PLC:GUNB:TM01:VERSIONREV")
#! Field("PLC:GUNB:TM01:VERSIONREV.HIGH",16777215,0,"PLC:GUNB:TM01:VERSIONREV.HIGH")
#! Field("PLC:GUNB:TM01:VERSIONREV.LOW",16777215,0,"PLC:GUNB:TM01:VERSIONREV.LOW")
#! Field("PLC:GUNB:TM01:VERSIONREV.INPA",16777215,0,"PLC:GUNB:TM01:VERSIONREV.INPA")
#! Link("PLC:GUNB:TM01:VERSIONREV.INPA","PLC:GUNB:TM01:VERSIONREVRAW.VAL")
#! Field("PLC:GUNB:TM01:VERSIONREV.INPB",16777215,1,"PLC:GUNB:TM01:VERSIONREV.INPB")
#! Link("PLC:GUNB:TM01:VERSIONREV.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Field("PLC:GUNB:TM01:VERSIONREV.VAL",16777215,0,"PLC:GUNB:TM01:VERSIONREV.VAL")
#! Record("PLC:GUNB:TM01:SERIALNUMBERRAW",1960,3787,0,1,"PLC:GUNB:TM01:SERIALNUMBERRAW")
#! Field("PLC:GUNB:TM01:SERIALNUMBERRAW.FLNK",16777215,1,"PLC:GUNB:TM01:SERIALNUMBERRAW.FLNK")
#! Link("PLC:GUNB:TM01:SERIALNUMBERRAW.FLNK","PLC:GUNB:TM01:SERIALNUMBER")
#! Field("PLC:GUNB:TM01:SERIALNUMBERRAW.VAL",16777215,0,"PLC:GUNB:TM01:SERIALNUMBERRAW.VAL")
#! Record("PLC:GUNB:TM01:SERIALNUMBER",2220,3822,0,0,"PLC:GUNB:TM01:SERIALNUMBER")
#! Field("PLC:GUNB:TM01:SERIALNUMBER.INPA",16777215,0,"PLC:GUNB:TM01:SERIALNUMBER.INPA")
#! Link("PLC:GUNB:TM01:SERIALNUMBER.INPA","PLC:GUNB:TM01:SERIALNUMBERRAW.VAL")
#! Field("PLC:GUNB:TM01:SERIALNUMBER.INPB",16777215,1,"PLC:GUNB:TM01:SERIALNUMBER.INPB")
#! Link("PLC:GUNB:TM01:SERIALNUMBER.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:COMMLINK",340,43,0,0,"PLC:GUNB:TM01:COMMLINK")
#! Field("PLC:GUNB:TM01:COMMLINK.INP",16777215,0,"PLC:GUNB:TM01:COMMLINK.INP")
#! Link("PLC:GUNB:TM01:COMMLINK.INP","PLC:GUNB:TM01:HEARTBEATRAW.SEVR")
#! Field("PLC:GUNB:TM01:COMMLINK.FLNK",16777215,1,"PLC:GUNB:TM01:COMMLINK.FLNK")
#! Link("PLC:GUNB:TM01:COMMLINK.FLNK","PLC:GUNB:TM01:HEARTBEATCALC")
#! Record("PLC:GUNB:TM01:HEARTBEATE10",1100,2447,0,1,"PLC:GUNB:TM01:HEARTBEATE10")
#! Field("PLC:GUNB:TM01:HEARTBEATE10.VAL",16777215,1,"PLC:GUNB:TM01:HEARTBEATE10.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE10.INPB",16777215,0,"PLC:GUNB:TM01:HEARTBEATE10.INPB")
#! Link("PLC:GUNB:TM01:HEARTBEATE10.INPB","PLC:GUNB:TM01:HEARTBEATE10.VAL")
#! Field("PLC:GUNB:TM01:HEARTBEATE10.FLNK",16777215,1,"PLC:GUNB:TM01:HEARTBEATE10.FLNK")
#! Link("PLC:GUNB:TM01:HEARTBEATE10.FLNK","PLC:GUNB:TM01:HEARTBEATECT")
#! Field("PLC:GUNB:TM01:HEARTBEATE10.INPA",16777215,0,"PLC:GUNB:TM01:HEARTBEATE10.INPA")
#! Link("PLC:GUNB:TM01:HEARTBEATE10.INPA","PLC:GUNB:TM01:HEARTBEATE09.B")
#! Record("PLC:GUNB:TM01:DOCPREFIXRAW",880,2867,0,1,"PLC:GUNB:TM01:DOCPREFIXRAW")
#! Field("PLC:GUNB:TM01:DOCPREFIXRAW.FLNK",16777215,1,"PLC:GUNB:TM01:DOCPREFIXRAW.FLNK")
#! Link("PLC:GUNB:TM01:DOCPREFIXRAW.FLNK","PLC:GUNB:TM01:DOCPREFIXCALC")
#! Field("PLC:GUNB:TM01:DOCPREFIXRAW.VAL",16777215,1,"PLC:GUNB:TM01:DOCPREFIXRAW.VAL")
#! Record("PLC:GUNB:TM01:DOCPREFIXCALC",1160,2887,0,0,"PLC:GUNB:TM01:DOCPREFIXCALC")
#! Field("PLC:GUNB:TM01:DOCPREFIXCALC.INPA",16777215,0,"PLC:GUNB:TM01:DOCPREFIXCALC.INPA")
#! Link("PLC:GUNB:TM01:DOCPREFIXCALC.INPA","PLC:GUNB:TM01:DOCPREFIXRAW.VAL")
#! Field("PLC:GUNB:TM01:DOCPREFIXCALC.FLNK",16777215,1,"PLC:GUNB:TM01:DOCPREFIXCALC.FLNK")
#! Link("PLC:GUNB:TM01:DOCPREFIXCALC.FLNK","PLC:GUNB:TM01:DOCPREFIX")
#! Field("PLC:GUNB:TM01:DOCPREFIXCALC.VAL",16777215,1,"PLC:GUNB:TM01:DOCPREFIXCALC.VAL")
#! Field("PLC:GUNB:TM01:DOCPREFIXCALC.INPB",16777215,1,"PLC:GUNB:TM01:DOCPREFIXCALC.INPB")
#! Link("PLC:GUNB:TM01:DOCPREFIXCALC.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:DOCPREFIX",1460,2630,0,0,"PLC:GUNB:TM01:DOCPREFIX")
#! Field("PLC:GUNB:TM01:DOCPREFIX.INP",16777215,0,"PLC:GUNB:TM01:DOCPREFIX.INP")
#! Link("PLC:GUNB:TM01:DOCPREFIX.INP","PLC:GUNB:TM01:DOCPREFIXCALC.VAL")
#! Record("PLC:GUNB:TM01:DOCSERIESRAW",880,3087,0,1,"PLC:GUNB:TM01:DOCSERIESRAW")
#! Field("PLC:GUNB:TM01:DOCSERIESRAW.FLNK",16777215,1,"PLC:GUNB:TM01:DOCSERIESRAW.FLNK")
#! Link("PLC:GUNB:TM01:DOCSERIESRAW.FLNK","PLC:GUNB:TM01:DOCSERIES")
#! Field("PLC:GUNB:TM01:DOCSERIESRAW.VAL",16777215,1,"PLC:GUNB:TM01:DOCSERIESRAW.VAL")
#! Record("PLC:GUNB:TM01:DOCSERIES",1160,3122,0,0,"PLC:GUNB:TM01:DOCSERIES")
#! Field("PLC:GUNB:TM01:DOCSERIES.INPA",16777215,0,"PLC:GUNB:TM01:DOCSERIES.INPA")
#! Link("PLC:GUNB:TM01:DOCSERIES.INPA","PLC:GUNB:TM01:DOCSERIESRAW.VAL")
#! Field("PLC:GUNB:TM01:DOCSERIES.INPB",16777215,1,"PLC:GUNB:TM01:DOCSERIES.INPB")
#! Link("PLC:GUNB:TM01:DOCSERIES.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:DOCBASERAW",878,3307,0,1,"PLC:GUNB:TM01:DOCBASERAW")
#! Field("PLC:GUNB:TM01:DOCBASERAW.FLNK",16777215,1,"PLC:GUNB:TM01:DOCBASERAW.FLNK")
#! Link("PLC:GUNB:TM01:DOCBASERAW.FLNK","PLC:GUNB:TM01:DOCBASE")
#! Field("PLC:GUNB:TM01:DOCBASERAW.VAL",16777215,1,"PLC:GUNB:TM01:DOCBASERAW.VAL")
#! Record("PLC:GUNB:TM01:DOCBASE",1160,3342,0,0,"PLC:GUNB:TM01:DOCBASE")
#! Field("PLC:GUNB:TM01:DOCBASE.INPA",16777215,0,"PLC:GUNB:TM01:DOCBASE.INPA")
#! Link("PLC:GUNB:TM01:DOCBASE.INPA","PLC:GUNB:TM01:DOCBASERAW.VAL")
#! Field("PLC:GUNB:TM01:DOCBASE.INPB",16777215,1,"PLC:GUNB:TM01:DOCBASE.INPB")
#! Link("PLC:GUNB:TM01:DOCBASE.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:DOCSUFFIXRAW",878,3567,0,1,"PLC:GUNB:TM01:DOCSUFFIXRAW")
#! Field("PLC:GUNB:TM01:DOCSUFFIXRAW.FLNK",16777215,1,"PLC:GUNB:TM01:DOCSUFFIXRAW.FLNK")
#! Link("PLC:GUNB:TM01:DOCSUFFIXRAW.FLNK","PLC:GUNB:TM01:DOCSUFFIX")
#! Field("PLC:GUNB:TM01:DOCSUFFIXRAW.VAL",16777215,1,"PLC:GUNB:TM01:DOCSUFFIXRAW.VAL")
#! Record("PLC:GUNB:TM01:DOCSUFFIX",1160,3602,0,0,"PLC:GUNB:TM01:DOCSUFFIX")
#! Field("PLC:GUNB:TM01:DOCSUFFIX.INPA",16777215,0,"PLC:GUNB:TM01:DOCSUFFIX.INPA")
#! Link("PLC:GUNB:TM01:DOCSUFFIX.INPA","PLC:GUNB:TM01:DOCSUFFIXRAW.VAL")
#! Field("PLC:GUNB:TM01:DOCSUFFIX.INPB",16777215,1,"PLC:GUNB:TM01:DOCSUFFIX.INPB")
#! Link("PLC:GUNB:TM01:DOCSUFFIX.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:DOCREVRAW",874,3787,0,1,"PLC:GUNB:TM01:DOCREVRAW")
#! Field("PLC:GUNB:TM01:DOCREVRAW.FLNK",16777215,1,"PLC:GUNB:TM01:DOCREVRAW.FLNK")
#! Link("PLC:GUNB:TM01:DOCREVRAW.FLNK","PLC:GUNB:TM01:DOCREV")
#! Field("PLC:GUNB:TM01:DOCREVRAW.VAL",16777215,1,"PLC:GUNB:TM01:DOCREVRAW.VAL")
#! Record("PLC:GUNB:TM01:DOCREV",1154,3822,0,0,"PLC:GUNB:TM01:DOCREV")
#! Field("PLC:GUNB:TM01:DOCREV.INPA",16777215,0,"PLC:GUNB:TM01:DOCREV.INPA")
#! Link("PLC:GUNB:TM01:DOCREV.INPA","PLC:GUNB:TM01:DOCREVRAW.VAL")
#! Field("PLC:GUNB:TM01:DOCREV.INPB",16777215,1,"PLC:GUNB:TM01:DOCREV.INPB")
#! Link("PLC:GUNB:TM01:DOCREV.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:SUBSYSTEM",3320,2816,0,1,"PLC:GUNB:TM01:SUBSYSTEM")
#! Record("PLC:GUNB:TM01:PLCADMINVMAJRAW",2720,2087,0,1,"PLC:GUNB:TM01:PLCADMINVMAJRAW")
#! Field("PLC:GUNB:TM01:PLCADMINVMAJRAW.FLNK",16777215,1,"PLC:GUNB:TM01:PLCADMINVMAJRAW.FLNK")
#! Link("PLC:GUNB:TM01:PLCADMINVMAJRAW.FLNK","PLC:GUNB:TM01:PLCADMINVMAJ")
#! Field("PLC:GUNB:TM01:PLCADMINVMAJRAW.VAL",16777215,1,"PLC:GUNB:TM01:PLCADMINVMAJRAW.VAL")
#! Record("PLC:GUNB:TM01:PLCADMINVMAJ",3020,2050,0,0,"PLC:GUNB:TM01:PLCADMINVMAJ")
#! Field("PLC:GUNB:TM01:PLCADMINVMAJ.INPA",16777215,0,"PLC:GUNB:TM01:PLCADMINVMAJ.INPA")
#! Link("PLC:GUNB:TM01:PLCADMINVMAJ.INPA","PLC:GUNB:TM01:PLCADMINVMAJRAW.VAL")
#! Field("PLC:GUNB:TM01:PLCADMINVMAJ.INPB",16777215,1,"PLC:GUNB:TM01:PLCADMINVMAJ.INPB")
#! Link("PLC:GUNB:TM01:PLCADMINVMAJ.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:PLCADMINVMINRAW",2720,2327,0,1,"PLC:GUNB:TM01:PLCADMINVMINRAW")
#! Field("PLC:GUNB:TM01:PLCADMINVMINRAW.FLNK",16777215,1,"PLC:GUNB:TM01:PLCADMINVMINRAW.FLNK")
#! Link("PLC:GUNB:TM01:PLCADMINVMINRAW.FLNK","PLC:GUNB:TM01:PLCADMINVMIN")
#! Field("PLC:GUNB:TM01:PLCADMINVMINRAW.VAL",16777215,1,"PLC:GUNB:TM01:PLCADMINVMINRAW.VAL")
#! Record("PLC:GUNB:TM01:PLCADMINVMIN",3020,2290,0,0,"PLC:GUNB:TM01:PLCADMINVMIN")
#! Field("PLC:GUNB:TM01:PLCADMINVMIN.INPA",16777215,0,"PLC:GUNB:TM01:PLCADMINVMIN.INPA")
#! Link("PLC:GUNB:TM01:PLCADMINVMIN.INPA","PLC:GUNB:TM01:PLCADMINVMINRAW.VAL")
#! Field("PLC:GUNB:TM01:PLCADMINVMIN.INPB",16777215,1,"PLC:GUNB:TM01:PLCADMINVMIN.INPB")
#! Link("PLC:GUNB:TM01:PLCADMINVMIN.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:PLCADMINVREVRAW",2720,2567,0,1,"PLC:GUNB:TM01:PLCADMINVREVRAW")
#! Field("PLC:GUNB:TM01:PLCADMINVREVRAW.FLNK",16777215,1,"PLC:GUNB:TM01:PLCADMINVREVRAW.FLNK")
#! Link("PLC:GUNB:TM01:PLCADMINVREVRAW.FLNK","PLC:GUNB:TM01:PLCADMINVREV")
#! Field("PLC:GUNB:TM01:PLCADMINVREVRAW.VAL",16777215,1,"PLC:GUNB:TM01:PLCADMINVREVRAW.VAL")
#! Record("PLC:GUNB:TM01:PLCADMINVREV",3020,2530,0,0,"PLC:GUNB:TM01:PLCADMINVREV")
#! Field("PLC:GUNB:TM01:PLCADMINVREV.INPA",16777215,0,"PLC:GUNB:TM01:PLCADMINVREV.INPA")
#! Link("PLC:GUNB:TM01:PLCADMINVREV.INPA","PLC:GUNB:TM01:PLCADMINVREVRAW.VAL")
#! Field("PLC:GUNB:TM01:PLCADMINVREV.INPB",16777215,1,"PLC:GUNB:TM01:PLCADMINVREV.INPB")
#! Link("PLC:GUNB:TM01:PLCADMINVREV.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:PROGPLCATMAXRAW",2700,727,0,0,"PLC:GUNB:TM01:PROGPLCATMAXRAW")
#! Field("PLC:GUNB:TM01:PROGPLCATMAXRAW.FLNK",16777215,1,"PLC:GUNB:TM01:PROGPLCATMAXRAW.FLNK")
#! Link("PLC:GUNB:TM01:PROGPLCATMAXRAW.FLNK","PLC:GUNB:TM01:PROGPLCATMAX")
#! Field("PLC:GUNB:TM01:PROGPLCATMAXRAW.VAL",16777215,1,"PLC:GUNB:TM01:PROGPLCATMAXRAW.VAL")
#! Record("PLC:GUNB:TM01:PROGPLCATLSTRAW",2700,567,0,0,"PLC:GUNB:TM01:PROGPLCATLSTRAW")
#! Field("PLC:GUNB:TM01:PROGPLCATLSTRAW.FLNK",16777215,1,"PLC:GUNB:TM01:PROGPLCATLSTRAW.FLNK")
#! Link("PLC:GUNB:TM01:PROGPLCATLSTRAW.FLNK","PLC:GUNB:TM01:PROGPLCATLST")
#! Field("PLC:GUNB:TM01:PROGPLCATLSTRAW.VAL",16777215,1,"PLC:GUNB:TM01:PROGPLCATLSTRAW.VAL")
#! Record("PLC:GUNB:TM01:PROGPLCATLST",3000,602,0,0,"PLC:GUNB:TM01:PROGPLCATLST")
#! Field("PLC:GUNB:TM01:PROGPLCATLST.INPA",16777215,0,"PLC:GUNB:TM01:PROGPLCATLST.INPA")
#! Link("PLC:GUNB:TM01:PROGPLCATLST.INPA","PLC:GUNB:TM01:PROGPLCATLSTRAW.VAL")
#! Field("PLC:GUNB:TM01:PROGPLCATLST.INPB",16777215,1,"PLC:GUNB:TM01:PROGPLCATLST.INPB")
#! Link("PLC:GUNB:TM01:PROGPLCATLST.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:PROGPLCATMAX",3000,762,0,0,"PLC:GUNB:TM01:PROGPLCATMAX")
#! Field("PLC:GUNB:TM01:PROGPLCATMAX.INPA",16777215,0,"PLC:GUNB:TM01:PROGPLCATMAX.INPA")
#! Link("PLC:GUNB:TM01:PROGPLCATMAX.INPA","PLC:GUNB:TM01:PROGPLCATMAXRAW.VAL")
#! Field("PLC:GUNB:TM01:PROGPLCATMAX.INPB",16777215,1,"PLC:GUNB:TM01:PROGPLCATMAX.INPB")
#! Link("PLC:GUNB:TM01:PROGPLCATMAX.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:PLCADMINTAG",2120,876,0,1,"PLC:GUNB:TM01:PLCADMINTAG")
#! Record("PLC:GUNB:TM01:TASKMAINTLSTRAW",2700,247,0,0,"PLC:GUNB:TM01:TASKMAINTLSTRAW")
#! Field("PLC:GUNB:TM01:TASKMAINTLSTRAW.FLNK",16777215,1,"PLC:GUNB:TM01:TASKMAINTLSTRAW.FLNK")
#! Link("PLC:GUNB:TM01:TASKMAINTLSTRAW.FLNK","PLC:GUNB:TM01:TASKMAINTLST")
#! Field("PLC:GUNB:TM01:TASKMAINTLSTRAW.VAL",16777215,1,"PLC:GUNB:TM01:TASKMAINTLSTRAW.VAL")
#! Record("PLC:GUNB:TM01:TASKMAINTLST",3000,282,0,0,"PLC:GUNB:TM01:TASKMAINTLST")
#! Field("PLC:GUNB:TM01:TASKMAINTLST.INPA",16777215,0,"PLC:GUNB:TM01:TASKMAINTLST.INPA")
#! Link("PLC:GUNB:TM01:TASKMAINTLST.INPA","PLC:GUNB:TM01:TASKMAINTLSTRAW.VAL")
#! Field("PLC:GUNB:TM01:TASKMAINTLST.INPB",16777215,1,"PLC:GUNB:TM01:TASKMAINTLST.INPB")
#! Link("PLC:GUNB:TM01:TASKMAINTLST.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:TASKMAINTMAXRAW",2700,407,0,0,"PLC:GUNB:TM01:TASKMAINTMAXRAW")
#! Field("PLC:GUNB:TM01:TASKMAINTMAXRAW.FLNK",16777215,1,"PLC:GUNB:TM01:TASKMAINTMAXRAW.FLNK")
#! Link("PLC:GUNB:TM01:TASKMAINTMAXRAW.FLNK","PLC:GUNB:TM01:TASKMAINTMAX")
#! Field("PLC:GUNB:TM01:TASKMAINTMAXRAW.VAL",16777215,1,"PLC:GUNB:TM01:TASKMAINTMAXRAW.VAL")
#! Record("PLC:GUNB:TM01:TASKMAINTMAX",3000,442,0,0,"PLC:GUNB:TM01:TASKMAINTMAX")
#! Field("PLC:GUNB:TM01:TASKMAINTMAX.INPA",16777215,0,"PLC:GUNB:TM01:TASKMAINTMAX.INPA")
#! Link("PLC:GUNB:TM01:TASKMAINTMAX.INPA","PLC:GUNB:TM01:TASKMAINTMAXRAW.VAL")
#! Field("PLC:GUNB:TM01:TASKMAINTMAX.INPB",16777215,1,"PLC:GUNB:TM01:TASKMAINTMAX.INPB")
#! Link("PLC:GUNB:TM01:TASKMAINTMAX.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:PROG1TLSTRAW",2700,887,0,0,"PLC:GUNB:TM01:PROG1TLSTRAW")
#! Field("PLC:GUNB:TM01:PROG1TLSTRAW.FLNK",16777215,1,"PLC:GUNB:TM01:PROG1TLSTRAW.FLNK")
#! Link("PLC:GUNB:TM01:PROG1TLSTRAW.FLNK","PLC:GUNB:TM01:PROG1TLST")
#! Field("PLC:GUNB:TM01:PROG1TLSTRAW.VAL",16777215,1,"PLC:GUNB:TM01:PROG1TLSTRAW.VAL")
#! Record("PLC:GUNB:TM01:PROG1TMAXRAW",2700,1047,0,0,"PLC:GUNB:TM01:PROG1TMAXRAW")
#! Field("PLC:GUNB:TM01:PROG1TMAXRAW.FLNK",16777215,1,"PLC:GUNB:TM01:PROG1TMAXRAW.FLNK")
#! Link("PLC:GUNB:TM01:PROG1TMAXRAW.FLNK","PLC:GUNB:TM01:PROG1TMAX")
#! Field("PLC:GUNB:TM01:PROG1TMAXRAW.VAL",16777215,1,"PLC:GUNB:TM01:PROG1TMAXRAW.VAL")
#! Record("PLC:GUNB:TM01:PROG1TLST",3000,922,0,0,"PLC:GUNB:TM01:PROG1TLST")
#! Field("PLC:GUNB:TM01:PROG1TLST.INPA",16777215,0,"PLC:GUNB:TM01:PROG1TLST.INPA")
#! Link("PLC:GUNB:TM01:PROG1TLST.INPA","PLC:GUNB:TM01:PROG1TLSTRAW.VAL")
#! Field("PLC:GUNB:TM01:PROG1TLST.INPB",16777215,1,"PLC:GUNB:TM01:PROG1TLST.INPB")
#! Link("PLC:GUNB:TM01:PROG1TLST.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:PROG1TMAX",3000,1082,0,0,"PLC:GUNB:TM01:PROG1TMAX")
#! Field("PLC:GUNB:TM01:PROG1TMAX.INPA",16777215,0,"PLC:GUNB:TM01:PROG1TMAX.INPA")
#! Link("PLC:GUNB:TM01:PROG1TMAX.INPA","PLC:GUNB:TM01:PROG1TMAXRAW.VAL")
#! Field("PLC:GUNB:TM01:PROG1TMAX.INPB",16777215,1,"PLC:GUNB:TM01:PROG1TMAX.INPB")
#! Link("PLC:GUNB:TM01:PROG1TMAX.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:PROG2TLSTRAW",2700,1207,0,0,"PLC:GUNB:TM01:PROG2TLSTRAW")
#! Field("PLC:GUNB:TM01:PROG2TLSTRAW.FLNK",16777215,1,"PLC:GUNB:TM01:PROG2TLSTRAW.FLNK")
#! Link("PLC:GUNB:TM01:PROG2TLSTRAW.FLNK","PLC:GUNB:TM01:PROG2TLST")
#! Field("PLC:GUNB:TM01:PROG2TLSTRAW.VAL",16777215,1,"PLC:GUNB:TM01:PROG2TLSTRAW.VAL")
#! Record("PLC:GUNB:TM01:PROG2TMAXRAW",2700,1367,0,0,"PLC:GUNB:TM01:PROG2TMAXRAW")
#! Field("PLC:GUNB:TM01:PROG2TMAXRAW.FLNK",16777215,1,"PLC:GUNB:TM01:PROG2TMAXRAW.FLNK")
#! Link("PLC:GUNB:TM01:PROG2TMAXRAW.FLNK","PLC:GUNB:TM01:PROG2TMAX")
#! Field("PLC:GUNB:TM01:PROG2TMAXRAW.VAL",16777215,1,"PLC:GUNB:TM01:PROG2TMAXRAW.VAL")
#! Record("PLC:GUNB:TM01:PROG2TLST",3000,1242,0,0,"PLC:GUNB:TM01:PROG2TLST")
#! Field("PLC:GUNB:TM01:PROG2TLST.INPA",16777215,0,"PLC:GUNB:TM01:PROG2TLST.INPA")
#! Link("PLC:GUNB:TM01:PROG2TLST.INPA","PLC:GUNB:TM01:PROG2TLSTRAW.VAL")
#! Field("PLC:GUNB:TM01:PROG2TLST.INPB",16777215,1,"PLC:GUNB:TM01:PROG2TLST.INPB")
#! Link("PLC:GUNB:TM01:PROG2TLST.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:PROG2TMAX",3000,1402,0,0,"PLC:GUNB:TM01:PROG2TMAX")
#! Field("PLC:GUNB:TM01:PROG2TMAX.INPA",16777215,0,"PLC:GUNB:TM01:PROG2TMAX.INPA")
#! Link("PLC:GUNB:TM01:PROG2TMAX.INPA","PLC:GUNB:TM01:PROG2TMAXRAW.VAL")
#! Field("PLC:GUNB:TM01:PROG2TMAX.INPB",16777215,1,"PLC:GUNB:TM01:PROG2TMAX.INPB")
#! Link("PLC:GUNB:TM01:PROG2TMAX.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:PROG3TLSTRAW",2700,1527,0,0,"PLC:GUNB:TM01:PROG3TLSTRAW")
#! Field("PLC:GUNB:TM01:PROG3TLSTRAW.FLNK",16777215,1,"PLC:GUNB:TM01:PROG3TLSTRAW.FLNK")
#! Link("PLC:GUNB:TM01:PROG3TLSTRAW.FLNK","PLC:GUNB:TM01:PROG3TLST")
#! Field("PLC:GUNB:TM01:PROG3TLSTRAW.VAL",16777215,1,"PLC:GUNB:TM01:PROG3TLSTRAW.VAL")
#! Record("PLC:GUNB:TM01:PROG3TMAXRAW",2700,1687,0,0,"PLC:GUNB:TM01:PROG3TMAXRAW")
#! Field("PLC:GUNB:TM01:PROG3TMAXRAW.FLNK",16777215,1,"PLC:GUNB:TM01:PROG3TMAXRAW.FLNK")
#! Link("PLC:GUNB:TM01:PROG3TMAXRAW.FLNK","PLC:GUNB:TM01:PROG3TMAX")
#! Field("PLC:GUNB:TM01:PROG3TMAXRAW.VAL",16777215,1,"PLC:GUNB:TM01:PROG3TMAXRAW.VAL")
#! Record("PLC:GUNB:TM01:PROG3TMAX",3000,1722,0,0,"PLC:GUNB:TM01:PROG3TMAX")
#! Field("PLC:GUNB:TM01:PROG3TMAX.INPA",16777215,0,"PLC:GUNB:TM01:PROG3TMAX.INPA")
#! Link("PLC:GUNB:TM01:PROG3TMAX.INPA","PLC:GUNB:TM01:PROG3TMAXRAW.VAL")
#! Field("PLC:GUNB:TM01:PROG3TMAX.INPB",16777215,1,"PLC:GUNB:TM01:PROG3TMAX.INPB")
#! Link("PLC:GUNB:TM01:PROG3TMAX.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:PROG3TLST",3000,1562,0,0,"PLC:GUNB:TM01:PROG3TLST")
#! Field("PLC:GUNB:TM01:PROG3TLST.INPA",16777215,0,"PLC:GUNB:TM01:PROG3TLST.INPA")
#! Link("PLC:GUNB:TM01:PROG3TLST.INPA","PLC:GUNB:TM01:PROG3TLSTRAW.VAL")
#! Field("PLC:GUNB:TM01:PROG3TLST.INPB",16777215,1,"PLC:GUNB:TM01:PROG3TLST.INPB")
#! Link("PLC:GUNB:TM01:PROG3TLST.INPB","PLC:GUNB:TM01:HEARTBEATCLC.VAL")
#! Record("PLC:GUNB:TM01:STATSUMY",1600,4643,0,1,"PLC:GUNB:TM01:STATSUMY")
#! Field("PLC:GUNB:TM01:STATSUMY.INPB",16777215,1,"PLC:GUNB:TM01:STATSUMY.INPB")
#! Link("PLC:GUNB:TM01:STATSUMY.INPB","PLC:GUNB:TM01:HEARTBEATSUM.VAL")
#! Field("PLC:GUNB:TM01:STATSUMY.INPC",16777215,1,"PLC:GUNB:TM01:STATSUMY.INPC")
#! Link("PLC:GUNB:TM01:STATSUMY.INPC","PLC:GUNB:TM01:FAULTSTATUS.VAL")
#! Field("PLC:GUNB:TM01:STATSUMY.INPD",16777215,1,"PLC:GUNB:TM01:STATSUMY.INPD")
#! Link("PLC:GUNB:TM01:STATSUMY.INPD","PLC:GUNB:TM01:KEYSTATUS.VAL")
#! Field("PLC:GUNB:TM01:STATSUMY.INPE",16777215,1,"PLC:GUNB:TM01:STATSUMY.INPE")
#! Link("PLC:GUNB:TM01:STATSUMY.INPE","PLC:GUNB:TM01:DEVICESTATUS.VAL")
#! Field("PLC:GUNB:TM01:STATSUMY.INPF",16777215,1,"PLC:GUNB:TM01:STATSUMY.INPF")
#! Link("PLC:GUNB:TM01:STATSUMY.INPF","PLC:GUNB:TM01:VERSIONMAJOR.VAL")
#! Field("PLC:GUNB:TM01:STATSUMY.INPG",16777215,1,"PLC:GUNB:TM01:STATSUMY.INPG")
#! Link("PLC:GUNB:TM01:STATSUMY.INPG","PLC:GUNB:TM01:VERSIONMINOR.VAL")
#! Field("PLC:GUNB:TM01:STATSUMY.INPH",16777215,1,"PLC:GUNB:TM01:STATSUMY.INPH")
#! Link("PLC:GUNB:TM01:STATSUMY.INPH","PLC:GUNB:TM01:VERSIONREV.VAL")
#! Field("PLC:GUNB:TM01:STATSUMY.SEVR",16777215,0,"PLC:GUNB:TM01:STATSUMY.SEVR")
#! Field("PLC:GUNB:TM01:STATSUMY.INPA",16777215,0,"PLC:GUNB:TM01:STATSUMY.INPA")
#! Link("PLC:GUNB:TM01:STATSUMY.INPA","PLC:GUNB:TM01:STATSUMY.SEVR")
# -*- shell-script -*-
# AI records that read statistical information from EtherIP
# driver/device
#
# IOC:  prefix to records
# PLC:  PLC to use
# TAG:  queried tag (leads to PLC's ScanList)

record(ai, "PLC:GUNB:TM01:PLC_ERRORS")
{
	field(SCAN, ".5 second")
	field(DTYP, "EtherIP")
	field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01 PLC_ERRORS")
	field(EGUF, "5")
	field(EGU, "Errors")
	field(HOPR, "5")
	field(LOPR, "0")
}


record(ai, "PLC:GUNB:TM01:PLC_TASK_SLOW")
{
	field(SCAN, ".5 second")
	field(DTYP, "EtherIP")
	field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01 PLC_TASK_SLOW")
	field(EGUF, "5")
	field(EGU, "Holdups")
	field(HOPR, "5")
	field(LOPR, "0")
}

record(ai, "PLC:GUNB:TM01:LIST_TICKS")
{
	field(SCAN, ".5 second")
	field(DTYP, "EtherIP")
	field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01 LIST_TICKS")
	field(EGUF, "5")
	field(EGU, "vx ticks")
	field(HOPR, "5")
	field(LOPR, "0")
}

record(ai, "PLC:GUNB:TM01:LIST_SCAN_TIME")
{
	field(SCAN, ".5 second")
	field(DTYP, "EtherIP")
	field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01 LIST_SCAN_TIME")
	field(EGUF, "1")
	field(EGU, "s")
	field(HOPR, "1")
	field(LOPR, "0")
	field(PREC, "5")
}

record(ai, "PLC:GUNB:TM01:LIST_MIN_SCAN_TIME")
{
	field(SCAN, ".5 second")
	field(DTYP, "EtherIP")
	field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01 LIST_MIN_SCAN_TIME")
	field(EGUF, "1")
	field(EGU, "s")
	field(HOPR, "1")
	field(LOPR, "0")
	field(PREC, "5")
}

record(ai, "PLC:GUNB:TM01:LIST_MAX_SCAN_TIME")
{
	field(SCAN, ".5 second")
	field(DTYP, "EtherIP")
	field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01 LIST_MAX_SCAN_TIME")
	field(EGUF, "1")
	field(EGU, "s")
	field(HOPR, "1")
	field(LOPR, "0")
	field(PREC, "5")
}

record(ai, "PLC:GUNB:TM01:TAG_TRANSFER_TIME")
{
	field(SCAN, ".5 second")
	field(DTYP, "EtherIP")
	field(INP, "@PLC_GUNB_TM01 PLCADMIN_PLC_GUNB_TM01 TAG_TRANSFER_TIME")
	field(EGUF, "1000000000")
	field(EGU, "s")
	field(HOPR, "1")
	field(LOPR, "0")
	field(PREC, "5")
}






#==============================================================================
#
# Abs:  Database template for plcinfo.
#
# Name: ab-plc-info-lcls2.template
#
# Macros:
#       CR          Panel or crate number
#       NUM_CHANS   Total number of channels
#       UNIT        Unit number of the PLC   
#       LOCA        Location of the PLC
#       LOCATION    Location of the panel
#==============================================================================
record(stringin, "PLC:GUNB:TM01:CR0_LOC") {
    field(VAL, "Buncher Temperature")
}

record(longout, "PLC:GUNB:TM01:CR0_NUM_CHANS") {
    field(VAL, "56")
}

record(bo, "PLC:GUNB:TM01:INITIALIZE") {
    field(DTYP, "EtherIP")
    field(OUT, "@PLC_GUNB_TM01 INITIALIZE") 
    field(DESC, "Init")

}
#==============================================================================
#
# Abs:  Database template for plcinfo.
#
# Name: ab-plc-info-lcls2.template
#
# Macros:
#       CR          Panel or crate number
#       NUM_CHANS   Total number of channels
#       UNIT        Unit number of the PLC   
#       LOCA        Location of the PLC
#       LOCATION    Location of the panel
#==============================================================================
record(stringin, "PLC:GUNB:TM01:CR1_LOC") {
    field(VAL, "Gun Temperature")
}

record(longout, "PLC:GUNB:TM01:CR1_NUM_CHANS") {
    field(VAL, "40")
}

record(bo, "PLC:GUNB:TM01:INITIALIZE") {
    field(DTYP, "EtherIP")
    field(OUT, "@PLC_GUNB_TM01 INITIALIZE") 
    field(DESC, "Init")

}
#==============================================================================
#
# Abs:  Database template for plcinfo.
#
# Name: ab-plc-info-lcls2.template
#
# Macros:
#       CR          Panel or crate number
#       NUM_CHANS   Total number of channels
#       UNIT        Unit number of the PLC   
#       LOCA        Location of the PLC
#       LOCATION    Location of the panel
#==============================================================================
record(stringin, "PLC:GUNB:TM01:CR2_LOC") {
    field(VAL, "Laser Room")
}

record(longout, "PLC:GUNB:TM01:CR2_NUM_CHANS") {
    field(VAL, "32")
}

record(bo, "PLC:GUNB:TM01:INITIALIZE") {
    field(DTYP, "EtherIP")
    field(OUT, "@PLC_GUNB_TM01 INITIALIZE") 
    field(DESC, "Init")

}
#==============================================================================
#
# Abs:  Database template for plcinfo.
#
# Name: ab-plc-info-lcls2.template
#
# Macros:
#       CR          Panel or crate number
#       NUM_CHANS   Total number of channels
#       UNIT        Unit number of the PLC   
#       LOCA        Location of the PLC
#       LOCATION    Location of the panel
#==============================================================================
record(stringin, "PLC:GUNB:TM01:CR3_LOC") {
    field(VAL, "LI00 sensors")
}

record(longout, "PLC:GUNB:TM01:CR3_NUM_CHANS") {
    field(VAL, "32")
}

record(bo, "PLC:GUNB:TM01:INITIALIZE") {
    field(DTYP, "EtherIP")
    field(OUT, "@PLC_GUNB_TM01 INITIALIZE") 
    field(DESC, "Init")

}
#==============================================================================
#
# Abs:  Database template for plcinfo.
#
# Name: ab-plc-info-lcls2.template
#
# Macros:
#       CR          Panel or crate number
#       NUM_CHANS   Total number of channels
#       UNIT        Unit number of the PLC   
#       LOCA        Location of the PLC
#       LOCATION    Location of the panel
#==============================================================================
record(stringin, "PLC:GUNB:TM01:CR4_LOC") {
    field(VAL, "EPS System")
}

record(longout, "PLC:GUNB:TM01:CR4_NUM_CHANS") {
    field(VAL, "112")
}

record(bo, "PLC:GUNB:TM01:INITIALIZE") {
    field(DTYP, "EtherIP")
    field(OUT, "@PLC_GUNB_TM01 INITIALIZE") 
    field(DESC, "Init")

}
#==============================================================================
#
# Abs:  Database template for plcinfo.
#
# Name: ab-plc-info-lcls2.template
#
# Macros:
#       CR          Panel or crate number
#       NUM_CHANS   Total number of channels
#       UNIT        Unit number of the PLC   
#       LOCA        Location of the PLC
#       LOCATION    Location of the panel
#==============================================================================
record(stringin, "PLC:GUNB:TM01:CR5_LOC") {
    field(VAL, "Circulator Temp")
}

record(longout, "PLC:GUNB:TM01:CR5_NUM_CHANS") {
    field(VAL, "16")
}

record(bo, "PLC:GUNB:TM01:INITIALIZE") {
    field(DTYP, "EtherIP")
    field(OUT, "@PLC_GUNB_TM01 INITIALIZE") 
    field(DESC, "Init")

}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR01_M6_CH4")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_DI[0] B 4")
  field(ZNAM, "Not Open")
  field(ONAM, "Open")
  field(FLNK, "VVMG:LLOK:510:OPENSTS_EPS")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M6_CH4_ALIAS") {
    field(VAL,"VVMG:LLOK:510:OPENSTS_EPS")
    field(PINI,"YES")
}

#PV for user
record(bi, "VVMG:LLOK:510:OPENSTS_EPS") {
  field(DESC, "VVMG Open Status")
  field(INP, "PLC:GUNB:TM01:CR01_M6_CH4 CA MS")
  field(ZNAM, "Not Open")
  field(ONAM, "Open")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR01_M6_CH5")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_DI[0] B 5")
  field(ZNAM, "Not Open")
  field(ONAM, "Open")
  field(FLNK, "VVPG:GUNB:100:OPENSTS_EPS")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M6_CH5_ALIAS") {
    field(VAL,"VVPG:GUNB:100:OPENSTS_EPS")
    field(PINI,"YES")
}

#PV for user
record(bi, "VVPG:GUNB:100:OPENSTS_EPS") {
  field(DESC, "VV01 Open Status")
  field(INP, "PLC:GUNB:TM01:CR01_M6_CH5 CA MS")
  field(ZNAM, "Not Open")
  field(ONAM, "Open")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR01_M6_CH6")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_DI[0] B 6")
  field(ZNAM, "Not Open")
  field(ONAM, "Open")
  field(FLNK, "VVPG:GUNB:941:OPENSTS_EPS")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M6_CH6_ALIAS") {
    field(VAL,"VVPG:GUNB:941:OPENSTS_EPS")
    field(PINI,"YES")
}

#PV for user
record(bi, "VVPG:GUNB:941:OPENSTS_EPS") {
  field(DESC, "VV02 Open Status")
  field(INP, "PLC:GUNB:TM01:CR01_M6_CH6 CA MS")
  field(ZNAM, "Not Open")
  field(ONAM, "Open")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR01_M6_CH7")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_DI[0] B 7")
  field(ZNAM, "Not Closed")
  field(ONAM, "Closed")
  field(FLNK, "VVPG:GUNB:941:CLOSEDSTS_EPS")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M6_CH7_ALIAS") {
    field(VAL,"VVPG:GUNB:941:CLOSEDSTS_EPS")
    field(PINI,"YES")
}

#PV for user
record(bi, "VVPG:GUNB:941:CLOSEDSTS_EPS") {
  field(DESC, "VV02 Closed Status")
  field(INP, "PLC:GUNB:TM01:CR01_M6_CH7 CA MS")
  field(ZNAM, "Not Closed")
  field(ONAM, "Closed")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR01_M6_CH8")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_DI[0] B 8")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "VGEX:GUNB:100:PSTAT_EPS")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M6_CH8_ALIAS") {
    field(VAL,"VGEX:GUNB:100:PSTAT_EPS")
    field(PINI,"YES")
}

#PV for user
record(bi, "VGEX:GUNB:100:PSTAT_EPS") {
  field(DESC, "Gun Pressue Status")
  field(INP, "PLC:GUNB:TM01:CR01_M6_CH8 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR01_M6_CH9")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_DI[0] B 9")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "VGHF:GUNB:519:PSTAT_EPS")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M6_CH9_ALIAS") {
    field(VAL,"VGHF:GUNB:519:PSTAT_EPS")
    field(PINI,"YES")
}

#PV for user
record(bi, "VGHF:GUNB:519:PSTAT_EPS") {
  field(DESC, "Buncher Pressure Sts")
  field(INP, "PLC:GUNB:TM01:CR01_M6_CH9 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M1_CH0")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[0] B 0")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "GUN:GUNB:100:ANDGATE:BYPALL")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M1_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:BYPALL")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:BYPALL") {
  field(DESC, "8 chan AND gate sts")
  field(INP, "PLC:GUNB:TM01:CR05_M1_CH0 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "GUN:GUNB:100:ANDGATE:SUMBPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M1_CH1")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[0] B 1")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "GUN:GUNB:100:ANDGATE:SSA1BYP")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M1_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:SSA1BYP")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:SSA1BYP") {
  field(DESC, "SSA#1 byp AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M1_CH1 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M1_CH2")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[0] B 2")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "GUN:GUNB:100:ANDGATE:SSA2BYP")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M1_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:SSA2BYP")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:SSA2BYP") {
  field(DESC, "SSA#2 byp AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M1_CH2 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M1_CH3")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[0] B 3")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "GUN:GUNB:100:ANDGATE:ARCDET_CIRCSUMBYP")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M1_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:ARCDET_CIRCSUMBYP")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:ARCDET_CIRCSUMBYP") {
  field(DESC, "gun circ byp AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M1_CH3 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M1_CH4")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[0] B 4")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "GUN:GUNB:100:ANDGATE:BCSSUMBYP")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M1_CH4_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:BCSSUMBYP")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:BCSSUMBYP") {
  field(DESC, "BCS byp AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M1_CH4 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M1_CH5")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[0] B 5")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "GUN:GUNB:100:ANDGATE:EPSSUMBYP")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M1_CH5_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:EPSSUMBYP")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:EPSSUMBYP") {
  field(DESC, "EPS byp AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M1_CH5 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M1_CH6")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[0] B 6")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "GUN:GUNB:100:ANDGATE:RFS1BYP")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M1_CH6_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:RFS1BYP")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:RFS1BYP") {
  field(DESC, "RFS1 byp AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M1_CH6 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M1_CH7")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[0] B 7")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "GUN:GUNB:100:ANDGATE:RFS2BYP")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M1_CH7_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:RFS2BYP")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:RFS2BYP") {
  field(DESC, "RFS2 byp AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M1_CH7 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M1_CH8")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[0] B 8")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "GUN:GUNB:100:ANDGATE:PRCBYP")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M1_CH8_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:PRCBYP")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:PRCBYP") {
  field(DESC, "PRC byp AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M1_CH8 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M1_CH9")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[0] B 9")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ANDGATE:SSA1")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M1_CH9_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:SSA1")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:SSA1") {
  field(DESC, "SSA#1 AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M1_CH9 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "GUN:GUNB:100:ANDGATE:SSA1BPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M1_CH10")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[0] B 10")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ANDGATE:SSA2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M1_CH10_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:SSA2")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:SSA2") {
  field(DESC, "SSA#2 AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M1_CH10 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "GUN:GUNB:100:ANDGATE:SSA2BPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M1_CH11")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[0] B 11")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ANDGATE:ARCDET_CIRCSUM")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M1_CH11_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:ARCDET_CIRCSUM")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:ARCDET_CIRCSUM") {
  field(DESC, "gun cir sts AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M1_CH11 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "GUN:GUNB:100:ANDGATE:ARCDET_CIRCSUMBPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M1_CH12")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[0] B 12")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ANDGATE:BCSSUM")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M1_CH12_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:BCSSUM")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:BCSSUM") {
  field(DESC, "BCS sts AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M1_CH12 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "GUN:GUNB:100:ANDGATE:BCSSUMBPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M1_CH13")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[0] B 13")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ANDGATE:EPSSUM")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M1_CH13_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:EPSSUM")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:EPSSUM") {
  field(DESC, "EPS sts AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M1_CH13 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "GUN:GUNB:100:ANDGATE:EPSSUMBPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M1_CH14")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[0] B 14")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ANDGATE:RFS1")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M1_CH14_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:RFS1")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:RFS1") {
  field(DESC, "RFS1 sts AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M1_CH14 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "GUN:GUNB:100:ANDGATE:RFS1BPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M1_CH15")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[0] B 15")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ANDGATE:RFS2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M1_CH15_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:RFS2")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:RFS2") {
  field(DESC, "RFS2 sts AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M1_CH15 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "GUN:GUNB:100:ANDGATE:RFS2BPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M2_CH0")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[1] B 0")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ANDGATE:PRC")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M2_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:PRC")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:PRC") {
  field(DESC, "PRC sts AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M2_CH0 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "GUN:GUNB:100:ANDGATE:PRCBPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M2_CH3")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[1] B 3")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ANDGATE:ENABLESTAT")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M2_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:ENABLESTAT")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:ENABLESTAT") {
  field(DESC, "TTL sts AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M2_CH3 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M2_CH4")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[1] B 4")
  field(ZNAM, "OK")
  field(ONAM, "Fault")
  field(FLNK, "GUN:GUNB:100:ANDGATE:DISABLESTAT")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M2_CH4_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANDGATE:DISABLESTAT")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ANDGATE:DISABLESTAT") {
  field(DESC, "NIM sts AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M2_CH4 CA MS")
  field(ZNAM, "OK")
  field(ONAM, "Fault")
  field(ZSV, "NO_ALARM")
  field(FLNK, "")
  field(OSV, "MAJOR")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M2_CH6")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[1] B 6")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ARCDET_CAV1")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M2_CH6_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CAV1")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ARCDET_CAV1") {
  field(DESC, "arc det gun cav1 sts")
  field(INP, "PLC:GUNB:TM01:CR05_M2_CH6 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M2_CH7")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[1] B 7")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ARCDET_CH2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M2_CH7_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CH2")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ARCDET_CH2") {
  field(DESC, "spare ch2 arcdet")
  field(INP, "PLC:GUNB:TM01:CR05_M2_CH7 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M2_CH8")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[1] B 8")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ARCDET_WNDW1")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M2_CH8_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_WNDW1")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ARCDET_WNDW1") {
  field(DESC, "arc det rf wdw1 sts")
  field(INP, "PLC:GUNB:TM01:CR05_M2_CH8 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M2_CH9")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[1] B 9")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ARCDET_WNDW2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M2_CH9_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_WNDW2")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ARCDET_WNDW2") {
  field(DESC, "arc det rf wdw2 sts")
  field(INP, "PLC:GUNB:TM01:CR05_M2_CH9 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M2_CH10")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[1] B 10")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "ACCL:GUNB:455:ARCDET_CAV1")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M2_CH10_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ARCDET_CAV1")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ARCDET_CAV1") {
  field(DESC, "arc det bch cav1 sts")
  field(INP, "PLC:GUNB:TM01:CR05_M2_CH10 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M2_CH11")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[1] B 11")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "ACCL:GUNB:455:ARCDET_CAV2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M2_CH11_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ARCDET_CAV2")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ARCDET_CAV2") {
  field(DESC, "arc det bch cav2 sts")
  field(INP, "PLC:GUNB:TM01:CR05_M2_CH11 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M2_CH12")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[1] B 12")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ARCDET_CH7")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M2_CH12_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CH7")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ARCDET_CH7") {
  field(DESC, "spare ch7 arcdet")
  field(INP, "PLC:GUNB:TM01:CR05_M2_CH12 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M2_CH13")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[1] B 13")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ARCDET_CH8")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M2_CH13_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CH8")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ARCDET_CH8") {
  field(DESC, "spare ch8 arcdet")
  field(INP, "PLC:GUNB:TM01:CR05_M2_CH13 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M3_CH0")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[2] B 0")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:BYPALL")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M3_CH0_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:BYPALL")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:BYPALL") {
  field(DESC, "8 chan sts AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M3_CH0 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SUMBPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M3_CH1")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[2] B 1")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SSA1BYP")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M3_CH1_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:SSA1BYP")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:SSA1BYP") {
  field(DESC, "SSA#1 byp AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M3_CH1 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M3_CH2")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[2] B 2")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SSA2BYP")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M3_CH2_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:SSA2BYP")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:SSA2BYP") {
  field(DESC, "SSA#2 byp AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M3_CH2 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M3_CH3")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[2] B 3")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SSA3BYP")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M3_CH3_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:SSA3BYP")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:SSA3BYP") {
  field(DESC, "SSA#3 byp AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M3_CH3 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M3_CH4")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[2] B 4")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SSA4BYP")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M3_CH4_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:SSA4BYP")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:SSA4BYP") {
  field(DESC, "SSA#4 byp AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M3_CH4 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M3_CH5")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[2] B 5")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:EPSSUMBYP")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M3_CH5_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:EPSSUMBYP")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:EPSSUMBYP") {
  field(DESC, "EPS byp AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M3_CH5 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M3_CH6")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[2] B 6")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:RFS1BYP")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M3_CH6_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:RFS1BYP")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:RFS1BYP") {
  field(DESC, "RFS1 byp AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M3_CH6 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M3_CH7")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[2] B 7")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:RFS2BYP")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M3_CH7_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:RFS2BYP")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:RFS2BYP") {
  field(DESC, "RFS2 byp AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M3_CH7 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M3_CH8")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[2] B 8")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:PRCBYP")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M3_CH8_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:PRCBYP")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:PRCBYP") {
  field(DESC, "PRC byp AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M3_CH8 CA MS")
  field(ZNAM, "Bypass")
  field(ONAM, "No Bypass")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M3_CH9")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[2] B 9")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SSA1")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M3_CH9_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:SSA1")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:SSA1") {
  field(DESC, "SSA#1 AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M3_CH9 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SSA1BPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M3_CH10")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[2] B 10")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SSA2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M3_CH10_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:SSA2")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:SSA2") {
  field(DESC, "SSA#2 AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M3_CH10 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SSA2BPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M3_CH11")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[2] B 11")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SSA3")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M3_CH11_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:SSA3")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:SSA3") {
  field(DESC, "SSA#3 AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M3_CH11 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SSA3BPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M3_CH12")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[2] B 12")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SSA4")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M3_CH12_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:SSA4")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:SSA4") {
  field(DESC, "SSA#4 AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M3_CH12 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SSA4BPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M3_CH13")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[2] B 13")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:EPSSUM")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M3_CH13_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:EPSSUM")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:EPSSUM") {
  field(DESC, "EPS sts AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M3_CH13 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:EPSSUMBPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M3_CH14")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[2] B 14")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:RFS1")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M3_CH14_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:RFS1")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:RFS1") {
  field(DESC, "RFS1 sts AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M3_CH14 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:RFS1BPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M3_CH15")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[2] B 15")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:RFS2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M3_CH15_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:RFS2")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:RFS2") {
  field(DESC, "RFS2 sts AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M3_CH15 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:RFS2BPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M4_CH0")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[3] B 0")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:PRC")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M4_CH0_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:PRC")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:PRC") {
  field(DESC, "PRC sts AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M4_CH0 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:PRCBPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M4_CH3")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[3] B 3")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:ENABLESTAT")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M4_CH3_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:ENABLESTAT")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:ENABLESTAT") {
  field(DESC, "TTL IN sts AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M4_CH3 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M4_CH4")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[3] B 4")
  field(ZNAM, "OK")
  field(ONAM, "Fault")
  field(FLNK, "ACCL:GUNB:455:ANDGATE:DISABLESTAT")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M4_CH4_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ANDGATE:DISABLESTAT")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ANDGATE:DISABLESTAT") {
  field(DESC, "NIM IN sts AND gate")
  field(INP, "PLC:GUNB:TM01:CR05_M4_CH4 CA MS")
  field(ZNAM, "OK")
  field(ONAM, "Fault")
  field(ZSV, "NO_ALARM")
  field(FLNK, "")
  field(OSV, "MAJOR")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M4_CH6")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[3] B 6")
  field(ZNAM, "Auto")
  field(ONAM, "Manual")
  field(FLNK, "GUN:GUNB:100:CIRC1MODE")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M4_CH6_ALIAS") {
    field(VAL,"GUN:GUNB:100:CIRC1MODE")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:CIRC1MODE") {
  field(DESC, "gun circ1 ctl")
  field(INP, "PLC:GUNB:TM01:CR05_M4_CH6 CA MS")
  field(ZNAM, "Auto")
  field(ONAM, "Manual")
  field(ZSV, "NO_ALARM")
  field(FLNK, "")
  field(OSV, "MINOR")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M4_CH7")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[3] B 7")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:CIRC1STAT")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M4_CH7_ALIAS") {
    field(VAL,"GUN:GUNB:100:CIRC1STAT")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:CIRC1STAT") {
  field(DESC, "gun circ1 sts")
  field(INP, "PLC:GUNB:TM01:CR05_M4_CH7 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M4_CH8")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[3] B 8")
  field(ZNAM, "Auto")
  field(ONAM, "Manual")
  field(FLNK, "GUN:GUNB:100:CIRC2MODE")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M4_CH8_ALIAS") {
    field(VAL,"GUN:GUNB:100:CIRC2MODE")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:CIRC2MODE") {
  field(DESC, "gun circ2 ctl")
  field(INP, "PLC:GUNB:TM01:CR05_M4_CH8 CA MS")
  field(ZNAM, "Auto")
  field(ONAM, "Manual")
  field(ZSV, "NO_ALARM")
  field(FLNK, "")
  field(OSV, "MINOR")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M4_CH9")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[3] B 9")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:CIRC2STAT")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M4_CH9_ALIAS") {
    field(VAL,"GUN:GUNB:100:CIRC2STAT")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:CIRC2STAT") {
  field(DESC, "gun circ2 sts")
  field(INP, "PLC:GUNB:TM01:CR05_M4_CH9 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M4_CH10")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[3] B 10")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ARCDET_CIRC1DET1")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M4_CH10_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CIRC1DET1")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ARCDET_CIRC1DET1") {
  field(DESC, "cir1 arcdet1 sts")
  field(INP, "PLC:GUNB:TM01:CR05_M4_CH10 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "GUN:GUNB:100:ARCDET_CIRC1DET1BPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M4_CH11")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[3] B 11")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ARCDET_CIRC1DET2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M4_CH11_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CIRC1DET2")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ARCDET_CIRC1DET2") {
  field(DESC, "cir1 arcdet2 sts")
  field(INP, "PLC:GUNB:TM01:CR05_M4_CH11 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "GUN:GUNB:100:ARCDET_CIRC1DET2BPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M4_CH12")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[3] B 12")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ARCDET_CIRC2DET1")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M4_CH12_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CIRC2DET1")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ARCDET_CIRC2DET1") {
  field(DESC, "cir2 arcdet1 sts")
  field(INP, "PLC:GUNB:TM01:CR05_M4_CH12 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "GUN:GUNB:100:ARCDET_CIRC2DET1BPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M4_CH13")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[3] B 13")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ARCDET_CIRC2DET2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M4_CH13_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CIRC2DET2")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ARCDET_CIRC2DET2") {
  field(DESC, "cir2 arcdet2 sts")
  field(INP, "PLC:GUNB:TM01:CR05_M4_CH13 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "GUN:GUNB:100:ARCDET_CIRC2DET2BPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M4_CH14")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[3] B 14")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ARCDET_CIRC1SUM")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M4_CH14_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CIRC1SUM")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ARCDET_CIRC1SUM") {
  field(DESC, "cir1 all ch sts")
  field(INP, "PLC:GUNB:TM01:CR05_M4_CH14 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M4_CH15")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[3] B 15")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ARCDET_CIRC2SUM")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M4_CH15_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CIRC2SUM")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ARCDET_CIRC2SUM") {
  field(DESC, "cir2 all ch sts")
  field(INP, "PLC:GUNB:TM01:CR05_M4_CH15 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M5_CH2")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[4] B 2")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:INTLK:BCSCHA")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M5_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:INTLK:BCSCHA")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:INTLK:BCSCHA") {
  field(DESC, "bcs a sts")
  field(INP, "PLC:GUNB:TM01:CR05_M5_CH2 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "GUN:GUNB:100:INTLK:BCSCHABPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M5_CH3")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[4] B 3")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:INTLK:BCSCHB")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M5_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:INTLK:BCSCHB")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:INTLK:BCSCHB") {
  field(DESC, "bcs b sts")
  field(INP, "PLC:GUNB:TM01:CR05_M5_CH3 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "GUN:GUNB:100:INTLK:BCSCHBBPCALC")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M5_CH4")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[4] B 4")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ARCDETSUM")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M5_CH4_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDETSUM")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ARCDETSUM") {
  field(DESC, "arc det gun ch sts")
  field(INP, "PLC:GUNB:TM01:CR05_M5_CH4 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M5_CH5")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[4] B 5")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "ACCL:GUNB:455:ARCDETSUM")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M5_CH5_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ARCDETSUM")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:ARCDETSUM") {
  field(DESC, "arc det bch ch sts")
  field(INP, "PLC:GUNB:TM01:CR05_M5_CH5 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M5_CH6")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[4] B 6")
  field(ZNAM, "OK")
  field(ONAM, "Fault")
  field(FLNK, "GUN:GUNB:100:ARCDETCHASPWR")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M5_CH6_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDETCHASPWR")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ARCDETCHASPWR") {
  field(DESC, "arcdet chas power sts")
  field(INP, "PLC:GUNB:TM01:CR05_M5_CH6 CA MS")
  field(ZNAM, "OK")
  field(ONAM, "Fault")
  field(ZSV, "NO_ALARM")
  field(FLNK, "")
  field(OSV, "MAJOR")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M5_CH7")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[4] B 7")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:ARCDET_CABLESTAT")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M5_CH7_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CABLESTAT")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:ARCDET_CABLESTAT") {
  field(DESC, "arcdet cable sts")
  field(INP, "PLC:GUNB:TM01:CR05_M5_CH7 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M5_CH8")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[4] B 8")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:INTLK:BCSSUM")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M5_CH8_ALIAS") {
    field(VAL,"GUN:GUNB:100:INTLK:BCSSUM")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:INTLK:BCSSUM") {
  field(DESC, "bcs a and b status")
  field(INP, "PLC:GUNB:TM01:CR05_M5_CH8 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M5_CH9")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[4] B 9")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "GUN:GUNB:100:INTLK:RFENABLE")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M5_CH9_ALIAS") {
    field(VAL,"GUN:GUNB:100:INTLK:RFENABLE")
    field(PINI,"YES")
}

#PV for user
record(bi, "GUN:GUNB:100:INTLK:RFENABLE") {
  field(DESC, "rf sts 9 termsANDGATE")
  field(INP, "PLC:GUNB:TM01:CR05_M5_CH9 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control each channel from a 
# 5069-IB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array instance in which data is read
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#        FLNK  FLNK to the PV that needs to be processed after ALIAS PV
#==============================================================================
record(bi, "PLC:GUNB:TM01:CR05_M5_CH10")
{
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR05_DI[4] B 10")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(FLNK, "ACCL:GUNB:455:INTLK:RFENABLE")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M5_CH10_ALIAS") {
    field(VAL,"ACCL:GUNB:455:INTLK:RFENABLE")
    field(PINI,"YES")
}

#PV for user
record(bi, "ACCL:GUNB:455:INTLK:RFENABLE") {
  field(DESC, "rf sts 9 termsANDGATE")
  field(INP, "PLC:GUNB:TM01:CR05_M5_CH10 CA MS")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(FLNK, "")
  field(OSV, "NO_ALARM")
  field(PINI,"YES")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M6_CH0_CMD") {
  field(DESC, "arc det gun cav 1 test")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[0] B 0")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M6_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CAV1TEST")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:ARCDET_CAV1TEST") {
  field(DESC, "arc det gun cav 1 test")
  field(OUT, "PLC:GUNB:TM01:CR05_M6_CH0_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Test")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M6_CH0_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M6_CH1_CMD") {
  field(DESC, "arc det gun cav 1 reset")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[0] B 1")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M6_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CAV1RESET")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:ARCDET_CAV1RESET") {
  field(DESC, "arc det gun cav 1 reset")
  field(OUT, "PLC:GUNB:TM01:CR05_M6_CH1_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Reset")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M6_CH1_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M6_CH2_CMD") {
  field(DESC, "arc det ch 2 test")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[0] B 2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M6_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CH2TEST")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:ARCDET_CH2TEST") {
  field(DESC, "arc det ch 2 test")
  field(OUT, "PLC:GUNB:TM01:CR05_M6_CH2_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Test")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M6_CH2_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M6_CH3_CMD") {
  field(DESC, "arc det ch 2 reset")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[0] B 3")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M6_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CH2RESET")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:ARCDET_CH2RESET") {
  field(DESC, "arc det ch 2 reset")
  field(OUT, "PLC:GUNB:TM01:CR05_M6_CH3_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Reset")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M6_CH3_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M6_CH4_CMD") {
  field(DESC, "arc det rf wdw 1 test")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[0] B 4")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M6_CH4_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_WNDW1TEST")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:ARCDET_WNDW1TEST") {
  field(DESC, "arc det rf wdw 1 test")
  field(OUT, "PLC:GUNB:TM01:CR05_M6_CH4_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Test")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M6_CH4_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M6_CH5_CMD") {
  field(DESC, "arc det rf wdw 1 reset")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[0] B 5")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M6_CH5_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_WNDW1RESET")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:ARCDET_WNDW1RESET") {
  field(DESC, "arc det rf wdw 1 reset")
  field(OUT, "PLC:GUNB:TM01:CR05_M6_CH5_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Reset")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M6_CH5_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M6_CH6_CMD") {
  field(DESC, "arc det rf wdw 2 test")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[0] B 6")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M6_CH6_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_WNDW2TEST")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:ARCDET_WNDW2TEST") {
  field(DESC, "arc det rf wdw 2 test")
  field(OUT, "PLC:GUNB:TM01:CR05_M6_CH6_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Test")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M6_CH6_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M6_CH7_CMD") {
  field(DESC, "arc det rf wdw 2 reset")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[0] B 7")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M6_CH7_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_WNDW2RESET")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:ARCDET_WNDW2RESET") {
  field(DESC, "arc det rf wdw 2 reset")
  field(OUT, "PLC:GUNB:TM01:CR05_M6_CH7_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Reset")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M6_CH7_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M6_CH8_CMD") {
  field(DESC, "arc det bch cav 1 test")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[0] B 8")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M6_CH8_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ARCDET_CAV1TEST")
    field(PINI,"YES")
}

#PV for user
record(bo, "ACCL:GUNB:455:ARCDET_CAV1TEST") {
  field(DESC, "arc det bch cav 1 test")
  field(OUT, "PLC:GUNB:TM01:CR05_M6_CH8_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Test")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M6_CH8_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M6_CH9_CMD") {
  field(DESC, "arc det bch cav 1 reset")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[0] B 9")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M6_CH9_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ARCDET_CAV1RESET")
    field(PINI,"YES")
}

#PV for user
record(bo, "ACCL:GUNB:455:ARCDET_CAV1RESET") {
  field(DESC, "arc det bch cav 1 reset")
  field(OUT, "PLC:GUNB:TM01:CR05_M6_CH9_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Reset")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M6_CH9_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M6_CH10_CMD") {
  field(DESC, "arc det bch cav 2 test")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[0] B 10")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M6_CH10_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ARCDET_CAV2TEST")
    field(PINI,"YES")
}

#PV for user
record(bo, "ACCL:GUNB:455:ARCDET_CAV2TEST") {
  field(DESC, "arc det bch cav 2 test")
  field(OUT, "PLC:GUNB:TM01:CR05_M6_CH10_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Test")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M6_CH10_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M6_CH11_CMD") {
  field(DESC, "arc det bch cav 2 reset")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[0] B 11")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M6_CH11_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ARCDET_CAV2RESET")
    field(PINI,"YES")
}

#PV for user
record(bo, "ACCL:GUNB:455:ARCDET_CAV2RESET") {
  field(DESC, "arc det bch cav 2 reset")
  field(OUT, "PLC:GUNB:TM01:CR05_M6_CH11_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Reset")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M6_CH11_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M6_CH12_CMD") {
  field(DESC, "spare")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[0] B 12")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M6_CH12_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CH7TEST")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:ARCDET_CH7TEST") {
  field(DESC, "spare")
  field(OUT, "PLC:GUNB:TM01:CR05_M6_CH12_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Test")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M6_CH12_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M6_CH13_CMD") {
  field(DESC, "spare")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[0] B 13")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M6_CH13_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CH7RESET")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:ARCDET_CH7RESET") {
  field(DESC, "spare")
  field(OUT, "PLC:GUNB:TM01:CR05_M6_CH13_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Reset")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M6_CH13_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M6_CH14_CMD") {
  field(DESC, "spare")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[0] B 14")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M6_CH14_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CH8TEST")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:ARCDET_CH8TEST") {
  field(DESC, "spare")
  field(OUT, "PLC:GUNB:TM01:CR05_M6_CH14_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Test")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M6_CH14_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M6_CH15_CMD") {
  field(DESC, "spare")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[0] B 15")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M6_CH15_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CH8RESET")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:ARCDET_CH8RESET") {
  field(DESC, "spare")
  field(OUT, "PLC:GUNB:TM01:CR05_M6_CH15_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Reset")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M6_CH15_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M7_CH0_CMD") {
  field(DESC, "eps enable")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[1] B 0")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M7_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:INTLK:EPSENABLE")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:INTLK:EPSENABLE") {
  field(DESC, "eps enable")
  field(OUT, "PLC:GUNB:TM01:CR05_M7_CH0_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Enable")
  field(ONAM, "Disable")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
  field(FLNK, "PLC:GUNB:TM01:CR05_M7_CH0_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M7_CH1_CMD") {
  field(DESC, "eps enable")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[1] B 1")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M7_CH1_ALIAS") {
    field(VAL,"ACCL:GUNB:455:INTLK:EPSENABLE")
    field(PINI,"YES")
}

#PV for user
record(bo, "ACCL:GUNB:455:INTLK:EPSENABLE") {
  field(DESC, "eps enable")
  field(OUT, "PLC:GUNB:TM01:CR05_M7_CH1_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Enable")
  field(ONAM, "Disable")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
  field(FLNK, "PLC:GUNB:TM01:CR05_M7_CH1_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M7_CH2_CMD") {
  field(DESC, "Circ 1 test")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[1] B 2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M7_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CIRC1TEST")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:ARCDET_CIRC1TEST") {
  field(DESC, "Circ 1 test")
  field(OUT, "PLC:GUNB:TM01:CR05_M7_CH2_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Test")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M7_CH2_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M7_CH3_CMD") {
  field(DESC, "Circ 1 reset")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[1] B 3")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M7_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CIRC1RESET")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:ARCDET_CIRC1RESET") {
  field(DESC, "Circ 1 reset")
  field(OUT, "PLC:GUNB:TM01:CR05_M7_CH3_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Reset")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M7_CH3_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M7_CH4_CMD") {
  field(DESC, "Circ 2 test")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[1] B 4")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M7_CH4_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CIRC2TEST")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:ARCDET_CIRC2TEST") {
  field(DESC, "Circ 2 test")
  field(OUT, "PLC:GUNB:TM01:CR05_M7_CH4_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Test")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M7_CH4_CMD")
}
#
# This template is used to monitor and control data from a 
# 5069-OB16 module that monitors a EPS for Gun and buncher interlock
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ARRAY Array in which data is written
#        INDEX index of the array from PLC where the the data will be writtento
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        ZNAM  Zero name
#        ONAM  One name
#        ZSV   Zero severity
#        OSV   One severity
#==============================================================================


#Controls the digital output channels 
record(bo, "PLC:GUNB:TM01:CR05_M7_CH5_CMD") {
  field(DESC, "Circ 2 reset")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 CR05_DO[1] B 5")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR05_M7_CH5_ALIAS") {
    field(VAL,"GUN:GUNB:100:ARCDET_CIRC2RESET")
    field(PINI,"YES")
}

#PV for user
record(bo, "GUN:GUNB:100:ARCDET_CIRC2RESET") {
  field(DESC, "Circ 2 reset")
  field(OUT, "PLC:GUNB:TM01:CR05_M7_CH5_CMD NPP MSI")
  info(autosaveFields,"VAL")
  field(ZNAM, "Standby")
  field(ONAM, "Reset")
  field(ZSV, "NO_ALARM")
  field(OSV, "NO_ALARM")
  field(FLNK, "PLC:GUNB:TM01:CR05_M7_CH5_CMD")
}
#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "GUN:GUNB:100:ANDGATE:SUMBPCALC") {
  field(FLNK, "GUN:GUNB:100:ANDGATE:SUMOKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "GUN:GUNB:100:ANDGATE:SUM CA MS")
  field(INPB, "GUN:GUNB:100:ANDGATE:BYPALL CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "GUN:GUNB:100:ANDGATE:SUMOKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "GUN:GUNB:100:ANDGATE:SUMBPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "GUN:GUNB:100:ANDGATE:SSA1BPCALC") {
  field(FLNK, "GUN:GUNB:100:ANDGATE:SSA1OKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "GUN:GUNB:100:ANDGATE:SSA1 CA MS")
  field(INPB, "GUN:GUNB:100:ANDGATE:SSA1BYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "GUN:GUNB:100:ANDGATE:SSA1OKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "GUN:GUNB:100:ANDGATE:SSA1BPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "GUN:GUNB:100:ANDGATE:SSA2BPCALC") {
  field(FLNK, "GUN:GUNB:100:ANDGATE:SSA2OKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "GUN:GUNB:100:ANDGATE:SSA2 CA MS")
  field(INPB, "GUN:GUNB:100:ANDGATE:SSA2BYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "GUN:GUNB:100:ANDGATE:SSA2OKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "GUN:GUNB:100:ANDGATE:SSA2BPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "GUN:GUNB:100:ANDGATE:ARCDET_CIRCSUMBPCALC") {
  field(FLNK, "GUN:GUNB:100:ANDGATE:ARCDET_CIRCSUMOKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "GUN:GUNB:100:ANDGATE:ARCDET_CIRCSUM CA MS")
  field(INPB, "GUN:GUNB:100:ANDGATE:ARCDET_CIRCSUMBYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "GUN:GUNB:100:ANDGATE:ARCDET_CIRCSUMOKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "GUN:GUNB:100:ANDGATE:ARCDET_CIRCSUMBPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "GUN:GUNB:100:ANDGATE:BCSSUMBPCALC") {
  field(FLNK, "GUN:GUNB:100:ANDGATE:BCSSUMOKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "GUN:GUNB:100:ANDGATE:BCSSUM CA MS")
  field(INPB, "GUN:GUNB:100:ANDGATE:BCSSUMBYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "GUN:GUNB:100:ANDGATE:BCSSUMOKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "GUN:GUNB:100:ANDGATE:BCSSUMBPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "GUN:GUNB:100:ANDGATE:EPSSUMBPCALC") {
  field(FLNK, "GUN:GUNB:100:ANDGATE:EPSSUMOKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "GUN:GUNB:100:ANDGATE:EPSSUM CA MS")
  field(INPB, "GUN:GUNB:100:ANDGATE:EPSSUMBYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "GUN:GUNB:100:ANDGATE:EPSSUMOKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "GUN:GUNB:100:ANDGATE:EPSSUMBPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "GUN:GUNB:100:ANDGATE:RFS1BPCALC") {
  field(FLNK, "GUN:GUNB:100:ANDGATE:RFS1OKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "GUN:GUNB:100:ANDGATE:RFS1 CA MS")
  field(INPB, "GUN:GUNB:100:ANDGATE:RFS1BYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "GUN:GUNB:100:ANDGATE:RFS1OKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "GUN:GUNB:100:ANDGATE:RFS1BPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "GUN:GUNB:100:ANDGATE:RFS2BPCALC") {
  field(FLNK, "GUN:GUNB:100:ANDGATE:RFS2OKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "GUN:GUNB:100:ANDGATE:RFS2 CA MS")
  field(INPB, "GUN:GUNB:100:ANDGATE:RFS2BYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "GUN:GUNB:100:ANDGATE:RFS2OKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "GUN:GUNB:100:ANDGATE:RFS2BPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "GUN:GUNB:100:ANDGATE:PRCBPCALC") {
  field(FLNK, "GUN:GUNB:100:ANDGATE:PRCOKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "GUN:GUNB:100:ANDGATE:PRC CA MS")
  field(INPB, "GUN:GUNB:100:ANDGATE:PRCBYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "GUN:GUNB:100:ANDGATE:PRCOKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "GUN:GUNB:100:ANDGATE:PRCBPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "ACCL:GUNB:455:ANDGATE:SUMBPCALC") {
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SUMOKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "ACCL:GUNB:455:ANDGATE:SUM CA MS")
  field(INPB, "ACCL:GUNB:455:ANDGATE:BYPALL CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "ACCL:GUNB:455:ANDGATE:SUMOKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "ACCL:GUNB:455:ANDGATE:SUMBPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "ACCL:GUNB:455:ANDGATE:SSA1BPCALC") {
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SSA1OKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "ACCL:GUNB:455:ANDGATE:SSA1 CA MS")
  field(INPB, "ACCL:GUNB:455:ANDGATE:SSA1BYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "ACCL:GUNB:455:ANDGATE:SSA1OKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "ACCL:GUNB:455:ANDGATE:SSA1BPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "ACCL:GUNB:455:ANDGATE:SSA2BPCALC") {
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SSA2OKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "ACCL:GUNB:455:ANDGATE:SSA2 CA MS")
  field(INPB, "ACCL:GUNB:455:ANDGATE:SSA2BYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "ACCL:GUNB:455:ANDGATE:SSA2OKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "ACCL:GUNB:455:ANDGATE:SSA2BPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "ACCL:GUNB:455:ANDGATE:SSA3BPCALC") {
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SSA3OKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "ACCL:GUNB:455:ANDGATE:SSA3 CA MS")
  field(INPB, "ACCL:GUNB:455:ANDGATE:SSA3BYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "ACCL:GUNB:455:ANDGATE:SSA3OKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "ACCL:GUNB:455:ANDGATE:SSA3BPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "ACCL:GUNB:455:ANDGATE:SSA4BPCALC") {
  field(FLNK, "ACCL:GUNB:455:ANDGATE:SSA4OKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "ACCL:GUNB:455:ANDGATE:SSA4 CA MS")
  field(INPB, "ACCL:GUNB:455:ANDGATE:SSA4BYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "ACCL:GUNB:455:ANDGATE:SSA4OKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "ACCL:GUNB:455:ANDGATE:SSA4BPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "ACCL:GUNB:455:ANDGATE:EPSSUMBPCALC") {
  field(FLNK, "ACCL:GUNB:455:ANDGATE:EPSSUMOKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "ACCL:GUNB:455:ANDGATE:EPSSUM CA MS")
  field(INPB, "ACCL:GUNB:455:ANDGATE:EPSSUMBYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "ACCL:GUNB:455:ANDGATE:EPSSUMOKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "ACCL:GUNB:455:ANDGATE:EPSSUMBPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "ACCL:GUNB:455:ANDGATE:RFS1BPCALC") {
  field(FLNK, "ACCL:GUNB:455:ANDGATE:RFS1OKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "ACCL:GUNB:455:ANDGATE:RFS1 CA MS")
  field(INPB, "ACCL:GUNB:455:ANDGATE:RFS1BYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "ACCL:GUNB:455:ANDGATE:RFS1OKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "ACCL:GUNB:455:ANDGATE:RFS1BPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "ACCL:GUNB:455:ANDGATE:RFS2BPCALC") {
  field(FLNK, "ACCL:GUNB:455:ANDGATE:RFS2OKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "ACCL:GUNB:455:ANDGATE:RFS2 CA MS")
  field(INPB, "ACCL:GUNB:455:ANDGATE:RFS2BYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "ACCL:GUNB:455:ANDGATE:RFS2OKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "ACCL:GUNB:455:ANDGATE:RFS2BPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "ACCL:GUNB:455:ANDGATE:PRCBPCALC") {
  field(FLNK, "ACCL:GUNB:455:ANDGATE:PRCOKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "ACCL:GUNB:455:ANDGATE:PRC CA MS")
  field(INPB, "ACCL:GUNB:455:ANDGATE:PRCBYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "ACCL:GUNB:455:ANDGATE:PRCOKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "ACCL:GUNB:455:ANDGATE:PRCBPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "GUN:GUNB:100:ARCDET_CIRC1DET1BPCALC") {
  field(FLNK, "GUN:GUNB:100:ARCDET_CIRC1DET1OKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "GUN:GUNB:100:ARCDET_CIRC1DET1 CA MS")
  field(INPB, "GUN:GUNB:100:ARCDET_CIRC1DET1BYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "GUN:GUNB:100:ARCDET_CIRC1DET1OKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "GUN:GUNB:100:ARCDET_CIRC1DET1BPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "GUN:GUNB:100:ARCDET_CIRC1DET2BPCALC") {
  field(FLNK, "GUN:GUNB:100:ARCDET_CIRC1DET2OKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "GUN:GUNB:100:ARCDET_CIRC1DET2 CA MS")
  field(INPB, "GUN:GUNB:100:ARCDET_CIRC1DET2BYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "GUN:GUNB:100:ARCDET_CIRC1DET2OKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "GUN:GUNB:100:ARCDET_CIRC1DET2BPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "GUN:GUNB:100:ARCDET_CIRC2DET1BPCALC") {
  field(FLNK, "GUN:GUNB:100:ARCDET_CIRC2DET1OKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "GUN:GUNB:100:ARCDET_CIRC2DET1 CA MS")
  field(INPB, "GUN:GUNB:100:ARCDET_CIRC2DET1BYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "GUN:GUNB:100:ARCDET_CIRC2DET1OKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "GUN:GUNB:100:ARCDET_CIRC2DET1BPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "GUN:GUNB:100:ARCDET_CIRC2DET2BPCALC") {
  field(FLNK, "GUN:GUNB:100:ARCDET_CIRC2DET2OKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "GUN:GUNB:100:ARCDET_CIRC2DET2 CA MS")
  field(INPB, "GUN:GUNB:100:ARCDET_CIRC2DET2BYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "GUN:GUNB:100:ARCDET_CIRC2DET2OKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "GUN:GUNB:100:ARCDET_CIRC2DET2BPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "GUN:GUNB:100:INTLK:BCSCHABPCALC") {
  field(FLNK, "GUN:GUNB:100:INTLK:BCSCHAOKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "GUN:GUNB:100:INTLK:BCSCHA CA MS")
  field(INPB, "GUN:GUNB:100:INTLK:BCSCHABYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "GUN:GUNB:100:INTLK:BCSCHAOKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "GUN:GUNB:100:INTLK:BCSCHABPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#===========================================================================
#
# Abs:  Database template for RF Gun Interlocks
#
# Name:  rf_interlock.template
#
# Macros:
#       DEVICE - The PV Name prefix 
#==============================================================================

record(calc, "GUN:GUNB:100:INTLK:BCSCHBBPCALC") {
  field(FLNK, "GUN:GUNB:100:INTLK:BCSCHBOKORBP")
  field(CALC, "B=0?1:A")
  field(INPA, "GUN:GUNB:100:INTLK:BCSCHB CA MS")
  field(INPB, "GUN:GUNB:100:INTLK:BCSCHBBYP CA MS")
  field(ASG, "Internal")
  info(autosaveFields,"CALC")
}

record(bi, "GUN:GUNB:100:INTLK:BCSCHBOKORBP") {
  field(DESC, "latched or bypassed status")
  field(INP, "GUN:GUNB:100:INTLK:BCSCHBBPCALC.VAL")
  field(ZNAM, "Fault")
  field(ONAM, "OK")
  field(ZSV, "MAJOR")
  field(OSV, "NO_ALARM")
  field(PINI, "YES")
}

#Alarm Bypass 
record(bo, "SOLN:GUNB:212:EPS_TEMPSUMBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 EPSSigBypReq[0] B 0")
  info(autosaveFields,"VAL")
}

record(bi, "SOLN:GUNB:212:EPS_TEMPSUMBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 EPSSigBypStat[0] B 0")
  field(ONAM, "BYPASSED")
  field(ZNAM, "NOT BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#Alarm Bypass 
record(bo, "SOLN:GUNB:823:EPS_TEMPSUMBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 EPSSigBypReq[0] B 1")
  info(autosaveFields,"VAL")
}

record(bi, "SOLN:GUNB:823:EPS_TEMPSUMBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 EPSSigBypStat[0] B 1")
  field(ONAM, "BYPASSED")
  field(ZNAM, "NOT BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#Alarm Bypass 
record(bo, "GUN:GUNB:100:EPS_BDYTEMPSUMBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 EPSSigBypReq[0] B 3")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:EPS_BDYTEMPSUMBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 EPSSigBypStat[0] B 3")
  field(ONAM, "BYPASSED")
  field(ZNAM, "NOT BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#Alarm Bypass 
record(bo, "GUN:GUNB:100:EPS_WGTEMPSUMBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 EPSSigBypReq[0] B 4")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:EPS_WGTEMPSUMBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 EPSSigBypStat[0] B 4")
  field(ONAM, "BYPASSED")
  field(ZNAM, "NOT BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#Alarm Bypass 
record(bo, "GUN:GUNB:100:EPS_FLOWSUMBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 EPSSigBypReq[0] B 5")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:EPS_FLOWSUMBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 EPSSigBypStat[0] B 5")
  field(ONAM, "BYPASSED")
  field(ZNAM, "NOT BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#Alarm Bypass 
record(bo, "MOVR:GUNB:753:EPS_TEMPSUMBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 EPSSigBypReq[0] B 7")
  info(autosaveFields,"VAL")
}

record(bi, "MOVR:GUNB:753:EPS_TEMPSUMBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 EPSSigBypStat[0] B 7")
  field(ONAM, "BYPASSED")
  field(ZNAM, "NOT BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#Alarm Bypass 
record(bo, "ACCL:GUNB:455:EPS_TEMPSUMBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 EPSSigBypReq[0] B 9")
  info(autosaveFields,"VAL")
}

record(bi, "ACCL:GUNB:455:EPS_TEMPSUMBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 EPSSigBypStat[0] B 9")
  field(ONAM, "BYPASSED")
  field(ZNAM, "NOT BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#Alarm Bypass 
record(bo, "ACCL:GUNB:455:EPS_FLOWSUMBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_GUNB_TM01 EPSSigBypReq[0] B 10")
  info(autosaveFields,"VAL")
}

record(bi, "ACCL:GUNB:455:EPS_FLOWSUMBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 EPSSigBypStat[0] B 10")
  field(ONAM, "BYPASSED")
  field(ZNAM, "NOT BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to control MPS outputs
#
#
# Macros:
#        TYPE  Type of MPS Permit signal- eg: TEMP, FLOW etc.
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS EPICS name for the PV
#        MAD   MAD name for the PV
#==============================================================================
# Temperature PV Alarm status
# Alarm channels are the PV  bit
record(bi, "SOLN:GUNB:212:TEMP_PERMIT"){
  field(DESC, "SOL1B TEMP Permit Alarm Sts")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 MPSAlarm[0] B 0")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Bypass reset
# Alarm channels are the PV  bit
# Eg: SigResetReq[0].0
# Uses Reset_Index 0 , Uses Channel 0
record(bo, "SOLN:GUNB:212:TEMP_RESET") {
  field(DESC, "Reset Request")
  field(DTYP, "EtherIP")
  #field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigResetReq[0] B 0")
  field(ZNAM, "RESET")
  field(ONAM, "RESET")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
  field(HIGH, "2")
  field(ASG, "MCC")
}

#
# This template is used to control MPS outputs
#
#
# Macros:
#        TYPE  Type of MPS Permit signal- eg: TEMP, FLOW etc.
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS EPICS name for the PV
#        MAD   MAD name for the PV
#==============================================================================
# Temperature PV Alarm status
# Alarm channels are the PV  bit
record(bi, "SOLN:GUNB:823:TEMP_PERMIT"){
  field(DESC, "SOL2B TEMP Permit Alarm Sts")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 MPSAlarm[0] B 1")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Bypass reset
# Alarm channels are the PV  bit
# Eg: SigResetReq[0].0
# Uses Reset_Index 0 , Uses Channel 0
record(bo, "SOLN:GUNB:823:TEMP_RESET") {
  field(DESC, "Reset Request")
  field(DTYP, "EtherIP")
  #field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigResetReq[0] B 1")
  field(ZNAM, "RESET")
  field(ONAM, "RESET")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
  field(HIGH, "2")
  field(ASG, "MCC")
}

#
# This template is used to control MPS outputs
#
#
# Macros:
#        TYPE  Type of MPS Permit signal- eg: TEMP, FLOW etc.
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS EPICS name for the PV
#        MAD   MAD name for the PV
#==============================================================================
# Temperature PV Alarm status
# Alarm channels are the PV  bit
record(bi, "SOLN:GUNB:212:FLOW_PERMIT"){
  field(DESC, "SOL1B FLOW Permit Alarm Sts")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 MPSAlarm[0] B 2")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Bypass reset
# Alarm channels are the PV  bit
# Eg: SigResetReq[0].0
# Uses Reset_Index 0 , Uses Channel 0
record(bo, "SOLN:GUNB:212:FLOW_RESET") {
  field(DESC, "Reset Request")
  field(DTYP, "EtherIP")
  #field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigResetReq[0] B 2")
  field(ZNAM, "RESET")
  field(ONAM, "RESET")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
  field(HIGH, "2")
  field(ASG, "MCC")
}

#
# This template is used to control MPS outputs
#
#
# Macros:
#        TYPE  Type of MPS Permit signal- eg: TEMP, FLOW etc.
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS EPICS name for the PV
#        MAD   MAD name for the PV
#==============================================================================
# Temperature PV Alarm status
# Alarm channels are the PV  bit
record(bi, "ACCL:GUNB:455:TEMP_PERMIT"){
  field(DESC, "BUN1B TEMP Permit Alarm Sts")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 MPSAlarm[0] B 3")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Bypass reset
# Alarm channels are the PV  bit
# Eg: SigResetReq[0].0
# Uses Reset_Index 0 , Uses Channel 0
record(bo, "ACCL:GUNB:455:TEMP_RESET") {
  field(DESC, "Reset Request")
  field(DTYP, "EtherIP")
  #field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigResetReq[0] B 3")
  field(ZNAM, "RESET")
  field(ONAM, "RESET")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
  field(HIGH, "2")
  field(ASG, "MCC")
}

#
# This template is used to control MPS outputs
#
#
# Macros:
#        TYPE  Type of MPS Permit signal- eg: TEMP, FLOW etc.
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS EPICS name for the PV
#        MAD   MAD name for the PV
#==============================================================================
# Temperature PV Alarm status
# Alarm channels are the PV  bit
record(bi, "ACCL:GUNB:455:FLOW_PERMIT"){
  field(DESC, "BUN1B FLOW Permit Alarm Sts")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 MPSAlarm[0] B 4")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Bypass reset
# Alarm channels are the PV  bit
# Eg: SigResetReq[0].0
# Uses Reset_Index 0 , Uses Channel 0
record(bo, "ACCL:GUNB:455:FLOW_RESET") {
  field(DESC, "Reset Request")
  field(DTYP, "EtherIP")
  #field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigResetReq[0] B 4")
  field(ZNAM, "RESET")
  field(ONAM, "RESET")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
  field(HIGH, "2")
  field(ASG, "MCC")
}

#
# This template is used to control MPS outputs
#
#
# Macros:
#        TYPE  Type of MPS Permit signal- eg: TEMP, FLOW etc.
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS EPICS name for the PV
#        MAD   MAD name for the PV
#==============================================================================
# Temperature PV Alarm status
# Alarm channels are the PV  bit
record(bi, "MOVR:GUNB:753:TEMP_PERMIT"){
  field(DESC, "YAG01B TEMP Permit Alarm Sts")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 MPSAlarm[0] B 5")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Bypass reset
# Alarm channels are the PV  bit
# Eg: SigResetReq[0].0
# Uses Reset_Index 0 , Uses Channel 0
record(bo, "MOVR:GUNB:753:TEMP_RESET") {
  field(DESC, "Reset Request")
  field(DTYP, "EtherIP")
  #field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigResetReq[0] B 5")
  field(ZNAM, "RESET")
  field(ONAM, "RESET")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
  field(HIGH, "2")
  field(ASG, "MCC")
}

#
# This template is used to control MPS outputs
#
#
# Macros:
#        TYPE  Type of MPS Permit signal- eg: TEMP, FLOW etc.
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS EPICS name for the PV
#        MAD   MAD name for the PV
#==============================================================================
# Temperature PV Alarm status
# Alarm channels are the PV  bit
record(bi, "GUN:GUNB:100:BDYTEMP_PERMIT"){
  field(DESC, "GUNB TEMP Permit Alarm Sts")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 MPSAlarm[0] B 6")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Bypass reset
# Alarm channels are the PV  bit
# Eg: SigResetReq[0].0
# Uses Reset_Index 0 , Uses Channel 0
record(bo, "GUN:GUNB:100:BDYTEMP_RESET") {
  field(DESC, "Reset Request")
  field(DTYP, "EtherIP")
  #field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigResetReq[0] B 6")
  field(ZNAM, "RESET")
  field(ONAM, "RESET")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
  field(HIGH, "2")
  field(ASG, "MCC")
}

#
# This template is used to control MPS outputs
#
#
# Macros:
#        TYPE  Type of MPS Permit signal- eg: TEMP, FLOW etc.
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS EPICS name for the PV
#        MAD   MAD name for the PV
#==============================================================================
# Temperature PV Alarm status
# Alarm channels are the PV  bit
record(bi, "GUN:GUNB:100:FLOW_PERMIT"){
  field(DESC, "GUNB FLOW Permit Alarm Sts")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 MPSAlarm[0] B 7")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Bypass reset
# Alarm channels are the PV  bit
# Eg: SigResetReq[0].0
# Uses Reset_Index 0 , Uses Channel 0
record(bo, "GUN:GUNB:100:FLOW_RESET") {
  field(DESC, "Reset Request")
  field(DTYP, "EtherIP")
  #field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigResetReq[0] B 7")
  field(ZNAM, "RESET")
  field(ONAM, "RESET")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
  field(HIGH, "2")
  field(ASG, "MCC")
}

#
# This template is used to control MPS outputs
#
#
# Macros:
#        TYPE  Type of MPS Permit signal- eg: TEMP, FLOW etc.
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS EPICS name for the PV
#        MAD   MAD name for the PV
#==============================================================================
# Temperature PV Alarm status
# Alarm channels are the PV  bit
record(bi, "GUN:GUNB:100:WGTEMP_PERMIT"){
  field(DESC, "GUNB TEMP Permit Alarm Sts")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 MPSAlarm[0] B 8")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Bypass reset
# Alarm channels are the PV  bit
# Eg: SigResetReq[0].0
# Uses Reset_Index 0 , Uses Channel 0
record(bo, "GUN:GUNB:100:WGTEMP_RESET") {
  field(DESC, "Reset Request")
  field(DTYP, "EtherIP")
  #field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigResetReq[0] B 8")
  field(ZNAM, "RESET")
  field(ONAM, "RESET")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
  field(HIGH, "2")
  field(ASG, "MCC")
}

#
# This template is used to control MPS outputs
#
#
# Macros:
#        TYPE  Type of MPS Permit signal- eg: TEMP, FLOW etc.
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS EPICS name for the PV
#        MAD   MAD name for the PV
#==============================================================================
# Temperature PV Alarm status
# Alarm channels are the PV  bit
record(bi, "VVPG:GUNB:941:TEMP_PERMIT"){
  field(DESC, "VV02 TEMP Permit Alarm Sts")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 MPSAlarm[0] B 9")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Bypass reset
# Alarm channels are the PV  bit
# Eg: SigResetReq[0].0
# Uses Reset_Index 0 , Uses Channel 0
record(bo, "VVPG:GUNB:941:TEMP_RESET") {
  field(DESC, "Reset Request")
  field(DTYP, "EtherIP")
  #field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigResetReq[0] B 9")
  field(ZNAM, "RESET")
  field(ONAM, "RESET")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
  field(HIGH, "2")
  field(ASG, "MCC")
}

#
# This template is used to control MPS outputs
#
#
# Macros:
#        TYPE  Type of MPS Permit signal- eg: TEMP, FLOW etc.
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS EPICS name for the PV
#        MAD   MAD name for the PV
#==============================================================================
# Temperature PV Alarm status
# Alarm channels are the PV  bit
record(bi, "GUN:GUNB:100:EPSVAC_PERMIT"){
  field(DESC, "GUNB VAC Permit Alarm Sts")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 MPSAlarm[0] B 10")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Bypass reset
# Alarm channels are the PV  bit
# Eg: SigResetReq[0].0
# Uses Reset_Index 0 , Uses Channel 0
record(bo, "GUN:GUNB:100:EPSVAC_RESET") {
  field(DESC, "Reset Request")
  field(DTYP, "EtherIP")
  #field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigResetReq[0] B 10")
  field(ZNAM, "RESET")
  field(ONAM, "RESET")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
  field(HIGH, "2")
  field(ASG, "MCC")
}

#
# This template is used to control MPS outputs
#
#
# Macros:
#        TYPE  Type of MPS Permit signal- eg: TEMP, FLOW etc.
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS EPICS name for the PV
#        MAD   MAD name for the PV
#==============================================================================
# Temperature PV Alarm status
# Alarm channels are the PV  bit
record(bi, "ACCL:GUNB:455:EPSVAC_PERMIT"){
  field(DESC, "BUN1B VAC Permit Alarm Sts")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 MPSAlarm[0] B 11")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Bypass reset
# Alarm channels are the PV  bit
# Eg: SigResetReq[0].0
# Uses Reset_Index 0 , Uses Channel 0
record(bo, "ACCL:GUNB:455:EPSVAC_RESET") {
  field(DESC, "Reset Request")
  field(DTYP, "EtherIP")
  #field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigResetReq[0] B 11")
  field(ZNAM, "RESET")
  field(ONAM, "RESET")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
  field(HIGH, "2")
  field(ASG, "MCC")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "SOLN:GUNB:212:INLTTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[0] B 0")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "SOLN:GUNB:212:INLTTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[0] B 0")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "SOLN:GUNB:212:INLTTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[0] B 0")
  info(autosaveFields,"VAL")
}

record(bi, "SOLN:GUNB:212:INLTTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[0] B 0")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "SOLN:GUNB:212:BDYTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[0] B 1")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "SOLN:GUNB:212:BDYTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[0] B 1")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "SOLN:GUNB:212:BDYTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[0] B 1")
  info(autosaveFields,"VAL")
}

record(bi, "SOLN:GUNB:212:BDYTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[0] B 1")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "SOLN:GUNB:212:RETTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[0] B 2")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "SOLN:GUNB:212:RETTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[0] B 2")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "SOLN:GUNB:212:RETTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[0] B 2")
  info(autosaveFields,"VAL")
}

record(bi, "SOLN:GUNB:212:RETTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[0] B 2")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "SOLN:GUNB:823:BDYTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[0] B 3")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "SOLN:GUNB:823:BDYTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[0] B 3")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "SOLN:GUNB:823:BDYTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[0] B 3")
  info(autosaveFields,"VAL")
}

record(bi, "SOLN:GUNB:823:BDYTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[0] B 3")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "SOLN:GUNB:823:RETTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[0] B 4")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "SOLN:GUNB:823:RETTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[0] B 4")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "SOLN:GUNB:823:RETTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[0] B 4")
  info(autosaveFields,"VAL")
}

record(bi, "SOLN:GUNB:823:RETTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[0] B 4")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "SOLN:GUNB:212:FLOWALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[0] B 5")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "SOLN:GUNB:212:FLOWALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[0] B 5")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "SOLN:GUNB:212:FLOWBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[0] B 5")
  info(autosaveFields,"VAL")
}

record(bi, "SOLN:GUNB:212:FLOWBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[0] B 5")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "ACCL:GUNB:455:INLTTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[0] B 6")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "ACCL:GUNB:455:INLTTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[0] B 6")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "ACCL:GUNB:455:INLTTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[0] B 6")
  info(autosaveFields,"VAL")
}

record(bi, "ACCL:GUNB:455:INLTTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[0] B 6")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "ACCL:GUNB:455:CELL1RETTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[0] B 7")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "ACCL:GUNB:455:CELL1RETTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[0] B 7")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "ACCL:GUNB:455:CELL1RETTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[0] B 7")
  info(autosaveFields,"VAL")
}

record(bi, "ACCL:GUNB:455:CELL1RETTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[0] B 7")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "ACCL:GUNB:455:CELL2RETTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[0] B 8")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "ACCL:GUNB:455:CELL2RETTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[0] B 8")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "ACCL:GUNB:455:CELL2RETTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[0] B 8")
  info(autosaveFields,"VAL")
}

record(bi, "ACCL:GUNB:455:CELL2RETTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[0] B 8")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "ACCL:GUNB:455:ENDCAP1STEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[0] B 9")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "ACCL:GUNB:455:ENDCAP1STEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[0] B 9")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "ACCL:GUNB:455:ENDCAP1STEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[0] B 9")
  info(autosaveFields,"VAL")
}

record(bi, "ACCL:GUNB:455:ENDCAP1STEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[0] B 9")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "ACCL:GUNB:455:ENDCAP2STEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[0] B 10")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "ACCL:GUNB:455:ENDCAP2STEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[0] B 10")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "ACCL:GUNB:455:ENDCAP2STEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[0] B 10")
  info(autosaveFields,"VAL")
}

record(bi, "ACCL:GUNB:455:ENDCAP2STEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[0] B 10")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "ACCL:GUNB:455:ENDCAP1NTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[0] B 11")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "ACCL:GUNB:455:ENDCAP1NTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[0] B 11")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "ACCL:GUNB:455:ENDCAP1NTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[0] B 11")
  info(autosaveFields,"VAL")
}

record(bi, "ACCL:GUNB:455:ENDCAP1NTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[0] B 11")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "ACCL:GUNB:455:ENDCAP2NTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[0] B 12")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "ACCL:GUNB:455:ENDCAP2NTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[0] B 12")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "ACCL:GUNB:455:ENDCAP2NTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[0] B 12")
  info(autosaveFields,"VAL")
}

record(bi, "ACCL:GUNB:455:ENDCAP2NTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[0] B 12")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "ACCL:GUNB:455:CPLR1TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[0] B 13")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "ACCL:GUNB:455:CPLR1TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[0] B 13")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "ACCL:GUNB:455:CPLR1TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[0] B 13")
  info(autosaveFields,"VAL")
}

record(bi, "ACCL:GUNB:455:CPLR1TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[0] B 13")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "ACCL:GUNB:455:CPLR2TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[0] B 14")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "ACCL:GUNB:455:CPLR2TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[0] B 14")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "ACCL:GUNB:455:CPLR2TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[0] B 14")
  info(autosaveFields,"VAL")
}

record(bi, "ACCL:GUNB:455:CPLR2TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[0] B 14")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "ACCL:GUNB:455:CPLR3TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[0] B 15")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "ACCL:GUNB:455:CPLR3TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[0] B 15")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "ACCL:GUNB:455:CPLR3TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[0] B 15")
  info(autosaveFields,"VAL")
}

record(bi, "ACCL:GUNB:455:CPLR3TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[0] B 15")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "ACCL:GUNB:455:CPLR4TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[1] B 0")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "ACCL:GUNB:455:CPLR4TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[1] B 0")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "ACCL:GUNB:455:CPLR4TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[1] B 0")
  info(autosaveFields,"VAL")
}

record(bi, "ACCL:GUNB:455:CPLR4TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[1] B 0")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "ACCL:GUNB:455:FLOWALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[1] B 1")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "ACCL:GUNB:455:FLOWALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[1] B 1")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "ACCL:GUNB:455:FLOWBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[1] B 1")
  info(autosaveFields,"VAL")
}

record(bi, "ACCL:GUNB:455:FLOWBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[1] B 1")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "MOVR:GUNB:753:1:TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[1] B 2")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "MOVR:GUNB:753:1:TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[1] B 2")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "MOVR:GUNB:753:1:TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[1] B 2")
  info(autosaveFields,"VAL")
}

record(bi, "MOVR:GUNB:753:1:TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[1] B 2")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "MOVR:GUNB:753:2:TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[1] B 3")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "MOVR:GUNB:753:2:TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[1] B 3")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "MOVR:GUNB:753:2:TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[1] B 3")
  info(autosaveFields,"VAL")
}

record(bi, "MOVR:GUNB:753:2:TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[1] B 3")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:INLTTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[1] B 4")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:INLTTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[1] B 4")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:INLTTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[1] B 4")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:INLTTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[1] B 4")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:ANENDCAPRETTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[1] B 5")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:ANENDCAPRETTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[1] B 5")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:ANENDCAPRETTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[1] B 5")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:ANENDCAPRETTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[1] B 5")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:CATHENDCAPRETTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[1] B 6")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:CATHENDCAPRETTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[1] B 6")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:CATHENDCAPRETTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[1] B 6")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:CATHENDCAPRETTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[1] B 6")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:NOSERETTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[1] B 7")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:NOSERETTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[1] B 7")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:NOSERETTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[1] B 7")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:NOSERETTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[1] B 7")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:CAVITYWALLRETTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[1] B 8")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:CAVITYWALLRETTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[1] B 8")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:CAVITYWALLRETTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[1] B 8")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:CAVITYWALLRETTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[1] B 8")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:BUCKCOILTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[1] B 9")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:BUCKCOILTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[1] B 9")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:BUCKCOILTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[1] B 9")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:BUCKCOILTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[1] B 9")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:CATHENDCAPCENTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[1] B 10")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:CATHENDCAPCENTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[1] B 10")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:CATHENDCAPCENTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[1] B 10")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:CATHENDCAPCENTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[1] B 10")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:CATHENDCAPOUTTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[1] B 11")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:CATHENDCAPOUTTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[1] B 11")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:CATHENDCAPOUTTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[1] B 11")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:CATHENDCAPOUTTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[1] B 11")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:ANCENTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[1] B 12")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:ANCENTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[1] B 12")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:ANCENTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[1] B 12")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:ANCENTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[1] B 12")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:ANOUTTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[1] B 13")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:ANOUTTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[1] B 13")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:ANOUTTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[1] B 13")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:ANOUTTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[1] B 13")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:VACWALLSTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[1] B 14")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:VACWALLSTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[1] B 14")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:VACWALLSTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[1] B 14")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:VACWALLSTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[1] B 14")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:VACWALLNTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[1] B 15")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:VACWALLNTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[1] B 15")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:VACWALLNTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[1] B 15")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:VACWALLNTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[1] B 15")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:ANFLANGETEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[2] B 0")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:ANFLANGETEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[2] B 0")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:ANFLANGETEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[2] B 0")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:ANFLANGETEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[2] B 0")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:NOSETEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[2] B 1")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:NOSETEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[2] B 1")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:NOSETEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[2] B 1")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:NOSETEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[2] B 1")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:ANENDCAPFLOWALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[2] B 2")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:ANENDCAPFLOWALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[2] B 2")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:ANENDCAPFLOWBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[2] B 2")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:ANENDCAPFLOWBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[2] B 2")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:ANFLANGEFLOWALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[2] B 3")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:ANFLANGEFLOWALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[2] B 3")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:ANFLANGEFLOWBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[2] B 3")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:ANFLANGEFLOWBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[2] B 3")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:CATENDCAPFLOWALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[2] B 4")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:CATENDCAPFLOWALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[2] B 4")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:CATENDCAPFLOWBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[2] B 4")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:CATENDCAPFLOWBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[2] B 4")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:NOSEFLOWALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[2] B 5")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:NOSEFLOWALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[2] B 5")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:NOSEFLOWBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[2] B 5")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:NOSEFLOWBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[2] B 5")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:CAVWALLFLOWALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[2] B 6")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:CAVWALLFLOWALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[2] B 6")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:CAVWALLFLOWBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[2] B 6")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:CAVWALLFLOWBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[2] B 6")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:CPLRFLOWALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[2] B 7")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:CPLRFLOWALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[2] B 7")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:CPLRFLOWBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[2] B 7")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:CPLRFLOWBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[2] B 7")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3:B1TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[2] B 8")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3:B1TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[2] B 8")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3:B1TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[2] B 8")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3:B1TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[2] B 8")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3:E1TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[2] B 9")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3:E1TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[2] B 9")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3:E1TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[2] B 9")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3:E1TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[2] B 9")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3:S2TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[2] B 10")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3:S2TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[2] B 10")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3:S2TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[2] B 10")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3:S2TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[2] B 10")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3:B2TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[2] B 11")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3:B2TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[2] B 11")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3:B2TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[2] B 11")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3:B2TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[2] B 11")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3:CIRCTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[2] B 12")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3:CIRCTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[2] B 12")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3:CIRCTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[2] B 12")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3:CIRCTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[2] B 12")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3:B3TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[2] B 13")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3:B3TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[2] B 13")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3:B3TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[2] B 13")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3:B3TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[2] B 13")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3:S3TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[2] B 14")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3:S3TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[2] B 14")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3:S3TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[2] B 14")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3:S3TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[2] B 14")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3:E6TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[2] B 15")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3:E6TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[2] B 15")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3:E6TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[2] B 15")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3:E6TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[2] B 15")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4:B1TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[3] B 0")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4:B1TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[3] B 0")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4:B1TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[3] B 0")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4:B1TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[3] B 0")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4:E1TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[3] B 1")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4:E1TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[3] B 1")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4:E1TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[3] B 1")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4:E1TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[3] B 1")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4:S2TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[3] B 2")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4:S2TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[3] B 2")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4:S2TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[3] B 2")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4:S2TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[3] B 2")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4:B2TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[3] B 3")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4:B2TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[3] B 3")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4:B2TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[3] B 3")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4:B2TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[3] B 3")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4:CIRCTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[3] B 4")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4:CIRCTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[3] B 4")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4:CIRCTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[3] B 4")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4:CIRCTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[3] B 4")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4:B3TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[3] B 5")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4:B3TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[3] B 5")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4:B3TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[3] B 5")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4:B3TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[3] B 5")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4:S3TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[3] B 6")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4:S3TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[3] B 6")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4:S3TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[3] B 6")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4:S3TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[3] B 6")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4:E6TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[3] B 7")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4:E6TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[3] B 7")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4:E6TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[3] B 7")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4:E6TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[3] B 7")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3:E7TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[3] B 8")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3:E7TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[3] B 8")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3:E7TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[3] B 8")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3:E7TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[3] B 8")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3:FLANGETEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[3] B 9")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3:FLANGETEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[3] B 9")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3:FLANGETEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[3] B 9")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3:FLANGETEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[3] B 9")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3:S6TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[3] B 10")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3:S6TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[3] B 10")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3:S6TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[3] B 10")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3:S6TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[3] B 10")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3:E8TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[3] B 11")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3:E8TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[3] B 11")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3:E8TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[3] B 11")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3:E8TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[3] B 11")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3:S7TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[3] B 12")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3:S7TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[3] B 12")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3:S7TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[3] B 12")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3:S7TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[3] B 12")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3:E9TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[3] B 13")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3:E9TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[3] B 13")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3:E9TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[3] B 13")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3:E9TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[3] B 13")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3:B4TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[3] B 14")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3:B4TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[3] B 14")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3:B4TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[3] B 14")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3:B4TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[3] B 14")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3:WTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[3] B 15")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3:WTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[3] B 15")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3:WTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[3] B 15")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3:WTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[3] B 15")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4:E7TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[4] B 0")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4:E7TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[4] B 0")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4:E7TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[4] B 0")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4:E7TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[4] B 0")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4:FLANGETEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[4] B 1")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4:FLANGETEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[4] B 1")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4:FLANGETEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[4] B 1")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4:FLANGETEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[4] B 1")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4:S6TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[4] B 2")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4:S6TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[4] B 2")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4:S6TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[4] B 2")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4:S6TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[4] B 2")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4:E8TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[4] B 3")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4:E8TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[4] B 3")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4:E8TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[4] B 3")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4:E8TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[4] B 3")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4:S7TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[4] B 4")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4:S7TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[4] B 4")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4:S7TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[4] B 4")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4:S7TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[4] B 4")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4:E9TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[4] B 5")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4:E9TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[4] B 5")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4:E9TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[4] B 5")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4:E9TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[4] B 5")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4:B4TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[4] B 6")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4:B4TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[4] B 6")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4:B4TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[4] B 6")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4:B4TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[4] B 6")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4:E10TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[4] B 7")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4:E10TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[4] B 7")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4:E10TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[4] B 7")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4:E10TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[4] B 7")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:A3CPLRRFWNDWTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[4] B 8")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:A3CPLRRFWNDWTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[4] B 8")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:A3CPLRRFWNDWTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[4] B 8")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:A3CPLRRFWNDWTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[4] B 8")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:A4CPLRRFWNDWTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[4] B 9")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:A4CPLRRFWNDWTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[4] B 9")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:A4CPLRRFWNDWTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[4] B 9")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:A4CPLRRFWNDWTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[4] B 9")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3CPLRENDTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[4] B 10")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3CPLRENDTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[4] B 10")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3CPLRENDTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[4] B 10")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3CPLRENDTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[4] B 10")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3MIDTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[4] B 11")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3MIDTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[4] B 11")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3MIDTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[4] B 11")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3MIDTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[4] B 11")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3ELBOWTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[4] B 12")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3ELBOWTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[4] B 12")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3ELBOWTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[4] B 12")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3ELBOWTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[4] B 12")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA3VRUNTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[4] B 13")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA3VRUNTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[4] B 13")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA3VRUNTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[4] B 13")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA3VRUNTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[4] B 13")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4CPLRENDTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[4] B 14")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4CPLRENDTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[4] B 14")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4CPLRENDTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[4] B 14")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4CPLRENDTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[4] B 14")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4MIDTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[4] B 15")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4MIDTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[4] B 15")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4MIDTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[4] B 15")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4MIDTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[4] B 15")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4ELBOWTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[5] B 0")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4ELBOWTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[5] B 0")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4ELBOWTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[5] B 0")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4ELBOWTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[5] B 0")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "GUN:GUNB:100:WGA4VRUNTEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[5] B 1")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "GUN:GUNB:100:WGA4VRUNTEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[5] B 1")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "GUN:GUNB:100:WGA4VRUNTEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[5] B 1")
  info(autosaveFields,"VAL")
}

record(bi, "GUN:GUNB:100:WGA4VRUNTEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[5] B 1")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "VVPG:GUNB:941:TEMPALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[5] B 2")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "VVPG:GUNB:941:TEMPALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[5] B 2")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "VVPG:GUNB:941:TEMPBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[5] B 2")
  info(autosaveFields,"VAL")
}

record(bi, "VVPG:GUNB:941:TEMPBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[5] B 2")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "VGEX:GUNB:100:PSTAT_EPSALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[5] B 3")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "VGEX:GUNB:100:PSTAT_EPSALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[5] B 3")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "VGEX:GUNB:100:PSTAT_EPSBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[5] B 3")
  info(autosaveFields,"VAL")
}

record(bi, "VGEX:GUNB:100:PSTAT_EPSBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[5] B 3")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data for MPS interlock
#
#
# Macros:
#        CHAN              I/O channel on the I/O module
#        PLC               Name of the ether_ip connection to PLC as defined in st.cmd 
#        ALIAS             EPICS name for the PV
#        INDEX     	       Array number of SigAlarmLatch, SigAlarmReal, SigBypReq, SigBypStat
#        
#==============================================================================

# Temperature PV Alarm status
# Alarm channels are the PV  bit
# Eg: SigAlarmLatch[0].0
# Uses Index 0 , Uses Channel 0
record(bi, "VGHF:GUNB:519:PSTAT_EPSALMLATCH"){
  field(DESC, "Latched Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmLatch[5] B 4")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

record(bi, "VGHF:GUNB:519:PSTAT_EPSALM"){
  field(DESC, "Alarm Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigAlarmReal[5] B 4")
  field(ONAM, "OK")
  field(ZNAM, "FAULT")
  field(OSV, "NO_ALARM")
  field(ZSV, "MAJOR")
}

# Temperature Alarm Bypass 
# Alarm channels are the PV  bit
record(bo, "VGHF:GUNB:519:PSTAT_EPSBYP") {
  field(DESC, "Bypass Request")
  field(ZNAM, "NO BYPASS")
  field(ONAM, "BYPASS")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT , "@PLC_GUNB_TM01 SigBypReq[5] B 4")
  info(autosaveFields,"VAL")
}

record(bi, "VGHF:GUNB:519:PSTAT_EPSBYPSTAT"){
  field(DESC, "Bypass Status")
  field(SCAN, "I/O Intr")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 SigBypStat[5] B 4")
  field(ZNAM, "NOT BYPASSED")
  field(ONAM, "BYPASSED")
  field(ZSV, "NO_ALARM")
  field(OSV, "MINOR")
}

#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M1_CH0_TEMP") {
  field(DESC, "Buncher supply inlet")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:455:INLTTEMP")
  field(INP , "@PLC_GUNB_TM01 CR01_Temp[0]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M1_CH0_ALIAS") {
    field(VAL,"ACCL:GUNB:455:INLTTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:455:INLTTEMP") {
  field(DESC, "Buncher supply inlet")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M1_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "0")
  field(HIGH, "45")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:455:INLTTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiTemp[0]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:INLTTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:455:INLTTEMP.HIHI CP")
  field(OUT, "ACCL:GUNB:455:INLTTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:INLTTEMPHLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:455:INLTTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoTemp[0]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:INLTTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:455:INLTTEMP.LOLO CP")
  field(OUT, "ACCL:GUNB:455:INLTTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:INLTTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR01_M1_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[1] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M1_CH1_TEMP") {
  field(DESC, "Buncher cell1 ret Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:455:CELL1RETTEMP")
  field(INP , "@PLC_GUNB_TM01 CR01_Temp[1]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M1_CH1_ALIAS") {
    field(VAL,"ACCL:GUNB:455:CELL1RETTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:455:CELL1RETTEMP") {
  field(DESC, "Buncher cell1 ret Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M1_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "0")
  field(HIGH, "45")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:455:CELL1RETTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiTemp[1]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:CELL1RETTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:455:CELL1RETTEMP.HIHI CP")
  field(OUT, "ACCL:GUNB:455:CELL1RETTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:CELL1RETTEMPHLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:455:CELL1RETTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoTemp[1]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:CELL1RETTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:455:CELL1RETTEMP.LOLO CP")
  field(OUT, "ACCL:GUNB:455:CELL1RETTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:CELL1RETTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR01_M1_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[1] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M1_CH2_TEMP") {
  field(DESC, "Buncher cell2 ret Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:455:CELL2RETTEMP")
  field(INP , "@PLC_GUNB_TM01 CR01_Temp[2]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M1_CH2_ALIAS") {
    field(VAL,"ACCL:GUNB:455:CELL2RETTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:455:CELL2RETTEMP") {
  field(DESC, "Buncher cell2 ret Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M1_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "0")
  field(HIGH, "45")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:455:CELL2RETTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiTemp[2]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:CELL2RETTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:455:CELL2RETTEMP.HIHI CP")
  field(OUT, "ACCL:GUNB:455:CELL2RETTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:CELL2RETTEMPHLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:455:CELL2RETTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoTemp[2]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:CELL2RETTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:455:CELL2RETTEMP.LOLO CP")
  field(OUT, "ACCL:GUNB:455:CELL2RETTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:CELL2RETTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR01_M1_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[1] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M1_CH3_TEMP") {
  field(DESC, "Buncher End cap 1 South")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:455:ENDCAP1STEMP")
  field(INP , "@PLC_GUNB_TM01 CR01_Temp[3]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M1_CH3_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ENDCAP1STEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:455:ENDCAP1STEMP") {
  field(DESC, "Buncher End cap 1 South")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M1_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "65")
  field(LOLO, "0")
  field(HIGH, "60")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:455:ENDCAP1STEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiTemp[3]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:ENDCAP1STEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:455:ENDCAP1STEMP.HIHI CP")
  field(OUT, "ACCL:GUNB:455:ENDCAP1STEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:ENDCAP1STEMPHLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:455:ENDCAP1STEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoTemp[3]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:ENDCAP1STEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:455:ENDCAP1STEMP.LOLO CP")
  field(OUT, "ACCL:GUNB:455:ENDCAP1STEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:ENDCAP1STEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR01_M1_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[1] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M2_CH0_TEMP") {
  field(DESC, "Buncher End cap 2 South")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:455:ENDCAP2STEMP")
  field(INP , "@PLC_GUNB_TM01 CR01_Temp[4]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M2_CH0_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ENDCAP2STEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:455:ENDCAP2STEMP") {
  field(DESC, "Buncher End cap 2 South")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M2_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "65")
  field(LOLO, "0")
  field(HIGH, "60")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:455:ENDCAP2STEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiTemp[4]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:ENDCAP2STEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:455:ENDCAP2STEMP.HIHI CP")
  field(OUT, "ACCL:GUNB:455:ENDCAP2STEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:ENDCAP2STEMPHLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:455:ENDCAP2STEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoTemp[4]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:ENDCAP2STEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:455:ENDCAP2STEMP.LOLO CP")
  field(OUT, "ACCL:GUNB:455:ENDCAP2STEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:ENDCAP2STEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR01_M2_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[2] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M2_CH1_TEMP") {
  field(DESC, "Buncher End cap 1 North")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:455:ENDCAP1NTEMP")
  field(INP , "@PLC_GUNB_TM01 CR01_Temp[5]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M2_CH1_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ENDCAP1NTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:455:ENDCAP1NTEMP") {
  field(DESC, "Buncher End cap 1 North")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M2_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "60")
  field(LOLO, "0")
  field(HIGH, "55")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:455:ENDCAP1NTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiTemp[5]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:ENDCAP1NTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:455:ENDCAP1NTEMP.HIHI CP")
  field(OUT, "ACCL:GUNB:455:ENDCAP1NTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:ENDCAP1NTEMPHLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:455:ENDCAP1NTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoTemp[5]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:ENDCAP1NTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:455:ENDCAP1NTEMP.LOLO CP")
  field(OUT, "ACCL:GUNB:455:ENDCAP1NTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:ENDCAP1NTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR01_M2_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[2] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M2_CH2_TEMP") {
  field(DESC, "Buncher End cap 2 North")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:455:ENDCAP2NTEMP")
  field(INP , "@PLC_GUNB_TM01 CR01_Temp[6]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M2_CH2_ALIAS") {
    field(VAL,"ACCL:GUNB:455:ENDCAP2NTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:455:ENDCAP2NTEMP") {
  field(DESC, "Buncher End cap 2 North")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M2_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "60")
  field(LOLO, "0")
  field(HIGH, "55")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:455:ENDCAP2NTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiTemp[6]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:ENDCAP2NTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:455:ENDCAP2NTEMP.HIHI CP")
  field(OUT, "ACCL:GUNB:455:ENDCAP2NTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:ENDCAP2NTEMPHLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:455:ENDCAP2NTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoTemp[6]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:ENDCAP2NTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:455:ENDCAP2NTEMP.LOLO CP")
  field(OUT, "ACCL:GUNB:455:ENDCAP2NTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:ENDCAP2NTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR01_M2_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[2] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M2_CH3_TEMP") {
  field(DESC, "Buncher coupler 1 temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:455:CPLR1TEMP")
  field(INP , "@PLC_GUNB_TM01 CR01_Temp[7]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M2_CH3_ALIAS") {
    field(VAL,"ACCL:GUNB:455:CPLR1TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:455:CPLR1TEMP") {
  field(DESC, "Buncher coupler 1 temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M2_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "0")
  field(HIGH, "45")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:455:CPLR1TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiTemp[7]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:CPLR1TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:455:CPLR1TEMP.HIHI CP")
  field(OUT, "ACCL:GUNB:455:CPLR1TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:CPLR1TEMPHLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:455:CPLR1TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoTemp[7]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:CPLR1TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:455:CPLR1TEMP.LOLO CP")
  field(OUT, "ACCL:GUNB:455:CPLR1TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:CPLR1TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR01_M2_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[2] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M3_CH0_TEMP") {
  field(DESC, "Buncher coupler 2 temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:455:CPLR2TEMP")
  field(INP , "@PLC_GUNB_TM01 CR01_Temp[8]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M3_CH0_ALIAS") {
    field(VAL,"ACCL:GUNB:455:CPLR2TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:455:CPLR2TEMP") {
  field(DESC, "Buncher coupler 2 temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M3_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "0")
  field(HIGH, "45")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:455:CPLR2TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiTemp[8]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:CPLR2TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:455:CPLR2TEMP.HIHI CP")
  field(OUT, "ACCL:GUNB:455:CPLR2TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:CPLR2TEMPHLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:455:CPLR2TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoTemp[8]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:CPLR2TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:455:CPLR2TEMP.LOLO CP")
  field(OUT, "ACCL:GUNB:455:CPLR2TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:CPLR2TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR01_M3_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[3] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M3_CH1_TEMP") {
  field(DESC, "Buncher coupler 3 temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:455:CPLR3TEMP")
  field(INP , "@PLC_GUNB_TM01 CR01_Temp[9]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M3_CH1_ALIAS") {
    field(VAL,"ACCL:GUNB:455:CPLR3TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:455:CPLR3TEMP") {
  field(DESC, "Buncher coupler 3 temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M3_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "0")
  field(HIGH, "45")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:455:CPLR3TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiTemp[9]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:CPLR3TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:455:CPLR3TEMP.HIHI CP")
  field(OUT, "ACCL:GUNB:455:CPLR3TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:CPLR3TEMPHLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:455:CPLR3TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoTemp[9]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:CPLR3TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:455:CPLR3TEMP.LOLO CP")
  field(OUT, "ACCL:GUNB:455:CPLR3TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:CPLR3TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR01_M3_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[3] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M3_CH2_TEMP") {
  field(DESC, "Buncher coupler 4 temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:455:CPLR4TEMP")
  field(INP , "@PLC_GUNB_TM01 CR01_Temp[10]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M3_CH2_ALIAS") {
    field(VAL,"ACCL:GUNB:455:CPLR4TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:455:CPLR4TEMP") {
  field(DESC, "Buncher coupler 4 temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M3_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "0")
  field(HIGH, "45")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:455:CPLR4TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiTemp[10]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:CPLR4TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:455:CPLR4TEMP.HIHI CP")
  field(OUT, "ACCL:GUNB:455:CPLR4TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:CPLR4TEMPHLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:455:CPLR4TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoTemp[10]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:455:CPLR4TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:455:CPLR4TEMP.LOLO CP")
  field(OUT, "ACCL:GUNB:455:CPLR4TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:CPLR4TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR01_M3_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[3] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M3_CH3_TEMP") {
  field(DESC, "Solenoid 1 Return")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:GUNB:212:RETTEMP")
  field(INP , "@PLC_GUNB_TM01 CR01_Temp[11]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M3_CH3_ALIAS") {
    field(VAL,"SOLN:GUNB:212:RETTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "SOLN:GUNB:212:RETTEMP") {
  field(DESC, "Solenoid 1 Return")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M3_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "0")
  field(HIGH, "45")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "SOLN:GUNB:212:RETTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiTemp[11]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "SOLN:GUNB:212:RETTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "SOLN:GUNB:212:RETTEMP.HIHI CP")
  field(OUT, "SOLN:GUNB:212:RETTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"SOLN:GUNB:212:RETTEMPHLIMDES")
}

# Temperature low limit
record(ao, "SOLN:GUNB:212:RETTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoTemp[11]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "SOLN:GUNB:212:RETTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "SOLN:GUNB:212:RETTEMP.LOLO CP")
  field(OUT, "SOLN:GUNB:212:RETTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"SOLN:GUNB:212:RETTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR01_M3_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[3] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M4_CH0_TEMP") {
  field(DESC, "Solenoid 2 Return")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:GUNB:823:RETTEMP")
  field(INP , "@PLC_GUNB_TM01 CR01_Temp[12]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M4_CH0_ALIAS") {
    field(VAL,"SOLN:GUNB:823:RETTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "SOLN:GUNB:823:RETTEMP") {
  field(DESC, "Solenoid 2 Return")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M4_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "0")
  field(HIGH, "45")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "SOLN:GUNB:823:RETTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiTemp[12]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "SOLN:GUNB:823:RETTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "SOLN:GUNB:823:RETTEMP.HIHI CP")
  field(OUT, "SOLN:GUNB:823:RETTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"SOLN:GUNB:823:RETTEMPHLIMDES")
}

# Temperature low limit
record(ao, "SOLN:GUNB:823:RETTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoTemp[12]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "SOLN:GUNB:823:RETTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "SOLN:GUNB:823:RETTEMP.LOLO CP")
  field(OUT, "SOLN:GUNB:823:RETTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"SOLN:GUNB:823:RETTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR01_M4_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[4] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M4_CH1_TEMP") {
  field(DESC, "Solenoid Inlet Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:GUNB:212:INLTTEMP")
  field(INP , "@PLC_GUNB_TM01 CR01_Temp[13]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M4_CH1_ALIAS") {
    field(VAL,"SOLN:GUNB:212:INLTTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "SOLN:GUNB:212:INLTTEMP") {
  field(DESC, "Solenoid Inlet Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M4_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "55")
  field(LOLO, "0")
  field(HIGH, "50")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "SOLN:GUNB:212:INLTTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiTemp[13]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "SOLN:GUNB:212:INLTTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "SOLN:GUNB:212:INLTTEMP.HIHI CP")
  field(OUT, "SOLN:GUNB:212:INLTTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"SOLN:GUNB:212:INLTTEMPHLIMDES")
}

# Temperature low limit
record(ao, "SOLN:GUNB:212:INLTTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoTemp[13]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "SOLN:GUNB:212:INLTTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "SOLN:GUNB:212:INLTTEMP.LOLO CP")
  field(OUT, "SOLN:GUNB:212:INLTTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"SOLN:GUNB:212:INLTTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR01_M4_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[4] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M4_CH2_TEMP") {
  field(DESC, "ICT Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "TORO:GUNB:360:BDYTEMP")
  field(INP , "@PLC_GUNB_TM01 CR01_Temp[14]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M4_CH2_ALIAS") {
    field(VAL,"TORO:GUNB:360:BDYTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "TORO:GUNB:360:BDYTEMP") {
  field(DESC, "ICT Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M4_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "0")
  field(HIGH, "45")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "TORO:GUNB:360:BDYTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiTemp[14]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "TORO:GUNB:360:BDYTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "TORO:GUNB:360:BDYTEMP.HIHI CP")
  field(OUT, "TORO:GUNB:360:BDYTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"TORO:GUNB:360:BDYTEMPHLIMDES")
}

# Temperature low limit
record(ao, "TORO:GUNB:360:BDYTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoTemp[14]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "TORO:GUNB:360:BDYTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "TORO:GUNB:360:BDYTEMP.LOLO CP")
  field(OUT, "TORO:GUNB:360:BDYTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"TORO:GUNB:360:BDYTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR01_M4_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[4] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M1_CH0_TEMP") {
  field(DESC, "Supply/Inlet Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:INLTTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[0]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M1_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:INLTTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:INLTTEMP") {
  field(DESC, "Supply/Inlet Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M1_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "10")
  field(HIGH, "35")
  field(LOW, "15")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:INLTTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[0]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:INLTTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:INLTTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:INLTTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:INLTTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:INLTTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[0]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:INLTTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:INLTTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:INLTTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:INLTTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M1_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[1] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M1_CH1_TEMP") {
  field(DESC, "Anode End Cap ret temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:ANENDCAPRETTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[1]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M1_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANENDCAPRETTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:ANENDCAPRETTEMP") {
  field(DESC, "Anode End Cap ret temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M1_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "65")
  field(LOLO, "10")
  field(HIGH, "60")
  field(LOW, "15")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:ANENDCAPRETTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[1]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:ANENDCAPRETTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:ANENDCAPRETTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:ANENDCAPRETTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:ANENDCAPRETTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:ANENDCAPRETTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[1]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:ANENDCAPRETTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:ANENDCAPRETTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:ANENDCAPRETTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:ANENDCAPRETTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M1_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[1] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M1_CH2_TEMP") {
  field(DESC, "Cat End Cap ret temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:CATHENDCAPRETTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[2]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M1_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:CATHENDCAPRETTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:CATHENDCAPRETTEMP") {
  field(DESC, "Cat End Cap ret temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M1_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "10")
  field(HIGH, "40")
  field(LOW, "15")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:CATHENDCAPRETTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[2]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:CATHENDCAPRETTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:CATHENDCAPRETTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:CATHENDCAPRETTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CATHENDCAPRETTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:CATHENDCAPRETTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[2]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:CATHENDCAPRETTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:CATHENDCAPRETTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:CATHENDCAPRETTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CATHENDCAPRETTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M1_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[1] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M1_CH3_TEMP") {
  field(DESC, "Nose Return Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:NOSERETTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[3]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M1_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:NOSERETTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:NOSERETTEMP") {
  field(DESC, "Nose Return Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M1_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "10")
  field(HIGH, "40")
  field(LOW, "15")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:NOSERETTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[3]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:NOSERETTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:NOSERETTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:NOSERETTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:NOSERETTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:NOSERETTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[3]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:NOSERETTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:NOSERETTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:NOSERETTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:NOSERETTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M1_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[1] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M2_CH0_TEMP") {
  field(DESC, "Cavity Wall Ret Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:CAVITYWALLRETTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[4]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M2_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:CAVITYWALLRETTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:CAVITYWALLRETTEMP") {
  field(DESC, "Cavity Wall Ret Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M2_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "10")
  field(HIGH, "40")
  field(LOW, "15")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:CAVITYWALLRETTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[4]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:CAVITYWALLRETTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:CAVITYWALLRETTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:CAVITYWALLRETTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CAVITYWALLRETTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:CAVITYWALLRETTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[4]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:CAVITYWALLRETTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:CAVITYWALLRETTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:CAVITYWALLRETTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CAVITYWALLRETTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M2_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[2] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M2_CH1_TEMP") {
  field(DESC, "Bucking coil Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:BUCKCOILTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[5]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M2_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:BUCKCOILTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:BUCKCOILTEMP") {
  field(DESC, "Bucking coil Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M2_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "10")
  field(HIGH, "35")
  field(LOW, "15")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:BUCKCOILTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[5]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:BUCKCOILTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:BUCKCOILTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:BUCKCOILTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:BUCKCOILTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:BUCKCOILTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[5]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:BUCKCOILTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:BUCKCOILTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:BUCKCOILTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:BUCKCOILTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M2_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[2] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M2_CH2_TEMP") {
  field(DESC, "A3 Coupler Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:A3CPLRRFWNDWTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[6]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M2_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:A3CPLRRFWNDWTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:A3CPLRRFWNDWTEMP") {
  field(DESC, "A3 Coupler Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M2_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "10")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:A3CPLRRFWNDWTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[6]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:A3CPLRRFWNDWTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:A3CPLRRFWNDWTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:A3CPLRRFWNDWTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:A3CPLRRFWNDWTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:A3CPLRRFWNDWTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[6]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:A3CPLRRFWNDWTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:A3CPLRRFWNDWTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:A3CPLRRFWNDWTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:A3CPLRRFWNDWTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M2_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[2] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M2_CH3_TEMP") {
  field(DESC, "A4 Coupler Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:A4CPLRRFWNDWTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[7]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M2_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:A4CPLRRFWNDWTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:A4CPLRRFWNDWTEMP") {
  field(DESC, "A4 Coupler Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M2_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:A4CPLRRFWNDWTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[7]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:A4CPLRRFWNDWTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:A4CPLRRFWNDWTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:A4CPLRRFWNDWTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:A4CPLRRFWNDWTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:A4CPLRRFWNDWTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[7]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:A4CPLRRFWNDWTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:A4CPLRRFWNDWTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:A4CPLRRFWNDWTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:A4CPLRRFWNDWTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M2_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[2] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M3_CH0_TEMP") {
  field(DESC, "Cathode center temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:CATHENDCAPCENTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[8]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M3_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:CATHENDCAPCENTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:CATHENDCAPCENTEMP") {
  field(DESC, "Cathode center temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M3_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "10")
  field(HIGH, "45")
  field(LOW, "15")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:CATHENDCAPCENTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[8]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:CATHENDCAPCENTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:CATHENDCAPCENTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:CATHENDCAPCENTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CATHENDCAPCENTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:CATHENDCAPCENTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[8]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:CATHENDCAPCENTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:CATHENDCAPCENTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:CATHENDCAPCENTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CATHENDCAPCENTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M3_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[3] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M3_CH1_TEMP") {
  field(DESC, "Cathode outer temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:CATHENDCAPOUTTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[9]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M3_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:CATHENDCAPOUTTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:CATHENDCAPOUTTEMP") {
  field(DESC, "Cathode outer temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M3_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "10")
  field(HIGH, "40")
  field(LOW, "15")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:CATHENDCAPOUTTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[9]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:CATHENDCAPOUTTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:CATHENDCAPOUTTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:CATHENDCAPOUTTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CATHENDCAPOUTTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:CATHENDCAPOUTTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[9]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:CATHENDCAPOUTTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:CATHENDCAPOUTTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:CATHENDCAPOUTTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CATHENDCAPOUTTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M3_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[3] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M3_CH2_TEMP") {
  field(DESC, "Anode center temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:ANCENTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[10]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M3_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANCENTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:ANCENTEMP") {
  field(DESC, "Anode center temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M3_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "70")
  field(LOLO, "10")
  field(HIGH, "65")
  field(LOW, "15")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:ANCENTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[10]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:ANCENTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:ANCENTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:ANCENTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:ANCENTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:ANCENTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[10]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:ANCENTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:ANCENTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:ANCENTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:ANCENTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M3_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[3] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M3_CH3_TEMP") {
  field(DESC, "Anode outer temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:ANOUTTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[11]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M3_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANOUTTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:ANOUTTEMP") {
  field(DESC, "Anode outer temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M3_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "55")
  field(LOLO, "10")
  field(HIGH, "50")
  field(LOW, "15")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:ANOUTTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[11]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:ANOUTTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:ANOUTTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:ANOUTTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:ANOUTTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:ANOUTTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[11]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:ANOUTTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:ANOUTTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:ANOUTTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:ANOUTTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M3_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[3] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M4_CH0_TEMP") {
  field(DESC, "vacuum wall southtemp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:VACWALLSTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[12]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M4_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:VACWALLSTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:VACWALLSTEMP") {
  field(DESC, "vacuum wall southtemp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M4_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "10")
  field(HIGH, "40")
  field(LOW, "15")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:VACWALLSTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[12]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:VACWALLSTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:VACWALLSTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:VACWALLSTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:VACWALLSTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:VACWALLSTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[12]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:VACWALLSTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:VACWALLSTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:VACWALLSTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:VACWALLSTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M4_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[4] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M4_CH1_TEMP") {
  field(DESC, "vacuum wall northtemp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:VACWALLNTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[13]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M4_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:VACWALLNTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:VACWALLNTEMP") {
  field(DESC, "vacuum wall northtemp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M4_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "10")
  field(HIGH, "40")
  field(LOW, "15")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:VACWALLNTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[13]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:VACWALLNTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:VACWALLNTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:VACWALLNTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:VACWALLNTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:VACWALLNTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[13]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:VACWALLNTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:VACWALLNTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:VACWALLNTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:VACWALLNTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M4_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[4] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M4_CH2_TEMP") {
  field(DESC, "anode flange ss temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:ANFLANGETEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[14]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M4_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANFLANGETEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:ANFLANGETEMP") {
  field(DESC, "anode flange ss temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M4_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "10")
  field(HIGH, "45")
  field(LOW, "15")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:ANFLANGETEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[14]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:ANFLANGETEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:ANFLANGETEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:ANFLANGETEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:ANFLANGETEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:ANFLANGETEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[14]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:ANFLANGETEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:ANFLANGETEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:ANFLANGETEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:ANFLANGETEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M4_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[4] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M4_CH3_TEMP") {
  field(DESC, "nose temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:NOSETEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[15]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M4_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:NOSETEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:NOSETEMP") {
  field(DESC, "nose temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M4_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "60")
  field(LOLO, "10")
  field(HIGH, "55")
  field(LOW, "15")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:NOSETEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[15]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:NOSETEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:NOSETEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:NOSETEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:NOSETEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:NOSETEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[15]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:NOSETEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:NOSETEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:NOSETEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:NOSETEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M4_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[4] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M5_CH0_TEMP") {
  field(DESC, "wg A3 coupler end temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3CPLRENDTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[16]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M5_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3CPLRENDTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3CPLRENDTEMP") {
  field(DESC, "wg A3 coupler end temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M5_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "5")
  field(HIGH, "45")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3CPLRENDTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[16]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3CPLRENDTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3CPLRENDTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3CPLRENDTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3CPLRENDTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3CPLRENDTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[16]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3CPLRENDTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3CPLRENDTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3CPLRENDTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3CPLRENDTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M5_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[5] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M5_CH1_TEMP") {
  field(DESC, "wg A3 middle temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3MIDTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[17]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M5_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3MIDTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3MIDTEMP") {
  field(DESC, "wg A3 middle temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M5_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3MIDTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[17]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3MIDTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3MIDTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3MIDTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3MIDTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3MIDTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[17]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3MIDTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3MIDTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3MIDTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3MIDTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M5_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[5] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M5_CH2_TEMP") {
  field(DESC, "wg A3 elbow temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3ELBOWTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[18]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M5_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3ELBOWTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3ELBOWTEMP") {
  field(DESC, "wg A3 elbow temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M5_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "5")
  field(HIGH, "45")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3ELBOWTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[18]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3ELBOWTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3ELBOWTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3ELBOWTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3ELBOWTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3ELBOWTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[18]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3ELBOWTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3ELBOWTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3ELBOWTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3ELBOWTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M5_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[5] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M5_CH3_TEMP") {
  field(DESC, "wg A3 verticle run temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3VRUNTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[19]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M5_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3VRUNTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3VRUNTEMP") {
  field(DESC, "wg A3 verticle run temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M5_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3VRUNTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[19]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3VRUNTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3VRUNTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3VRUNTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3VRUNTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3VRUNTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[19]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3VRUNTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3VRUNTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3VRUNTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3VRUNTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M5_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[5] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M6_CH0_TEMP") {
  field(DESC, "wg A4 coupler end temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4CPLRENDTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[20]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M6_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4CPLRENDTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4CPLRENDTEMP") {
  field(DESC, "wg A4 coupler end temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M6_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4CPLRENDTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[20]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4CPLRENDTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4CPLRENDTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4CPLRENDTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4CPLRENDTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4CPLRENDTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[20]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4CPLRENDTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4CPLRENDTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4CPLRENDTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4CPLRENDTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M6_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[6] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M6_CH1_TEMP") {
  field(DESC, "wg A4 middle temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4MIDTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[21]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M6_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4MIDTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4MIDTEMP") {
  field(DESC, "wg A4 middle temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M6_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4MIDTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[21]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4MIDTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4MIDTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4MIDTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4MIDTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4MIDTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[21]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4MIDTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4MIDTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4MIDTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4MIDTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M6_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[6] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M6_CH2_TEMP") {
  field(DESC, "wg A4 elbow temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4ELBOWTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[22]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M6_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4ELBOWTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4ELBOWTEMP") {
  field(DESC, "wg A4 elbow temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M6_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "5")
  field(HIGH, "45")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4ELBOWTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[22]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4ELBOWTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4ELBOWTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4ELBOWTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4ELBOWTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4ELBOWTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[22]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4ELBOWTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4ELBOWTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4ELBOWTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4ELBOWTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M6_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[6] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M6_CH3_TEMP") {
  field(DESC, "wg A4 verticle run temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4VRUNTEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[23]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M6_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4VRUNTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4VRUNTEMP") {
  field(DESC, "wg A4 verticle run temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M6_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4VRUNTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[23]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4VRUNTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4VRUNTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4VRUNTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4VRUNTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4VRUNTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[23]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4VRUNTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4VRUNTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4VRUNTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4VRUNTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M6_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[6] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M7_CH0_TEMP") {
  field(DESC, "UV Table sensor 1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LGUN:600:UVTABLETEMP1")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[24]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M7_CH0_ALIAS") {
    field(VAL,"LASR:LGUN:600:UVTABLETEMP1")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "LASR:LGUN:600:UVTABLETEMP1") {
  field(DESC, "UV Table sensor 1")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M7_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "LASR:LGUN:600:UVTABLETEMP1HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[24]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LASR:LGUN:600:UVTABLETEMP1HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "LASR:LGUN:600:UVTABLETEMP1.HIHI CP")
  field(OUT, "LASR:LGUN:600:UVTABLETEMP1HLIMDES")
  field(CALC, "A")
  field(FLNK,"LASR:LGUN:600:UVTABLETEMP1HLIMDES")
}

# Temperature low limit
record(ao, "LASR:LGUN:600:UVTABLETEMP1LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[24]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LASR:LGUN:600:UVTABLETEMP1LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "LASR:LGUN:600:UVTABLETEMP1.LOLO CP")
  field(OUT, "LASR:LGUN:600:UVTABLETEMP1LLIMDES")
  field(CALC, "A")
  field(FLNK,"LASR:LGUN:600:UVTABLETEMP1LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M7_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[7] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M7_CH1_TEMP") {
  field(DESC, "LEB Coll temp2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "MOVR:GUNB:753:2:TEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[25]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M7_CH1_ALIAS") {
    field(VAL,"MOVR:GUNB:753:2:TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "MOVR:GUNB:753:2:TEMP") {
  field(DESC, "LEB Coll temp2")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M7_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "MOVR:GUNB:753:2:TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[25]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "MOVR:GUNB:753:2:TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "MOVR:GUNB:753:2:TEMP.HIHI CP")
  field(OUT, "MOVR:GUNB:753:2:TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"MOVR:GUNB:753:2:TEMPHLIMDES")
}

# Temperature low limit
record(ao, "MOVR:GUNB:753:2:TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[25]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "MOVR:GUNB:753:2:TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "MOVR:GUNB:753:2:TEMP.LOLO CP")
  field(OUT, "MOVR:GUNB:753:2:TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"MOVR:GUNB:753:2:TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M7_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[7] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M7_CH2_TEMP") {
  field(DESC, "VV02 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "VVPG:GUNB:941:TEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[26]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M7_CH2_ALIAS") {
    field(VAL,"VVPG:GUNB:941:TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "VVPG:GUNB:941:TEMP") {
  field(DESC, "VV02 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M7_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "VVPG:GUNB:941:TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[26]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "VVPG:GUNB:941:TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "VVPG:GUNB:941:TEMP.HIHI CP")
  field(OUT, "VVPG:GUNB:941:TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"VVPG:GUNB:941:TEMPHLIMDES")
}

# Temperature low limit
record(ao, "VVPG:GUNB:941:TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[26]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "VVPG:GUNB:941:TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "VVPG:GUNB:941:TEMP.LOLO CP")
  field(OUT, "VVPG:GUNB:941:TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"VVPG:GUNB:941:TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M7_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[7] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M7_CH3_TEMP") {
  field(DESC, "S0 Alcove RTD")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LI00:1:KA:TEMP")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[27]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M7_CH3_ALIAS") {
    field(VAL,"ROOM:LI00:1:KA:TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ROOM:LI00:1:KA:TEMP") {
  field(DESC, "S0 Alcove RTD")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M7_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ROOM:LI00:1:KA:TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[27]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ROOM:LI00:1:KA:TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ROOM:LI00:1:KA:TEMP.HIHI CP")
  field(OUT, "ROOM:LI00:1:KA:TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"ROOM:LI00:1:KA:TEMPHLIMDES")
}

# Temperature low limit
record(ao, "ROOM:LI00:1:KA:TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[27]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ROOM:LI00:1:KA:TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ROOM:LI00:1:KA:TEMP.LOLO CP")
  field(OUT, "ROOM:LI00:1:KA:TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"ROOM:LI00:1:KA:TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M7_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[7] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M8_CH0_TEMP") {
  field(DESC, "PEN 0-3 sensor 1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:100:P0003:Temp1")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[28]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M8_CH0_ALIAS") {
    field(VAL,"ACCL:GUNB:100:P0003:Temp1")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:100:P0003:Temp1") {
  field(DESC, "PEN 0-3 sensor 1")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M8_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:100:P0003:Temp1HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[28]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:100:P0003:Temp1HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:100:P0003:Temp1.HIHI CP")
  field(OUT, "ACCL:GUNB:100:P0003:Temp1HLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:100:P0003:Temp1HLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:100:P0003:Temp1LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[28]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:100:P0003:Temp1LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:100:P0003:Temp1.LOLO CP")
  field(OUT, "ACCL:GUNB:100:P0003:Temp1LLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:100:P0003:Temp1LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M8_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[8] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M8_CH1_TEMP") {
  field(DESC, "PEN 0-3 sensor 2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:100:P0003:Temp2")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[29]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M8_CH1_ALIAS") {
    field(VAL,"ACCL:GUNB:100:P0003:Temp2")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:100:P0003:Temp2") {
  field(DESC, "PEN 0-3 sensor 2")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M8_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:100:P0003:Temp2HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[29]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:100:P0003:Temp2HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:100:P0003:Temp2.HIHI CP")
  field(OUT, "ACCL:GUNB:100:P0003:Temp2HLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:100:P0003:Temp2HLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:100:P0003:Temp2LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[29]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:100:P0003:Temp2LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:100:P0003:Temp2.LOLO CP")
  field(OUT, "ACCL:GUNB:100:P0003:Temp2LLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:100:P0003:Temp2LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M8_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[8] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M8_CH2_TEMP") {
  field(DESC, "PEN 0-3 sensor 3")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:100:P0003:Temp3")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[30]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M8_CH2_ALIAS") {
    field(VAL,"ACCL:GUNB:100:P0003:Temp3")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:100:P0003:Temp3") {
  field(DESC, "PEN 0-3 sensor 3")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M8_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:100:P0003:Temp3HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[30]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:100:P0003:Temp3HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:100:P0003:Temp3.HIHI CP")
  field(OUT, "ACCL:GUNB:100:P0003:Temp3HLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:100:P0003:Temp3HLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:100:P0003:Temp3LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[30]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:100:P0003:Temp3LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:100:P0003:Temp3.LOLO CP")
  field(OUT, "ACCL:GUNB:100:P0003:Temp3LLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:100:P0003:Temp3LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M8_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[8] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M8_CH3_TEMP") {
  field(DESC, "PEN 0-3 sensor 4")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:100:P0003:Temp4")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[31]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M8_CH3_ALIAS") {
    field(VAL,"ACCL:GUNB:100:P0003:Temp4")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:100:P0003:Temp4") {
  field(DESC, "PEN 0-3 sensor 4")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M8_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:100:P0003:Temp4HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[31]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:100:P0003:Temp4HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:100:P0003:Temp4.HIHI CP")
  field(OUT, "ACCL:GUNB:100:P0003:Temp4HLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:100:P0003:Temp4HLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:100:P0003:Temp4LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[31]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:100:P0003:Temp4LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:100:P0003:Temp4.LOLO CP")
  field(OUT, "ACCL:GUNB:100:P0003:Temp4LLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:100:P0003:Temp4LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M8_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[8] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M9_CH0_TEMP") {
  field(DESC, "PEN 0-3 sensor 5")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:100:P0003:Temp5")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[32]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M9_CH0_ALIAS") {
    field(VAL,"ACCL:GUNB:100:P0003:Temp5")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:100:P0003:Temp5") {
  field(DESC, "PEN 0-3 sensor 5")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M9_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:100:P0003:Temp5HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[32]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:100:P0003:Temp5HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:100:P0003:Temp5.HIHI CP")
  field(OUT, "ACCL:GUNB:100:P0003:Temp5HLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:100:P0003:Temp5HLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:100:P0003:Temp5LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[32]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:100:P0003:Temp5LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:100:P0003:Temp5.LOLO CP")
  field(OUT, "ACCL:GUNB:100:P0003:Temp5LLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:100:P0003:Temp5LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M9_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[9] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M9_CH1_TEMP") {
  field(DESC, "PEN 0-3 sensor 6")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:100:P0003:Temp6")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[33]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M9_CH1_ALIAS") {
    field(VAL,"ACCL:GUNB:100:P0003:Temp6")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:100:P0003:Temp6") {
  field(DESC, "PEN 0-3 sensor 6")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M9_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:GUNB:100:P0003:Temp6HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[33]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:100:P0003:Temp6HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:100:P0003:Temp6.HIHI CP")
  field(OUT, "ACCL:GUNB:100:P0003:Temp6HLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:100:P0003:Temp6HLIMDES")
}

# Temperature low limit
record(ao, "ACCL:GUNB:100:P0003:Temp6LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[33]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:GUNB:100:P0003:Temp6LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:100:P0003:Temp6.LOLO CP")
  field(OUT, "ACCL:GUNB:100:P0003:Temp6LLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:100:P0003:Temp6LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M9_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[9] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M9_CH2_TEMP") {
  field(DESC, "PEN 0-1 sensor 1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:L0B:0110:P0001:Temp1")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[34]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M9_CH2_ALIAS") {
    field(VAL,"ACCL:L0B:0110:P0001:Temp1")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:L0B:0110:P0001:Temp1") {
  field(DESC, "PEN 0-1 sensor 1")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M9_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:L0B:0110:P0001:Temp1HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[34]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:L0B:0110:P0001:Temp1HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:L0B:0110:P0001:Temp1.HIHI CP")
  field(OUT, "ACCL:L0B:0110:P0001:Temp1HLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:L0B:0110:P0001:Temp1HLIMDES")
}

# Temperature low limit
record(ao, "ACCL:L0B:0110:P0001:Temp1LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[34]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:L0B:0110:P0001:Temp1LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:L0B:0110:P0001:Temp1.LOLO CP")
  field(OUT, "ACCL:L0B:0110:P0001:Temp1LLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:L0B:0110:P0001:Temp1LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M9_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[9] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M9_CH3_TEMP") {
  field(DESC, "PEN 0-1 sensor 2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:L0B:0110:P0001:Temp2")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[35]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M9_CH3_ALIAS") {
    field(VAL,"ACCL:L0B:0110:P0001:Temp2")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:L0B:0110:P0001:Temp2") {
  field(DESC, "PEN 0-1 sensor 2")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M9_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:L0B:0110:P0001:Temp2HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[35]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:L0B:0110:P0001:Temp2HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:L0B:0110:P0001:Temp2.HIHI CP")
  field(OUT, "ACCL:L0B:0110:P0001:Temp2HLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:L0B:0110:P0001:Temp2HLIMDES")
}

# Temperature low limit
record(ao, "ACCL:L0B:0110:P0001:Temp2LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[35]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:L0B:0110:P0001:Temp2LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:L0B:0110:P0001:Temp2.LOLO CP")
  field(OUT, "ACCL:L0B:0110:P0001:Temp2LLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:L0B:0110:P0001:Temp2LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M9_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[9] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M10_CH0_TEMP") {
  field(DESC, "PEN 0-1 sensor 3")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:L0B:0110:P0001:Temp3")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[36]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M10_CH0_ALIAS") {
    field(VAL,"ACCL:L0B:0110:P0001:Temp3")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:L0B:0110:P0001:Temp3") {
  field(DESC, "PEN 0-1 sensor 3")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M10_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:L0B:0110:P0001:Temp3HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[36]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:L0B:0110:P0001:Temp3HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:L0B:0110:P0001:Temp3.HIHI CP")
  field(OUT, "ACCL:L0B:0110:P0001:Temp3HLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:L0B:0110:P0001:Temp3HLIMDES")
}

# Temperature low limit
record(ao, "ACCL:L0B:0110:P0001:Temp3LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[36]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:L0B:0110:P0001:Temp3LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:L0B:0110:P0001:Temp3.LOLO CP")
  field(OUT, "ACCL:L0B:0110:P0001:Temp3LLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:L0B:0110:P0001:Temp3LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M10_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[10] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M10_CH1_TEMP") {
  field(DESC, "PEN 0-1 sensor 4")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:L0B:0110:P0001:Temp4")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[37]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M10_CH1_ALIAS") {
    field(VAL,"ACCL:L0B:0110:P0001:Temp4")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:L0B:0110:P0001:Temp4") {
  field(DESC, "PEN 0-1 sensor 4")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M10_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:L0B:0110:P0001:Temp4HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[37]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:L0B:0110:P0001:Temp4HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:L0B:0110:P0001:Temp4.HIHI CP")
  field(OUT, "ACCL:L0B:0110:P0001:Temp4HLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:L0B:0110:P0001:Temp4HLIMDES")
}

# Temperature low limit
record(ao, "ACCL:L0B:0110:P0001:Temp4LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[37]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:L0B:0110:P0001:Temp4LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:L0B:0110:P0001:Temp4.LOLO CP")
  field(OUT, "ACCL:L0B:0110:P0001:Temp4LLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:L0B:0110:P0001:Temp4LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M10_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[10] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M10_CH2_TEMP") {
  field(DESC, "PEN 0-1 sensor 5")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:L0B:0110:P0001:Temp5")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[38]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M10_CH2_ALIAS") {
    field(VAL,"ACCL:L0B:0110:P0001:Temp5")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:L0B:0110:P0001:Temp5") {
  field(DESC, "PEN 0-1 sensor 5")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M10_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:L0B:0110:P0001:Temp5HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[38]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:L0B:0110:P0001:Temp5HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:L0B:0110:P0001:Temp5.HIHI CP")
  field(OUT, "ACCL:L0B:0110:P0001:Temp5HLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:L0B:0110:P0001:Temp5HLIMDES")
}

# Temperature low limit
record(ao, "ACCL:L0B:0110:P0001:Temp5LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[38]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:L0B:0110:P0001:Temp5LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:L0B:0110:P0001:Temp5.LOLO CP")
  field(OUT, "ACCL:L0B:0110:P0001:Temp5LLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:L0B:0110:P0001:Temp5LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M10_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[10] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR02_M10_CH3_TEMP") {
  field(DESC, "PEN 0-1 sensor 6")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:L0B:0110:P0001:Temp6")
  field(INP , "@PLC_GUNB_TM01 CR02_Temp[39]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR02_M10_CH3_ALIAS") {
    field(VAL,"ACCL:L0B:0110:P0001:Temp6")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:L0B:0110:P0001:Temp6") {
  field(DESC, "PEN 0-1 sensor 6")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR02_M10_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ACCL:L0B:0110:P0001:Temp6HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_HiTemp[39]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:L0B:0110:P0001:Temp6HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:L0B:0110:P0001:Temp6.HIHI CP")
  field(OUT, "ACCL:L0B:0110:P0001:Temp6HLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:L0B:0110:P0001:Temp6HLIMDES")
}

# Temperature low limit
record(ao, "ACCL:L0B:0110:P0001:Temp6LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR02_LoTemp[39]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ACCL:L0B:0110:P0001:Temp6LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:L0B:0110:P0001:Temp6.LOLO CP")
  field(OUT, "ACCL:L0B:0110:P0001:Temp6LLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:L0B:0110:P0001:Temp6LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR02_M10_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR02_Ch_Faults[10] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M1_CH0_TEMP") {
  field(DESC, "Shaping SHG")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR00:1:TABLETEMP01")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[0]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M1_CH0_ALIAS") {
    field(VAL,"LASR:LR00:1:TABLETEMP01")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "LASR:LR00:1:TABLETEMP01") {
  field(DESC, "Shaping SHG")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M1_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "LASR:LR00:1:TABLETEMP01HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[0]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LASR:LR00:1:TABLETEMP01HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "LASR:LR00:1:TABLETEMP01.HIHI CP")
  field(OUT, "LASR:LR00:1:TABLETEMP01HLIMDES")
  field(CALC, "A")
  field(FLNK,"LASR:LR00:1:TABLETEMP01HLIMDES")
}

# Temperature low limit
record(ao, "LASR:LR00:1:TABLETEMP01LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[0]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LASR:LR00:1:TABLETEMP01LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "LASR:LR00:1:TABLETEMP01.LOLO CP")
  field(OUT, "LASR:LR00:1:TABLETEMP01LLIMDES")
  field(CALC, "A")
  field(FLNK,"LASR:LR00:1:TABLETEMP01LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M1_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[1] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M1_CH1_TEMP") {
  field(DESC, "Shaping FHG")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR00:1:TABLETEMP02")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[1]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M1_CH1_ALIAS") {
    field(VAL,"LASR:LR00:1:TABLETEMP02")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "LASR:LR00:1:TABLETEMP02") {
  field(DESC, "Shaping FHG")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M1_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "LASR:LR00:1:TABLETEMP02HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[1]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LASR:LR00:1:TABLETEMP02HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "LASR:LR00:1:TABLETEMP02.HIHI CP")
  field(OUT, "LASR:LR00:1:TABLETEMP02HLIMDES")
  field(CALC, "A")
  field(FLNK,"LASR:LR00:1:TABLETEMP02HLIMDES")
}

# Temperature low limit
record(ao, "LASR:LR00:1:TABLETEMP02LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[1]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LASR:LR00:1:TABLETEMP02LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "LASR:LR00:1:TABLETEMP02.LOLO CP")
  field(OUT, "LASR:LR00:1:TABLETEMP02LLIMDES")
  field(CALC, "A")
  field(FLNK,"LASR:LR00:1:TABLETEMP02LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M1_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[1] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M1_CH2_TEMP") {
  field(DESC, "Air South East")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LR00:1:AIRTEMP1")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[2]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M1_CH2_ALIAS") {
    field(VAL,"ROOM:LR00:1:AIRTEMP1")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ROOM:LR00:1:AIRTEMP1") {
  field(DESC, "Air South East")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M1_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ROOM:LR00:1:AIRTEMP1HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[2]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ROOM:LR00:1:AIRTEMP1HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ROOM:LR00:1:AIRTEMP1.HIHI CP")
  field(OUT, "ROOM:LR00:1:AIRTEMP1HLIMDES")
  field(CALC, "A")
  field(FLNK,"ROOM:LR00:1:AIRTEMP1HLIMDES")
}

# Temperature low limit
record(ao, "ROOM:LR00:1:AIRTEMP1LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[2]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ROOM:LR00:1:AIRTEMP1LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ROOM:LR00:1:AIRTEMP1.LOLO CP")
  field(OUT, "ROOM:LR00:1:AIRTEMP1LLIMDES")
  field(CALC, "A")
  field(FLNK,"ROOM:LR00:1:AIRTEMP1LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M1_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[1] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M1_CH3_TEMP") {
  field(DESC, "Air North East")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LR00:1:AIRTEMP2")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[3]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M1_CH3_ALIAS") {
    field(VAL,"ROOM:LR00:1:AIRTEMP2")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ROOM:LR00:1:AIRTEMP2") {
  field(DESC, "Air North East")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M1_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ROOM:LR00:1:AIRTEMP2HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[3]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ROOM:LR00:1:AIRTEMP2HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ROOM:LR00:1:AIRTEMP2.HIHI CP")
  field(OUT, "ROOM:LR00:1:AIRTEMP2HLIMDES")
  field(CALC, "A")
  field(FLNK,"ROOM:LR00:1:AIRTEMP2HLIMDES")
}

# Temperature low limit
record(ao, "ROOM:LR00:1:AIRTEMP2LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[3]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ROOM:LR00:1:AIRTEMP2LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ROOM:LR00:1:AIRTEMP2.LOLO CP")
  field(OUT, "ROOM:LR00:1:AIRTEMP2LLIMDES")
  field(CALC, "A")
  field(FLNK,"ROOM:LR00:1:AIRTEMP2LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M1_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[1] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M2_CH0_TEMP") {
  field(DESC, "Inside stretcher")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR00:1:TABLETEMP03")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[4]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M2_CH0_ALIAS") {
    field(VAL,"LASR:LR00:1:TABLETEMP03")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "LASR:LR00:1:TABLETEMP03") {
  field(DESC, "Inside stretcher")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M2_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "LASR:LR00:1:TABLETEMP03HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[4]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LASR:LR00:1:TABLETEMP03HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "LASR:LR00:1:TABLETEMP03.HIHI CP")
  field(OUT, "LASR:LR00:1:TABLETEMP03HLIMDES")
  field(CALC, "A")
  field(FLNK,"LASR:LR00:1:TABLETEMP03HLIMDES")
}

# Temperature low limit
record(ao, "LASR:LR00:1:TABLETEMP03LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[4]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LASR:LR00:1:TABLETEMP03LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "LASR:LR00:1:TABLETEMP03.LOLO CP")
  field(OUT, "LASR:LR00:1:TABLETEMP03LLIMDES")
  field(CALC, "A")
  field(FLNK,"LASR:LR00:1:TABLETEMP03LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M2_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[2] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M2_CH1_TEMP") {
  field(DESC, "Air inside enclosure")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR00:1:TABLETEMP04")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[5]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M2_CH1_ALIAS") {
    field(VAL,"LASR:LR00:1:TABLETEMP04")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "LASR:LR00:1:TABLETEMP04") {
  field(DESC, "Air inside enclosure")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M2_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "LASR:LR00:1:TABLETEMP04HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[5]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LASR:LR00:1:TABLETEMP04HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "LASR:LR00:1:TABLETEMP04.HIHI CP")
  field(OUT, "LASR:LR00:1:TABLETEMP04HLIMDES")
  field(CALC, "A")
  field(FLNK,"LASR:LR00:1:TABLETEMP04HLIMDES")
}

# Temperature low limit
record(ao, "LASR:LR00:1:TABLETEMP04LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[5]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LASR:LR00:1:TABLETEMP04LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "LASR:LR00:1:TABLETEMP04.LOLO CP")
  field(OUT, "LASR:LR00:1:TABLETEMP04LLIMDES")
  field(CALC, "A")
  field(FLNK,"LASR:LR00:1:TABLETEMP04LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M2_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[2] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M2_CH2_TEMP") {
  field(DESC, "Production SHG")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR00:1:TABLETEMP05")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[6]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M2_CH2_ALIAS") {
    field(VAL,"LASR:LR00:1:TABLETEMP05")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "LASR:LR00:1:TABLETEMP05") {
  field(DESC, "Production SHG")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M2_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "LASR:LR00:1:TABLETEMP05HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[6]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LASR:LR00:1:TABLETEMP05HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "LASR:LR00:1:TABLETEMP05.HIHI CP")
  field(OUT, "LASR:LR00:1:TABLETEMP05HLIMDES")
  field(CALC, "A")
  field(FLNK,"LASR:LR00:1:TABLETEMP05HLIMDES")
}

# Temperature low limit
record(ao, "LASR:LR00:1:TABLETEMP05LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[6]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LASR:LR00:1:TABLETEMP05LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "LASR:LR00:1:TABLETEMP05.LOLO CP")
  field(OUT, "LASR:LR00:1:TABLETEMP05LLIMDES")
  field(CALC, "A")
  field(FLNK,"LASR:LR00:1:TABLETEMP05LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M2_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[2] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M2_CH3_TEMP") {
  field(DESC, "Production FHG")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR00:1:TABLETEMP06")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[7]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M2_CH3_ALIAS") {
    field(VAL,"LASR:LR00:1:TABLETEMP06")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "LASR:LR00:1:TABLETEMP06") {
  field(DESC, "Production FHG")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M2_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "LASR:LR00:1:TABLETEMP06HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[7]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LASR:LR00:1:TABLETEMP06HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "LASR:LR00:1:TABLETEMP06.HIHI CP")
  field(OUT, "LASR:LR00:1:TABLETEMP06HLIMDES")
  field(CALC, "A")
  field(FLNK,"LASR:LR00:1:TABLETEMP06HLIMDES")
}

# Temperature low limit
record(ao, "LASR:LR00:1:TABLETEMP06LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[7]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LASR:LR00:1:TABLETEMP06LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "LASR:LR00:1:TABLETEMP06.LOLO CP")
  field(OUT, "LASR:LR00:1:TABLETEMP06LLIMDES")
  field(CALC, "A")
  field(FLNK,"LASR:LR00:1:TABLETEMP06LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M2_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[2] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M3_CH0_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M3_CH0_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[8]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M3_CH0_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M3_CH0_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M3_CH0_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M3_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M3_CH0_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[8]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M3_CH0_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M3_CH0_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M3_CH0_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M3_CH0_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M3_CH0_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[8]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M3_CH0_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M3_CH0_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M3_CH0_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M3_CH0_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M3_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[3] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M3_CH1_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M3_CH1_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[9]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M3_CH1_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M3_CH1_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M3_CH1_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M3_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M3_CH1_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[9]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M3_CH1_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M3_CH1_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M3_CH1_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M3_CH1_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M3_CH1_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[9]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M3_CH1_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M3_CH1_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M3_CH1_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M3_CH1_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M3_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[3] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M3_CH2_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M3_CH2_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[10]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M3_CH2_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M3_CH2_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M3_CH2_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M3_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M3_CH2_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[10]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M3_CH2_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M3_CH2_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M3_CH2_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M3_CH2_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M3_CH2_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[10]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M3_CH2_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M3_CH2_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M3_CH2_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M3_CH2_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M3_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[3] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M3_CH3_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M3_CH3_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[11]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M3_CH3_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M3_CH3_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M3_CH3_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M3_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M3_CH3_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[11]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M3_CH3_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M3_CH3_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M3_CH3_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M3_CH3_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M3_CH3_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[11]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M3_CH3_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M3_CH3_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M3_CH3_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M3_CH3_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M3_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[3] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M4_CH0_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M4_CH0_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[12]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M4_CH0_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M4_CH0_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M4_CH0_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M4_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M4_CH0_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[12]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M4_CH0_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M4_CH0_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M4_CH0_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M4_CH0_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M4_CH0_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[12]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M4_CH0_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M4_CH0_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M4_CH0_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M4_CH0_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M4_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[4] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M4_CH1_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M4_CH1_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[13]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M4_CH1_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M4_CH1_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M4_CH1_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M4_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M4_CH1_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[13]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M4_CH1_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M4_CH1_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M4_CH1_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M4_CH1_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M4_CH1_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[13]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M4_CH1_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M4_CH1_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M4_CH1_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M4_CH1_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M4_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[4] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M4_CH2_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M4_CH2_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[14]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M4_CH2_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M4_CH2_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M4_CH2_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M4_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M4_CH2_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[14]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M4_CH2_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M4_CH2_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M4_CH2_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M4_CH2_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M4_CH2_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[14]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M4_CH2_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M4_CH2_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M4_CH2_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M4_CH2_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M4_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[4] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M4_CH3_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M4_CH3_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[15]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M4_CH3_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M4_CH3_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M4_CH3_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M4_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M4_CH3_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[15]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M4_CH3_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M4_CH3_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M4_CH3_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M4_CH3_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M4_CH3_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[15]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M4_CH3_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M4_CH3_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M4_CH3_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M4_CH3_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M4_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[4] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M5_CH0_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M5_CH0_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[16]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M5_CH0_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M5_CH0_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M5_CH0_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M5_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M5_CH0_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[16]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M5_CH0_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M5_CH0_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M5_CH0_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M5_CH0_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M5_CH0_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[16]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M5_CH0_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M5_CH0_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M5_CH0_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M5_CH0_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M5_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[5] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M5_CH1_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M5_CH1_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[17]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M5_CH1_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M5_CH1_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M5_CH1_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M5_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M5_CH1_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[17]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M5_CH1_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M5_CH1_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M5_CH1_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M5_CH1_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M5_CH1_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[17]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M5_CH1_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M5_CH1_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M5_CH1_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M5_CH1_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M5_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[5] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M5_CH2_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M5_CH2_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[18]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M5_CH2_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M5_CH2_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M5_CH2_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M5_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M5_CH2_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[18]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M5_CH2_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M5_CH2_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M5_CH2_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M5_CH2_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M5_CH2_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[18]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M5_CH2_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M5_CH2_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M5_CH2_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M5_CH2_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M5_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[5] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M5_CH3_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M5_CH3_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[19]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M5_CH3_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M5_CH3_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M5_CH3_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M5_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M5_CH3_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[19]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M5_CH3_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M5_CH3_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M5_CH3_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M5_CH3_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M5_CH3_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[19]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M5_CH3_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M5_CH3_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M5_CH3_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M5_CH3_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M5_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[5] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M6_CH0_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M6_CH0_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[20]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M6_CH0_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M6_CH0_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M6_CH0_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M6_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M6_CH0_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[20]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M6_CH0_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M6_CH0_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M6_CH0_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M6_CH0_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M6_CH0_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[20]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M6_CH0_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M6_CH0_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M6_CH0_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M6_CH0_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M6_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[6] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M6_CH1_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M6_CH1_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[21]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M6_CH1_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M6_CH1_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M6_CH1_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M6_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M6_CH1_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[21]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M6_CH1_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M6_CH1_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M6_CH1_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M6_CH1_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M6_CH1_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[21]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M6_CH1_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M6_CH1_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M6_CH1_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M6_CH1_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M6_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[6] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M6_CH2_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M6_CH2_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[22]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M6_CH2_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M6_CH2_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M6_CH2_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M6_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M6_CH2_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[22]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M6_CH2_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M6_CH2_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M6_CH2_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M6_CH2_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M6_CH2_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[22]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M6_CH2_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M6_CH2_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M6_CH2_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M6_CH2_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M6_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[6] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M6_CH3_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M6_CH3_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[23]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M6_CH3_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M6_CH3_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M6_CH3_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M6_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M6_CH3_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[23]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M6_CH3_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M6_CH3_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M6_CH3_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M6_CH3_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M6_CH3_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[23]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M6_CH3_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M6_CH3_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M6_CH3_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M6_CH3_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M6_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[6] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M7_CH0_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M7_CH0_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[24]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M7_CH0_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M7_CH0_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M7_CH0_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M7_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M7_CH0_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[24]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M7_CH0_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M7_CH0_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M7_CH0_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M7_CH0_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M7_CH0_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[24]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M7_CH0_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M7_CH0_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M7_CH0_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M7_CH0_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M7_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[7] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M7_CH1_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M7_CH1_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[25]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M7_CH1_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M7_CH1_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M7_CH1_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M7_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M7_CH1_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[25]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M7_CH1_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M7_CH1_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M7_CH1_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M7_CH1_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M7_CH1_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[25]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M7_CH1_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M7_CH1_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M7_CH1_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M7_CH1_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M7_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[7] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M7_CH2_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M7_CH2_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[26]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M7_CH2_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M7_CH2_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M7_CH2_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M7_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M7_CH2_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[26]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M7_CH2_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M7_CH2_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M7_CH2_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M7_CH2_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M7_CH2_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[26]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M7_CH2_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M7_CH2_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M7_CH2_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M7_CH2_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M7_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[7] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M7_CH3_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M7_CH3_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[27]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M7_CH3_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M7_CH3_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M7_CH3_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M7_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M7_CH3_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[27]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M7_CH3_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M7_CH3_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M7_CH3_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M7_CH3_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M7_CH3_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[27]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M7_CH3_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M7_CH3_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M7_CH3_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M7_CH3_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M7_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[7] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M8_CH0_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M8_CH0_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[28]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M8_CH0_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M8_CH0_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M8_CH0_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M8_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M8_CH0_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[28]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M8_CH0_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M8_CH0_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M8_CH0_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M8_CH0_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M8_CH0_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[28]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M8_CH0_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M8_CH0_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M8_CH0_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M8_CH0_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M8_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[8] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M8_CH1_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M8_CH1_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[28]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M8_CH1_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M8_CH1_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M8_CH1_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M8_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M8_CH1_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[28]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M8_CH1_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M8_CH1_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M8_CH1_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M8_CH1_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M8_CH1_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[28]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M8_CH1_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M8_CH1_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M8_CH1_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M8_CH1_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M8_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[8] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M8_CH2_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M8_CH2_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[30]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M8_CH2_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M8_CH2_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M8_CH2_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M8_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M8_CH2_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[30]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M8_CH2_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M8_CH2_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M8_CH2_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M8_CH2_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M8_CH2_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[30]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M8_CH2_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M8_CH2_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M8_CH2_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M8_CH2_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M8_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[8] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR03_M8_CH3_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:03:M8_CH3_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR03_Temp[31]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR03_M8_CH3_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:03:M8_CH3_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:03:M8_CH3_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR03_M8_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:03:M8_CH3_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_HiTemp[31]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M8_CH3_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:03:M8_CH3_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:03:M8_CH3_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M8_CH3_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:03:M8_CH3_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR03_LoTemp[31]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:03:M8_CH3_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:03:M8_CH3_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:03:M8_CH3_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:03:M8_CH3_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR03_M8_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR03_Ch_Faults[8] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M1_CH0_TEMP") {
  field(DESC, "Solenoid 2 Body")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:GUNB:823:BDYTEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[0]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M1_CH0_ALIAS") {
    field(VAL,"SOLN:GUNB:823:BDYTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "SOLN:GUNB:823:BDYTEMP") {
  field(DESC, "Solenoid 2 Body")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M1_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "0")
  field(HIGH, "45")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "SOLN:GUNB:823:BDYTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[0]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "SOLN:GUNB:823:BDYTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "SOLN:GUNB:823:BDYTEMP.HIHI CP")
  field(OUT, "SOLN:GUNB:823:BDYTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"SOLN:GUNB:823:BDYTEMPHLIMDES")
}

# Temperature low limit
record(ao, "SOLN:GUNB:823:BDYTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[0]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "SOLN:GUNB:823:BDYTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "SOLN:GUNB:823:BDYTEMP.LOLO CP")
  field(OUT, "SOLN:GUNB:823:BDYTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"SOLN:GUNB:823:BDYTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M1_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[1] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M1_CH1_TEMP") {
  field(DESC, "Phase ref line 1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LLRF:GUNB:1:PRLTEMP1")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[1]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M1_CH1_ALIAS") {
    field(VAL,"LLRF:GUNB:1:PRLTEMP1")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "LLRF:GUNB:1:PRLTEMP1") {
  field(DESC, "Phase ref line 1")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M1_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "LLRF:GUNB:1:PRLTEMP1HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[1]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LLRF:GUNB:1:PRLTEMP1HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "LLRF:GUNB:1:PRLTEMP1.HIHI CP")
  field(OUT, "LLRF:GUNB:1:PRLTEMP1HLIMDES")
  field(CALC, "A")
  field(FLNK,"LLRF:GUNB:1:PRLTEMP1HLIMDES")
}

# Temperature low limit
record(ao, "LLRF:GUNB:1:PRLTEMP1LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[1]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LLRF:GUNB:1:PRLTEMP1LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "LLRF:GUNB:1:PRLTEMP1.LOLO CP")
  field(OUT, "LLRF:GUNB:1:PRLTEMP1LLIMDES")
  field(CALC, "A")
  field(FLNK,"LLRF:GUNB:1:PRLTEMP1LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M1_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[1] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M1_CH2_TEMP") {
  field(DESC, "Phase ref line 2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LLRF:GUNB:1:PRLTEMP2")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[2]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M1_CH2_ALIAS") {
    field(VAL,"LLRF:GUNB:1:PRLTEMP2")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "LLRF:GUNB:1:PRLTEMP2") {
  field(DESC, "Phase ref line 2")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M1_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "LLRF:GUNB:1:PRLTEMP2HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[2]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LLRF:GUNB:1:PRLTEMP2HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "LLRF:GUNB:1:PRLTEMP2.HIHI CP")
  field(OUT, "LLRF:GUNB:1:PRLTEMP2HLIMDES")
  field(CALC, "A")
  field(FLNK,"LLRF:GUNB:1:PRLTEMP2HLIMDES")
}

# Temperature low limit
record(ao, "LLRF:GUNB:1:PRLTEMP2LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[2]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "LLRF:GUNB:1:PRLTEMP2LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "LLRF:GUNB:1:PRLTEMP2.LOLO CP")
  field(OUT, "LLRF:GUNB:1:PRLTEMP2LLIMDES")
  field(CALC, "A")
  field(FLNK,"LLRF:GUNB:1:PRLTEMP2LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M1_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[1] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M1_CH3_TEMP") {
  field(DESC, "Air temp 1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:GUNB:1:AIRTEMP1")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[3]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M1_CH3_ALIAS") {
    field(VAL,"ROOM:GUNB:1:AIRTEMP1")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ROOM:GUNB:1:AIRTEMP1") {
  field(DESC, "Air temp 1")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M1_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ROOM:GUNB:1:AIRTEMP1HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[3]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ROOM:GUNB:1:AIRTEMP1HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ROOM:GUNB:1:AIRTEMP1.HIHI CP")
  field(OUT, "ROOM:GUNB:1:AIRTEMP1HLIMDES")
  field(CALC, "A")
  field(FLNK,"ROOM:GUNB:1:AIRTEMP1HLIMDES")
}

# Temperature low limit
record(ao, "ROOM:GUNB:1:AIRTEMP1LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[3]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ROOM:GUNB:1:AIRTEMP1LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ROOM:GUNB:1:AIRTEMP1.LOLO CP")
  field(OUT, "ROOM:GUNB:1:AIRTEMP1LLIMDES")
  field(CALC, "A")
  field(FLNK,"ROOM:GUNB:1:AIRTEMP1LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M1_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[1] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M2_CH0_TEMP") {
  field(DESC, "Air temp 2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:GUNB:1:AIRTEMP2")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[4]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M2_CH0_ALIAS") {
    field(VAL,"ROOM:GUNB:1:AIRTEMP2")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ROOM:GUNB:1:AIRTEMP2") {
  field(DESC, "Air temp 2")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M2_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "ROOM:GUNB:1:AIRTEMP2HLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[4]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ROOM:GUNB:1:AIRTEMP2HLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ROOM:GUNB:1:AIRTEMP2.HIHI CP")
  field(OUT, "ROOM:GUNB:1:AIRTEMP2HLIMDES")
  field(CALC, "A")
  field(FLNK,"ROOM:GUNB:1:AIRTEMP2HLIMDES")
}

# Temperature low limit
record(ao, "ROOM:GUNB:1:AIRTEMP2LLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[4]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "ROOM:GUNB:1:AIRTEMP2LLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ROOM:GUNB:1:AIRTEMP2.LOLO CP")
  field(OUT, "ROOM:GUNB:1:AIRTEMP2LLIMDES")
  field(CALC, "A")
  field(FLNK,"ROOM:GUNB:1:AIRTEMP2LLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M2_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[2] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M2_CH1_TEMP") {
  field(DESC, "Solenoid 1 body temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:GUNB:212:BDYTEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[5]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M2_CH1_ALIAS") {
    field(VAL,"SOLN:GUNB:212:BDYTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "SOLN:GUNB:212:BDYTEMP") {
  field(DESC, "Solenoid 1 body temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M2_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "55")
  field(LOLO, "0")
  field(HIGH, "50")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "SOLN:GUNB:212:BDYTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[5]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "SOLN:GUNB:212:BDYTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "SOLN:GUNB:212:BDYTEMP.HIHI CP")
  field(OUT, "SOLN:GUNB:212:BDYTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"SOLN:GUNB:212:BDYTEMPHLIMDES")
}

# Temperature low limit
record(ao, "SOLN:GUNB:212:BDYTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[5]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "SOLN:GUNB:212:BDYTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "SOLN:GUNB:212:BDYTEMP.LOLO CP")
  field(OUT, "SOLN:GUNB:212:BDYTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"SOLN:GUNB:212:BDYTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M2_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[2] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M2_CH2_TEMP") {
  field(DESC, "LEB Coll Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "MOVR:GUNB:753:1:TEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[6]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M2_CH2_ALIAS") {
    field(VAL,"MOVR:GUNB:753:1:TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "MOVR:GUNB:753:1:TEMP") {
  field(DESC, "LEB Coll Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M2_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "MOVR:GUNB:753:1:TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[6]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "MOVR:GUNB:753:1:TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "MOVR:GUNB:753:1:TEMP.HIHI CP")
  field(OUT, "MOVR:GUNB:753:1:TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"MOVR:GUNB:753:1:TEMPHLIMDES")
}

# Temperature low limit
record(ao, "MOVR:GUNB:753:1:TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[6]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "MOVR:GUNB:753:1:TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "MOVR:GUNB:753:1:TEMP.LOLO CP")
  field(OUT, "MOVR:GUNB:753:1:TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"MOVR:GUNB:753:1:TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M2_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[2] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M2_CH3_TEMP") {
  field(DESC, "")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:GUNB:TM01:04:M2_CH3_SPARE")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[7]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M2_CH3_ALIAS") {
    field(VAL,"PLC:GUNB:TM01:04:M2_CH3_SPARE")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "PLC:GUNB:TM01:04:M2_CH3_SPARE") {
  field(DESC, "")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M2_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "40")
  field(LOLO, "0")
  field(HIGH, "35")
  field(LOW, "5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "PLC:GUNB:TM01:04:M2_CH3_SPAREHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[7]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:04:M2_CH3_SPAREHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "PLC:GUNB:TM01:04:M2_CH3_SPARE.HIHI CP")
  field(OUT, "PLC:GUNB:TM01:04:M2_CH3_SPAREHLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:04:M2_CH3_SPAREHLIMDES")
}

# Temperature low limit
record(ao, "PLC:GUNB:TM01:04:M2_CH3_SPARELLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[7]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "PLC:GUNB:TM01:04:M2_CH3_SPARELLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "PLC:GUNB:TM01:04:M2_CH3_SPARE.LOLO CP")
  field(OUT, "PLC:GUNB:TM01:04:M2_CH3_SPARELLIMDES")
  field(CALC, "A")
  field(FLNK,"PLC:GUNB:TM01:04:M2_CH3_SPARELLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M2_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[2] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M4_CH0_TEMP") {
  field(DESC, "E7 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3:E7TEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[8]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M4_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3:E7TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3:E7TEMP") {
  field(DESC, "E7 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M4_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3:E7TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[8]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:E7TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3:E7TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3:E7TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:E7TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3:E7TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[8]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:E7TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3:E7TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3:E7TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:E7TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M4_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[4] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M4_CH1_TEMP") {
  field(DESC, "Flange Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3:FLANGETEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[9]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M4_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3:FLANGETEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3:FLANGETEMP") {
  field(DESC, "Flange Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M4_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "5")
  field(HIGH, "45")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3:FLANGETEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[9]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:FLANGETEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3:FLANGETEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3:FLANGETEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:FLANGETEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3:FLANGETEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[9]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:FLANGETEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3:FLANGETEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3:FLANGETEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:FLANGETEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M4_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[4] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M4_CH2_TEMP") {
  field(DESC, "S6 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3:S6TEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[10]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M4_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3:S6TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3:S6TEMP") {
  field(DESC, "S6 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M4_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3:S6TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[10]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:S6TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3:S6TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3:S6TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:S6TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3:S6TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[10]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:S6TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3:S6TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3:S6TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:S6TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M4_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[4] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M4_CH3_TEMP") {
  field(DESC, "E8 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3:E8TEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[11]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M4_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3:E8TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3:E8TEMP") {
  field(DESC, "E8 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M4_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3:E8TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[11]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:E8TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3:E8TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3:E8TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:E8TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3:E8TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[11]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:E8TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3:E8TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3:E8TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:E8TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M4_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[4] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M5_CH0_TEMP") {
  field(DESC, "S7 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3:S7TEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[12]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M5_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3:S7TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3:S7TEMP") {
  field(DESC, "S7 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M5_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3:S7TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[12]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:S7TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3:S7TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3:S7TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:S7TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3:S7TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[12]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:S7TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3:S7TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3:S7TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:S7TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M5_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[5] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M5_CH1_TEMP") {
  field(DESC, "E9 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3:E9TEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[13]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M5_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3:E9TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3:E9TEMP") {
  field(DESC, "E9 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M5_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3:E9TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[13]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:E9TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3:E9TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3:E9TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:E9TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3:E9TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[13]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:E9TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3:E9TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3:E9TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:E9TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M5_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[5] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M5_CH2_TEMP") {
  field(DESC, "B4 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3:B4TEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[14]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M5_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3:B4TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3:B4TEMP") {
  field(DESC, "B4 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M5_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3:B4TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[14]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:B4TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3:B4TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3:B4TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:B4TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3:B4TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[14]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:B4TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3:B4TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3:B4TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:B4TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M5_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[5] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M5_CH3_TEMP") {
  field(DESC, "W Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3:WTEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[15]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M5_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3:WTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3:WTEMP") {
  field(DESC, "W Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M5_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3:WTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[15]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:WTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3:WTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3:WTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:WTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3:WTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[15]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:WTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3:WTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3:WTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:WTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M5_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[5] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M6_CH0_TEMP") {
  field(DESC, "E7 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4:E7TEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[16]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M6_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4:E7TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4:E7TEMP") {
  field(DESC, "E7 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M6_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4:E7TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[16]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:E7TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4:E7TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4:E7TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:E7TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4:E7TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[16]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:E7TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4:E7TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4:E7TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:E7TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M6_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[6] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M6_CH1_TEMP") {
  field(DESC, "Flange Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4:FLANGETEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[17]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M6_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4:FLANGETEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4:FLANGETEMP") {
  field(DESC, "Flange Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M6_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "5")
  field(HIGH, "45")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4:FLANGETEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[17]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:FLANGETEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4:FLANGETEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4:FLANGETEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:FLANGETEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4:FLANGETEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[17]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:FLANGETEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4:FLANGETEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4:FLANGETEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:FLANGETEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M6_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[6] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M6_CH2_TEMP") {
  field(DESC, "S6 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4:S6TEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[18]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M6_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4:S6TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4:S6TEMP") {
  field(DESC, "S6 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M6_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4:S6TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[18]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:S6TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4:S6TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4:S6TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:S6TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4:S6TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[18]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:S6TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4:S6TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4:S6TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:S6TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M6_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[6] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M6_CH3_TEMP") {
  field(DESC, "E8 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4:E8TEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[19]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M6_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4:E8TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4:E8TEMP") {
  field(DESC, "E8 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M6_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4:E8TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[19]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:E8TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4:E8TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4:E8TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:E8TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4:E8TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[19]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:E8TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4:E8TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4:E8TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:E8TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M6_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[6] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M7_CH0_TEMP") {
  field(DESC, "S7 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4:S7TEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[20]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M7_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4:S7TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4:S7TEMP") {
  field(DESC, "S7 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M7_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4:S7TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[20]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:S7TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4:S7TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4:S7TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:S7TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4:S7TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[20]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:S7TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4:S7TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4:S7TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:S7TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M7_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[7] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M7_CH1_TEMP") {
  field(DESC, "E9 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4:E9TEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[21]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M7_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4:E9TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4:E9TEMP") {
  field(DESC, "E9 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M7_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4:E9TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[21]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:E9TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4:E9TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4:E9TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:E9TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4:E9TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[21]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:E9TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4:E9TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4:E9TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:E9TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M7_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[7] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M7_CH2_TEMP") {
  field(DESC, "B4 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4:B4TEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[22]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M7_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4:B4TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4:B4TEMP") {
  field(DESC, "B4 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M7_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4:B4TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[22]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:B4TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4:B4TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4:B4TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:B4TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4:B4TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[22]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:B4TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4:B4TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4:B4TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:B4TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M7_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[7] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M7_CH3_TEMP") {
  field(DESC, "W Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4:E10TEMP")
  field(INP , "@PLC_GUNB_TM01 CR04_Temp[23]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M7_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4:E10TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4:E10TEMP") {
  field(DESC, "W Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M7_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4:E10TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiTemp[23]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:E10TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4:E10TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4:E10TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:E10TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4:E10TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoTemp[23]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:E10TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4:E10TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4:E10TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:E10TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR04_M7_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[7] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR06_M1_CH0_TEMP") {
  field(DESC, "B1 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3:B1TEMP")
  field(INP , "@PLC_GUNB_TM01 CR06_Temp[0]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR06_M1_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3:B1TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3:B1TEMP") {
  field(DESC, "B1 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR06_M1_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "55")
  field(LOLO, "5")
  field(HIGH, "50")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3:B1TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_HiTemp[0]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:B1TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3:B1TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3:B1TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:B1TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3:B1TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_LoTemp[0]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:B1TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3:B1TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3:B1TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:B1TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR06_M1_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR06_Ch_Faults[1] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR06_M1_CH1_TEMP") {
  field(DESC, "E1 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3:E1TEMP")
  field(INP , "@PLC_GUNB_TM01 CR06_Temp[1]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR06_M1_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3:E1TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3:E1TEMP") {
  field(DESC, "E1 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR06_M1_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "55")
  field(LOLO, "5")
  field(HIGH, "50")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3:E1TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_HiTemp[1]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:E1TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3:E1TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3:E1TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:E1TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3:E1TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_LoTemp[1]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:E1TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3:E1TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3:E1TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:E1TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR06_M1_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR06_Ch_Faults[1] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR06_M1_CH2_TEMP") {
  field(DESC, "S2 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3:S2TEMP")
  field(INP , "@PLC_GUNB_TM01 CR06_Temp[2]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR06_M1_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3:S2TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3:S2TEMP") {
  field(DESC, "S2 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR06_M1_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "5")
  field(HIGH, "45")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3:S2TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_HiTemp[2]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:S2TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3:S2TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3:S2TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:S2TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3:S2TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_LoTemp[2]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:S2TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3:S2TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3:S2TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:S2TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR06_M1_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR06_Ch_Faults[1] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR06_M1_CH3_TEMP") {
  field(DESC, "B2 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3:B2TEMP")
  field(INP , "@PLC_GUNB_TM01 CR06_Temp[3]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR06_M1_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3:B2TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3:B2TEMP") {
  field(DESC, "B2 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR06_M1_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "5")
  field(HIGH, "45")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3:B2TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_HiTemp[3]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:B2TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3:B2TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3:B2TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:B2TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3:B2TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_LoTemp[3]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:B2TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3:B2TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3:B2TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:B2TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR06_M1_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR06_Ch_Faults[1] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR06_M2_CH0_TEMP") {
  field(DESC, "Circ Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3:CIRCTEMP")
  field(INP , "@PLC_GUNB_TM01 CR06_Temp[4]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR06_M2_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3:CIRCTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3:CIRCTEMP") {
  field(DESC, "Circ Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR06_M2_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3:CIRCTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_HiTemp[4]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:CIRCTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3:CIRCTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3:CIRCTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:CIRCTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3:CIRCTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_LoTemp[4]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:CIRCTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3:CIRCTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3:CIRCTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:CIRCTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR06_M2_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR06_Ch_Faults[2] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR06_M2_CH1_TEMP") {
  field(DESC, "B3 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3:B3TEMP")
  field(INP , "@PLC_GUNB_TM01 CR06_Temp[5]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR06_M2_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3:B3TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3:B3TEMP") {
  field(DESC, "B3 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR06_M2_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "5")
  field(HIGH, "45")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3:B3TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_HiTemp[5]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:B3TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3:B3TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3:B3TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:B3TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3:B3TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_LoTemp[5]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:B3TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3:B3TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3:B3TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:B3TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR06_M2_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR06_Ch_Faults[2] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR06_M2_CH2_TEMP") {
  field(DESC, "S3 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3:S3TEMP")
  field(INP , "@PLC_GUNB_TM01 CR06_Temp[6]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR06_M2_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3:S3TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3:S3TEMP") {
  field(DESC, "S3 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR06_M2_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "5")
  field(HIGH, "45")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3:S3TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_HiTemp[6]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:S3TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3:S3TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3:S3TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:S3TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3:S3TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_LoTemp[6]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:S3TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3:S3TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3:S3TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:S3TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR06_M2_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR06_Ch_Faults[2] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR06_M2_CH3_TEMP") {
  field(DESC, "E6 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA3:E6TEMP")
  field(INP , "@PLC_GUNB_TM01 CR06_Temp[7]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR06_M2_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA3:E6TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA3:E6TEMP") {
  field(DESC, "E6 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR06_M2_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "5")
  field(HIGH, "45")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA3:E6TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_HiTemp[7]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:E6TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA3:E6TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA3:E6TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:E6TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA3:E6TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_LoTemp[7]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA3:E6TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA3:E6TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA3:E6TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA3:E6TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR06_M2_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR06_Ch_Faults[2] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR06_M3_CH0_TEMP") {
  field(DESC, "B1 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4:B1TEMP")
  field(INP , "@PLC_GUNB_TM01 CR06_Temp[8]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR06_M3_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4:B1TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4:B1TEMP") {
  field(DESC, "B1 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR06_M3_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "55")
  field(LOLO, "5")
  field(HIGH, "50")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4:B1TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_HiTemp[8]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:B1TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4:B1TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4:B1TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:B1TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4:B1TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_LoTemp[8]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:B1TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4:B1TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4:B1TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:B1TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR06_M3_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR06_Ch_Faults[3] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR06_M3_CH1_TEMP") {
  field(DESC, "E1 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4:E1TEMP")
  field(INP , "@PLC_GUNB_TM01 CR06_Temp[9]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR06_M3_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4:E1TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4:E1TEMP") {
  field(DESC, "E1 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR06_M3_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "55")
  field(LOLO, "5")
  field(HIGH, "50")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4:E1TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_HiTemp[9]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:E1TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4:E1TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4:E1TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:E1TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4:E1TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_LoTemp[9]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:E1TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4:E1TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4:E1TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:E1TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR06_M3_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR06_Ch_Faults[3] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR06_M3_CH2_TEMP") {
  field(DESC, "S2 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4:S2TEMP")
  field(INP , "@PLC_GUNB_TM01 CR06_Temp[10]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR06_M3_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4:S2TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4:S2TEMP") {
  field(DESC, "S2 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR06_M3_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "5")
  field(HIGH, "45")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4:S2TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_HiTemp[10]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:S2TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4:S2TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4:S2TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:S2TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4:S2TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_LoTemp[10]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:S2TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4:S2TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4:S2TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:S2TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR06_M3_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR06_Ch_Faults[3] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR06_M3_CH3_TEMP") {
  field(DESC, "B2 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4:B2TEMP")
  field(INP , "@PLC_GUNB_TM01 CR06_Temp[11]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR06_M3_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4:B2TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4:B2TEMP") {
  field(DESC, "B2 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR06_M3_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "5")
  field(HIGH, "45")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4:B2TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_HiTemp[11]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:B2TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4:B2TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4:B2TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:B2TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4:B2TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_LoTemp[11]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:B2TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4:B2TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4:B2TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:B2TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR06_M3_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR06_Ch_Faults[3] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR06_M4_CH0_TEMP") {
  field(DESC, "Circ Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4:CIRCTEMP")
  field(INP , "@PLC_GUNB_TM01 CR06_Temp[12]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR06_M4_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4:CIRCTEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4:CIRCTEMP") {
  field(DESC, "Circ Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR06_M4_CH0_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "45")
  field(LOLO, "5")
  field(HIGH, "40")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4:CIRCTEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_HiTemp[12]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:CIRCTEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4:CIRCTEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4:CIRCTEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:CIRCTEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4:CIRCTEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_LoTemp[12]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:CIRCTEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4:CIRCTEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4:CIRCTEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:CIRCTEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR06_M4_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR06_Ch_Faults[4] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR06_M4_CH1_TEMP") {
  field(DESC, "B3 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4:B3TEMP")
  field(INP , "@PLC_GUNB_TM01 CR06_Temp[13]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR06_M4_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4:B3TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4:B3TEMP") {
  field(DESC, "B3 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR06_M4_CH1_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "5")
  field(HIGH, "45")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4:B3TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_HiTemp[13]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:B3TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4:B3TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4:B3TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:B3TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4:B3TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_LoTemp[13]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:B3TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4:B3TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4:B3TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:B3TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR06_M4_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR06_Ch_Faults[4] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR06_M4_CH2_TEMP") {
  field(DESC, "S3 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4:S3TEMP")
  field(INP , "@PLC_GUNB_TM01 CR06_Temp[14]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR06_M4_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4:S3TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4:S3TEMP") {
  field(DESC, "S3 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR06_M4_CH2_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "5")
  field(HIGH, "45")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4:S3TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_HiTemp[14]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:S3TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4:S3TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4:S3TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:S3TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4:S3TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_LoTemp[14]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:S3TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4:S3TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4:S3TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:S3TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR06_M4_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR06_Ch_Faults[4] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 is a analog 4 channel input module that monitors a RTD  Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR06_M4_CH3_TEMP") {
  field(DESC, "E6 Temp")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:WGA4:E6TEMP")
  field(INP , "@PLC_GUNB_TM01 CR06_Temp[15]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-200")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR06_M4_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:WGA4:E6TEMP")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:WGA4:E6TEMP") {
  field(DESC, "E6 Temp")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR06_M4_CH3_TEMP CA MS")
  field(EGU, "DegC")
  field(HOPR, "300")
  field(LOPR, "-20")
  field(HIHI, "50")
  field(LOLO, "5")
  field(HIGH, "45")
  field(LOW, "10")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0.5")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Temperature high limit
record(ao, "GUN:GUNB:100:WGA4:E6TEMPHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_HiTemp[15]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:E6TEMPHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:WGA4:E6TEMP.HIHI CP")
  field(OUT, "GUN:GUNB:100:WGA4:E6TEMPHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:E6TEMPHLIMDES")
}

# Temperature low limit
record(ao, "GUN:GUNB:100:WGA4:E6TEMPLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(ASG, "MCC")
  field(OUT, "@PLC_GUNB_TM01 CR06_LoTemp[15]")
  field(DRVH, 200)
  field(DRVL, -20)
  field(EGU, "DegC")
  field(PREC, "2")
}

record(calcout, "GUN:GUNB:100:WGA4:E6TEMPLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:WGA4:E6TEMP.LOLO CP")
  field(OUT, "GUN:GUNB:100:WGA4:E6TEMPLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:WGA4:E6TEMPLLIMDES")
}

# RTD status
record(bi, "PLC:GUNB:TM01:CR06_M4_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR06_Ch_Faults[4] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IF8 is a analog 8 channel input module that monitors a flow Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M3_CH0_FLOW") {
  field(DESC, "Anode end cap flow")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:ANENDCAPFLOW")
  field(INP , "@PLC_GUNB_TM01 CR04_Flow[0]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-6.5")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M3_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANENDCAPFLOW")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:ANENDCAPFLOW") {
  field(DESC, "Anode end cap flow")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M3_CH0_FLOW CA MS")
  field(EGU, "GPM")
  field(HOPR, "100")
  field(LOPR, "-10")
  field(HIHI, "4.5")
  field(LOLO, "1.5")
  field(HIGH, "3.2")
  field(LOW, "1.8")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Flow high limit
record(ao, "GUN:GUNB:100:ANENDCAPFLOWHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiFlow[0]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:ANENDCAPFLOWHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:ANENDCAPFLOW.HIHI CP")
  field(OUT, "GUN:GUNB:100:ANENDCAPFLOWHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:ANENDCAPFLOWHLIMDES")
}

# Flow low limit
record(ao, "GUN:GUNB:100:ANENDCAPFLOWLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoFlow[0]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:ANENDCAPFLOWLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:ANENDCAPFLOW.LOLO CP")
  field(OUT, "GUN:GUNB:100:ANENDCAPFLOWLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:ANENDCAPFLOWLLIMDES")
}

# Flow meter status
record(bi, "PLC:GUNB:TM01:CR04_M3_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[3] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IF8 is a analog 8 channel input module that monitors a flow Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M3_CH1_FLOW") {
  field(DESC, "Anode flange flow")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:ANFLANGEFLOW")
  field(INP , "@PLC_GUNB_TM01 CR04_Flow[1]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-6.5")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M3_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:ANFLANGEFLOW")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:ANFLANGEFLOW") {
  field(DESC, "Anode flange flow")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M3_CH1_FLOW CA MS")
  field(EGU, "GPM")
  field(HOPR, "100")
  field(LOPR, "-10")
  field(HIHI, "2")
  field(LOLO, "0.5")
  field(HIGH, "1.7")
  field(LOW, "0.8")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Flow high limit
record(ao, "GUN:GUNB:100:ANFLANGEFLOWHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiFlow[1]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:ANFLANGEFLOWHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:ANFLANGEFLOW.HIHI CP")
  field(OUT, "GUN:GUNB:100:ANFLANGEFLOWHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:ANFLANGEFLOWHLIMDES")
}

# Flow low limit
record(ao, "GUN:GUNB:100:ANFLANGEFLOWLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoFlow[1]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:ANFLANGEFLOWLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:ANFLANGEFLOW.LOLO CP")
  field(OUT, "GUN:GUNB:100:ANFLANGEFLOWLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:ANFLANGEFLOWLLIMDES")
}

# Flow meter status
record(bi, "PLC:GUNB:TM01:CR04_M3_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[3] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IF8 is a analog 8 channel input module that monitors a flow Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M3_CH2_FLOW") {
  field(DESC, "Cat end cap flow")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:CATENDCAPFLOW")
  field(INP , "@PLC_GUNB_TM01 CR04_Flow[2]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-6.5")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M3_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:CATENDCAPFLOW")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:CATENDCAPFLOW") {
  field(DESC, "Cat end cap flow")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M3_CH2_FLOW CA MS")
  field(EGU, "GPM")
  field(HOPR, "100")
  field(LOPR, "-10")
  field(HIHI, "27")
  field(LOLO, "10")
  field(HIGH, "20")
  field(LOW, "18")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Flow high limit
record(ao, "GUN:GUNB:100:CATENDCAPFLOWHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiFlow[2]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:CATENDCAPFLOWHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:CATENDCAPFLOW.HIHI CP")
  field(OUT, "GUN:GUNB:100:CATENDCAPFLOWHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CATENDCAPFLOWHLIMDES")
}

# Flow low limit
record(ao, "GUN:GUNB:100:CATENDCAPFLOWLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoFlow[2]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:CATENDCAPFLOWLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:CATENDCAPFLOW.LOLO CP")
  field(OUT, "GUN:GUNB:100:CATENDCAPFLOWLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CATENDCAPFLOWLLIMDES")
}

# Flow meter status
record(bi, "PLC:GUNB:TM01:CR04_M3_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[3] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IF8 is a analog 8 channel input module that monitors a flow Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M3_CH3_FLOW") {
  field(DESC, "Nose flow")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:NOSEFLOW")
  field(INP , "@PLC_GUNB_TM01 CR04_Flow[3]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-6.5")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M3_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:NOSEFLOW")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:NOSEFLOW") {
  field(DESC, "Nose flow")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M3_CH3_FLOW CA MS")
  field(EGU, "GPM")
  field(HOPR, "100")
  field(LOPR, "-10")
  field(HIHI, "16")
  field(LOLO, "6")
  field(HIGH, "10")
  field(LOW, "8.5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Flow high limit
record(ao, "GUN:GUNB:100:NOSEFLOWHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiFlow[3]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:NOSEFLOWHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:NOSEFLOW.HIHI CP")
  field(OUT, "GUN:GUNB:100:NOSEFLOWHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:NOSEFLOWHLIMDES")
}

# Flow low limit
record(ao, "GUN:GUNB:100:NOSEFLOWLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoFlow[3]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:NOSEFLOWLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:NOSEFLOW.LOLO CP")
  field(OUT, "GUN:GUNB:100:NOSEFLOWLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:NOSEFLOWLLIMDES")
}

# Flow meter status
record(bi, "PLC:GUNB:TM01:CR04_M3_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[3] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IF8 is a analog 8 channel input module that monitors a flow Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M3_CH4_FLOW") {
  field(DESC, "Cavity wall flow")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:CAVWALLFLOW")
  field(INP , "@PLC_GUNB_TM01 CR04_Flow[4]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-6.5")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M3_CH4_ALIAS") {
    field(VAL,"GUN:GUNB:100:CAVWALLFLOW")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:CAVWALLFLOW") {
  field(DESC, "Cavity wall flow")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M3_CH4_FLOW CA MS")
  field(EGU, "GPM")
  field(HOPR, "100")
  field(LOPR, "-10")
  field(HIHI, "9")
  field(LOLO, "2")
  field(HIGH, "6")
  field(LOW, "4")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Flow high limit
record(ao, "GUN:GUNB:100:CAVWALLFLOWHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiFlow[4]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:CAVWALLFLOWHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:CAVWALLFLOW.HIHI CP")
  field(OUT, "GUN:GUNB:100:CAVWALLFLOWHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CAVWALLFLOWHLIMDES")
}

# Flow low limit
record(ao, "GUN:GUNB:100:CAVWALLFLOWLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoFlow[4]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:CAVWALLFLOWLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:CAVWALLFLOW.LOLO CP")
  field(OUT, "GUN:GUNB:100:CAVWALLFLOWLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CAVWALLFLOWLLIMDES")
}

# Flow meter status
record(bi, "PLC:GUNB:TM01:CR04_M3_CH4_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[3] B 4")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IF8 is a analog 8 channel input module that monitors a flow Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M3_CH5_FLOW") {
  field(DESC, "Coupler flow")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:CPLRFLOW")
  field(INP , "@PLC_GUNB_TM01 CR04_Flow[5]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-6.5")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M3_CH5_ALIAS") {
    field(VAL,"GUN:GUNB:100:CPLRFLOW")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:CPLRFLOW") {
  field(DESC, "Coupler flow")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M3_CH5_FLOW CA MS")
  field(EGU, "GPM")
  field(HOPR, "100")
  field(LOPR, "-10")
  field(HIHI, "3")
  field(LOLO, "0.5")
  field(HIGH, "2.6")
  field(LOW, "0.98")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Flow high limit
record(ao, "GUN:GUNB:100:CPLRFLOWHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiFlow[5]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:CPLRFLOWHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:CPLRFLOW.HIHI CP")
  field(OUT, "GUN:GUNB:100:CPLRFLOWHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CPLRFLOWHLIMDES")
}

# Flow low limit
record(ao, "GUN:GUNB:100:CPLRFLOWLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoFlow[5]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:CPLRFLOWLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:CPLRFLOW.LOLO CP")
  field(OUT, "GUN:GUNB:100:CPLRFLOWLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CPLRFLOWLLIMDES")
}

# Flow meter status
record(bi, "PLC:GUNB:TM01:CR04_M3_CH5_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[3] B 5")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IF8 is a analog 8 channel input module that monitors a flow Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M3_CH6_FLOW") {
  field(DESC, "Buncher 1 flow")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:GUNB:455:FLOW")
  field(INP , "@PLC_GUNB_TM01 CR04_Flow[6]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-6.5")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M3_CH6_ALIAS") {
    field(VAL,"ACCL:GUNB:455:FLOW")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "ACCL:GUNB:455:FLOW") {
  field(DESC, "Buncher 1 flow")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M3_CH6_FLOW CA MS")
  field(EGU, "GPM")
  field(HOPR, "100")
  field(LOPR, "-10")
  field(HIHI, "5")
  field(LOLO, "0")
  field(HIGH, "3")
  field(LOW, "1")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Flow high limit
record(ao, "ACCL:GUNB:455:FLOWHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiFlow[6]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "ACCL:GUNB:455:FLOWHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "ACCL:GUNB:455:FLOW.HIHI CP")
  field(OUT, "ACCL:GUNB:455:FLOWHLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:FLOWHLIMDES")
}

# Flow low limit
record(ao, "ACCL:GUNB:455:FLOWLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoFlow[6]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "ACCL:GUNB:455:FLOWLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "ACCL:GUNB:455:FLOW.LOLO CP")
  field(OUT, "ACCL:GUNB:455:FLOWLLIMDES")
  field(CALC, "A")
  field(FLNK,"ACCL:GUNB:455:FLOWLLIMDES")
}

# Flow meter status
record(bi, "PLC:GUNB:TM01:CR04_M3_CH6_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[3] B 6")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IF8 is a analog 8 channel input module that monitors a flow Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR04_M3_CH7_FLOW") {
  field(DESC, "Solenoid flow")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:GUNB:212:FLOW")
  field(INP , "@PLC_GUNB_TM01 CR04_Flow[7]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-6.5")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR04_M3_CH7_ALIAS") {
    field(VAL,"SOLN:GUNB:212:FLOW")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "SOLN:GUNB:212:FLOW") {
  field(DESC, "Solenoid flow")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR04_M3_CH7_FLOW CA MS")
  field(EGU, "GPM")
  field(HOPR, "100")
  field(LOPR, "-10")
  field(HIHI, "2")
  field(LOLO, "0")
  field(HIGH, "1.5")
  field(LOW, "0.5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Flow high limit
record(ao, "SOLN:GUNB:212:FLOWHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR04_HiFlow[7]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "SOLN:GUNB:212:FLOWHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "SOLN:GUNB:212:FLOW.HIHI CP")
  field(OUT, "SOLN:GUNB:212:FLOWHLIMDES")
  field(CALC, "A")
  field(FLNK,"SOLN:GUNB:212:FLOWHLIMDES")
}

# Flow low limit
record(ao, "SOLN:GUNB:212:FLOWLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR04_LoFlow[7]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "SOLN:GUNB:212:FLOWLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "SOLN:GUNB:212:FLOW.LOLO CP")
  field(OUT, "SOLN:GUNB:212:FLOWLLIMDES")
  field(CALC, "A")
  field(FLNK,"SOLN:GUNB:212:FLOWLLIMDES")
}

# Flow meter status
record(bi, "PLC:GUNB:TM01:CR04_M3_CH7_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR04_Ch_Faults[3] B 7")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IF8 is a analog 8 channel input module that monitors a flow Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M6_CH0_FLOW") {
  field(DESC, "Circ 1 Flow Meter")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:CIRC1FLOW")
  field(INP , "@PLC_GUNB_TM01 CR01_Flow[0]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-6.5")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M6_CH0_ALIAS") {
    field(VAL,"GUN:GUNB:100:CIRC1FLOW")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:CIRC1FLOW") {
  field(DESC, "Circ 1 Flow Meter")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M6_CH0_FLOW CA MS")
  field(EGU, "GPM")
  field(HOPR, "100")
  field(LOPR, "-10")
  field(HIHI, "10")
  field(LOLO, "-1")
  field(HIGH, "5")
  field(LOW, "1")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Flow high limit
record(ao, "GUN:GUNB:100:CIRC1FLOWHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiFlow[0]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:CIRC1FLOWHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:CIRC1FLOW.HIHI CP")
  field(OUT, "GUN:GUNB:100:CIRC1FLOWHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CIRC1FLOWHLIMDES")
}

# Flow low limit
record(ao, "GUN:GUNB:100:CIRC1FLOWLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoFlow[0]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:CIRC1FLOWLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:CIRC1FLOW.LOLO CP")
  field(OUT, "GUN:GUNB:100:CIRC1FLOWLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CIRC1FLOWLLIMDES")
}

# Flow meter status
record(bi, "PLC:GUNB:TM01:CR01_M6_CH0_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[6] B 0")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IF8 is a analog 8 channel input module that monitors a flow Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M6_CH1_FLOW") {
  field(DESC, "Circ 2 Flow Meter")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:CIRC2FLOW")
  field(INP , "@PLC_GUNB_TM01 CR01_Flow[1]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-6.5")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M6_CH1_ALIAS") {
    field(VAL,"GUN:GUNB:100:CIRC2FLOW")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:CIRC2FLOW") {
  field(DESC, "Circ 2 Flow Meter")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M6_CH1_FLOW CA MS")
  field(EGU, "GPM")
  field(HOPR, "100")
  field(LOPR, "-10")
  field(HIHI, "10")
  field(LOLO, "-1")
  field(HIGH, "5")
  field(LOW, "1")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Flow high limit
record(ao, "GUN:GUNB:100:CIRC2FLOWHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiFlow[1]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:CIRC2FLOWHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:CIRC2FLOW.HIHI CP")
  field(OUT, "GUN:GUNB:100:CIRC2FLOWHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CIRC2FLOWHLIMDES")
}

# Flow low limit
record(ao, "GUN:GUNB:100:CIRC2FLOWLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoFlow[1]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:CIRC2FLOWLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:CIRC2FLOW.LOLO CP")
  field(OUT, "GUN:GUNB:100:CIRC2FLOWLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CIRC2FLOWLLIMDES")
}

# Flow meter status
record(bi, "PLC:GUNB:TM01:CR01_M6_CH1_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[6] B 1")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IF8 is a analog 8 channel input module that monitors a flow Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M6_CH2_FLOW") {
  field(DESC, "Circ 1 Load FM")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:CIRC1LOADFLOW")
  field(INP , "@PLC_GUNB_TM01 CR01_Flow[2]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-6.5")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M6_CH2_ALIAS") {
    field(VAL,"GUN:GUNB:100:CIRC1LOADFLOW")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:CIRC1LOADFLOW") {
  field(DESC, "Circ 1 Load FM")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M6_CH2_FLOW CA MS")
  field(EGU, "GPM")
  field(HOPR, "100")
  field(LOPR, "-10")
  field(HIHI, "10")
  field(LOLO, "-1")
  field(HIGH, "5")
  field(LOW, "1")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Flow high limit
record(ao, "GUN:GUNB:100:CIRC1LOADFLOWHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiFlow[2]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:CIRC1LOADFLOWHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:CIRC1LOADFLOW.HIHI CP")
  field(OUT, "GUN:GUNB:100:CIRC1LOADFLOWHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CIRC1LOADFLOWHLIMDES")
}

# Flow low limit
record(ao, "GUN:GUNB:100:CIRC1LOADFLOWLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoFlow[2]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:CIRC1LOADFLOWLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:CIRC1LOADFLOW.LOLO CP")
  field(OUT, "GUN:GUNB:100:CIRC1LOADFLOWLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CIRC1LOADFLOWLLIMDES")
}

# Flow meter status
record(bi, "PLC:GUNB:TM01:CR01_M6_CH2_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[6] B 2")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
#
# This template is used to monitor and control data from a 
# 5069-IF8 is a analog 8 channel input module that monitors a flow Sensor
#
#
# Macros:
#        LOCA  The sector/area in the accelerator where the sensors are present  
#        UNIT  The PLC/ IOC instance of the subsystem    
#        CR    Crate/panel number 
#        SLOT  I/O module location on the panel
#        CHAN  I/O channel on the I/O module
#        PLC   Name of the ether_ip connection to PLC as defined in st.cmd 
#        INDEX index of the array from PLC where the the data will be read out of
#        DESC  EPICS PV description
#        ALIAS EPICS name for the PV
#        EGU   Engineering units
#        H     High operating range
#        L     Low operating range
#        HH    High alarm limit
#        LL    Low alarm limit
#        HI    High warning limit
#        LO    Low warning limit
#        HY    Alarm deadband.signal hovering at limit not generate many alarm
#        AD    Archiver deadband
#        MO    Monitor deadband
#==============================================================================

#Holds raw sensor readback
record(ai, "PLC:GUNB:TM01:CR01_M6_CH3_FLOW") {
  field(DESC, "Circ 2 Load FM")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:GUNB:100:CIRC2LOADFLOW")
  field(INP , "@PLC_GUNB_TM01 CR01_Flow[3]")
  #PLC will read -200 if sensor is physically disconnected
  field(LOW, "-6.5")
  field(LSV, "INVALID")
  field(PREC, "2")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:GUNB:TM01:CR01_M6_CH3_ALIAS") {
    field(VAL,"GUN:GUNB:100:CIRC2LOADFLOW")
    field(PINI,"YES")
}

#Temperature PV for user
record(ai, "GUN:GUNB:100:CIRC2LOADFLOW") {
  field(DESC, "Circ 2 Load FM")
  field(PREC, "2")
  field(INP, "PLC:GUNB:TM01:CR01_M6_CH3_FLOW CA MS")
  field(EGU, "GPM")
  field(HOPR, "100")
  field(LOPR, "-10")
  field(HIHI, "10")
  field(LOLO, "-1")
  field(HIGH, "5")
  field(LOW, "1")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "0")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI,"YES")
}

# Flow high limit
record(ao, "GUN:GUNB:100:CIRC2LOADFLOWHLIMDES"){
  field(DESC, "Desired high limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR01_HiFlow[3]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:CIRC2LOADFLOWHLIMCALC"){
  field(DESC, "Desired high limit") 
  field(INPA, "GUN:GUNB:100:CIRC2LOADFLOW.HIHI CP")
  field(OUT, "GUN:GUNB:100:CIRC2LOADFLOWHLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CIRC2LOADFLOWHLIMDES")
}

# Flow low limit
record(ao, "GUN:GUNB:100:CIRC2LOADFLOWLLIMDES"){
  field(DESC, "Desired low  limit") 
  field(DTYP, "EtherIP")
  field(OUT, "@PLC_GUNB_TM01 CR01_LoFlow[3]")
  field(EGU, "GPM")
  field(PREC, "2")
  field(ASG, "MCC")
}

record(calcout, "GUN:GUNB:100:CIRC2LOADFLOWLLIMCALC"){
  field(DESC, "Desired low  limit") 
  field(INPA, "GUN:GUNB:100:CIRC2LOADFLOW.LOLO CP")
  field(OUT, "GUN:GUNB:100:CIRC2LOADFLOWLLIMDES")
  field(CALC, "A")
  field(FLNK,"GUN:GUNB:100:CIRC2LOADFLOWLLIMDES")
}

# Flow meter status
record(bi, "PLC:GUNB:TM01:CR01_M6_CH3_FAULT") {
  field(DESC, "Status")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_GUNB_TM01 CR01_Ch_Faults[6] B 3")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}
