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


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

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

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

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

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

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

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

record(mbbi, "PLC:LI21:TM01:MODEL") {
  field(INP, "PLC:LI21: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:LI21:TM01:FWVERSIONRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_LI21_TM01 PLCADMIN_PLC_LI21_TM01[7]")
  field(FLNK, "PLC:LI21:TM01:FWVERSIONMAJ")
}

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

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

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

record(calc, "PLC:LI21:TM01:DEVICESTATUSCALC") {
  field(FLNK, "PLC:LI21: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:LI21:TM01:DEVICESTATUSRAW NPP MS")
  field(INPB, "0x7")
  field(INPC, "0x6")
  field(INPD, "0x5")
  field(INPE, "0x4")
  field(INPF, "0x1")
}

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

record(mbbi, "PLC:LI21:TM01:DEVICESTATUS") {
  field(FLNK, "PLC:LI21:TM01:FAULTSTATUSRAW")
  field(INP, "PLC:LI21: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:LI21:TM01:FAULTSTATUSRAW") {
  field(FLNK, "PLC:LI21:TM01:FAULTSTATUSCALC")
  field(CALC, "A>>8&B")
  field(INPA, "PLC:LI21:TM01:STATUSRAW")
  field(INPB, "0xF")
  field(INPC, "PLC:LI21:TM01:HEARTBEATCLC MS")
}

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

record(mbbi, "PLC:LI21:TM01:FAULTSTATUS") {
  field(FLNK, "PLC:LI21:TM01:KEYSTATUSRAW")
  field(INP, "PLC:LI21: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:LI21:TM01:KEYSTATUSRAW") {
  field(FLNK, "PLC:LI21:TM01:KEYSTATUSCALC")
  field(CALC, "A>>12&B")
  field(INPA, "PLC:LI21:TM01:STATUSRAW")
  field(INPB, "0x3")
  field(INPC, "PLC:LI21:TM01:HEARTBEATCLC MS")
}

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

record(mbbi, "PLC:LI21:TM01:KEYSTATUS") {
  field(INP, "PLC:LI21: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:LI21:TM01:MAJORFAULTRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_LI21_TM01 PLCADMIN_PLC_LI21_TM01[8]")
  field(FLNK, "PLC:LI21:TM01:FAULTPOWERCALC")
}

record(ai, "PLC:LI21:TM01:MINORFAULTRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_LI21_TM01 PLCADMIN_PLC_LI21_TM01[9]")
}

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

record(mbbi, "PLC:LI21:TM01:FAULTPOWER") {
  field(FLNK, "PLC:LI21:TM01:FAULTIOCALC")
  field(INP, "PLC:LI21: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:LI21:TM01:FAULTIOCALC") {
  field(FLNK, "PLC:LI21:TM01:FAULTIO")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:LI21:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:LI21:TM01:MINORFAULTRAW")
  field(INPC, "0x8")
  field(INPD, "PLC:LI21:TM01:HEARTBEATCLC MS")
}

record(mbbi, "PLC:LI21:TM01:FAULTIO") {
  field(FLNK, "PLC:LI21:TM01:FAULTPROGRAMCALC")
  field(INP, "PLC:LI21: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:LI21:TM01:FAULTPROGRAMCALC") {
  field(FLNK, "PLC:LI21:TM01:FAULTPROGRAM")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:LI21:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:LI21:TM01:MINORFAULTRAW")
  field(INPC, "0x10")
  field(INPD, "PLC:LI21:TM01:HEARTBEATCLC MS")
}

record(mbbi, "PLC:LI21:TM01:FAULTPROGRAM") {
  field(FLNK, "PLC:LI21:TM01:FAULTFLTHNDLCALC")
  field(INP, "PLC:LI21: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:LI21:TM01:FAULTFLTHNDL") {
  field(FLNK, "PLC:LI21:TM01:FAULTWTCHDOGCALC")
  field(INP, "PLC:LI21: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:LI21:TM01:FAULTFLTHNDLCALC") {
  field(FLNK, "PLC:LI21:TM01:FAULTFLTHNDL")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:LI21:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:LI21:TM01:MINORFAULTRAW")
  field(INPC, "0x20")
  field(INPD, "PLC:LI21:TM01:HEARTBEATCLC MS")
}

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

record(mbbi, "PLC:LI21:TM01:FAULTWTCHDOG") {
  field(FLNK, "PLC:LI21:TM01:FAULTSTACKCALC")
  field(INP, "PLC:LI21: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:LI21:TM01:FAULTSTACKCALC") {
  field(FLNK, "PLC:LI21:TM01:FAULTSTACK")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:LI21:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:LI21:TM01:MINORFAULTRAW")
  field(INPC, "0x80")
  field(INPD, "PLC:LI21:TM01:HEARTBEATCLC MS")
}


record(mbbi, "PLC:LI21:TM01:FAULTSTACK") {
  field(FLNK, "PLC:LI21:TM01:FAULTMODECHGCALC")
  field(INP, "PLC:LI21: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:LI21:TM01:FAULTMODECHGCALC") {
  field(FLNK, "PLC:LI21:TM01:FAULTMODECHG")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:LI21:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:LI21:TM01:MINORFAULTRAW")
  field(INPC, "0x100")
  field(INPD, "PLC:LI21:TM01:HEARTBEATCLC MS")
}

record(mbbi, "PLC:LI21:TM01:FAULTMODECHG") {
  field(FLNK, "PLC:LI21:TM01:FAULTSERIALCALC")
  field(INP, "PLC:LI21: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:LI21:TM01:FAULTSERIALCALC") {
  field(FLNK, "PLC:LI21:TM01:FAULTSERIAL")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:LI21:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:LI21:TM01:MINORFAULTRAW")
  field(INPC, "0x200")
  field(INPD, "PLC:LI21:TM01:HEARTBEATCLC MS")
}

record(mbbi, "PLC:LI21:TM01:FAULTSERIAL") {
  field(FLNK, "PLC:LI21:TM01:FAULTBATTERYCALC")
  field(INP, "PLC:LI21: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:LI21:TM01:FAULTBATTERY") {
  field(FLNK, "PLC:LI21:TM01:FAULTMOTIONCALC")
  field(INP, "PLC:LI21: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:LI21:TM01:FAULTBATTERYCALC") {
  field(FLNK, "PLC:LI21:TM01:FAULTBATTERY")
  field(CALC, "A&C?2:B&C?1:0")
  field(INPA, "PLC:LI21:TM01:MAJORFAULTRAW")
  field(INPB, "PLC:LI21:TM01:MINORFAULTRAW")
  field(INPC, "0x400")
  field(INPD, "PLC:LI21:TM01:HEARTBEATCLC MS")
}

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

record(mbbi, "PLC:LI21:TM01:FAULTMOTION") {
  field(INP, "PLC:LI21: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:LI21:TM01:VERSIONMAJORDES") {
  field(PINI, "YES")
  field(FLNK, "PLC:LI21:TM01:VERSIONMAJORCALCHI")
  field(VAL, "0")
  field(PREC, "0")
}

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

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

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

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

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

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

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

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

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

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

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

record(calc, "PLC:LI21:TM01:HEARTBEATECT") {
  field(FLNK, "PLC:LI21:TM01:HEARTBEATSUM")
  field(CALC, "A+B+C+D+E+F+G+H+I+J")
  field(INPA, "PLC:LI21:TM01:HEARTBEATE01")
  field(INPB, "PLC:LI21:TM01:HEARTBEATE02")
  field(INPC, "PLC:LI21:TM01:HEARTBEATE03")
  field(INPD, "PLC:LI21:TM01:HEARTBEATE04")
  field(INPE, "PLC:LI21:TM01:HEARTBEATE05")
  field(INPF, "PLC:LI21:TM01:HEARTBEATE06")
  field(INPG, "PLC:LI21:TM01:HEARTBEATE07")
  field(INPH, "PLC:LI21:TM01:HEARTBEATE08")
  field(INPI, "PLC:LI21:TM01:HEARTBEATE09")
  field(INPJ, "PLC:LI21: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:LI21:TM01:HEARTBEATE09") {
  field(FLNK, "PLC:LI21:TM01:HEARTBEATE10")
  field(CALC, "A")
  field(INPA, "PLC:LI21:TM01:HEARTBEATE08.B")
  field(INPB, "PLC:LI21:TM01:HEARTBEATE09.VAL")
}

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

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

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

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

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

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

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

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

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

record(mbbi, "PLC:LI21:TM01:HEARTBEATSUM") {
  field(FLNK, "PLC:LI21:TM01:HEARTBEATCLC")
  field(INP, "PLC:LI21: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:LI21:TM01:UPTIMEDAYRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP, "@PLC_LI21_TM01 PLCADMIN_PLC_LI21_TM01[18]")
  field(FLNK, "PLC:LI21:TM01:UPTIMEDAY")
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

record(mbbi, "PLC:LI21:TM01:COMMLINK") {
  field(FLNK, "PLC:LI21:TM01:HEARTBEATCALC")
  field(INP, "PLC:LI21: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:LI21:TM01:HEARTBEATE10") {
  field(FLNK, "PLC:LI21:TM01:HEARTBEATECT")
  field(CALC, "A")
  field(INPA, "PLC:LI21:TM01:HEARTBEATE09.B")
  field(INPB, "PLC:LI21:TM01:HEARTBEATE10.VAL")
}

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

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

record(mbbi, "PLC:LI21:TM01:DOCPREFIX") {
  field(INP, "PLC:LI21: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:LI21:TM01:DOCSERIESRAW") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:DOCSERIES")
  field(INP, "@PLC_LI21_TM01 PLCADMIN_PLC_LI21_TM01[32]")
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

record(ai, "PLC:LI21:TM01:TAG_TRANSFER_TIME")
{
	field(SCAN, ".5 second")
	field(DTYP, "EtherIP")
	field(INP, "@PLC_LI21_TM01 PLCADMIN_PLC_LI21_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.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:LI21:TM01:CR0_LOC") {
    field(VAL, "ALCOVE SEC 20")
}

record(longout, "PLC:LI21:TM01:CR0_NUM_CHANS") {
    field(VAL, "36")
}
#==============================================================================
#
# Abs:  Database template for plcinfo.
#
# Name: ab-plc-info.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:LI21:TM01:CR1_LOC") {
    field(VAL, "LASER ROOM")
}

record(longout, "PLC:LI21:TM01:CR1_NUM_CHANS") {
    field(VAL, "24")
}
#==============================================================================
#
# Abs:  Database template for plcinfo.
#
# Name: ab-plc-info.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:LI21:TM01:CR2_LOC") {
    field(VAL, "INJECTOR IN20")
}

record(longout, "PLC:LI21:TM01:CR2_NUM_CHANS") {
    field(VAL, "40")
}
#==============================================================================
#
# Abs:  Database template for plcinfo.
#
# Name: ab-plc-info.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:LI21:TM01:CR3_LOC") {
    field(VAL, "ALCOVE SEC 21")
}

record(longout, "PLC:LI21:TM01:CR3_NUM_CHANS") {
    field(VAL, "48")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR0_M1_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[0]")
  field(FLNK, "PLC:LI21:TM01:CR0_M1_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR0_M1_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[0]")
  field(FLNK, "PLC:LI21:TM01:CR0_M1_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR0_M1_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M1_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR0_M1_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M1_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR0_M1_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[0]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR0_M1_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[0]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR0_M2_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[1]")
  field(FLNK, "PLC:LI21:TM01:CR0_M2_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR0_M2_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[1]")
  field(FLNK, "PLC:LI21:TM01:CR0_M2_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR0_M2_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M2_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR0_M2_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M2_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR0_M2_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[1]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR0_M2_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[1]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR0_M3_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[2]")
  field(FLNK, "PLC:LI21:TM01:CR0_M3_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR0_M3_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[2]")
  field(FLNK, "PLC:LI21:TM01:CR0_M3_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR0_M3_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M3_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR0_M3_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M3_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR0_M3_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[2]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR0_M3_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[2]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR0_M4_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[3]")
  field(FLNK, "PLC:LI21:TM01:CR0_M4_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR0_M4_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[3]")
  field(FLNK, "PLC:LI21:TM01:CR0_M4_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR0_M4_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M4_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR0_M4_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M4_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR0_M4_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[3]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR0_M4_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[3]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR0_M5_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[4]")
  field(FLNK, "PLC:LI21:TM01:CR0_M5_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR0_M5_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[4]")
  field(FLNK, "PLC:LI21:TM01:CR0_M5_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR0_M5_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M5_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR0_M5_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M5_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR0_M5_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[4]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR0_M5_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[4]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR0_M6_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[5]")
  field(FLNK, "PLC:LI21:TM01:CR0_M6_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR0_M6_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[5]")
  field(FLNK, "PLC:LI21:TM01:CR0_M6_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR0_M6_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M6_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR0_M6_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M6_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR0_M6_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[5]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR0_M6_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[5]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR0_M7_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[6]")
  field(FLNK, "PLC:LI21:TM01:CR0_M7_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR0_M7_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[6]")
  field(FLNK, "PLC:LI21:TM01:CR0_M7_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR0_M7_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M7_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR0_M7_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M7_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR0_M7_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[6]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR0_M7_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[6]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR0_M8_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[7]")
  field(FLNK, "PLC:LI21:TM01:CR0_M8_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR0_M8_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[7]")
  field(FLNK, "PLC:LI21:TM01:CR0_M8_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR0_M8_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M8_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR0_M8_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M8_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR0_M8_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[7]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR0_M8_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[7]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR0_M9_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[8]")
  field(FLNK, "PLC:LI21:TM01:CR0_M9_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR0_M9_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[8]")
  field(FLNK, "PLC:LI21:TM01:CR0_M9_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR0_M9_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M9_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR0_M9_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR0_M9_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR0_M9_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[8]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR0_M9_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[8]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M1_CH00_RAW") {
  field(DESC, "OUTSIDET")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LI20:1:OUTSIDE_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[0]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M1_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[0]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M1_CH00_TEMP") {
  field(DESC, "OUTSIDET")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LI20:1:OUTSIDE_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[0]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M1_CH00_FILT_CUTOFF") {
  field(DESC, "OUTSIDET")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M1_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M1_CH00_FILT_RAD") {
  field(DESC, "OUTSIDET")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M1_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M1_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M1_CH00_FILT_RAW") {
  field(DESC, "OUTSIDET")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[0] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M1_CH00_FILT_ORDER") {
  field(DESC, "OUTSIDET")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[0] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M1_CH00_FILT_SR") {
  field(DESC, "OUTSIDET")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[0]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M1_CH00_ALIAS") {
    field(VAL,"ROOM:LI20:1:OUTSIDE_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ROOM:LI20:1:OUTSIDE_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ROOM:LI20:1:OUTSIDE_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M1_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ROOM:LI20:1:OUTSIDE_TEMP") {
  field(DESC, "OUTSIDET")
  field(PREC, "1")
  field(INP, "ROOM:LI20:1:OUTSIDE_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.07e+02")
  field(LOPR, "-9.70e+00")
  field(HIHI, "97")
  field(LOLO, "0")
  field(HIGH, "92.15")
  field(LOW, "4.85")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "1.9400000e+00")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ROOM:LI20:1:OUTSIDE_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M1_CH01_RAW") {
  field(DESC, "SLED_6")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:61:SLED_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[0]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M1_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[0]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M1_CH01_TEMP") {
  field(DESC, "SLED_6")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:61:SLED_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[0]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M1_CH01_FILT_CUTOFF") {
  field(DESC, "SLED_6")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M1_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M1_CH01_FILT_RAD") {
  field(DESC, "SLED_6")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M1_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M1_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M1_CH01_FILT_RAW") {
  field(DESC, "SLED_6")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[0] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M1_CH01_FILT_ORDER") {
  field(DESC, "SLED_6")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[0] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M1_CH01_FILT_SR") {
  field(DESC, "SLED_6")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[0]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M1_CH01_ALIAS") {
    field(VAL,"KLYS:LI20:61:SLED_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI20:61:SLED_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI20:61:SLED_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M1_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "KLYS:LI20:61:SLED_TEMP") {
  field(DESC, "SLED_6")
  field(PREC, "1")
  field(INP, "KLYS:LI20:61:SLED_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "2.30e+02")
  field(LOPR, "1.40e+01")
  field(HIHI, "212")
  field(LOLO, "32")
  field(HIGH, "203")
  field(LOW, "41")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "3.6000000e+00")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI20:61:SLED_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M1_CH02_RAW") {
  field(DESC, "SLED_7")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:71:SLED_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[0]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M1_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[0]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M1_CH02_TEMP") {
  field(DESC, "SLED_7")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:71:SLED_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[0]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M1_CH02_FILT_CUTOFF") {
  field(DESC, "SLED_7")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M1_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M1_CH02_FILT_RAD") {
  field(DESC, "SLED_7")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M1_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M1_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M1_CH02_FILT_RAW") {
  field(DESC, "SLED_7")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[0] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M1_CH02_FILT_ORDER") {
  field(DESC, "SLED_7")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[0] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M1_CH02_FILT_SR") {
  field(DESC, "SLED_7")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[0]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M1_CH02_ALIAS") {
    field(VAL,"KLYS:LI20:71:SLED_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI20:71:SLED_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI20:71:SLED_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M1_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "KLYS:LI20:71:SLED_TEMP") {
  field(DESC, "SLED_7")
  field(PREC, "1")
  field(INP, "KLYS:LI20:71:SLED_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "2.30e+02")
  field(LOPR, "1.40e+01")
  field(HIHI, "212")
  field(LOLO, "32")
  field(HIGH, "203")
  field(LOW, "41")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "3.6000000e+00")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI20:71:SLED_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M1_CH03_RAW") {
  field(DESC, "SLED_8")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:81:SLED_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[0]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M1_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[0]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M1_CH03_TEMP") {
  field(DESC, "SLED_8")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:81:SLED_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[0]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M1_CH03_FILT_CUTOFF") {
  field(DESC, "SLED_8")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M1_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M1_CH03_FILT_RAD") {
  field(DESC, "SLED_8")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M1_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M1_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M1_CH03_FILT_RAW") {
  field(DESC, "SLED_8")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[0] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M1_CH03_FILT_ORDER") {
  field(DESC, "SLED_8")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[0] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M1_CH03_FILT_SR") {
  field(DESC, "SLED_8")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[0]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M1_CH03_ALIAS") {
    field(VAL,"KLYS:LI20:81:SLED_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI20:81:SLED_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI20:81:SLED_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M1_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "KLYS:LI20:81:SLED_TEMP") {
  field(DESC, "SLED_8")
  field(PREC, "1")
  field(INP, "KLYS:LI20:81:SLED_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "2.30e+02")
  field(LOPR, "1.40e+01")
  field(HIHI, "212")
  field(LOLO, "32")
  field(HIGH, "203")
  field(LOW, "41")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "3.6000000e+00")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI20:81:SLED_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M2_CH00_RAW") {
  field(DESC, "KLY_W2_8")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:81:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[1]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M2_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[1]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M2_CH00_TEMP") {
  field(DESC, "KLY_W2_8")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:81:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[1]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M2_CH00_FILT_CUTOFF") {
  field(DESC, "KLY_W2_8")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M2_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M2_CH00_FILT_RAD") {
  field(DESC, "KLY_W2_8")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M2_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M2_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M2_CH00_FILT_RAW") {
  field(DESC, "KLY_W2_8")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[1] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M2_CH00_FILT_ORDER") {
  field(DESC, "KLY_W2_8")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[1] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M2_CH00_FILT_SR") {
  field(DESC, "KLY_W2_8")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[1]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M2_CH00_ALIAS") {
    field(VAL,"KLYS:LI20:81:WNDW2_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI20:81:WNDW2_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI20:81:WNDW2_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M2_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "KLYS:LI20:81:WNDW2_TEMP") {
  field(DESC, "KLY_W2_8")
  field(PREC, "1")
  field(INP, "KLYS:LI20:81:WNDW2_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI20:81:WNDW2_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M2_CH01_RAW") {
  field(DESC, "RF_AIR")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LI20:1:RFHUT_AIRTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[1]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M2_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[1]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M2_CH01_TEMP") {
  field(DESC, "RF_AIR")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LI20:1:RFHUT_AIRTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[1]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M2_CH01_FILT_CUTOFF") {
  field(DESC, "RF_AIR")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M2_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M2_CH01_FILT_RAD") {
  field(DESC, "RF_AIR")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M2_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M2_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M2_CH01_FILT_RAW") {
  field(DESC, "RF_AIR")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[1] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M2_CH01_FILT_ORDER") {
  field(DESC, "RF_AIR")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[1] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M2_CH01_FILT_SR") {
  field(DESC, "RF_AIR")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[1]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M2_CH01_ALIAS") {
    field(VAL,"ROOM:LI20:1:RFHUT_AIRTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ROOM:LI20:1:RFHUT_AIRTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ROOM:LI20:1:RFHUT_AIRTEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M2_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ROOM:LI20:1:RFHUT_AIRTEMP") {
  field(DESC, "RF_AIR")
  field(PREC, "1")
  field(INP, "ROOM:LI20:1:RFHUT_AIRTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.16e+02")
  field(LOPR, "4.40e+01")
  field(HIHI, "79")
  field(LOLO, "50")
  field(HIGH, "80")
  field(LOW, "63")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "3.6000000e+00")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ROOM:LI20:1:RFHUT_AIRTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M2_CH02_RAW") {
  field(DESC, "KLY_W1_5")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:51:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[1]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M2_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[1]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M2_CH02_TEMP") {
  field(DESC, "KLY_W1_5")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:51:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[1]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M2_CH02_FILT_CUTOFF") {
  field(DESC, "KLY_W1_5")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M2_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M2_CH02_FILT_RAD") {
  field(DESC, "KLY_W1_5")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M2_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M2_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M2_CH02_FILT_RAW") {
  field(DESC, "KLY_W1_5")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[1] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M2_CH02_FILT_ORDER") {
  field(DESC, "KLY_W1_5")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[1] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M2_CH02_FILT_SR") {
  field(DESC, "KLY_W1_5")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[1]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M2_CH02_ALIAS") {
    field(VAL,"KLYS:LI20:51:WNDW1_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI20:51:WNDW1_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI20:51:WNDW1_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M2_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "KLYS:LI20:51:WNDW1_TEMP") {
  field(DESC, "KLY_W1_5")
  field(PREC, "1")
  field(INP, "KLYS:LI20:51:WNDW1_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI20:51:WNDW1_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M2_CH03_RAW") {
  field(DESC, "KLY_W2_5")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:51:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[1]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M2_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[1]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M2_CH03_TEMP") {
  field(DESC, "KLY_W2_5")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:51:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[1]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M2_CH03_FILT_CUTOFF") {
  field(DESC, "KLY_W2_5")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M2_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M2_CH03_FILT_RAD") {
  field(DESC, "KLY_W2_5")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M2_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M2_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M2_CH03_FILT_RAW") {
  field(DESC, "KLY_W2_5")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[1] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M2_CH03_FILT_ORDER") {
  field(DESC, "KLY_W2_5")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[1] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M2_CH03_FILT_SR") {
  field(DESC, "KLY_W2_5")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[1]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M2_CH03_ALIAS") {
    field(VAL,"KLYS:LI20:51:WNDW2_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI20:51:WNDW2_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI20:51:WNDW2_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M2_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "KLYS:LI20:51:WNDW2_TEMP") {
  field(DESC, "KLY_W2_5")
  field(PREC, "1")
  field(INP, "KLYS:LI20:51:WNDW2_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI20:51:WNDW2_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M3_CH00_RAW") {
  field(DESC, "KLY_W1_6")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:61:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[2]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M3_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[2]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M3_CH00_TEMP") {
  field(DESC, "KLY_W1_6")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:61:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[2]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M3_CH00_FILT_CUTOFF") {
  field(DESC, "KLY_W1_6")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M3_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M3_CH00_FILT_RAD") {
  field(DESC, "KLY_W1_6")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M3_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M3_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M3_CH00_FILT_RAW") {
  field(DESC, "KLY_W1_6")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[2] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M3_CH00_FILT_ORDER") {
  field(DESC, "KLY_W1_6")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[2] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M3_CH00_FILT_SR") {
  field(DESC, "KLY_W1_6")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[2]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M3_CH00_ALIAS") {
    field(VAL,"KLYS:LI20:61:WNDW1_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI20:61:WNDW1_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI20:61:WNDW1_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M3_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "KLYS:LI20:61:WNDW1_TEMP") {
  field(DESC, "KLY_W1_6")
  field(PREC, "1")
  field(INP, "KLYS:LI20:61:WNDW1_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI20:61:WNDW1_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M3_CH01_RAW") {
  field(DESC, "KLY_W2_6")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:61:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[2]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M3_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[2]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M3_CH01_TEMP") {
  field(DESC, "KLY_W2_6")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:61:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[2]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M3_CH01_FILT_CUTOFF") {
  field(DESC, "KLY_W2_6")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M3_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M3_CH01_FILT_RAD") {
  field(DESC, "KLY_W2_6")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M3_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M3_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M3_CH01_FILT_RAW") {
  field(DESC, "KLY_W2_6")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[2] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M3_CH01_FILT_ORDER") {
  field(DESC, "KLY_W2_6")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[2] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M3_CH01_FILT_SR") {
  field(DESC, "KLY_W2_6")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[2]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M3_CH01_ALIAS") {
    field(VAL,"KLYS:LI20:61:WNDW2_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI20:61:WNDW2_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI20:61:WNDW2_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M3_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "KLYS:LI20:61:WNDW2_TEMP") {
  field(DESC, "KLY_W2_6")
  field(PREC, "1")
  field(INP, "KLYS:LI20:61:WNDW2_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI20:61:WNDW2_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M3_CH02_RAW") {
  field(DESC, "KLY_W1_7")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:71:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[2]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M3_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[2]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M3_CH02_TEMP") {
  field(DESC, "KLY_W1_7")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:71:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[2]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M3_CH02_FILT_CUTOFF") {
  field(DESC, "KLY_W1_7")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M3_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M3_CH02_FILT_RAD") {
  field(DESC, "KLY_W1_7")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M3_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M3_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M3_CH02_FILT_RAW") {
  field(DESC, "KLY_W1_7")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[2] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M3_CH02_FILT_ORDER") {
  field(DESC, "KLY_W1_7")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[2] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M3_CH02_FILT_SR") {
  field(DESC, "KLY_W1_7")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[2]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M3_CH02_ALIAS") {
    field(VAL,"KLYS:LI20:71:WNDW1_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI20:71:WNDW1_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI20:71:WNDW1_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M3_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "KLYS:LI20:71:WNDW1_TEMP") {
  field(DESC, "KLY_W1_7")
  field(PREC, "1")
  field(INP, "KLYS:LI20:71:WNDW1_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI20:71:WNDW1_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M3_CH03_RAW") {
  field(DESC, "KLY_W2_7")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:71:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[2]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M3_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[2]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M3_CH03_TEMP") {
  field(DESC, "KLY_W2_7")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:71:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[2]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M3_CH03_FILT_CUTOFF") {
  field(DESC, "KLY_W2_7")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M3_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M3_CH03_FILT_RAD") {
  field(DESC, "KLY_W2_7")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M3_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M3_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M3_CH03_FILT_RAW") {
  field(DESC, "KLY_W2_7")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[2] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M3_CH03_FILT_ORDER") {
  field(DESC, "KLY_W2_7")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[2] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M3_CH03_FILT_SR") {
  field(DESC, "KLY_W2_7")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[2]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M3_CH03_ALIAS") {
    field(VAL,"KLYS:LI20:71:WNDW2_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI20:71:WNDW2_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI20:71:WNDW2_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M3_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "KLYS:LI20:71:WNDW2_TEMP") {
  field(DESC, "KLY_W2_7")
  field(PREC, "1")
  field(INP, "KLYS:LI20:71:WNDW2_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI20:71:WNDW2_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M4_CH00_RAW") {
  field(DESC, "KLY_W1_8")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:81:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[3]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M4_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[3]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M4_CH00_TEMP") {
  field(DESC, "KLY_W1_8")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI20:81:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[3]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M4_CH00_FILT_CUTOFF") {
  field(DESC, "KLY_W1_8")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M4_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M4_CH00_FILT_RAD") {
  field(DESC, "KLY_W1_8")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M4_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M4_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M4_CH00_FILT_RAW") {
  field(DESC, "KLY_W1_8")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[3] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M4_CH00_FILT_ORDER") {
  field(DESC, "KLY_W1_8")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[3] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M4_CH00_FILT_SR") {
  field(DESC, "KLY_W1_8")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[3]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M4_CH00_ALIAS") {
    field(VAL,"KLYS:LI20:81:WNDW1_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI20:81:WNDW1_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI20:81:WNDW1_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M4_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "KLYS:LI20:81:WNDW1_TEMP") {
  field(DESC, "KLY_W1_8")
  field(PREC, "1")
  field(INP, "KLYS:LI20:81:WNDW1_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI20:81:WNDW1_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M4_CH01_RAW") {
  field(DESC, "WG_H2O")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "WATR:LI20:1:WG_H2O_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[3]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M4_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[3]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M4_CH01_TEMP") {
  field(DESC, "WG_H2O")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "WATR:LI20:1:WG_H2O_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[3]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M4_CH01_FILT_CUTOFF") {
  field(DESC, "WG_H2O")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M4_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M4_CH01_FILT_RAD") {
  field(DESC, "WG_H2O")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M4_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M4_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M4_CH01_FILT_RAW") {
  field(DESC, "WG_H2O")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[3] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M4_CH01_FILT_ORDER") {
  field(DESC, "WG_H2O")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[3] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M4_CH01_FILT_SR") {
  field(DESC, "WG_H2O")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[3]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M4_CH01_ALIAS") {
    field(VAL,"WATR:LI20:1:WG_H2O_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "WATR:LI20:1:WG_H2O_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"WATR:LI20:1:WG_H2O_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M4_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "WATR:LI20:1:WG_H2O_TEMP") {
  field(DESC, "WG_H2O")
  field(PREC, "1")
  field(INP, "WATR:LI20:1:WG_H2O_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "9.74e+01")
  field(LOPR, "9.26e+01")
  field(HIHI, "97")
  field(LOLO, "93")
  field(HIGH, "96.8")
  field(LOW, "93.2")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "8.0000000e-02")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "WATR:LI20:1:WG_H2O_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M4_CH02_RAW") {
  field(DESC, "KLY_H2O")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "WATR:LI20:1:KLY_H2O_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[3]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M4_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[3]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M4_CH02_TEMP") {
  field(DESC, "KLY_H2O")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "WATR:LI20:1:KLY_H2O_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[3]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M4_CH02_FILT_CUTOFF") {
  field(DESC, "KLY_H2O")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M4_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M4_CH02_FILT_RAD") {
  field(DESC, "KLY_H2O")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M4_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M4_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M4_CH02_FILT_RAW") {
  field(DESC, "KLY_H2O")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[3] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M4_CH02_FILT_ORDER") {
  field(DESC, "KLY_H2O")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[3] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M4_CH02_FILT_SR") {
  field(DESC, "KLY_H2O")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[3]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M4_CH02_ALIAS") {
    field(VAL,"WATR:LI20:1:KLY_H2O_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "WATR:LI20:1:KLY_H2O_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"WATR:LI20:1:KLY_H2O_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M4_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "WATR:LI20:1:KLY_H2O_TEMP") {
  field(DESC, "KLY_H2O")
  field(PREC, "1")
  field(INP, "WATR:LI20:1:KLY_H2O_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "9.76e+01")
  field(LOPR, "9.04e+01")
  field(HIHI, "97")
  field(LOLO, "91")
  field(HIGH, "96.7")
  field(LOW, "91.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "1.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "WATR:LI20:1:KLY_H2O_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M4_CH03_RAW") {
  field(DESC, "M_D_LINE")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LLRF:LI20:1:M_D_LINE_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[3]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M4_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[3]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M4_CH03_TEMP") {
  field(DESC, "M_D_LINE")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LLRF:LI20:1:M_D_LINE_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[3]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M4_CH03_FILT_CUTOFF") {
  field(DESC, "M_D_LINE")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M4_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M4_CH03_FILT_RAD") {
  field(DESC, "M_D_LINE")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M4_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M4_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M4_CH03_FILT_RAW") {
  field(DESC, "M_D_LINE")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[3] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M4_CH03_FILT_ORDER") {
  field(DESC, "M_D_LINE")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[3] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M4_CH03_FILT_SR") {
  field(DESC, "M_D_LINE")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[3]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M4_CH03_ALIAS") {
    field(VAL,"LLRF:LI20:1:M_D_LINE_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LLRF:LI20:1:M_D_LINE_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LLRF:LI20:1:M_D_LINE_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M4_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "LLRF:LI20:1:M_D_LINE_TEMP") {
  field(DESC, "M_D_LINE")
  field(PREC, "1")
  field(INP, "LLRF:LI20:1:M_D_LINE_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.02e+02")
  field(LOPR, "6.93e+01")
  field(HIHI, "99")
  field(LOLO, "72")
  field(HIGH, "97.65")
  field(LOW, "73.35")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "5.4000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LLRF:LI20:1:M_D_LINE_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M5_CH00_RAW") {
  field(DESC, "PHS_REF")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LLRF:LI20:1:PHS_REF_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[4]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M5_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[4]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M5_CH00_TEMP") {
  field(DESC, "PHS_REF")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LLRF:LI20:1:PHS_REF_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[4]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M5_CH00_FILT_CUTOFF") {
  field(DESC, "PHS_REF")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M5_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M5_CH00_FILT_RAD") {
  field(DESC, "PHS_REF")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M5_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M5_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M5_CH00_FILT_RAW") {
  field(DESC, "PHS_REF")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[4] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M5_CH00_FILT_ORDER") {
  field(DESC, "PHS_REF")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[4] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M5_CH00_FILT_SR") {
  field(DESC, "PHS_REF")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[4]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M5_CH00_ALIAS") {
    field(VAL,"LLRF:LI20:1:PHS_REF_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LLRF:LI20:1:PHS_REF_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LLRF:LI20:1:PHS_REF_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M5_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "LLRF:LI20:1:PHS_REF_TEMP") {
  field(DESC, "PHS_REF")
  field(PREC, "1")
  field(INP, "LLRF:LI20:1:PHS_REF_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "9.90e+01")
  field(LOPR, "8.70e+01")
  field(HIHI, "98")
  field(LOLO, "88")
  field(HIGH, "97.5")
  field(LOW, "88.5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "2.0000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LLRF:LI20:1:PHS_REF_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M5_CH01_RAW") {
  field(DESC, "X6_MULT")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LLRF:LI20:1:X6_MULT_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[4]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M5_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[4]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M5_CH01_TEMP") {
  field(DESC, "X6_MULT")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LLRF:LI20:1:X6_MULT_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[4]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M5_CH01_FILT_CUTOFF") {
  field(DESC, "X6_MULT")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M5_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M5_CH01_FILT_RAD") {
  field(DESC, "X6_MULT")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M5_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M5_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M5_CH01_FILT_RAW") {
  field(DESC, "X6_MULT")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[4] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M5_CH01_FILT_ORDER") {
  field(DESC, "X6_MULT")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[4] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M5_CH01_FILT_SR") {
  field(DESC, "X6_MULT")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[4]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M5_CH01_ALIAS") {
    field(VAL,"LLRF:LI20:1:X6_MULT_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LLRF:LI20:1:X6_MULT_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LLRF:LI20:1:X6_MULT_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M5_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "LLRF:LI20:1:X6_MULT_TEMP") {
  field(DESC, "X6_MULT")
  field(PREC, "1")
  field(INP, "LLRF:LI20:1:X6_MULT_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "9.80e+01")
  field(LOPR, "8.60e+01")
  field(HIHI, "97")
  field(LOLO, "87")
  field(HIGH, "96.5")
  field(LOW, "87.5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "2.0000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LLRF:LI20:1:X6_MULT_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M5_CH02_RAW") {
  field(DESC, "ACC_H2O")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "WATR:LI20:1:ACC_H2O_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[4]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M5_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[4]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M5_CH02_TEMP") {
  field(DESC, "ACC_H2O")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "WATR:LI20:1:ACC_H2O_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[4]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M5_CH02_FILT_CUTOFF") {
  field(DESC, "ACC_H2O")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M5_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M5_CH02_FILT_RAD") {
  field(DESC, "ACC_H2O")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M5_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M5_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M5_CH02_FILT_RAW") {
  field(DESC, "ACC_H2O")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[4] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M5_CH02_FILT_ORDER") {
  field(DESC, "ACC_H2O")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[4] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M5_CH02_FILT_SR") {
  field(DESC, "ACC_H2O")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[4]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M5_CH02_ALIAS") {
    field(VAL,"WATR:LI20:1:ACC_H2O_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "WATR:LI20:1:ACC_H2O_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"WATR:LI20:1:ACC_H2O_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M5_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "WATR:LI20:1:ACC_H2O_TEMP") {
  field(DESC, "ACC_H2O")
  field(PREC, "1")
  field(INP, "WATR:LI20:1:ACC_H2O_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.12e+02")
  field(LOPR, "1.10e+02")
  field(HIHI, "87")
  field(LOLO, "85")
  field(HIGH, "86.9")
  field(LOW, "85.1")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "4.0000000e-02")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "WATR:LI20:1:ACC_H2O_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M5_CH03_RAW") {
  field(DESC, "T_AIR_5")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LI20:1:GIRDER5_AIRTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[4]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M5_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[4]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M5_CH03_TEMP") {
  field(DESC, "T_AIR_5")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LI20:1:GIRDER5_AIRTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[4]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M5_CH03_FILT_CUTOFF") {
  field(DESC, "T_AIR_5")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M5_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M5_CH03_FILT_RAD") {
  field(DESC, "T_AIR_5")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M5_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M5_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M5_CH03_FILT_RAW") {
  field(DESC, "T_AIR_5")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[4] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M5_CH03_FILT_ORDER") {
  field(DESC, "T_AIR_5")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[4] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M5_CH03_FILT_SR") {
  field(DESC, "T_AIR_5")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[4]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M5_CH03_ALIAS") {
    field(VAL,"ROOM:LI20:1:GIRDER5_AIRTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ROOM:LI20:1:GIRDER5_AIRTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ROOM:LI20:1:GIRDER5_AIRTEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M5_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ROOM:LI20:1:GIRDER5_AIRTEMP") {
  field(DESC, "T_AIR_5")
  field(PREC, "1")
  field(INP, "ROOM:LI20:1:GIRDER5_AIRTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.16e+02")
  field(LOPR, "4.40e+01")
  field(HIHI, "110")
  field(LOLO, "50")
  field(HIGH, "107")
  field(LOW, "53")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "1.2000000e+00")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ROOM:LI20:1:GIRDER5_AIRTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M6_CH00_RAW") {
  field(DESC, "LINACAIR")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LI20:1:LINACAIR_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[5]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M6_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[5]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M6_CH00_TEMP") {
  field(DESC, "LINACAIR")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LI20:1:LINACAIR_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[5]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M6_CH00_FILT_CUTOFF") {
  field(DESC, "LINACAIR")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M6_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M6_CH00_FILT_RAD") {
  field(DESC, "LINACAIR")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M6_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M6_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M6_CH00_FILT_RAW") {
  field(DESC, "LINACAIR")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[5] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M6_CH00_FILT_ORDER") {
  field(DESC, "LINACAIR")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[5] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M6_CH00_FILT_SR") {
  field(DESC, "LINACAIR")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[5]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M6_CH00_ALIAS") {
    field(VAL,"ROOM:LI20:1:LINACAIR_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ROOM:LI20:1:LINACAIR_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ROOM:LI20:1:LINACAIR_TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M6_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ROOM:LI20:1:LINACAIR_TEMP") {
  field(DESC, "LINACAIR")
  field(PREC, "1")
  field(INP, "ROOM:LI20:1:LINACAIR_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "2.30e+02")
  field(LOPR, "1.40e+01")
  field(HIHI, "212")
  field(LOLO, "32")
  field(HIGH, "203")
  field(LOW, "41")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "3.6000000e+00")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ROOM:LI20:1:LINACAIR_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M6_CH01_RAW") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR0_M6_CH01_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[5]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M6_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[5]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M6_CH01_TEMP") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR0_M6_CH01_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[5]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M6_CH01_FILT_CUTOFF") {
  field(DESC, "Spare")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M6_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M6_CH01_FILT_RAD") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M6_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M6_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M6_CH01_FILT_RAW") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[5] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M6_CH01_FILT_ORDER") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[5] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M6_CH01_FILT_SR") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[5]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M6_CH01_ALIAS") {
    field(VAL,"PLC:LI21:TM01:CR0_M6_CH01_SPARE")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PLC:LI21:TM01:CR0_M6_CH01_SPARE_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PLC:LI21:TM01:CR0_M6_CH01_SPARE")
  field(INPA, "PLC:LI21:TM01:CR0_M6_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "PLC:LI21:TM01:CR0_M6_CH01_SPARE") {
  field(DESC, "Spare")
  field(PREC, "1")
  field(INP, "PLC:LI21:TM01:CR0_M6_CH01_SPARE_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "2.30e+02")
  field(LOPR, "1.40e+01")
  field(HIHI, "212")
  field(LOLO, "32")
  field(HIGH, "203")
  field(LOW, "41")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "3.6000000e+00")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PLC:LI21:TM01:CR0_M6_CH01_SPARE_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M6_CH02_RAW") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR0_M6_CH02_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[5]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M6_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[5]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M6_CH02_TEMP") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR0_M6_CH02_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[5]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M6_CH02_FILT_CUTOFF") {
  field(DESC, "Spare")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M6_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M6_CH02_FILT_RAD") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M6_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M6_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M6_CH02_FILT_RAW") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[5] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M6_CH02_FILT_ORDER") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[5] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M6_CH02_FILT_SR") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[5]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M6_CH02_ALIAS") {
    field(VAL,"PLC:LI21:TM01:CR0_M6_CH02_SPARE")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PLC:LI21:TM01:CR0_M6_CH02_SPARE_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PLC:LI21:TM01:CR0_M6_CH02_SPARE")
  field(INPA, "PLC:LI21:TM01:CR0_M6_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "PLC:LI21:TM01:CR0_M6_CH02_SPARE") {
  field(DESC, "Spare")
  field(PREC, "1")
  field(INP, "PLC:LI21:TM01:CR0_M6_CH02_SPARE_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "2.30e+02")
  field(LOPR, "1.40e+01")
  field(HIHI, "212")
  field(LOLO, "32")
  field(HIGH, "203")
  field(LOW, "41")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "3.6000000e+00")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PLC:LI21:TM01:CR0_M6_CH02_SPARE_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M6_CH03_RAW") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR0_M6_CH03_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[5]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M6_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[5]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M6_CH03_TEMP") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR0_M6_CH03_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[5]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M6_CH03_FILT_CUTOFF") {
  field(DESC, "Spare")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M6_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M6_CH03_FILT_RAD") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M6_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M6_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M6_CH03_FILT_RAW") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[5] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M6_CH03_FILT_ORDER") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[5] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M6_CH03_FILT_SR") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[5]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M6_CH03_ALIAS") {
    field(VAL,"PLC:LI21:TM01:CR0_M6_CH03_SPARE")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PLC:LI21:TM01:CR0_M6_CH03_SPARE_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PLC:LI21:TM01:CR0_M6_CH03_SPARE")
  field(INPA, "PLC:LI21:TM01:CR0_M6_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "PLC:LI21:TM01:CR0_M6_CH03_SPARE") {
  field(DESC, "Spare")
  field(PREC, "1")
  field(INP, "PLC:LI21:TM01:CR0_M6_CH03_SPARE_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "2.30e+02")
  field(LOPR, "1.40e+01")
  field(HIHI, "212")
  field(LOLO, "32")
  field(HIGH, "203")
  field(LOW, "41")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "3.6000000e+00")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PLC:LI21:TM01:CR0_M6_CH03_SPARE_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M7_CH00_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:IN20:631:SUPTTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[6]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M7_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[6]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M7_CH00_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:IN20:631:SUPTTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[6]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M7_CH00_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M7_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M7_CH00_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M7_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M7_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M7_CH00_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[6] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M7_CH00_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[6] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M7_CH00_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[6]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M7_CH00_ALIAS") {
    field(VAL,"QUAD:IN20:631:SUPTTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "QUAD:IN20:631:SUPTTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"QUAD:IN20:631:SUPTTEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M7_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "QUAD:IN20:631:SUPTTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "QUAD:IN20:631:SUPTTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "QUAD:IN20:631:SUPTTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M7_CH01_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:IN20:651:SUPTTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[6]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M7_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[6]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M7_CH01_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:IN20:651:SUPTTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[6]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M7_CH01_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M7_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M7_CH01_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M7_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M7_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M7_CH01_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[6] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M7_CH01_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[6] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M7_CH01_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[6]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M7_CH01_ALIAS") {
    field(VAL,"QUAD:IN20:651:SUPTTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "QUAD:IN20:651:SUPTTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"QUAD:IN20:651:SUPTTEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M7_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "QUAD:IN20:651:SUPTTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "QUAD:IN20:651:SUPTTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "QUAD:IN20:651:SUPTTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M7_CH02_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:IN20:771:SUPTTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[6]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M7_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[6]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M7_CH02_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:IN20:771:SUPTTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[6]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M7_CH02_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M7_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M7_CH02_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M7_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M7_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M7_CH02_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[6] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M7_CH02_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[6] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M7_CH02_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[6]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M7_CH02_ALIAS") {
    field(VAL,"QUAD:IN20:771:SUPTTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "QUAD:IN20:771:SUPTTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"QUAD:IN20:771:SUPTTEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M7_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "QUAD:IN20:771:SUPTTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "QUAD:IN20:771:SUPTTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "QUAD:IN20:771:SUPTTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M7_CH03_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:IN20:781:SUPTTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[6]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M7_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[6]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M7_CH03_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:IN20:781:SUPTTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[6]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M7_CH03_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M7_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M7_CH03_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M7_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M7_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M7_CH03_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[6] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M7_CH03_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[6] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M7_CH03_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[6]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M7_CH03_ALIAS") {
    field(VAL,"QUAD:IN20:781:SUPTTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "QUAD:IN20:781:SUPTTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"QUAD:IN20:781:SUPTTEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M7_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "QUAD:IN20:781:SUPTTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "QUAD:IN20:781:SUPTTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "QUAD:IN20:781:SUPTTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M8_CH00_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:IN20:731:SUPTTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[7]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M8_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[7]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M8_CH00_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:IN20:731:SUPTTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[7]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M8_CH00_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M8_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M8_CH00_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M8_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M8_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M8_CH00_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[7] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M8_CH00_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[7] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M8_CH00_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[7]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M8_CH00_ALIAS") {
    field(VAL,"QUAD:IN20:731:SUPTTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "QUAD:IN20:731:SUPTTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"QUAD:IN20:731:SUPTTEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M8_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "QUAD:IN20:731:SUPTTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "QUAD:IN20:731:SUPTTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "QUAD:IN20:731:SUPTTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M8_CH01_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "BEND:IN20:661:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[7]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M8_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[7]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M8_CH01_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "BEND:IN20:661:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[7]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M8_CH01_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M8_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M8_CH01_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M8_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M8_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M8_CH01_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[7] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M8_CH01_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[7] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M8_CH01_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[7]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M8_CH01_ALIAS") {
    field(VAL,"BEND:IN20:661:TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "BEND:IN20:661:TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"BEND:IN20:661:TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M8_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "BEND:IN20:661:TEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "BEND:IN20:661:TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "BEND:IN20:661:TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M8_CH02_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "BEND:IN20:751:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[7]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M8_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[7]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M8_CH02_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "BEND:IN20:751:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[7]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M8_CH02_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M8_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M8_CH02_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M8_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M8_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M8_CH02_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[7] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M8_CH02_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[7] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M8_CH02_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[7]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M8_CH02_ALIAS") {
    field(VAL,"BEND:IN20:751:TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "BEND:IN20:751:TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"BEND:IN20:751:TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M8_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "BEND:IN20:751:TEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "BEND:IN20:751:TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "BEND:IN20:751:TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M8_CH03_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "BEND:IN20:931:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[7]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M8_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[7]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M8_CH03_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "BEND:IN20:931:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[7]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M8_CH03_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M8_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M8_CH03_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M8_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M8_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M8_CH03_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[7] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M8_CH03_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[7] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M8_CH03_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[7]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M8_CH03_ALIAS") {
    field(VAL,"BEND:IN20:931:TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "BEND:IN20:931:TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"BEND:IN20:931:TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M8_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "BEND:IN20:931:TEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "BEND:IN20:931:TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "BEND:IN20:931:TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M9_CH00_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "DUMP:IN20:999:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[8]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M9_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[8]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M9_CH00_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "DUMP:IN20:999:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[8]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M9_CH00_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M9_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M9_CH00_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M9_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M9_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M9_CH00_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[8] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M9_CH00_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[8] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M9_CH00_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[8]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M9_CH00_ALIAS") {
    field(VAL,"DUMP:IN20:999:TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "DUMP:IN20:999:TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"DUMP:IN20:999:TEMP")
  field(INPA, "PLC:LI21:TM01:CR0_M9_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "DUMP:IN20:999:TEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "DUMP:IN20:999:TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "DUMP:IN20:999:TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M9_CH01_RAW") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR0_M9_CH01_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[8]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M9_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[8]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M9_CH01_TEMP") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR0_M9_CH01_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[8]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M9_CH01_FILT_CUTOFF") {
  field(DESC, "Spare")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M9_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M9_CH01_FILT_RAD") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M9_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M9_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M9_CH01_FILT_RAW") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[8] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M9_CH01_FILT_ORDER") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[8] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M9_CH01_FILT_SR") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[8]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M9_CH01_ALIAS") {
    field(VAL,"PLC:LI21:TM01:CR0_M9_CH01_SPARE")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PLC:LI21:TM01:CR0_M9_CH01_SPARE_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PLC:LI21:TM01:CR0_M9_CH01_SPARE")
  field(INPA, "PLC:LI21:TM01:CR0_M9_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "PLC:LI21:TM01:CR0_M9_CH01_SPARE") {
  field(DESC, "Spare")
  field(PREC, "1")
  field(INP, "PLC:LI21:TM01:CR0_M9_CH01_SPARE_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PLC:LI21:TM01:CR0_M9_CH01_SPARE_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M9_CH02_RAW") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR0_M9_CH02_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[8]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M9_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[8]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M9_CH02_TEMP") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR0_M9_CH02_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[8]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M9_CH02_FILT_CUTOFF") {
  field(DESC, "Spare")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M9_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M9_CH02_FILT_RAD") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M9_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M9_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M9_CH02_FILT_RAW") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[8] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M9_CH02_FILT_ORDER") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[8] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M9_CH02_FILT_SR") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[8]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M9_CH02_ALIAS") {
    field(VAL,"PLC:LI21:TM01:CR0_M9_CH02_SPARE")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PLC:LI21:TM01:CR0_M9_CH02_SPARE_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PLC:LI21:TM01:CR0_M9_CH02_SPARE")
  field(INPA, "PLC:LI21:TM01:CR0_M9_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "PLC:LI21:TM01:CR0_M9_CH02_SPARE") {
  field(DESC, "Spare")
  field(PREC, "1")
  field(INP, "PLC:LI21:TM01:CR0_M9_CH02_SPARE_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PLC:LI21:TM01:CR0_M9_CH02_SPARE_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M9_CH03_RAW") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR0_M9_CH03_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[8]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR0_M9_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[8]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR0_M9_CH03_TEMP") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR0_M9_CH03_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[8]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR0_M9_CH03_FILT_CUTOFF") {
  field(DESC, "Spare")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR0_M9_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR0_M9_CH03_FILT_RAD") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR0_M9_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR0_M9_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR0_M9_CH03_FILT_RAW") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[8] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR0_M9_CH03_FILT_ORDER") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[8] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR0_M9_CH03_FILT_SR") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[8]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR0_M9_CH03_ALIAS") {
    field(VAL,"PLC:LI21:TM01:CR0_M9_CH03_SPARE")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PLC:LI21:TM01:CR0_M9_CH03_SPARE_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PLC:LI21:TM01:CR0_M9_CH03_SPARE")
  field(INPA, "PLC:LI21:TM01:CR0_M9_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "PLC:LI21:TM01:CR0_M9_CH03_SPARE") {
  field(DESC, "Spare")
  field(PREC, "1")
  field(INP, "PLC:LI21:TM01:CR0_M9_CH03_SPARE_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PLC:LI21:TM01:CR0_M9_CH03_SPARE_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR1_M1_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[10]")
  field(FLNK, "PLC:LI21:TM01:CR1_M1_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR1_M1_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[10]")
  field(FLNK, "PLC:LI21:TM01:CR1_M1_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR1_M1_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR1_M1_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR1_M1_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR1_M1_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR1_M1_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[10]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR1_M1_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[10]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR1_M2_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[11]")
  field(FLNK, "PLC:LI21:TM01:CR1_M2_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR1_M2_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[11]")
  field(FLNK, "PLC:LI21:TM01:CR1_M2_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR1_M2_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR1_M2_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR1_M2_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR1_M2_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR1_M2_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[11]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR1_M2_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[11]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR1_M3_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[12]")
  field(FLNK, "PLC:LI21:TM01:CR1_M3_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR1_M3_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[12]")
  field(FLNK, "PLC:LI21:TM01:CR1_M3_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR1_M3_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR1_M3_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR1_M3_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR1_M3_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR1_M3_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[12]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR1_M3_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[12]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR1_M4_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[13]")
  field(FLNK, "PLC:LI21:TM01:CR1_M4_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR1_M4_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[13]")
  field(FLNK, "PLC:LI21:TM01:CR1_M4_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR1_M4_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR1_M4_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR1_M4_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR1_M4_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR1_M4_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[13]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR1_M4_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[13]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR1_M5_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[14]")
  field(FLNK, "PLC:LI21:TM01:CR1_M5_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR1_M5_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[14]")
  field(FLNK, "PLC:LI21:TM01:CR1_M5_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR1_M5_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR1_M5_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR1_M5_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR1_M5_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR1_M5_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[14]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR1_M5_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[14]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR1_M6_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[15]")
  field(FLNK, "PLC:LI21:TM01:CR1_M6_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR1_M6_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[15]")
  field(FLNK, "PLC:LI21:TM01:CR1_M6_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR1_M6_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR1_M6_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR1_M6_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR1_M6_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR1_M6_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[15]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR1_M6_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[15]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M1_CH00_RAW") {
  field(DESC, "Above the Coh2 X-corr")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LR20:1:AIRTEMP6_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[10]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M1_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[10]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M1_CH00_TEMP") {
  field(DESC, "Above the Coh2 X-corr")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LR20:1:AIRTEMP6_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[10]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M1_CH00_FILT_CUTOFF") {
  field(DESC, "Above the Coh2 X-corr")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M1_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M1_CH00_FILT_RAD") {
  field(DESC, "Above the Coh2 X-corr")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M1_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M1_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M1_CH00_FILT_RAW") {
  field(DESC, "Above the Coh2 X-corr")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[10] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M1_CH00_FILT_ORDER") {
  field(DESC, "Above the Coh2 X-corr")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[10] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M1_CH00_FILT_SR") {
  field(DESC, "Above the Coh2 X-corr")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[10]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M1_CH00_ALIAS") {
    field(VAL,"ROOM:LR20:1:AIRTEMP6")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ROOM:LR20:1:AIRTEMP6_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ROOM:LR20:1:AIRTEMP6")
  field(INPA, "PLC:LI21:TM01:CR1_M1_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ROOM:LR20:1:AIRTEMP6") {
  field(DESC, "Above the Coh2 X-corr")
  field(PREC, "1")
  field(INP, "ROOM:LR20:1:AIRTEMP6_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "78")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ROOM:LR20:1:AIRTEMP6_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M1_CH01_RAW") {
  field(DESC, "Above C-Iris Camera")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LR20:1:AIRTEMP7_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[10]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M1_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[10]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M1_CH01_TEMP") {
  field(DESC, "Above C-Iris Camera")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LR20:1:AIRTEMP7_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[10]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M1_CH01_FILT_CUTOFF") {
  field(DESC, "Above C-Iris Camera")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M1_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M1_CH01_FILT_RAD") {
  field(DESC, "Above C-Iris Camera")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M1_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M1_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M1_CH01_FILT_RAW") {
  field(DESC, "Above C-Iris Camera")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[10] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M1_CH01_FILT_ORDER") {
  field(DESC, "Above C-Iris Camera")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[10] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M1_CH01_FILT_SR") {
  field(DESC, "Above C-Iris Camera")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[10]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M1_CH01_ALIAS") {
    field(VAL,"ROOM:LR20:1:AIRTEMP7")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ROOM:LR20:1:AIRTEMP7_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ROOM:LR20:1:AIRTEMP7")
  field(INPA, "PLC:LI21:TM01:CR1_M1_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ROOM:LR20:1:AIRTEMP7") {
  field(DESC, "Above C-Iris Camera")
  field(PREC, "1")
  field(INP, "ROOM:LR20:1:AIRTEMP7_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "78")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ROOM:LR20:1:AIRTEMP7_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M1_CH02_RAW") {
  field(DESC, "Side of Table by Coh1 MPA")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP01_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[10]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M1_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[10]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M1_CH02_TEMP") {
  field(DESC, "Side of Table by Coh1 MPA")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP01_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[10]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M1_CH02_FILT_CUTOFF") {
  field(DESC, "Side of Table by Coh1 MPA")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M1_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M1_CH02_FILT_RAD") {
  field(DESC, "Side of Table by Coh1 MPA")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M1_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M1_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M1_CH02_FILT_RAW") {
  field(DESC, "Side of Table by Coh1 MPA")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[10] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M1_CH02_FILT_ORDER") {
  field(DESC, "Side of Table by Coh1 MPA")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[10] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M1_CH02_FILT_SR") {
  field(DESC, "Side of Table by Coh1 MPA")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[10]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M1_CH02_ALIAS") {
    field(VAL,"LASR:LR20:1:TABLETEMP01")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LASR:LR20:1:TABLETEMP01_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LASR:LR20:1:TABLETEMP01")
  field(INPA, "PLC:LI21:TM01:CR1_M1_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "LASR:LR20:1:TABLETEMP01") {
  field(DESC, "Side of Table by Coh1 MPA")
  field(PREC, "1")
  field(INP, "LASR:LR20:1:TABLETEMP01_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "76")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LASR:LR20:1:TABLETEMP01_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M1_CH03_RAW") {
  field(DESC, "On Corner of Table Past Iris")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP02_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[10]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M1_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[10]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M1_CH03_TEMP") {
  field(DESC, "On Corner of Table Past Iris")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP02_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[10]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M1_CH03_FILT_CUTOFF") {
  field(DESC, "On Corner of Table Past Iris")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M1_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M1_CH03_FILT_RAD") {
  field(DESC, "On Corner of Table Past Iris")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M1_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M1_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M1_CH03_FILT_RAW") {
  field(DESC, "On Corner of Table Past Iris")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[10] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M1_CH03_FILT_ORDER") {
  field(DESC, "On Corner of Table Past Iris")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[10] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M1_CH03_FILT_SR") {
  field(DESC, "On Corner of Table Past Iris")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[10]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M1_CH03_ALIAS") {
    field(VAL,"LASR:LR20:1:TABLETEMP02")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LASR:LR20:1:TABLETEMP02_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LASR:LR20:1:TABLETEMP02")
  field(INPA, "PLC:LI21:TM01:CR1_M1_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "LASR:LR20:1:TABLETEMP02") {
  field(DESC, "On Corner of Table Past Iris")
  field(PREC, "1")
  field(INP, "LASR:LR20:1:TABLETEMP02_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "76")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LASR:LR20:1:TABLETEMP02_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M2_CH00_RAW") {
  field(DESC, "Side of Table by Coh1 Regen")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP03_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[11]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M2_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[11]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M2_CH00_TEMP") {
  field(DESC, "Side of Table by Coh1 Regen")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP03_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[11]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M2_CH00_FILT_CUTOFF") {
  field(DESC, "Side of Table by Coh1 Regen")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M2_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M2_CH00_FILT_RAD") {
  field(DESC, "Side of Table by Coh1 Regen")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M2_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M2_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M2_CH00_FILT_RAW") {
  field(DESC, "Side of Table by Coh1 Regen")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[11] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M2_CH00_FILT_ORDER") {
  field(DESC, "Side of Table by Coh1 Regen")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[11] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M2_CH00_FILT_SR") {
  field(DESC, "Side of Table by Coh1 Regen")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[11]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M2_CH00_ALIAS") {
    field(VAL,"LASR:LR20:1:TABLETEMP03")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LASR:LR20:1:TABLETEMP03_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LASR:LR20:1:TABLETEMP03")
  field(INPA, "PLC:LI21:TM01:CR1_M2_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "LASR:LR20:1:TABLETEMP03") {
  field(DESC, "Side of Table by Coh1 Regen")
  field(PREC, "1")
  field(INP, "LASR:LR20:1:TABLETEMP03_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "76")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LASR:LR20:1:TABLETEMP03_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M2_CH01_RAW") {
  field(DESC, "Under Table")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP04_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[11]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M2_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[11]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M2_CH01_TEMP") {
  field(DESC, "Under Table")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP04_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[11]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M2_CH01_FILT_CUTOFF") {
  field(DESC, "Under Table")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M2_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M2_CH01_FILT_RAD") {
  field(DESC, "Under Table")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M2_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M2_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M2_CH01_FILT_RAW") {
  field(DESC, "Under Table")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[11] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M2_CH01_FILT_ORDER") {
  field(DESC, "Under Table")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[11] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M2_CH01_FILT_SR") {
  field(DESC, "Under Table")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[11]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M2_CH01_ALIAS") {
    field(VAL,"LASR:LR20:1:TABLETEMP04")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LASR:LR20:1:TABLETEMP04_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LASR:LR20:1:TABLETEMP04")
  field(INPA, "PLC:LI21:TM01:CR1_M2_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "LASR:LR20:1:TABLETEMP04") {
  field(DESC, "Under Table")
  field(PREC, "1")
  field(INP, "LASR:LR20:1:TABLETEMP04_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "76")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LASR:LR20:1:TABLETEMP04_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M2_CH02_RAW") {
  field(DESC, "On Table near CH3")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP05_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[11]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M2_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[11]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M2_CH02_TEMP") {
  field(DESC, "On Table near CH3")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP05_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[11]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M2_CH02_FILT_CUTOFF") {
  field(DESC, "On Table near CH3")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M2_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M2_CH02_FILT_RAD") {
  field(DESC, "On Table near CH3")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M2_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M2_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M2_CH02_FILT_RAW") {
  field(DESC, "On Table near CH3")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[11] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M2_CH02_FILT_ORDER") {
  field(DESC, "On Table near CH3")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[11] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M2_CH02_FILT_SR") {
  field(DESC, "On Table near CH3")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[11]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M2_CH02_ALIAS") {
    field(VAL,"LASR:LR20:1:TABLETEMP05")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LASR:LR20:1:TABLETEMP05_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LASR:LR20:1:TABLETEMP05")
  field(INPA, "PLC:LI21:TM01:CR1_M2_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "LASR:LR20:1:TABLETEMP05") {
  field(DESC, "On Table near CH3")
  field(PREC, "1")
  field(INP, "LASR:LR20:1:TABLETEMP05_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "76")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LASR:LR20:1:TABLETEMP05_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M2_CH03_RAW") {
  field(DESC, "Side of Table by Pulse-stacker")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP06_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[11]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M2_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[11]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M2_CH03_TEMP") {
  field(DESC, "Side of Table by Pulse-stacker")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP06_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[11]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M2_CH03_FILT_CUTOFF") {
  field(DESC, "Side of Table by Pulse-stacker")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M2_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M2_CH03_FILT_RAD") {
  field(DESC, "Side of Table by Pulse-stacker")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M2_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M2_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M2_CH03_FILT_RAW") {
  field(DESC, "Side of Table by Pulse-stacker")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[11] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M2_CH03_FILT_ORDER") {
  field(DESC, "Side of Table by Pulse-stacker")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[11] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M2_CH03_FILT_SR") {
  field(DESC, "Side of Table by Pulse-stacker")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[11]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M2_CH03_ALIAS") {
    field(VAL,"LASR:LR20:1:TABLETEMP06")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LASR:LR20:1:TABLETEMP06_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LASR:LR20:1:TABLETEMP06")
  field(INPA, "PLC:LI21:TM01:CR1_M2_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "LASR:LR20:1:TABLETEMP06") {
  field(DESC, "Side of Table by Pulse-stacker")
  field(PREC, "1")
  field(INP, "LASR:LR20:1:TABLETEMP06_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "76")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LASR:LR20:1:TABLETEMP06_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M3_CH00_RAW") {
  field(DESC, "Side of table by Coh1 X-corr")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP07_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[12]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M3_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[12]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M3_CH00_TEMP") {
  field(DESC, "Side of table by Coh1 X-corr")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP07_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[12]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M3_CH00_FILT_CUTOFF") {
  field(DESC, "Side of table by Coh1 X-corr")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M3_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M3_CH00_FILT_RAD") {
  field(DESC, "Side of table by Coh1 X-corr")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M3_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M3_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M3_CH00_FILT_RAW") {
  field(DESC, "Side of table by Coh1 X-corr")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[12] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M3_CH00_FILT_ORDER") {
  field(DESC, "Side of table by Coh1 X-corr")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[12] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M3_CH00_FILT_SR") {
  field(DESC, "Side of table by Coh1 X-corr")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[12]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M3_CH00_ALIAS") {
    field(VAL,"LASR:LR20:1:TABLETEMP07")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LASR:LR20:1:TABLETEMP07_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LASR:LR20:1:TABLETEMP07")
  field(INPA, "PLC:LI21:TM01:CR1_M3_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "LASR:LR20:1:TABLETEMP07") {
  field(DESC, "Side of table by Coh1 X-corr")
  field(PREC, "1")
  field(INP, "LASR:LR20:1:TABLETEMP07_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "76")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LASR:LR20:1:TABLETEMP07_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M3_CH01_RAW") {
  field(DESC, "Above Coh1 in Enclosure")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LR20:1:AIRTEMP3_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[12]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M3_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[12]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M3_CH01_TEMP") {
  field(DESC, "Above Coh1 in Enclosure")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LR20:1:AIRTEMP3_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[12]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M3_CH01_FILT_CUTOFF") {
  field(DESC, "Above Coh1 in Enclosure")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M3_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M3_CH01_FILT_RAD") {
  field(DESC, "Above Coh1 in Enclosure")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M3_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M3_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M3_CH01_FILT_RAW") {
  field(DESC, "Above Coh1 in Enclosure")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[12] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M3_CH01_FILT_ORDER") {
  field(DESC, "Above Coh1 in Enclosure")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[12] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M3_CH01_FILT_SR") {
  field(DESC, "Above Coh1 in Enclosure")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[12]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M3_CH01_ALIAS") {
    field(VAL,"ROOM:LR20:1:AIRTEMP3")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ROOM:LR20:1:AIRTEMP3_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ROOM:LR20:1:AIRTEMP3")
  field(INPA, "PLC:LI21:TM01:CR1_M3_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ROOM:LR20:1:AIRTEMP3") {
  field(DESC, "Above Coh1 in Enclosure")
  field(PREC, "1")
  field(INP, "ROOM:LR20:1:AIRTEMP3_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "78")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ROOM:LR20:1:AIRTEMP3_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M3_CH02_RAW") {
  field(DESC, "Side of Table Beside Coh1 Regen")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP09_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[12]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M3_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[12]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M3_CH02_TEMP") {
  field(DESC, "Side of Table Beside Coh1 Regen")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP09_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[12]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M3_CH02_FILT_CUTOFF") {
  field(DESC, "Side of Table Beside Coh1 Regen")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M3_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M3_CH02_FILT_RAD") {
  field(DESC, "Side of Table Beside Coh1 Regen")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M3_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M3_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M3_CH02_FILT_RAW") {
  field(DESC, "Side of Table Beside Coh1 Regen")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[12] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M3_CH02_FILT_ORDER") {
  field(DESC, "Side of Table Beside Coh1 Regen")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[12] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M3_CH02_FILT_SR") {
  field(DESC, "Side of Table Beside Coh1 Regen")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[12]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M3_CH02_ALIAS") {
    field(VAL,"LASR:LR20:1:TABLETEMP09")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LASR:LR20:1:TABLETEMP09_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LASR:LR20:1:TABLETEMP09")
  field(INPA, "PLC:LI21:TM01:CR1_M3_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "LASR:LR20:1:TABLETEMP09") {
  field(DESC, "Side of Table Beside Coh1 Regen")
  field(PREC, "1")
  field(INP, "LASR:LR20:1:TABLETEMP09_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "76")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LASR:LR20:1:TABLETEMP09_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M3_CH03_RAW") {
  field(DESC, "On Table Next to Iris Wheel")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP10_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[12]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M3_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[12]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M3_CH03_TEMP") {
  field(DESC, "On Table Next to Iris Wheel")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:TABLETEMP10_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[12]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M3_CH03_FILT_CUTOFF") {
  field(DESC, "On Table Next to Iris Wheel")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M3_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M3_CH03_FILT_RAD") {
  field(DESC, "On Table Next to Iris Wheel")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M3_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M3_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M3_CH03_FILT_RAW") {
  field(DESC, "On Table Next to Iris Wheel")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[12] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M3_CH03_FILT_ORDER") {
  field(DESC, "On Table Next to Iris Wheel")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[12] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M3_CH03_FILT_SR") {
  field(DESC, "On Table Next to Iris Wheel")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[12]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M3_CH03_ALIAS") {
    field(VAL,"LASR:LR20:1:TABLETEMP10")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LASR:LR20:1:TABLETEMP10_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LASR:LR20:1:TABLETEMP10")
  field(INPA, "PLC:LI21:TM01:CR1_M3_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "LASR:LR20:1:TABLETEMP10") {
  field(DESC, "On Table Next to Iris Wheel")
  field(PREC, "1")
  field(INP, "LASR:LR20:1:TABLETEMP10_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "76")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LASR:LR20:1:TABLETEMP10_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M4_CH00_RAW") {
  field(DESC, "Inside Enclosure Above Coh2 Tripler")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LR20:1:AIRTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[13]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M4_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[13]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M4_CH00_TEMP") {
  field(DESC, "Inside Enclosure Above Coh2 Tripler")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LR20:1:AIRTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[13]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M4_CH00_FILT_CUTOFF") {
  field(DESC, "Inside Enclosure Above Coh2 Tripler")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M4_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M4_CH00_FILT_RAD") {
  field(DESC, "Inside Enclosure Above Coh2 Tripler")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M4_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M4_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M4_CH00_FILT_RAW") {
  field(DESC, "Inside Enclosure Above Coh2 Tripler")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[13] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M4_CH00_FILT_ORDER") {
  field(DESC, "Inside Enclosure Above Coh2 Tripler")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[13] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M4_CH00_FILT_SR") {
  field(DESC, "Inside Enclosure Above Coh2 Tripler")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[13]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M4_CH00_ALIAS") {
    field(VAL,"ROOM:LR20:1:AIRTEMP1")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ROOM:LR20:1:AIRTEMP1_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ROOM:LR20:1:AIRTEMP1")
  field(INPA, "PLC:LI21:TM01:CR1_M4_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ROOM:LR20:1:AIRTEMP1") {
  field(DESC, "Inside Enclosure Above Coh2 Tripler")
  field(PREC, "1")
  field(INP, "ROOM:LR20:1:AIRTEMP1_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "78")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ROOM:LR20:1:AIRTEMP1_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M4_CH01_RAW") {
  field(DESC, "Above CH3 camera")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LR20:1:AIRTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[13]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M4_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[13]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M4_CH01_TEMP") {
  field(DESC, "Above CH3 camera")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LR20:1:AIRTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[13]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M4_CH01_FILT_CUTOFF") {
  field(DESC, "Above CH3 camera")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M4_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M4_CH01_FILT_RAD") {
  field(DESC, "Above CH3 camera")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M4_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M4_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M4_CH01_FILT_RAW") {
  field(DESC, "Above CH3 camera")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[13] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M4_CH01_FILT_ORDER") {
  field(DESC, "Above CH3 camera")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[13] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M4_CH01_FILT_SR") {
  field(DESC, "Above CH3 camera")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[13]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M4_CH01_ALIAS") {
    field(VAL,"ROOM:LR20:1:AIRTEMP2")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ROOM:LR20:1:AIRTEMP2_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ROOM:LR20:1:AIRTEMP2")
  field(INPA, "PLC:LI21:TM01:CR1_M4_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ROOM:LR20:1:AIRTEMP2") {
  field(DESC, "Above CH3 camera")
  field(PREC, "1")
  field(INP, "ROOM:LR20:1:AIRTEMP2_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "78")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ROOM:LR20:1:AIRTEMP2_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M4_CH02_RAW") {
  field(DESC, "Coh1 Osc Water Temp (OUT hose)")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:2:OSCWATER_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[13]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M4_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[13]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M4_CH02_TEMP") {
  field(DESC, "Coh1 Osc Water Temp (OUT hose)")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:2:OSCWATER_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[13]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M4_CH02_FILT_CUTOFF") {
  field(DESC, "Coh1 Osc Water Temp (OUT hose)")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M4_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M4_CH02_FILT_RAD") {
  field(DESC, "Coh1 Osc Water Temp (OUT hose)")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M4_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M4_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M4_CH02_FILT_RAW") {
  field(DESC, "Coh1 Osc Water Temp (OUT hose)")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[13] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M4_CH02_FILT_ORDER") {
  field(DESC, "Coh1 Osc Water Temp (OUT hose)")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[13] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M4_CH02_FILT_SR") {
  field(DESC, "Coh1 Osc Water Temp (OUT hose)")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[13]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M4_CH02_ALIAS") {
    field(VAL,"LASR:LR20:2:OSCWATER")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LASR:LR20:2:OSCWATER_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LASR:LR20:2:OSCWATER")
  field(INPA, "PLC:LI21:TM01:CR1_M4_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "LASR:LR20:2:OSCWATER") {
  field(DESC, "Coh1 Osc Water Temp (OUT hose)")
  field(PREC, "1")
  field(INP, "LASR:LR20:2:OSCWATER_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "78")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LASR:LR20:2:OSCWATER_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M4_CH03_RAW") {
  field(DESC, "On Top of Rack Next to Coh2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LR20:1:AIRTEMP4_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[13]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M4_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[13]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M4_CH03_TEMP") {
  field(DESC, "On Top of Rack Next to Coh2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LR20:1:AIRTEMP4_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[13]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M4_CH03_FILT_CUTOFF") {
  field(DESC, "On Top of Rack Next to Coh2")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M4_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M4_CH03_FILT_RAD") {
  field(DESC, "On Top of Rack Next to Coh2")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M4_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M4_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M4_CH03_FILT_RAW") {
  field(DESC, "On Top of Rack Next to Coh2")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[13] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M4_CH03_FILT_ORDER") {
  field(DESC, "On Top of Rack Next to Coh2")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[13] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M4_CH03_FILT_SR") {
  field(DESC, "On Top of Rack Next to Coh2")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[13]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M4_CH03_ALIAS") {
    field(VAL,"ROOM:LR20:1:AIRTEMP4")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ROOM:LR20:1:AIRTEMP4_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ROOM:LR20:1:AIRTEMP4")
  field(INPA, "PLC:LI21:TM01:CR1_M4_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ROOM:LR20:1:AIRTEMP4") {
  field(DESC, "On Top of Rack Next to Coh2")
  field(PREC, "1")
  field(INP, "ROOM:LR20:1:AIRTEMP4_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "78")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ROOM:LR20:1:AIRTEMP4_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M5_CH00_RAW") {
  field(DESC, "In Cable Tray")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LR20:1:AIRTEMP5_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[14]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M5_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[14]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M5_CH00_TEMP") {
  field(DESC, "In Cable Tray")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:LR20:1:AIRTEMP5_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[14]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M5_CH00_FILT_CUTOFF") {
  field(DESC, "In Cable Tray")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M5_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M5_CH00_FILT_RAD") {
  field(DESC, "In Cable Tray")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M5_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M5_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M5_CH00_FILT_RAW") {
  field(DESC, "In Cable Tray")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[14] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M5_CH00_FILT_ORDER") {
  field(DESC, "In Cable Tray")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[14] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M5_CH00_FILT_SR") {
  field(DESC, "In Cable Tray")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[14]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M5_CH00_ALIAS") {
    field(VAL,"ROOM:LR20:1:AIRTEMP5")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ROOM:LR20:1:AIRTEMP5_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ROOM:LR20:1:AIRTEMP5")
  field(INPA, "PLC:LI21:TM01:CR1_M5_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ROOM:LR20:1:AIRTEMP5") {
  field(DESC, "In Cable Tray")
  field(PREC, "1")
  field(INP, "ROOM:LR20:1:AIRTEMP5_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "78")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ROOM:LR20:1:AIRTEMP5_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M5_CH01_RAW") {
  field(DESC, "Coh2 chillers LCS Supply")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:LCSSUPPLY_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[14]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M5_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[14]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M5_CH01_TEMP") {
  field(DESC, "Coh2 chillers LCS Supply")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:LCSSUPPLY_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[14]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M5_CH01_FILT_CUTOFF") {
  field(DESC, "Coh2 chillers LCS Supply")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M5_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M5_CH01_FILT_RAD") {
  field(DESC, "Coh2 chillers LCS Supply")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M5_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M5_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M5_CH01_FILT_RAW") {
  field(DESC, "Coh2 chillers LCS Supply")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[14] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M5_CH01_FILT_ORDER") {
  field(DESC, "Coh2 chillers LCS Supply")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[14] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M5_CH01_FILT_SR") {
  field(DESC, "Coh2 chillers LCS Supply")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[14]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M5_CH01_ALIAS") {
    field(VAL,"LASR:LR20:1:LCSSUPPLY")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LASR:LR20:1:LCSSUPPLY_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LASR:LR20:1:LCSSUPPLY")
  field(INPA, "PLC:LI21:TM01:CR1_M5_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "LASR:LR20:1:LCSSUPPLY") {
  field(DESC, "Coh2 chillers LCS Supply")
  field(PREC, "1")
  field(INP, "LASR:LR20:1:LCSSUPPLY_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "67")
  field(LOLO, "52")
  field(HIGH, "64")
  field(LOW, "55")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LASR:LR20:1:LCSSUPPLY_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M5_CH02_RAW") {
  field(DESC, "Coh2 chillers LCS Return")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:LCSRETURN_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[14]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M5_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[14]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M5_CH02_TEMP") {
  field(DESC, "Coh2 chillers LCS Return")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:LCSRETURN_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[14]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M5_CH02_FILT_CUTOFF") {
  field(DESC, "Coh2 chillers LCS Return")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M5_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M5_CH02_FILT_RAD") {
  field(DESC, "Coh2 chillers LCS Return")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M5_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M5_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M5_CH02_FILT_RAW") {
  field(DESC, "Coh2 chillers LCS Return")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[14] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M5_CH02_FILT_ORDER") {
  field(DESC, "Coh2 chillers LCS Return")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[14] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M5_CH02_FILT_SR") {
  field(DESC, "Coh2 chillers LCS Return")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[14]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M5_CH02_ALIAS") {
    field(VAL,"LASR:LR20:1:LCSRETURN")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LASR:LR20:1:LCSRETURN_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LASR:LR20:1:LCSRETURN")
  field(INPA, "PLC:LI21:TM01:CR1_M5_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "LASR:LR20:1:LCSRETURN") {
  field(DESC, "Coh2 chillers LCS Return")
  field(PREC, "1")
  field(INP, "LASR:LR20:1:LCSRETURN_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "105")
  field(LOLO, "54")
  field(HIGH, "102")
  field(LOW, "57")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LASR:LR20:1:LCSRETURN_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M5_CH03_RAW") {
  field(DESC, "Coh2 Osc Water (IN hose)")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:OSCWATER_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[14]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M5_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[14]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M5_CH03_TEMP") {
  field(DESC, "Coh2 Osc Water (IN hose)")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LASR:LR20:1:OSCWATER_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[14]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M5_CH03_FILT_CUTOFF") {
  field(DESC, "Coh2 Osc Water (IN hose)")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M5_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M5_CH03_FILT_RAD") {
  field(DESC, "Coh2 Osc Water (IN hose)")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M5_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M5_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M5_CH03_FILT_RAW") {
  field(DESC, "Coh2 Osc Water (IN hose)")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[14] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M5_CH03_FILT_ORDER") {
  field(DESC, "Coh2 Osc Water (IN hose)")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[14] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M5_CH03_FILT_SR") {
  field(DESC, "Coh2 Osc Water (IN hose)")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[14]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M5_CH03_ALIAS") {
    field(VAL,"LASR:LR20:1:OSCWATER")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LASR:LR20:1:OSCWATER_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LASR:LR20:1:OSCWATER")
  field(INPA, "PLC:LI21:TM01:CR1_M5_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "LASR:LR20:1:OSCWATER") {
  field(DESC, "Coh2 Osc Water (IN hose)")
  field(PREC, "1")
  field(INP, "LASR:LR20:1:OSCWATER_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "75")
  field(LOLO, "64")
  field(HIGH, "72")
  field(LOW, "67")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LASR:LR20:1:OSCWATER_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M6_CH00_RAW") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR1_M6_CH00_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[15]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M6_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[15]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M6_CH00_TEMP") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR1_M6_CH00_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[15]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M6_CH00_FILT_CUTOFF") {
  field(DESC, "Spare")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M6_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M6_CH00_FILT_RAD") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M6_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M6_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M6_CH00_FILT_RAW") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[15] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M6_CH00_FILT_ORDER") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[15] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M6_CH00_FILT_SR") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[15]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M6_CH00_ALIAS") {
    field(VAL,"PLC:LI21:TM01:CR1_M6_CH00_SPARE")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PLC:LI21:TM01:CR1_M6_CH00_SPARE_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PLC:LI21:TM01:CR1_M6_CH00_SPARE")
  field(INPA, "PLC:LI21:TM01:CR1_M6_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "PLC:LI21:TM01:CR1_M6_CH00_SPARE") {
  field(DESC, "Spare")
  field(PREC, "1")
  field(INP, "PLC:LI21:TM01:CR1_M6_CH00_SPARE_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "80")
  field(LOLO, "60")
  field(HIGH, "78")
  field(LOW, "66")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PLC:LI21:TM01:CR1_M6_CH00_SPARE_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M6_CH01_RAW") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR1_M6_CH01_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[15]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M6_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[15]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M6_CH01_TEMP") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR1_M6_CH01_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[15]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M6_CH01_FILT_CUTOFF") {
  field(DESC, "Spare")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M6_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M6_CH01_FILT_RAD") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M6_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M6_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M6_CH01_FILT_RAW") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[15] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M6_CH01_FILT_ORDER") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[15] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M6_CH01_FILT_SR") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[15]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M6_CH01_ALIAS") {
    field(VAL,"PLC:LI21:TM01:CR1_M6_CH01_SPARE")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PLC:LI21:TM01:CR1_M6_CH01_SPARE_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PLC:LI21:TM01:CR1_M6_CH01_SPARE")
  field(INPA, "PLC:LI21:TM01:CR1_M6_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "PLC:LI21:TM01:CR1_M6_CH01_SPARE") {
  field(DESC, "Spare")
  field(PREC, "1")
  field(INP, "PLC:LI21:TM01:CR1_M6_CH01_SPARE_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "67")
  field(LOLO, "52")
  field(HIGH, "64")
  field(LOW, "55")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PLC:LI21:TM01:CR1_M6_CH01_SPARE_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M6_CH02_RAW") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR1_M6_CH02_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[15]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M6_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[15]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M6_CH02_TEMP") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR1_M6_CH02_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[15]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M6_CH02_FILT_CUTOFF") {
  field(DESC, "Spare")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M6_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M6_CH02_FILT_RAD") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M6_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M6_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M6_CH02_FILT_RAW") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[15] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M6_CH02_FILT_ORDER") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[15] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M6_CH02_FILT_SR") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[15]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M6_CH02_ALIAS") {
    field(VAL,"PLC:LI21:TM01:CR1_M6_CH02_SPARE")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PLC:LI21:TM01:CR1_M6_CH02_SPARE_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PLC:LI21:TM01:CR1_M6_CH02_SPARE")
  field(INPA, "PLC:LI21:TM01:CR1_M6_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "PLC:LI21:TM01:CR1_M6_CH02_SPARE") {
  field(DESC, "Spare")
  field(PREC, "1")
  field(INP, "PLC:LI21:TM01:CR1_M6_CH02_SPARE_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "105")
  field(LOLO, "54")
  field(HIGH, "102")
  field(LOW, "57")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PLC:LI21:TM01:CR1_M6_CH02_SPARE_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M6_CH03_RAW") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR1_M6_CH03_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[15]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR1_M6_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[15]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR1_M6_CH03_TEMP") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR1_M6_CH03_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[15]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR1_M6_CH03_FILT_CUTOFF") {
  field(DESC, "Spare")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR1_M6_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR1_M6_CH03_FILT_RAD") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR1_M6_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR1_M6_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR1_M6_CH03_FILT_RAW") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[15] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR1_M6_CH03_FILT_ORDER") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[15] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR1_M6_CH03_FILT_SR") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[15]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR1_M6_CH03_ALIAS") {
    field(VAL,"PLC:LI21:TM01:CR1_M6_CH03_SPARE")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PLC:LI21:TM01:CR1_M6_CH03_SPARE_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PLC:LI21:TM01:CR1_M6_CH03_SPARE")
  field(INPA, "PLC:LI21:TM01:CR1_M6_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "PLC:LI21:TM01:CR1_M6_CH03_SPARE") {
  field(DESC, "Spare")
  field(PREC, "1")
  field(INP, "PLC:LI21:TM01:CR1_M6_CH03_SPARE_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "75")
  field(LOLO, "64")
  field(HIGH, "72")
  field(LOW, "67")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PLC:LI21:TM01:CR1_M6_CH03_SPARE_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR2_M1_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[16]")
  field(FLNK, "PLC:LI21:TM01:CR2_M1_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR2_M1_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[16]")
  field(FLNK, "PLC:LI21:TM01:CR2_M1_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR2_M1_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M1_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR2_M1_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M1_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR2_M1_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[16]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR2_M1_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[16]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR2_M2_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[17]")
  field(FLNK, "PLC:LI21:TM01:CR2_M2_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR2_M2_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[17]")
  field(FLNK, "PLC:LI21:TM01:CR2_M2_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR2_M2_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M2_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR2_M2_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M2_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR2_M2_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[17]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR2_M2_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[17]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR2_M3_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[18]")
  field(FLNK, "PLC:LI21:TM01:CR2_M3_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR2_M3_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[18]")
  field(FLNK, "PLC:LI21:TM01:CR2_M3_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR2_M3_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M3_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR2_M3_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M3_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR2_M3_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[18]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR2_M3_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[18]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR2_M4_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[19]")
  field(FLNK, "PLC:LI21:TM01:CR2_M4_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR2_M4_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[19]")
  field(FLNK, "PLC:LI21:TM01:CR2_M4_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR2_M4_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M4_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR2_M4_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M4_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR2_M4_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[19]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR2_M4_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[19]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR2_M5_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[20]")
  field(FLNK, "PLC:LI21:TM01:CR2_M5_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR2_M5_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[20]")
  field(FLNK, "PLC:LI21:TM01:CR2_M5_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR2_M5_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M5_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR2_M5_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M5_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR2_M5_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[20]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR2_M5_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[20]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR2_M6_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[21]")
  field(FLNK, "PLC:LI21:TM01:CR2_M6_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR2_M6_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[21]")
  field(FLNK, "PLC:LI21:TM01:CR2_M6_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR2_M6_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M6_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR2_M6_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M6_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR2_M6_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[21]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR2_M6_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[21]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR2_M7_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[22]")
  field(FLNK, "PLC:LI21:TM01:CR2_M7_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR2_M7_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[22]")
  field(FLNK, "PLC:LI21:TM01:CR2_M7_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR2_M7_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M7_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR2_M7_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M7_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR2_M7_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[22]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR2_M7_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[22]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR2_M8_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[23]")
  field(FLNK, "PLC:LI21:TM01:CR2_M8_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR2_M8_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[23]")
  field(FLNK, "PLC:LI21:TM01:CR2_M8_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR2_M8_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M8_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR2_M8_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M8_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR2_M8_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[23]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR2_M8_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[23]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR2_M9_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[24]")
  field(FLNK, "PLC:LI21:TM01:CR2_M9_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR2_M9_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[24]")
  field(FLNK, "PLC:LI21:TM01:CR2_M9_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR2_M9_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M9_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR2_M9_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M9_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR2_M9_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[24]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR2_M9_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[24]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR2_M10_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[25]")
  field(FLNK, "PLC:LI21:TM01:CR2_M10_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR2_M10_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[25]")
  field(FLNK, "PLC:LI21:TM01:CR2_M10_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR2_M10_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M10_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR2_M10_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR2_M10_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR2_M10_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[25]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR2_M10_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[25]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M1_CH00_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "CATH:IN20:111:CENTERTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[16]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M1_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[16]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M1_CH00_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "CATH:IN20:111:CENTERTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[16]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M1_CH00_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M1_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M1_CH00_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M1_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M1_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M1_CH00_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[16] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M1_CH00_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[16] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M1_CH00_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[16]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M1_CH00_ALIAS") {
    field(VAL,"CATH:IN20:111:CENTERTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "CATH:IN20:111:CENTERTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"CATH:IN20:111:CENTERTEMP")
  field(INPA, "PLC:LI21:TM01:CR2_M1_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "CATH:IN20:111:CENTERTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "CATH:IN20:111:CENTERTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "CATH:IN20:111:CENTERTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M1_CH01_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "CATH:IN20:111:OUTERTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[16]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M1_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[16]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M1_CH01_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "CATH:IN20:111:OUTERTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[16]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M1_CH01_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M1_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M1_CH01_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M1_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M1_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M1_CH01_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[16] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M1_CH01_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[16] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M1_CH01_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[16]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M1_CH01_ALIAS") {
    field(VAL,"CATH:IN20:111:OUTERTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "CATH:IN20:111:OUTERTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"CATH:IN20:111:OUTERTEMP")
  field(INPA, "PLC:LI21:TM01:CR2_M1_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "CATH:IN20:111:OUTERTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "CATH:IN20:111:OUTERTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "CATH:IN20:111:OUTERTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M1_CH02_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:UPPRWINDTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[16]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M1_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[16]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M1_CH02_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:UPPRWINDTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[16]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M1_CH02_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M1_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M1_CH02_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M1_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M1_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M1_CH02_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[16] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M1_CH02_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[16] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M1_CH02_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[16]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M1_CH02_ALIAS") {
    field(VAL,"GUN:IN20:111:UPPRWINDTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "GUN:IN20:111:UPPRWINDTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"GUN:IN20:111:UPPRWINDTEMP")
  field(INPA, "PLC:LI21:TM01:CR2_M1_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "GUN:IN20:111:UPPRWINDTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "GUN:IN20:111:UPPRWINDTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "GUN:IN20:111:UPPRWINDTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M1_CH03_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:LOWRWINDTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[16]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M1_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[16]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M1_CH03_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:LOWRWINDTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[16]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M1_CH03_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M1_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M1_CH03_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M1_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M1_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M1_CH03_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[16] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M1_CH03_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[16] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M1_CH03_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[16]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M1_CH03_ALIAS") {
    field(VAL,"GUN:IN20:111:LOWRWINDTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "GUN:IN20:111:LOWRWINDTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"GUN:IN20:111:LOWRWINDTEMP")
  field(INPA, "PLC:LI21:TM01:CR2_M1_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "GUN:IN20:111:LOWRWINDTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "GUN:IN20:111:LOWRWINDTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "GUN:IN20:111:LOWRWINDTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M2_CH00_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:UPPRPROBTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[17]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M2_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[17]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M2_CH00_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:UPPRPROBTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[17]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M2_CH00_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M2_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M2_CH00_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M2_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M2_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M2_CH00_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[17] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M2_CH00_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[17] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M2_CH00_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[17]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M2_CH00_ALIAS") {
    field(VAL,"GUN:IN20:111:UPPRPROBTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "GUN:IN20:111:UPPRPROBTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"GUN:IN20:111:UPPRPROBTEMP")
  field(INPA, "PLC:LI21:TM01:CR2_M2_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "GUN:IN20:111:UPPRPROBTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "GUN:IN20:111:UPPRPROBTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "120")
  field(LOLO, "70")
  field(HIGH, "115")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "GUN:IN20:111:UPPRPROBTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M2_CH01_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:LOWRPROBTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[17]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M2_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[17]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M2_CH01_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:LOWRPROBTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[17]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M2_CH01_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M2_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M2_CH01_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M2_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M2_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M2_CH01_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[17] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M2_CH01_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[17] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M2_CH01_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[17]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M2_CH01_ALIAS") {
    field(VAL,"GUN:IN20:111:LOWRPROBTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "GUN:IN20:111:LOWRPROBTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"GUN:IN20:111:LOWRPROBTEMP")
  field(INPA, "PLC:LI21:TM01:CR2_M2_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "GUN:IN20:111:LOWRPROBTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "GUN:IN20:111:LOWRPROBTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "120")
  field(LOLO, "70")
  field(HIGH, "115")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "GUN:IN20:111:LOWRPROBTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M2_CH02_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:INNRPROBTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[17]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M2_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[17]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M2_CH02_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:INNRPROBTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[17]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M2_CH02_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M2_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M2_CH02_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M2_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M2_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M2_CH02_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[17] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M2_CH02_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[17] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M2_CH02_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[17]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M2_CH02_ALIAS") {
    field(VAL,"GUN:IN20:111:INNRPROBTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "GUN:IN20:111:INNRPROBTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"GUN:IN20:111:INNRPROBTEMP")
  field(INPA, "PLC:LI21:TM01:CR2_M2_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "GUN:IN20:111:INNRPROBTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "GUN:IN20:111:INNRPROBTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "120")
  field(LOLO, "70")
  field(HIGH, "115")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "GUN:IN20:111:INNRPROBTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M2_CH03_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:OUTRPROBTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[17]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M2_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[17]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M2_CH03_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:OUTRPROBTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[17]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M2_CH03_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M2_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M2_CH03_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M2_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M2_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M2_CH03_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[17] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M2_CH03_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[17] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M2_CH03_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[17]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M2_CH03_ALIAS") {
    field(VAL,"GUN:IN20:111:OUTRPROBTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "GUN:IN20:111:OUTRPROBTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"GUN:IN20:111:OUTRPROBTEMP")
  field(INPA, "PLC:LI21:TM01:CR2_M2_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "GUN:IN20:111:OUTRPROBTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "GUN:IN20:111:OUTRPROBTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "120")
  field(LOLO, "70")
  field(HIGH, "115")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "GUN:IN20:111:OUTRPROBTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M3_CH00_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:TAILPIPTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[18]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M3_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[18]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M3_CH00_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:TAILPIPTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[18]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M3_CH00_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M3_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M3_CH00_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M3_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M3_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M3_CH00_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[18] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M3_CH00_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[18] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M3_CH00_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[18]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M3_CH00_ALIAS") {
    field(VAL,"GUN:IN20:111:TAILPIPTEMP1")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "GUN:IN20:111:TAILPIPTEMP1_CALC") {
  field(CALC,"A+B")
  field(FLNK,"GUN:IN20:111:TAILPIPTEMP1")
  field(INPA, "PLC:LI21:TM01:CR2_M3_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "GUN:IN20:111:TAILPIPTEMP1") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "GUN:IN20:111:TAILPIPTEMP1_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "GUN:IN20:111:TAILPIPTEMP1_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M3_CH01_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:TAILPIPTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[18]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M3_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[18]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M3_CH01_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:TAILPIPTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[18]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M3_CH01_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M3_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M3_CH01_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M3_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M3_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M3_CH01_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[18] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M3_CH01_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[18] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M3_CH01_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[18]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M3_CH01_ALIAS") {
    field(VAL,"GUN:IN20:111:TAILPIPTEMP2")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "GUN:IN20:111:TAILPIPTEMP2_CALC") {
  field(CALC,"A+B")
  field(FLNK,"GUN:IN20:111:TAILPIPTEMP2")
  field(INPA, "PLC:LI21:TM01:CR2_M3_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "GUN:IN20:111:TAILPIPTEMP2") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "GUN:IN20:111:TAILPIPTEMP2_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "GUN:IN20:111:TAILPIPTEMP2_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M3_CH02_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:WGBDYTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[18]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M3_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[18]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M3_CH02_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:WGBDYTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[18]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M3_CH02_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M3_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M3_CH02_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M3_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M3_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M3_CH02_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[18] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M3_CH02_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[18] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M3_CH02_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[18]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M3_CH02_ALIAS") {
    field(VAL,"GUN:IN20:111:WGBDYTEMP1")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "GUN:IN20:111:WGBDYTEMP1_CALC") {
  field(CALC,"A+B")
  field(FLNK,"GUN:IN20:111:WGBDYTEMP1")
  field(INPA, "PLC:LI21:TM01:CR2_M3_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "GUN:IN20:111:WGBDYTEMP1") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "GUN:IN20:111:WGBDYTEMP1_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "GUN:IN20:111:WGBDYTEMP1_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M3_CH03_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:WGBDYTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[18]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M3_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[18]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M3_CH03_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:WGBDYTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[18]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M3_CH03_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M3_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M3_CH03_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M3_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M3_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M3_CH03_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[18] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M3_CH03_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[18] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M3_CH03_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[18]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M3_CH03_ALIAS") {
    field(VAL,"GUN:IN20:111:WGBDYTEMP2")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "GUN:IN20:111:WGBDYTEMP2_CALC") {
  field(CALC,"A+B")
  field(FLNK,"GUN:IN20:111:WGBDYTEMP2")
  field(INPA, "PLC:LI21:TM01:CR2_M3_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "GUN:IN20:111:WGBDYTEMP2") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "GUN:IN20:111:WGBDYTEMP2_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "GUN:IN20:111:WGBDYTEMP2_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M4_CH00_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:IN20:111:LCWTEMPIN_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[19]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M4_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[19]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M4_CH00_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:IN20:111:LCWTEMPIN_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[19]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M4_CH00_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M4_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M4_CH00_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M4_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M4_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M4_CH00_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[19] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M4_CH00_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[19] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M4_CH00_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[19]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M4_CH00_ALIAS") {
    field(VAL,"SOLN:IN20:111:LCWTEMPIN")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "SOLN:IN20:111:LCWTEMPIN_CALC") {
  field(CALC,"A+B")
  field(FLNK,"SOLN:IN20:111:LCWTEMPIN")
  field(INPA, "PLC:LI21:TM01:CR2_M4_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "SOLN:IN20:111:LCWTEMPIN") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "SOLN:IN20:111:LCWTEMPIN_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "SOLN:IN20:111:LCWTEMPIN_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M4_CH01_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:IN20:111:LCWTEMPOUT_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[19]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M4_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[19]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M4_CH01_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:IN20:111:LCWTEMPOUT_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[19]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M4_CH01_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M4_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M4_CH01_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M4_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M4_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M4_CH01_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[19] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M4_CH01_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[19] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M4_CH01_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[19]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M4_CH01_ALIAS") {
    field(VAL,"SOLN:IN20:111:LCWTEMPOUT")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "SOLN:IN20:111:LCWTEMPOUT_CALC") {
  field(CALC,"A+B")
  field(FLNK,"SOLN:IN20:111:LCWTEMPOUT")
  field(INPA, "PLC:LI21:TM01:CR2_M4_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "SOLN:IN20:111:LCWTEMPOUT") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "SOLN:IN20:111:LCWTEMPOUT_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "SOLN:IN20:111:LCWTEMPOUT_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M4_CH02_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:IN20:1:AIRTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[19]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M4_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[19]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M4_CH02_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:IN20:1:AIRTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[19]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M4_CH02_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M4_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M4_CH02_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M4_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M4_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M4_CH02_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[19] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M4_CH02_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[19] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M4_CH02_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[19]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M4_CH02_ALIAS") {
    field(VAL,"ROOM:IN20:1:AIRTEMP1")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ROOM:IN20:1:AIRTEMP1_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ROOM:IN20:1:AIRTEMP1")
  field(INPA, "PLC:LI21:TM01:CR2_M4_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ROOM:IN20:1:AIRTEMP1") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "ROOM:IN20:1:AIRTEMP1_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "60")
  field(HIGH, "105")
  field(LOW, "70")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ROOM:IN20:1:AIRTEMP1_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M4_CH03_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:IN20:1:AIRTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[19]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M4_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[19]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M4_CH03_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:IN20:1:AIRTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[19]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M4_CH03_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M4_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M4_CH03_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M4_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M4_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M4_CH03_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[19] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M4_CH03_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[19] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M4_CH03_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[19]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M4_CH03_ALIAS") {
    field(VAL,"ROOM:IN20:1:AIRTEMP2")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ROOM:IN20:1:AIRTEMP2_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ROOM:IN20:1:AIRTEMP2")
  field(INPA, "PLC:LI21:TM01:CR2_M4_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ROOM:IN20:1:AIRTEMP2") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "ROOM:IN20:1:AIRTEMP2_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "60")
  field(HIGH, "105")
  field(LOW, "70")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ROOM:IN20:1:AIRTEMP2_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M5_CH00_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:IN20:1:AIRTEMP3_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[20]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M5_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[20]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M5_CH00_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:IN20:1:AIRTEMP3_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[20]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M5_CH00_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M5_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M5_CH00_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M5_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M5_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M5_CH00_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[20] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M5_CH00_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[20] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M5_CH00_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[20]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M5_CH00_ALIAS") {
    field(VAL,"ROOM:IN20:1:AIRTEMP3")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ROOM:IN20:1:AIRTEMP3_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ROOM:IN20:1:AIRTEMP3")
  field(INPA, "PLC:LI21:TM01:CR2_M5_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ROOM:IN20:1:AIRTEMP3") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "ROOM:IN20:1:AIRTEMP3_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "60")
  field(HIGH, "105")
  field(LOW, "70")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ROOM:IN20:1:AIRTEMP3_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M5_CH01_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:IN20:1:AIRTEMP4_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[20]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M5_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[20]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M5_CH01_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:IN20:1:AIRTEMP4_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[20]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M5_CH01_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M5_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M5_CH01_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M5_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M5_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M5_CH01_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[20] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M5_CH01_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[20] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M5_CH01_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[20]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M5_CH01_ALIAS") {
    field(VAL,"ROOM:IN20:1:AIRTEMP4")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ROOM:IN20:1:AIRTEMP4_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ROOM:IN20:1:AIRTEMP4")
  field(INPA, "PLC:LI21:TM01:CR2_M5_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ROOM:IN20:1:AIRTEMP4") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "ROOM:IN20:1:AIRTEMP4_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "60")
  field(HIGH, "105")
  field(LOW, "70")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ROOM:IN20:1:AIRTEMP4_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M5_CH02_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:IN20:1:AIRTEMP5_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[20]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M5_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[20]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M5_CH02_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ROOM:IN20:1:AIRTEMP5_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[20]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M5_CH02_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M5_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M5_CH02_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M5_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M5_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M5_CH02_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[20] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M5_CH02_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[20] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M5_CH02_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[20]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M5_CH02_ALIAS") {
    field(VAL,"ROOM:IN20:1:AIRTEMP5")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ROOM:IN20:1:AIRTEMP5_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ROOM:IN20:1:AIRTEMP5")
  field(INPA, "PLC:LI21:TM01:CR2_M5_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ROOM:IN20:1:AIRTEMP5") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "ROOM:IN20:1:AIRTEMP5_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "60")
  field(HIGH, "105")
  field(LOW, "70")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ROOM:IN20:1:AIRTEMP5_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M5_CH03_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "TCAV:IN20:490:WGTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[20]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M5_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[20]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M5_CH03_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "TCAV:IN20:490:WGTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[20]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M5_CH03_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M5_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M5_CH03_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M5_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M5_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M5_CH03_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[20] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M5_CH03_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[20] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M5_CH03_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[20]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M5_CH03_ALIAS") {
    field(VAL,"TCAV:IN20:490:WGTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "TCAV:IN20:490:WGTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"TCAV:IN20:490:WGTEMP")
  field(INPA, "PLC:LI21:TM01:CR2_M5_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "TCAV:IN20:490:WGTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "TCAV:IN20:490:WGTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "120")
  field(LOLO, "100")
  field(HIGH, "115")
  field(LOW, "105")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "TCAV:IN20:490:WGTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M6_CH00_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:IN20:111:BDYENTRTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[21]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M6_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[21]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M6_CH00_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:IN20:111:BDYENTRTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[21]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M6_CH00_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M6_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M6_CH00_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M6_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M6_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M6_CH00_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[21] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M6_CH00_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[21] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M6_CH00_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[21]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M6_CH00_ALIAS") {
    field(VAL,"SOLN:IN20:111:BDYENTRTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "SOLN:IN20:111:BDYENTRTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"SOLN:IN20:111:BDYENTRTEMP")
  field(INPA, "PLC:LI21:TM01:CR2_M6_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "SOLN:IN20:111:BDYENTRTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "SOLN:IN20:111:BDYENTRTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "SOLN:IN20:111:BDYENTRTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M6_CH01_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:IN20:111:BDYEXITTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[21]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M6_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[21]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M6_CH01_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:IN20:111:BDYEXITTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[21]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M6_CH01_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M6_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M6_CH01_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M6_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M6_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M6_CH01_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[21] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M6_CH01_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[21] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M6_CH01_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[21]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M6_CH01_ALIAS") {
    field(VAL,"SOLN:IN20:111:BDYEXITTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "SOLN:IN20:111:BDYEXITTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"SOLN:IN20:111:BDYEXITTEMP")
  field(INPA, "PLC:LI21:TM01:CR2_M6_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "SOLN:IN20:111:BDYEXITTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "SOLN:IN20:111:BDYEXITTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "SOLN:IN20:111:BDYEXITTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M6_CH02_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:BDYINSDTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[21]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M6_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[21]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M6_CH02_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:BDYINSDTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[21]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M6_CH02_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M6_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M6_CH02_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M6_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M6_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M6_CH02_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[21] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M6_CH02_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[21] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M6_CH02_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[21]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M6_CH02_ALIAS") {
    field(VAL,"GUN:IN20:111:BDYINSDTEMP2")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "GUN:IN20:111:BDYINSDTEMP2_CALC") {
  field(CALC,"A+B")
  field(FLNK,"GUN:IN20:111:BDYINSDTEMP2")
  field(INPA, "PLC:LI21:TM01:CR2_M6_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "GUN:IN20:111:BDYINSDTEMP2") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "GUN:IN20:111:BDYINSDTEMP2_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "GUN:IN20:111:BDYINSDTEMP2_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M6_CH03_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:FLSUPTTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[21]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M6_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[21]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M6_CH03_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:FLSUPTTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[21]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M6_CH03_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M6_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M6_CH03_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M6_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M6_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M6_CH03_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[21] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M6_CH03_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[21] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M6_CH03_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[21]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M6_CH03_ALIAS") {
    field(VAL,"GUN:IN20:111:FLSUPTTEMP1")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "GUN:IN20:111:FLSUPTTEMP1_CALC") {
  field(CALC,"A+B")
  field(FLNK,"GUN:IN20:111:FLSUPTTEMP1")
  field(INPA, "PLC:LI21:TM01:CR2_M6_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "GUN:IN20:111:FLSUPTTEMP1") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "GUN:IN20:111:FLSUPTTEMP1_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "GUN:IN20:111:FLSUPTTEMP1_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M7_CH00_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:FLSUPTTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[22]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M7_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[22]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M7_CH00_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:FLSUPTTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[22]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M7_CH00_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M7_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M7_CH00_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M7_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M7_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M7_CH00_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[22] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M7_CH00_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[22] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M7_CH00_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[22]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M7_CH00_ALIAS") {
    field(VAL,"GUN:IN20:111:FLSUPTTEMP2")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "GUN:IN20:111:FLSUPTTEMP2_CALC") {
  field(CALC,"A+B")
  field(FLNK,"GUN:IN20:111:FLSUPTTEMP2")
  field(INPA, "PLC:LI21:TM01:CR2_M7_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "GUN:IN20:111:FLSUPTTEMP2") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "GUN:IN20:111:FLSUPTTEMP2_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "GUN:IN20:111:FLSUPTTEMP2_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M7_CH01_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:FLSUPTTEMP3_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[22]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M7_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[22]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M7_CH01_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:FLSUPTTEMP3_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[22]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M7_CH01_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M7_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M7_CH01_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M7_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M7_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M7_CH01_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[22] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M7_CH01_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[22] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M7_CH01_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[22]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M7_CH01_ALIAS") {
    field(VAL,"GUN:IN20:111:FLSUPTTEMP3")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "GUN:IN20:111:FLSUPTTEMP3_CALC") {
  field(CALC,"A+B")
  field(FLNK,"GUN:IN20:111:FLSUPTTEMP3")
  field(INPA, "PLC:LI21:TM01:CR2_M7_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "GUN:IN20:111:FLSUPTTEMP3") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "GUN:IN20:111:FLSUPTTEMP3_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "GUN:IN20:111:FLSUPTTEMP3_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M7_CH02_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:FLSUPTTEMP4_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[22]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M7_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[22]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M7_CH02_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:FLSUPTTEMP4_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[22]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M7_CH02_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M7_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M7_CH02_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M7_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M7_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M7_CH02_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[22] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M7_CH02_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[22] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M7_CH02_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[22]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M7_CH02_ALIAS") {
    field(VAL,"GUN:IN20:111:FLSUPTTEMP4")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "GUN:IN20:111:FLSUPTTEMP4_CALC") {
  field(CALC,"A+B")
  field(FLNK,"GUN:IN20:111:FLSUPTTEMP4")
  field(INPA, "PLC:LI21:TM01:CR2_M7_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "GUN:IN20:111:FLSUPTTEMP4") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "GUN:IN20:111:FLSUPTTEMP4_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "GUN:IN20:111:FLSUPTTEMP4_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M7_CH03_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:BDYOTSDTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[22]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M7_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[22]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M7_CH03_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "GUN:IN20:111:BDYOTSDTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[22]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M7_CH03_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M7_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M7_CH03_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M7_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M7_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M7_CH03_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[22] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M7_CH03_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[22] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M7_CH03_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[22]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M7_CH03_ALIAS") {
    field(VAL,"GUN:IN20:111:BDYOTSDTEMP2")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "GUN:IN20:111:BDYOTSDTEMP2_CALC") {
  field(CALC,"A+B")
  field(FLNK,"GUN:IN20:111:BDYOTSDTEMP2")
  field(INPA, "PLC:LI21:TM01:CR2_M7_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "GUN:IN20:111:BDYOTSDTEMP2") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "GUN:IN20:111:BDYOTSDTEMP2_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "110")
  field(LOLO, "70")
  field(HIGH, "105")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "GUN:IN20:111:BDYOTSDTEMP2_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M8_CH00_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:IN20:300:WGTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[23]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M8_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[23]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M8_CH00_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:IN20:300:WGTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[23]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M8_CH00_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M8_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M8_CH00_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M8_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M8_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M8_CH00_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[23] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M8_CH00_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[23] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M8_CH00_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[23]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M8_CH00_ALIAS") {
    field(VAL,"ACCL:IN20:300:WGTEMP1")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ACCL:IN20:300:WGTEMP1_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ACCL:IN20:300:WGTEMP1")
  field(INPA, "PLC:LI21:TM01:CR2_M8_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ACCL:IN20:300:WGTEMP1") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "ACCL:IN20:300:WGTEMP1_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "80")
  field(HIGH, "110")
  field(LOW, "85")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ACCL:IN20:300:WGTEMP1_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M8_CH01_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:IN20:300:WGTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[23]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M8_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[23]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M8_CH01_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:IN20:300:WGTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[23]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M8_CH01_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M8_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M8_CH01_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M8_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M8_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M8_CH01_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[23] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M8_CH01_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[23] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M8_CH01_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[23]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M8_CH01_ALIAS") {
    field(VAL,"ACCL:IN20:300:WGTEMP2")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ACCL:IN20:300:WGTEMP2_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ACCL:IN20:300:WGTEMP2")
  field(INPA, "PLC:LI21:TM01:CR2_M8_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ACCL:IN20:300:WGTEMP2") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "ACCL:IN20:300:WGTEMP2_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "80")
  field(HIGH, "110")
  field(LOW, "85")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ACCL:IN20:300:WGTEMP2_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M8_CH02_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:IN20:311:SUPTTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[23]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M8_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[23]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M8_CH02_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:IN20:311:SUPTTEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[23]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M8_CH02_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M8_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M8_CH02_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M8_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M8_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M8_CH02_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[23] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M8_CH02_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[23] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M8_CH02_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[23]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M8_CH02_ALIAS") {
    field(VAL,"SOLN:IN20:311:SUPTTEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "SOLN:IN20:311:SUPTTEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"SOLN:IN20:311:SUPTTEMP")
  field(INPA, "PLC:LI21:TM01:CR2_M8_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "SOLN:IN20:311:SUPTTEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "SOLN:IN20:311:SUPTTEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "SOLN:IN20:311:SUPTTEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M8_CH03_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:IN20:311:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[23]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M8_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[23]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M8_CH03_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "SOLN:IN20:311:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[23]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M8_CH03_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M8_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M8_CH03_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M8_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M8_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M8_CH03_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[23] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M8_CH03_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[23] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M8_CH03_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[23]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M8_CH03_ALIAS") {
    field(VAL,"SOLN:IN20:311:TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "SOLN:IN20:311:TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"SOLN:IN20:311:TEMP")
  field(INPA, "PLC:LI21:TM01:CR2_M8_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "SOLN:IN20:311:TEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "SOLN:IN20:311:TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "SOLN:IN20:311:TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M9_CH00_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:IN20:361:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[24]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M9_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[24]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M9_CH00_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:IN20:361:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[24]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M9_CH00_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M9_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M9_CH00_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M9_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M9_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M9_CH00_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[24] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M9_CH00_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[24] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M9_CH00_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[24]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M9_CH00_ALIAS") {
    field(VAL,"QUAD:IN20:361:TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "QUAD:IN20:361:TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"QUAD:IN20:361:TEMP")
  field(INPA, "PLC:LI21:TM01:CR2_M9_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "QUAD:IN20:361:TEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "QUAD:IN20:361:TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "QUAD:IN20:361:TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M9_CH01_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:IN20:371:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[24]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M9_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[24]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M9_CH01_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:IN20:371:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[24]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M9_CH01_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M9_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M9_CH01_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M9_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M9_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M9_CH01_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[24] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M9_CH01_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[24] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M9_CH01_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[24]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M9_CH01_ALIAS") {
    field(VAL,"QUAD:IN20:371:TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "QUAD:IN20:371:TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"QUAD:IN20:371:TEMP")
  field(INPA, "PLC:LI21:TM01:CR2_M9_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "QUAD:IN20:371:TEMP") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "QUAD:IN20:371:TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "QUAD:IN20:371:TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M9_CH02_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PCAV:IN20:365:TEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[24]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M9_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[24]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M9_CH02_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PCAV:IN20:365:TEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[24]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M9_CH02_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M9_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M9_CH02_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M9_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M9_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M9_CH02_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[24] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M9_CH02_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[24] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M9_CH02_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[24]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M9_CH02_ALIAS") {
    field(VAL,"PCAV:IN20:365:TEMP1")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PCAV:IN20:365:TEMP1_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PCAV:IN20:365:TEMP1")
  field(INPA, "PLC:LI21:TM01:CR2_M9_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "PCAV:IN20:365:TEMP1") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "PCAV:IN20:365:TEMP1_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PCAV:IN20:365:TEMP1_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M9_CH03_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PCAV:IN20:365:TEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[24]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M9_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[24]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M9_CH03_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PCAV:IN20:365:TEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[24]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M9_CH03_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M9_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M9_CH03_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M9_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M9_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M9_CH03_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[24] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M9_CH03_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[24] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M9_CH03_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[24]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M9_CH03_ALIAS") {
    field(VAL,"PCAV:IN20:365:TEMP2")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PCAV:IN20:365:TEMP2_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PCAV:IN20:365:TEMP2")
  field(INPA, "PLC:LI21:TM01:CR2_M9_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "PCAV:IN20:365:TEMP2") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "PCAV:IN20:365:TEMP2_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PCAV:IN20:365:TEMP2_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M10_CH00_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:IN20:400:WGTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[25]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M10_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[25]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M10_CH00_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:IN20:400:WGTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[25]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M10_CH00_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M10_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M10_CH00_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M10_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M10_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M10_CH00_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[25] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M10_CH00_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[25] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M10_CH00_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[25]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M10_CH00_ALIAS") {
    field(VAL,"ACCL:IN20:400:WGTEMP1")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ACCL:IN20:400:WGTEMP1_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ACCL:IN20:400:WGTEMP1")
  field(INPA, "PLC:LI21:TM01:CR2_M10_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ACCL:IN20:400:WGTEMP1") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "ACCL:IN20:400:WGTEMP1_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "80")
  field(HIGH, "110")
  field(LOW, "85")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ACCL:IN20:400:WGTEMP1_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M10_CH01_RAW") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:IN20:400:WGTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[25]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M10_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[25]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M10_CH01_TEMP") {
  field(DESC, "Thermocouple")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACCL:IN20:400:WGTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[25]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M10_CH01_FILT_CUTOFF") {
  field(DESC, "Thermocouple")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M10_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M10_CH01_FILT_RAD") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M10_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M10_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M10_CH01_FILT_RAW") {
  field(DESC, "Thermocouple")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[25] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M10_CH01_FILT_ORDER") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[25] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M10_CH01_FILT_SR") {
  field(DESC, "Thermocouple")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[25]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M10_CH01_ALIAS") {
    field(VAL,"ACCL:IN20:400:WGTEMP2")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ACCL:IN20:400:WGTEMP2_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ACCL:IN20:400:WGTEMP2")
  field(INPA, "PLC:LI21:TM01:CR2_M10_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "ACCL:IN20:400:WGTEMP2") {
  field(DESC, "Thermocouple")
  field(PREC, "1")
  field(INP, "ACCL:IN20:400:WGTEMP2_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "80")
  field(HIGH, "110")
  field(LOW, "85")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ACCL:IN20:400:WGTEMP2_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M10_CH02_RAW") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR2_M10_CH02_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[25]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M10_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[25]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M10_CH02_TEMP") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR2_M10_CH02_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[25]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M10_CH02_FILT_CUTOFF") {
  field(DESC, "Spare")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M10_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M10_CH02_FILT_RAD") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M10_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M10_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M10_CH02_FILT_RAW") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[25] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M10_CH02_FILT_ORDER") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[25] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M10_CH02_FILT_SR") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[25]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M10_CH02_ALIAS") {
    field(VAL,"PLC:LI21:TM01:CR2_M10_CH02_SPARE")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PLC:LI21:TM01:CR2_M10_CH02_SPARE_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PLC:LI21:TM01:CR2_M10_CH02_SPARE")
  field(INPA, "PLC:LI21:TM01:CR2_M10_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "PLC:LI21:TM01:CR2_M10_CH02_SPARE") {
  field(DESC, "Spare")
  field(PREC, "1")
  field(INP, "PLC:LI21:TM01:CR2_M10_CH02_SPARE_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "80")
  field(HIGH, "110")
  field(LOW, "85")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PLC:LI21:TM01:CR2_M10_CH02_SPARE_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M10_CH03_RAW") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR2_M10_CH03_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[25]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR2_M10_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[25]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR2_M10_CH03_TEMP") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR2_M10_CH03_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[25]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR2_M10_CH03_FILT_CUTOFF") {
  field(DESC, "Spare")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR2_M10_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR2_M10_CH03_FILT_RAD") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR2_M10_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR2_M10_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR2_M10_CH03_FILT_RAW") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[25] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR2_M10_CH03_FILT_ORDER") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[25] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR2_M10_CH03_FILT_SR") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[25]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR2_M10_CH03_ALIAS") {
    field(VAL,"PLC:LI21:TM01:CR2_M10_CH03_SPARE")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PLC:LI21:TM01:CR2_M10_CH03_SPARE_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PLC:LI21:TM01:CR2_M10_CH03_SPARE")
  field(INPA, "PLC:LI21:TM01:CR2_M10_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0")
}


#Temperature PV for user
record(ai, "PLC:LI21:TM01:CR2_M10_CH03_SPARE") {
  field(DESC, "Spare")
  field(PREC, "1")
  field(INP, "PLC:LI21:TM01:CR2_M10_CH03_SPARE_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "80")
  field(HIGH, "110")
  field(LOW, "85")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, "0.001")
  field(MDEL, "0.001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PLC:LI21:TM01:CR2_M10_CH03_SPARE_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
record(mbbiDirect, "KLYS:LI21:11:STAT_VAL") {
  field(DESC, "Klys STAT for DLWG job")
  field(DTYP, "Raw Soft Channel")
  field(INP, "KLYS:LI21:11:STAT CPP MS")
  field(PINI, "YES")
}

record(mbbiDirect, "KLYS:LI21:11:SWRD_VAL") {
  field(DESC, "Klys SWRD for DLWG job")
  field(DTYP, "Raw Soft Channel")
  field(INP, "KLYS:LI21:11:SWRD CPP MS")
  field(PINI, "YES")
}

record(stringin, "KLYS:LI21:11:DL_WG_TEMP_KLY") {
  field(DESC, "DLWG associated KLYS")
  field(VAL, "KLYS LI21 11")
  field(PINI, "YES")
}

record(stringin, "KLYS:LI21:11:DL_WG_TEMP_STA") {
  field(DESC, "Station LOWRF status")
  field(PINI, "YES")
}

record(ai, "KLYS:LI21:11:DL_WG_TEMP_RFON") {
  field(DESC, "DLWG RFON limits")
  field(PREC, "1")
  field(EGU, "DegF")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI, "YES")
  field(ASG, "EOICDESK")
  field(LOLO,"109.5")
  field(HIHI,"113")
  field(HIGH,"113.9")
  field(LOW,"110")
  field(VAL, "0")
  field(FLNK, "KLYS:LI21:11:DL_WG_TEMP_LOWCALC")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

record(calcout, "KLYS:LI21:11:DL_WG_TEMP_LOWCALC") {
  field(DESC, "Calc DLWG RFOFF low limit")
  field(CALC, "A-10")
  field(INPA, "KLYS:LI21:11:DL_WG_TEMP_RFON.LOW")
  field(OUT,  "KLYS:LI21:11:DL_WG_TEMP_RFOFF.LOW PP")
  field(OOPT, "Every Time")
  field(FLNK, "KLYS:LI21:11:DL_WG_TEMP_LOLOCALC")
}

record(calcout, "KLYS:LI21:11:DL_WG_TEMP_LOLOCALC") {
  field(DESC, "Calc DLWG RFOFF lolo limit")
  field(CALC, "A-10")
  field(INPA, "KLYS:LI21:11:DL_WG_TEMP_RFON.LOLO")
  field(OUT,  "KLYS:LI21:11:DL_WG_TEMP_RFOFF.LOLO PP")
  field(OOPT, "Every Time")
}

record(ai, "KLYS:LI21:11:DL_WG_TEMP_RFOFF") {
  field(DESC, "DLWG RFOFF limits")
  field(PREC, "1")
  field(EGU, "DegF")
  field(ADEL, ".001")
  field(VAL, "0")
  field(MDEL, ".001")
  field(ASG, "NOWRITE")
}

record(mbbiDirect, "KLYS:LI21:21:STAT_VAL") {
  field(DESC, "Klys STAT for DLWG job")
  field(DTYP, "Raw Soft Channel")
  field(INP, "KLYS:LI21:21:STAT CPP MS")
  field(PINI, "YES")
}

record(mbbiDirect, "KLYS:LI21:21:SWRD_VAL") {
  field(DESC, "Klys SWRD for DLWG job")
  field(DTYP, "Raw Soft Channel")
  field(INP, "KLYS:LI21:21:SWRD CPP MS")
  field(PINI, "YES")
}

record(stringin, "KLYS:LI21:21:DL_WG_TEMP_KLY") {
  field(DESC, "DLWG associated KLYS")
  field(VAL, "KLYS LI21 21")
  field(PINI, "YES")
}

record(stringin, "KLYS:LI21:21:DL_WG_TEMP_STA") {
  field(DESC, "Station LOWRF status")
  field(PINI, "YES")
}

record(ai, "KLYS:LI21:21:DL_WG_TEMP_RFON") {
  field(DESC, "DLWG RFON limits")
  field(PREC, "1")
  field(EGU, "DegF")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI, "YES")
  field(ASG, "EOICDESK")
  field(LOLO,"109")
  field(HIHI,"115")
  field(HIGH,"114.8")
  field(LOW,"109.5")
  field(VAL, "0")
  field(FLNK, "KLYS:LI21:21:DL_WG_TEMP_LOWCALC")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

record(calcout, "KLYS:LI21:21:DL_WG_TEMP_LOWCALC") {
  field(DESC, "Calc DLWG RFOFF low limit")
  field(CALC, "A-10")
  field(INPA, "KLYS:LI21:21:DL_WG_TEMP_RFON.LOW")
  field(OUT,  "KLYS:LI21:21:DL_WG_TEMP_RFOFF.LOW PP")
  field(OOPT, "Every Time")
  field(FLNK, "KLYS:LI21:21:DL_WG_TEMP_LOLOCALC")
}

record(calcout, "KLYS:LI21:21:DL_WG_TEMP_LOLOCALC") {
  field(DESC, "Calc DLWG RFOFF lolo limit")
  field(CALC, "A-10")
  field(INPA, "KLYS:LI21:21:DL_WG_TEMP_RFON.LOLO")
  field(OUT,  "KLYS:LI21:21:DL_WG_TEMP_RFOFF.LOLO PP")
  field(OOPT, "Every Time")
}

record(ai, "KLYS:LI21:21:DL_WG_TEMP_RFOFF") {
  field(DESC, "DLWG RFOFF limits")
  field(PREC, "1")
  field(EGU, "DegF")
  field(ADEL, ".001")
  field(VAL, "0")
  field(MDEL, ".001")
  field(ASG, "NOWRITE")
}

record(mbbiDirect, "KLYS:LI21:31:STAT_VAL") {
  field(DESC, "Klys STAT for DLWG job")
  field(DTYP, "Raw Soft Channel")
  field(INP, "KLYS:LI21:31:STAT CPP MS")
  field(PINI, "YES")
}

record(mbbiDirect, "KLYS:LI21:31:SWRD_VAL") {
  field(DESC, "Klys SWRD for DLWG job")
  field(DTYP, "Raw Soft Channel")
  field(INP, "KLYS:LI21:31:SWRD CPP MS")
  field(PINI, "YES")
}

record(stringin, "KLYS:LI21:31:DL_WG_TEMP_KLY") {
  field(DESC, "DLWG associated KLYS")
  field(VAL, "KLYS LI21 31")
  field(PINI, "YES")
}

record(stringin, "KLYS:LI21:31:DL_WG_TEMP_STA") {
  field(DESC, "Station LOWRF status")
  field(PINI, "YES")
}

record(ai, "KLYS:LI21:31:DL_WG_TEMP_RFON") {
  field(DESC, "DLWG RFON limits")
  field(PREC, "1")
  field(EGU, "DegF")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI, "YES")
  field(ASG, "EOICDESK")
  field(LOLO,"111.8")
  field(HIHI,"114")
  field(HIGH,"113.9")
  field(LOW,"112.1")
  field(VAL, "0")
  field(FLNK, "KLYS:LI21:31:DL_WG_TEMP_LOWCALC")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

record(calcout, "KLYS:LI21:31:DL_WG_TEMP_LOWCALC") {
  field(DESC, "Calc DLWG RFOFF low limit")
  field(CALC, "A-10")
  field(INPA, "KLYS:LI21:31:DL_WG_TEMP_RFON.LOW")
  field(OUT,  "KLYS:LI21:31:DL_WG_TEMP_RFOFF.LOW PP")
  field(OOPT, "Every Time")
  field(FLNK, "KLYS:LI21:31:DL_WG_TEMP_LOLOCALC")
}

record(calcout, "KLYS:LI21:31:DL_WG_TEMP_LOLOCALC") {
  field(DESC, "Calc DLWG RFOFF lolo limit")
  field(CALC, "A-10")
  field(INPA, "KLYS:LI21:31:DL_WG_TEMP_RFON.LOLO")
  field(OUT,  "KLYS:LI21:31:DL_WG_TEMP_RFOFF.LOLO PP")
  field(OOPT, "Every Time")
}

record(ai, "KLYS:LI21:31:DL_WG_TEMP_RFOFF") {
  field(DESC, "DLWG RFOFF limits")
  field(PREC, "1")
  field(EGU, "DegF")
  field(ADEL, ".001")
  field(VAL, "0")
  field(MDEL, ".001")
  field(ASG, "NOWRITE")
}

record(mbbiDirect, "KLYS:LI21:41:STAT_VAL") {
  field(DESC, "Klys STAT for DLWG job")
  field(DTYP, "Raw Soft Channel")
  field(INP, "KLYS:LI21:41:STAT CPP MS")
  field(PINI, "YES")
}

record(mbbiDirect, "KLYS:LI21:41:SWRD_VAL") {
  field(DESC, "Klys SWRD for DLWG job")
  field(DTYP, "Raw Soft Channel")
  field(INP, "KLYS:LI21:41:SWRD CPP MS")
  field(PINI, "YES")
}

record(stringin, "KLYS:LI21:41:DL_WG_TEMP_KLY") {
  field(DESC, "DLWG associated KLYS")
  field(VAL, "KLYS LI21 41")
  field(PINI, "YES")
}

record(stringin, "KLYS:LI21:41:DL_WG_TEMP_STA") {
  field(DESC, "Station LOWRF status")
  field(PINI, "YES")
}

record(ai, "KLYS:LI21:41:DL_WG_TEMP_RFON") {
  field(DESC, "DLWG RFON limits")
  field(PREC, "1")
  field(EGU, "DegF")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI, "YES")
  field(ASG, "EOICDESK")
  field(LOLO,"112")
  field(HIHI,"114")
  field(HIGH,"113.9")
  field(LOW,"112.1")
  field(VAL, "0")
  field(FLNK, "KLYS:LI21:41:DL_WG_TEMP_LOWCALC")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

record(calcout, "KLYS:LI21:41:DL_WG_TEMP_LOWCALC") {
  field(DESC, "Calc DLWG RFOFF low limit")
  field(CALC, "A-10")
  field(INPA, "KLYS:LI21:41:DL_WG_TEMP_RFON.LOW")
  field(OUT,  "KLYS:LI21:41:DL_WG_TEMP_RFOFF.LOW PP")
  field(OOPT, "Every Time")
  field(FLNK, "KLYS:LI21:41:DL_WG_TEMP_LOLOCALC")
}

record(calcout, "KLYS:LI21:41:DL_WG_TEMP_LOLOCALC") {
  field(DESC, "Calc DLWG RFOFF lolo limit")
  field(CALC, "A-10")
  field(INPA, "KLYS:LI21:41:DL_WG_TEMP_RFON.LOLO")
  field(OUT,  "KLYS:LI21:41:DL_WG_TEMP_RFOFF.LOLO PP")
  field(OOPT, "Every Time")
}

record(ai, "KLYS:LI21:41:DL_WG_TEMP_RFOFF") {
  field(DESC, "DLWG RFOFF limits")
  field(PREC, "1")
  field(EGU, "DegF")
  field(ADEL, ".001")
  field(VAL, "0")
  field(MDEL, ".001")
  field(ASG, "NOWRITE")
}

record(mbbiDirect, "KLYS:LI21:51:STAT_VAL") {
  field(DESC, "Klys STAT for DLWG job")
  field(DTYP, "Raw Soft Channel")
  field(INP, "KLYS:LI21:51:STAT CPP MS")
  field(PINI, "YES")
}

record(mbbiDirect, "KLYS:LI21:51:SWRD_VAL") {
  field(DESC, "Klys SWRD for DLWG job")
  field(DTYP, "Raw Soft Channel")
  field(INP, "KLYS:LI21:51:SWRD CPP MS")
  field(PINI, "YES")
}

record(stringin, "KLYS:LI21:51:DL_WG_TEMP_KLY") {
  field(DESC, "DLWG associated KLYS")
  field(VAL, "KLYS LI21 51")
  field(PINI, "YES")
}

record(stringin, "KLYS:LI21:51:DL_WG_TEMP_STA") {
  field(DESC, "Station LOWRF status")
  field(PINI, "YES")
}

record(ai, "KLYS:LI21:51:DL_WG_TEMP_RFON") {
  field(DESC, "DLWG RFON limits")
  field(PREC, "1")
  field(EGU, "DegF")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI, "YES")
  field(ASG, "EOICDESK")
  field(LOLO,"112")
  field(HIHI,"114")
  field(HIGH,"113.9")
  field(LOW,"112.1")
  field(VAL, "0")
  field(FLNK, "KLYS:LI21:51:DL_WG_TEMP_LOWCALC")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

record(calcout, "KLYS:LI21:51:DL_WG_TEMP_LOWCALC") {
  field(DESC, "Calc DLWG RFOFF low limit")
  field(CALC, "A-10")
  field(INPA, "KLYS:LI21:51:DL_WG_TEMP_RFON.LOW")
  field(OUT,  "KLYS:LI21:51:DL_WG_TEMP_RFOFF.LOW PP")
  field(OOPT, "Every Time")
  field(FLNK, "KLYS:LI21:51:DL_WG_TEMP_LOLOCALC")
}

record(calcout, "KLYS:LI21:51:DL_WG_TEMP_LOLOCALC") {
  field(DESC, "Calc DLWG RFOFF lolo limit")
  field(CALC, "A-10")
  field(INPA, "KLYS:LI21:51:DL_WG_TEMP_RFON.LOLO")
  field(OUT,  "KLYS:LI21:51:DL_WG_TEMP_RFOFF.LOLO PP")
  field(OOPT, "Every Time")
}

record(ai, "KLYS:LI21:51:DL_WG_TEMP_RFOFF") {
  field(DESC, "DLWG RFOFF limits")
  field(PREC, "1")
  field(EGU, "DegF")
  field(ADEL, ".001")
  field(VAL, "0")
  field(MDEL, ".001")
  field(ASG, "NOWRITE")
}

record(mbbiDirect, "KLYS:LI21:61:STAT_VAL") {
  field(DESC, "Klys STAT for DLWG job")
  field(DTYP, "Raw Soft Channel")
  field(INP, "KLYS:LI21:61:STAT CPP MS")
  field(PINI, "YES")
}

record(mbbiDirect, "KLYS:LI21:61:SWRD_VAL") {
  field(DESC, "Klys SWRD for DLWG job")
  field(DTYP, "Raw Soft Channel")
  field(INP, "KLYS:LI21:61:SWRD CPP MS")
  field(PINI, "YES")
}

record(stringin, "KLYS:LI21:61:DL_WG_TEMP_KLY") {
  field(DESC, "DLWG associated KLYS")
  field(VAL, "KLYS LI21 61")
  field(PINI, "YES")
}

record(stringin, "KLYS:LI21:61:DL_WG_TEMP_STA") {
  field(DESC, "Station LOWRF status")
  field(PINI, "YES")
}

record(ai, "KLYS:LI21:61:DL_WG_TEMP_RFON") {
  field(DESC, "DLWG RFON limits")
  field(PREC, "1")
  field(EGU, "DegF")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI, "YES")
  field(ASG, "EOICDESK")
  field(LOLO,"112")
  field(HIHI,"114")
  field(HIGH,"113.9")
  field(LOW,"112.1")
  field(VAL, "0")
  field(FLNK, "KLYS:LI21:61:DL_WG_TEMP_LOWCALC")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

record(calcout, "KLYS:LI21:61:DL_WG_TEMP_LOWCALC") {
  field(DESC, "Calc DLWG RFOFF low limit")
  field(CALC, "A-10")
  field(INPA, "KLYS:LI21:61:DL_WG_TEMP_RFON.LOW")
  field(OUT,  "KLYS:LI21:61:DL_WG_TEMP_RFOFF.LOW PP")
  field(OOPT, "Every Time")
  field(FLNK, "KLYS:LI21:61:DL_WG_TEMP_LOLOCALC")
}

record(calcout, "KLYS:LI21:61:DL_WG_TEMP_LOLOCALC") {
  field(DESC, "Calc DLWG RFOFF lolo limit")
  field(CALC, "A-10")
  field(INPA, "KLYS:LI21:61:DL_WG_TEMP_RFON.LOLO")
  field(OUT,  "KLYS:LI21:61:DL_WG_TEMP_RFOFF.LOLO PP")
  field(OOPT, "Every Time")
}

record(ai, "KLYS:LI21:61:DL_WG_TEMP_RFOFF") {
  field(DESC, "DLWG RFOFF limits")
  field(PREC, "1")
  field(EGU, "DegF")
  field(ADEL, ".001")
  field(VAL, "0")
  field(MDEL, ".001")
  field(ASG, "NOWRITE")
}

record(mbbiDirect, "KLYS:LI21:71:STAT_VAL") {
  field(DESC, "Klys STAT for DLWG job")
  field(DTYP, "Raw Soft Channel")
  field(INP, "KLYS:LI21:71:STAT CPP MS")
  field(PINI, "YES")
}

record(mbbiDirect, "KLYS:LI21:71:SWRD_VAL") {
  field(DESC, "Klys SWRD for DLWG job")
  field(DTYP, "Raw Soft Channel")
  field(INP, "KLYS:LI21:71:SWRD CPP MS")
  field(PINI, "YES")
}

record(stringin, "KLYS:LI21:71:DL_WG_TEMP_KLY") {
  field(DESC, "DLWG associated KLYS")
  field(VAL, "KLYS LI21 71")
  field(PINI, "YES")
}

record(stringin, "KLYS:LI21:71:DL_WG_TEMP_STA") {
  field(DESC, "Station LOWRF status")
  field(PINI, "YES")
}

record(ai, "KLYS:LI21:71:DL_WG_TEMP_RFON") {
  field(DESC, "DLWG RFON limits")
  field(PREC, "1")
  field(EGU, "DegF")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI, "YES")
  field(ASG, "EOICDESK")
  field(LOLO,"112")
  field(HIHI,"114")
  field(HIGH,"113.9")
  field(LOW,"112.1")
  field(VAL, "0")
  field(FLNK, "KLYS:LI21:71:DL_WG_TEMP_LOWCALC")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

record(calcout, "KLYS:LI21:71:DL_WG_TEMP_LOWCALC") {
  field(DESC, "Calc DLWG RFOFF low limit")
  field(CALC, "A-10")
  field(INPA, "KLYS:LI21:71:DL_WG_TEMP_RFON.LOW")
  field(OUT,  "KLYS:LI21:71:DL_WG_TEMP_RFOFF.LOW PP")
  field(OOPT, "Every Time")
  field(FLNK, "KLYS:LI21:71:DL_WG_TEMP_LOLOCALC")
}

record(calcout, "KLYS:LI21:71:DL_WG_TEMP_LOLOCALC") {
  field(DESC, "Calc DLWG RFOFF lolo limit")
  field(CALC, "A-10")
  field(INPA, "KLYS:LI21:71:DL_WG_TEMP_RFON.LOLO")
  field(OUT,  "KLYS:LI21:71:DL_WG_TEMP_RFOFF.LOLO PP")
  field(OOPT, "Every Time")
}

record(ai, "KLYS:LI21:71:DL_WG_TEMP_RFOFF") {
  field(DESC, "DLWG RFOFF limits")
  field(PREC, "1")
  field(EGU, "DegF")
  field(ADEL, ".001")
  field(VAL, "0")
  field(MDEL, ".001")
  field(ASG, "NOWRITE")
}

record(mbbiDirect, "KLYS:LI21:81:STAT_VAL") {
  field(DESC, "Klys STAT for DLWG job")
  field(DTYP, "Raw Soft Channel")
  field(INP, "KLYS:LI21:81:STAT CPP MS")
  field(PINI, "YES")
}

record(mbbiDirect, "KLYS:LI21:81:SWRD_VAL") {
  field(DESC, "Klys SWRD for DLWG job")
  field(DTYP, "Raw Soft Channel")
  field(INP, "KLYS:LI21:81:SWRD CPP MS")
  field(PINI, "YES")
}

record(stringin, "KLYS:LI21:81:DL_WG_TEMP_KLY") {
  field(DESC, "DLWG associated KLYS")
  field(VAL, "KLYS LI21 81")
  field(PINI, "YES")
}

record(stringin, "KLYS:LI21:81:DL_WG_TEMP_STA") {
  field(DESC, "Station LOWRF status")
  field(PINI, "YES")
}

record(ai, "KLYS:LI21:81:DL_WG_TEMP_RFON") {
  field(DESC, "DLWG RFON limits")
  field(PREC, "1")
  field(EGU, "DegF")
  field(ADEL, ".001")
  field(MDEL, ".001")
  field(PINI, "YES")
  field(ASG, "EOICDESK")
  field(LOLO,"112")
  field(HIHI,"114")
  field(HIGH,"113.9")
  field(LOW,"112.1")
  field(VAL, "0")
  field(FLNK, "KLYS:LI21:81:DL_WG_TEMP_LOWCALC")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

record(calcout, "KLYS:LI21:81:DL_WG_TEMP_LOWCALC") {
  field(DESC, "Calc DLWG RFOFF low limit")
  field(CALC, "A-10")
  field(INPA, "KLYS:LI21:81:DL_WG_TEMP_RFON.LOW")
  field(OUT,  "KLYS:LI21:81:DL_WG_TEMP_RFOFF.LOW PP")
  field(OOPT, "Every Time")
  field(FLNK, "KLYS:LI21:81:DL_WG_TEMP_LOLOCALC")
}

record(calcout, "KLYS:LI21:81:DL_WG_TEMP_LOLOCALC") {
  field(DESC, "Calc DLWG RFOFF lolo limit")
  field(CALC, "A-10")
  field(INPA, "KLYS:LI21:81:DL_WG_TEMP_RFON.LOLO")
  field(OUT,  "KLYS:LI21:81:DL_WG_TEMP_RFOFF.LOLO PP")
  field(OOPT, "Every Time")
}

record(ai, "KLYS:LI21:81:DL_WG_TEMP_RFOFF") {
  field(DESC, "DLWG RFOFF limits")
  field(PREC, "1")
  field(EGU, "DegF")
  field(ADEL, ".001")
  field(VAL, "0")
  field(MDEL, ".001")
  field(ASG, "NOWRITE")
}

#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR3_M1_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[26]")
  field(FLNK, "PLC:LI21:TM01:CR3_M1_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR3_M1_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[26]")
  field(FLNK, "PLC:LI21:TM01:CR3_M1_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR3_M1_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M1_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR3_M1_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M1_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR3_M1_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[26]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR3_M1_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[26]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR3_M2_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[27]")
  field(FLNK, "PLC:LI21:TM01:CR3_M2_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR3_M2_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[27]")
  field(FLNK, "PLC:LI21:TM01:CR3_M2_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR3_M2_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M2_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR3_M2_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M2_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR3_M2_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[27]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR3_M2_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[27]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR3_M3_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[28]")
  field(FLNK, "PLC:LI21:TM01:CR3_M3_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR3_M3_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[28]")
  field(FLNK, "PLC:LI21:TM01:CR3_M3_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR3_M3_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M3_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR3_M3_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M3_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR3_M3_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[28]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR3_M3_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[28]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR3_M4_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[29]")
  field(FLNK, "PLC:LI21:TM01:CR3_M4_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR3_M4_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[29]")
  field(FLNK, "PLC:LI21:TM01:CR3_M4_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR3_M4_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M4_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR3_M4_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M4_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR3_M4_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[29]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR3_M4_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[29]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR3_M5_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[30]")
  field(FLNK, "PLC:LI21:TM01:CR3_M5_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR3_M5_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[30]")
  field(FLNK, "PLC:LI21:TM01:CR3_M5_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR3_M5_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M5_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR3_M5_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M5_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR3_M5_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[30]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR3_M5_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[30]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR3_M6_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[31]")
  field(FLNK, "PLC:LI21:TM01:CR3_M6_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR3_M6_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[31]")
  field(FLNK, "PLC:LI21:TM01:CR3_M6_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR3_M6_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M6_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR3_M6_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M6_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR3_M6_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[31]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR3_M6_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[31]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR3_M7_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[32]")
  field(FLNK, "PLC:LI21:TM01:CR3_M7_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR3_M7_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[32]")
  field(FLNK, "PLC:LI21:TM01:CR3_M7_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR3_M7_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M7_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR3_M7_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M7_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR3_M7_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[32]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR3_M7_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[32]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR3_M8_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[33]")
  field(FLNK, "PLC:LI21:TM01:CR3_M8_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR3_M8_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[33]")
  field(FLNK, "PLC:LI21:TM01:CR3_M8_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR3_M8_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M8_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR3_M8_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M8_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR3_M8_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[33]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR3_M8_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[33]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR3_M9_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[34]")
  field(FLNK, "PLC:LI21:TM01:CR3_M9_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR3_M9_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[34]")
  field(FLNK, "PLC:LI21:TM01:CR3_M9_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR3_M9_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M9_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR3_M9_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M9_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR3_M9_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[34]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR3_M9_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[34]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR3_M10_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[35]")
  field(FLNK, "PLC:LI21:TM01:CR3_M10_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR3_M10_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[35]")
  field(FLNK, "PLC:LI21:TM01:CR3_M10_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR3_M10_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M10_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR3_M10_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M10_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR3_M10_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[35]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR3_M10_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[35]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR3_M11_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[36]")
  field(FLNK, "PLC:LI21:TM01:CR3_M11_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR3_M11_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[36]")
  field(FLNK, "PLC:LI21:TM01:CR3_M11_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR3_M11_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M11_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR3_M11_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M11_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR3_M11_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[36]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR3_M11_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[36]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# Template is for 5069-IY4 modules, each module contains two internal
# cold junction compensators (cjc's). 
#




record(ai, "PLC:LI21:TM01:CR3_M12_CJC1") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch00[37]")
  field(FLNK, "PLC:LI21:TM01:CR3_M12_CJC1_TEMP")
}

record(ai, "PLC:LI21:TM01:CR3_M12_CJC2") {
  field(DESC, "Adjust sensors to absolute temperature")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_array_ch01[37]")
  field(FLNK, "PLC:LI21:TM01:CR3_M12_CJC2_TEMP")
}

record(calc, "PLC:LI21:TM01:CR3_M12_CJC1_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M12_CJC1")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(calc, "PLC:LI21:TM01:CR3_M12_CJC2_TEMP") {
  field(INPA , "PLC:LI21:TM01:CR3_M12_CJC2")
  #CJC reads in celsius convert to F
  field(PREC, "1")
  field(CALC, "A*1.8 + 32")
}

record(bi, "PLC:LI21:TM01:CR3_M12_CJC1_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch00[37]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}

record(bi, "PLC:LI21:TM01:CR3_M12_CJC2_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_cjc_fault_array_ch01[37]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M1_CH00_RAW") {
  field(DESC, "DL_WG_01")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:11:DL_WG_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[26]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M1_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[26]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M1_CH00_TEMP") {
  field(DESC, "DL_WG_01")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:11:DL_WG_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[26]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M1_CH00_FILT_CUTOFF") {
  field(DESC, "DL_WG_01")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M1_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M1_CH00_FILT_RAD") {
  field(DESC, "DL_WG_01")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M1_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M1_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M1_CH00_FILT_RAW") {
  field(DESC, "DL_WG_01")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[26] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M1_CH00_FILT_ORDER") {
  field(DESC, "DL_WG_01")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[26] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M1_CH00_FILT_SR") {
  field(DESC, "DL_WG_01")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[26]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M1_CH00_ALIAS") {
    field(VAL,"KLYS:LI21:11:DL_WG_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:11:DL_WG_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:11:DL_WG_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M1_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.6")
}


#Temperature PV for user
record(ai, "KLYS:LI21:11:DL_WG_TEMP") {
  field(DESC, "DL_WG_01")
  field(PREC, "1")
  field(INP, "KLYS:LI21:11:DL_WG_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.14e+02")
  field(LOPR, "1.12e+02")
  field(HIHI, "113")
  field(LOLO, "99.5")
  field(HIGH, "113.90000152588")
  field(LOW, "100")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "4.0000000e-02")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:11:DL_WG_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M1_CH01_RAW") {
  field(DESC, "DL_WG_02")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:21:DL_WG_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[26]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M1_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[26]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M1_CH01_TEMP") {
  field(DESC, "DL_WG_02")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:21:DL_WG_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[26]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M1_CH01_FILT_CUTOFF") {
  field(DESC, "DL_WG_02")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M1_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M1_CH01_FILT_RAD") {
  field(DESC, "DL_WG_02")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M1_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M1_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M1_CH01_FILT_RAW") {
  field(DESC, "DL_WG_02")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[26] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M1_CH01_FILT_ORDER") {
  field(DESC, "DL_WG_02")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[26] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M1_CH01_FILT_SR") {
  field(DESC, "DL_WG_02")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[26]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M1_CH01_ALIAS") {
    field(VAL,"KLYS:LI21:21:DL_WG_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:21:DL_WG_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:21:DL_WG_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M1_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "-0.3")
}


#Temperature PV for user
record(ai, "KLYS:LI21:21:DL_WG_TEMP") {
  field(DESC, "DL_WG_02")
  field(PREC, "1")
  field(INP, "KLYS:LI21:21:DL_WG_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.14e+02")
  field(LOPR, "1.12e+02")
  field(HIHI, "115")
  field(LOLO, "99")
  field(HIGH, "114.80000305176")
  field(LOW, "99.5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "4.0000000e-02")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:21:DL_WG_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M1_CH02_RAW") {
  field(DESC, "DL_WG_03")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:31:DL_WG_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[26]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M1_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[26]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M1_CH02_TEMP") {
  field(DESC, "DL_WG_03")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:31:DL_WG_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[26]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M1_CH02_FILT_CUTOFF") {
  field(DESC, "DL_WG_03")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M1_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M1_CH02_FILT_RAD") {
  field(DESC, "DL_WG_03")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M1_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M1_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M1_CH02_FILT_RAW") {
  field(DESC, "DL_WG_03")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[26] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M1_CH02_FILT_ORDER") {
  field(DESC, "DL_WG_03")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[26] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M1_CH02_FILT_SR") {
  field(DESC, "DL_WG_03")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[26]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M1_CH02_ALIAS") {
    field(VAL,"KLYS:LI21:31:DL_WG_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:31:DL_WG_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:31:DL_WG_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M1_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "3.2")
}


#Temperature PV for user
record(ai, "KLYS:LI21:31:DL_WG_TEMP") {
  field(DESC, "DL_WG_03")
  field(PREC, "1")
  field(INP, "KLYS:LI21:31:DL_WG_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.14e+02")
  field(LOPR, "1.12e+02")
  field(HIHI, "114")
  field(LOLO, "101.80000305176")
  field(HIGH, "113.90000152588")
  field(LOW, "102")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "4.0000000e-02")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:31:DL_WG_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M1_CH03_RAW") {
  field(DESC, "DL_WG_04")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:41:DL_WG_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[26]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M1_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[26]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M1_CH03_TEMP") {
  field(DESC, "DL_WG_04")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:41:DL_WG_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[26]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M1_CH03_FILT_CUTOFF") {
  field(DESC, "DL_WG_04")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M1_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M1_CH03_FILT_RAD") {
  field(DESC, "DL_WG_04")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M1_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M1_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M1_CH03_FILT_RAW") {
  field(DESC, "DL_WG_04")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[26] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M1_CH03_FILT_ORDER") {
  field(DESC, "DL_WG_04")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[26] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M1_CH03_FILT_SR") {
  field(DESC, "DL_WG_04")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[26]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M1_CH03_ALIAS") {
    field(VAL,"KLYS:LI21:41:DL_WG_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:41:DL_WG_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:41:DL_WG_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M1_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "-0.6")
}


#Temperature PV for user
record(ai, "KLYS:LI21:41:DL_WG_TEMP") {
  field(DESC, "DL_WG_04")
  field(PREC, "1")
  field(INP, "KLYS:LI21:41:DL_WG_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.14e+02")
  field(LOPR, "1.12e+02")
  field(HIHI, "114")
  field(LOLO, "102")
  field(HIGH, "113.90000152588")
  field(LOW, "102.09999847412")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "4.0000000e-02")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:41:DL_WG_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M2_CH00_RAW") {
  field(DESC, "DL_WG_05")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:51:DL_WG_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[27]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M2_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[27]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M2_CH00_TEMP") {
  field(DESC, "DL_WG_05")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:51:DL_WG_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[27]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M2_CH00_FILT_CUTOFF") {
  field(DESC, "DL_WG_05")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M2_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M2_CH00_FILT_RAD") {
  field(DESC, "DL_WG_05")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M2_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M2_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M2_CH00_FILT_RAW") {
  field(DESC, "DL_WG_05")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[27] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M2_CH00_FILT_ORDER") {
  field(DESC, "DL_WG_05")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[27] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M2_CH00_FILT_SR") {
  field(DESC, "DL_WG_05")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[27]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M2_CH00_ALIAS") {
    field(VAL,"KLYS:LI21:51:DL_WG_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:51:DL_WG_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:51:DL_WG_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M2_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "2.4")
}


#Temperature PV for user
record(ai, "KLYS:LI21:51:DL_WG_TEMP") {
  field(DESC, "DL_WG_05")
  field(PREC, "1")
  field(INP, "KLYS:LI21:51:DL_WG_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.14e+02")
  field(LOPR, "1.12e+02")
  field(HIHI, "114")
  field(LOLO, "102")
  field(HIGH, "113.90000152588")
  field(LOW, "102.09999847412")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "4.0000000e-02")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:51:DL_WG_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M2_CH01_RAW") {
  field(DESC, "DL_WG_06")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:61:DL_WG_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[27]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M2_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[27]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M2_CH01_TEMP") {
  field(DESC, "DL_WG_06")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:61:DL_WG_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[27]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M2_CH01_FILT_CUTOFF") {
  field(DESC, "DL_WG_06")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M2_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M2_CH01_FILT_RAD") {
  field(DESC, "DL_WG_06")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M2_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M2_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M2_CH01_FILT_RAW") {
  field(DESC, "DL_WG_06")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[27] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M2_CH01_FILT_ORDER") {
  field(DESC, "DL_WG_06")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[27] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M2_CH01_FILT_SR") {
  field(DESC, "DL_WG_06")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[27]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M2_CH01_ALIAS") {
    field(VAL,"KLYS:LI21:61:DL_WG_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:61:DL_WG_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:61:DL_WG_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M2_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "1.9")
}


#Temperature PV for user
record(ai, "KLYS:LI21:61:DL_WG_TEMP") {
  field(DESC, "DL_WG_06")
  field(PREC, "1")
  field(INP, "KLYS:LI21:61:DL_WG_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.14e+02")
  field(LOPR, "1.12e+02")
  field(HIHI, "114")
  field(LOLO, "102")
  field(HIGH, "113.90000152588")
  field(LOW, "102.09999847412")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "4.0000000e-02")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:61:DL_WG_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M2_CH02_RAW") {
  field(DESC, "DL_WG_07")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:71:DL_WG_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[27]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M2_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[27]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M2_CH02_TEMP") {
  field(DESC, "DL_WG_07")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:71:DL_WG_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[27]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M2_CH02_FILT_CUTOFF") {
  field(DESC, "DL_WG_07")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M2_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M2_CH02_FILT_RAD") {
  field(DESC, "DL_WG_07")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M2_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M2_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M2_CH02_FILT_RAW") {
  field(DESC, "DL_WG_07")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[27] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M2_CH02_FILT_ORDER") {
  field(DESC, "DL_WG_07")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[27] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M2_CH02_FILT_SR") {
  field(DESC, "DL_WG_07")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[27]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M2_CH02_ALIAS") {
    field(VAL,"KLYS:LI21:71:DL_WG_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:71:DL_WG_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:71:DL_WG_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M2_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "2.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:71:DL_WG_TEMP") {
  field(DESC, "DL_WG_07")
  field(PREC, "1")
  field(INP, "KLYS:LI21:71:DL_WG_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.14e+02")
  field(LOPR, "1.12e+02")
  field(HIHI, "114")
  field(LOLO, "102")
  field(HIGH, "113.90000152588")
  field(LOW, "102.09999847412")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "4.0000000e-02")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:71:DL_WG_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M2_CH03_RAW") {
  field(DESC, "DL_WG_08")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:81:DL_WG_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[27]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M2_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[27]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M2_CH03_TEMP") {
  field(DESC, "DL_WG_08")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:81:DL_WG_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[27]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M2_CH03_FILT_CUTOFF") {
  field(DESC, "DL_WG_08")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M2_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M2_CH03_FILT_RAD") {
  field(DESC, "DL_WG_08")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M2_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M2_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M2_CH03_FILT_RAW") {
  field(DESC, "DL_WG_08")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[27] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M2_CH03_FILT_ORDER") {
  field(DESC, "DL_WG_08")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[27] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M2_CH03_FILT_SR") {
  field(DESC, "DL_WG_08")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[27]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M2_CH03_ALIAS") {
    field(VAL,"KLYS:LI21:81:DL_WG_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:81:DL_WG_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:81:DL_WG_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M2_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "-0.5")
}


#Temperature PV for user
record(ai, "KLYS:LI21:81:DL_WG_TEMP") {
  field(DESC, "DL_WG_08")
  field(PREC, "1")
  field(INP, "KLYS:LI21:81:DL_WG_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.14e+02")
  field(LOPR, "1.12e+02")
  field(HIHI, "114")
  field(LOLO, "102")
  field(HIGH, "113.90000152588")
  field(LOW, "102.09999847412")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "4.0000000e-02")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:81:DL_WG_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M3_CH00_RAW") {
  field(DESC, "KLY_W2_1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:11:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[28]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M3_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[28]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M3_CH00_TEMP") {
  field(DESC, "KLY_W2_1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:11:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[28]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M3_CH00_FILT_CUTOFF") {
  field(DESC, "KLY_W2_1")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M3_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M3_CH00_FILT_RAD") {
  field(DESC, "KLY_W2_1")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M3_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M3_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M3_CH00_FILT_RAW") {
  field(DESC, "KLY_W2_1")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[28] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M3_CH00_FILT_ORDER") {
  field(DESC, "KLY_W2_1")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[28] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M3_CH00_FILT_SR") {
  field(DESC, "KLY_W2_1")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[28]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M3_CH00_ALIAS") {
    field(VAL,"KLYS:LI21:11:WNDW2_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:11:WNDW2_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:11:WNDW2_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M3_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:11:WNDW2_TEMP") {
  field(DESC, "KLY_W2_1")
  field(PREC, "1")
  field(INP, "KLYS:LI21:11:WNDW2_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.25e+02")
  field(LOPR, "8.79e+01")
  field(HIHI, "122")
  field(LOLO, "91")
  field(HIGH, "120.5")
  field(LOW, "92.55")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "6.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:11:WNDW2_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M3_CH01_RAW") {
  field(DESC, "ACC_H2O")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "WATR:LI21:1:ACC_H2O_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[28]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M3_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[28]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M3_CH01_TEMP") {
  field(DESC, "ACC_H2O")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "WATR:LI21:1:ACC_H2O_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[28]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M3_CH01_FILT_CUTOFF") {
  field(DESC, "ACC_H2O")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M3_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M3_CH01_FILT_RAD") {
  field(DESC, "ACC_H2O")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M3_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M3_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M3_CH01_FILT_RAW") {
  field(DESC, "ACC_H2O")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[28] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M3_CH01_FILT_ORDER") {
  field(DESC, "ACC_H2O")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[28] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M3_CH01_FILT_SR") {
  field(DESC, "ACC_H2O")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[28]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M3_CH01_ALIAS") {
    field(VAL,"WATR:LI21:1:ACC_H2O_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "WATR:LI21:1:ACC_H2O_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"WATR:LI21:1:ACC_H2O_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M3_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "2.6")
}


#Temperature PV for user
record(ai, "WATR:LI21:1:ACC_H2O_TEMP") {
  field(DESC, "ACC_H2O")
  field(PREC, "1")
  field(INP, "WATR:LI21:1:ACC_H2O_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.13e+02")
  field(LOPR, "1.10e+02")
  field(HIHI, "111.1")
  field(LOLO, "109.1")
  field(HIGH, "111")
  field(LOW, "109.2")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "4.0000000e-02")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "WATR:LI21:1:ACC_H2O_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M3_CH02_RAW") {
  field(DESC, "WG_H2O")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "WATR:LI21:1:WG_H2O_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[28]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M3_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[28]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M3_CH02_TEMP") {
  field(DESC, "WG_H2O")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "WATR:LI21:1:WG_H2O_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[28]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M3_CH02_FILT_CUTOFF") {
  field(DESC, "WG_H2O")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M3_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M3_CH02_FILT_RAD") {
  field(DESC, "WG_H2O")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M3_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M3_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M3_CH02_FILT_RAW") {
  field(DESC, "WG_H2O")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[28] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M3_CH02_FILT_ORDER") {
  field(DESC, "WG_H2O")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[28] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M3_CH02_FILT_SR") {
  field(DESC, "WG_H2O")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[28]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M3_CH02_ALIAS") {
    field(VAL,"WATR:LI21:1:WG_H2O_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "WATR:LI21:1:WG_H2O_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"WATR:LI21:1:WG_H2O_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M3_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "3.5")
}


#Temperature PV for user
record(ai, "WATR:LI21:1:WG_H2O_TEMP") {
  field(DESC, "WG_H2O")
  field(PREC, "1")
  field(INP, "WATR:LI21:1:WG_H2O_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "9.74e+01")
  field(LOPR, "9.26e+01")
  field(HIHI, "97")
  field(LOLO, "93")
  field(HIGH, "96.8")
  field(LOW, "93.2")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "8.0000000e-02")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "WATR:LI21:1:WG_H2O_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M3_CH03_RAW") {
  field(DESC, "KLY_H2O")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "WATR:LI21:1:KLY_H2O_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[28]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M3_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[28]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M3_CH03_TEMP") {
  field(DESC, "KLY_H2O")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "WATR:LI21:1:KLY_H2O_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[28]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M3_CH03_FILT_CUTOFF") {
  field(DESC, "KLY_H2O")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M3_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M3_CH03_FILT_RAD") {
  field(DESC, "KLY_H2O")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M3_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M3_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M3_CH03_FILT_RAW") {
  field(DESC, "KLY_H2O")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[28] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M3_CH03_FILT_ORDER") {
  field(DESC, "KLY_H2O")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[28] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M3_CH03_FILT_SR") {
  field(DESC, "KLY_H2O")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[28]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M3_CH03_ALIAS") {
    field(VAL,"WATR:LI21:1:KLY_H2O_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "WATR:LI21:1:KLY_H2O_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"WATR:LI21:1:KLY_H2O_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M3_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "1.0")
}


#Temperature PV for user
record(ai, "WATR:LI21:1:KLY_H2O_TEMP") {
  field(DESC, "KLY_H2O")
  field(PREC, "1")
  field(INP, "WATR:LI21:1:KLY_H2O_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "9.76e+01")
  field(LOPR, "9.04e+01")
  field(HIHI, "97")
  field(LOLO, "91")
  field(HIGH, "96.7")
  field(LOW, "91.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "1.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "WATR:LI21:1:KLY_H2O_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M4_CH00_RAW") {
  field(DESC, "M_D_LINE")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LLRF:LI21:1:M_D_LINE_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[29]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M4_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[29]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M4_CH00_TEMP") {
  field(DESC, "M_D_LINE")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LLRF:LI21:1:M_D_LINE_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[29]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M4_CH00_FILT_CUTOFF") {
  field(DESC, "M_D_LINE")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M4_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M4_CH00_FILT_RAD") {
  field(DESC, "M_D_LINE")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M4_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M4_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M4_CH00_FILT_RAW") {
  field(DESC, "M_D_LINE")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[29] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M4_CH00_FILT_ORDER") {
  field(DESC, "M_D_LINE")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[29] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M4_CH00_FILT_SR") {
  field(DESC, "M_D_LINE")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[29]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M4_CH00_ALIAS") {
    field(VAL,"LLRF:LI21:1:M_D_LINE_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LLRF:LI21:1:M_D_LINE_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LLRF:LI21:1:M_D_LINE_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M4_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "LLRF:LI21:1:M_D_LINE_TEMP") {
  field(DESC, "M_D_LINE")
  field(PREC, "1")
  field(INP, "LLRF:LI21:1:M_D_LINE_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.02e+02")
  field(LOPR, "6.93e+01")
  field(HIHI, "99")
  field(LOLO, "72")
  field(HIGH, "97.65")
  field(LOW, "73.35")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "5.4000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LLRF:LI21:1:M_D_LINE_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M4_CH01_RAW") {
  field(DESC, "PHS_REF")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LLRF:LI21:1:PHS_REF_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[29]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M4_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[29]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M4_CH01_TEMP") {
  field(DESC, "PHS_REF")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LLRF:LI21:1:PHS_REF_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[29]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M4_CH01_FILT_CUTOFF") {
  field(DESC, "PHS_REF")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M4_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M4_CH01_FILT_RAD") {
  field(DESC, "PHS_REF")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M4_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M4_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M4_CH01_FILT_RAW") {
  field(DESC, "PHS_REF")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[29] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M4_CH01_FILT_ORDER") {
  field(DESC, "PHS_REF")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[29] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M4_CH01_FILT_SR") {
  field(DESC, "PHS_REF")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[29]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M4_CH01_ALIAS") {
    field(VAL,"LLRF:LI21:1:PHS_REF_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LLRF:LI21:1:PHS_REF_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LLRF:LI21:1:PHS_REF_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M4_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "LLRF:LI21:1:PHS_REF_TEMP") {
  field(DESC, "PHS_REF")
  field(PREC, "1")
  field(INP, "LLRF:LI21:1:PHS_REF_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "9.90e+01")
  field(LOPR, "8.70e+01")
  field(HIHI, "98")
  field(LOLO, "88")
  field(HIGH, "97.5")
  field(LOW, "88.5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "2.0000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LLRF:LI21:1:PHS_REF_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M4_CH02_RAW") {
  field(DESC, "X6_MULT")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LLRF:LI21:1:X6_MULT_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[29]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M4_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[29]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M4_CH02_TEMP") {
  field(DESC, "X6_MULT")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "LLRF:LI21:1:X6_MULT_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[29]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M4_CH02_FILT_CUTOFF") {
  field(DESC, "X6_MULT")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M4_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M4_CH02_FILT_RAD") {
  field(DESC, "X6_MULT")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M4_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M4_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M4_CH02_FILT_RAW") {
  field(DESC, "X6_MULT")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[29] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M4_CH02_FILT_ORDER") {
  field(DESC, "X6_MULT")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[29] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M4_CH02_FILT_SR") {
  field(DESC, "X6_MULT")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[29]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M4_CH02_ALIAS") {
    field(VAL,"LLRF:LI21:1:X6_MULT_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "LLRF:LI21:1:X6_MULT_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"LLRF:LI21:1:X6_MULT_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M4_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "LLRF:LI21:1:X6_MULT_TEMP") {
  field(DESC, "X6_MULT")
  field(PREC, "1")
  field(INP, "LLRF:LI21:1:X6_MULT_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "9.80e+01")
  field(LOPR, "8.60e+01")
  field(HIHI, "97")
  field(LOLO, "87")
  field(HIGH, "96.5")
  field(LOW, "87.5")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "2.0000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "LLRF:LI21:1:X6_MULT_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M4_CH03_RAW") {
  field(DESC, "KLY_W1_1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:11:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[29]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M4_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[29]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M4_CH03_TEMP") {
  field(DESC, "KLY_W1_1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:11:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[29]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M4_CH03_FILT_CUTOFF") {
  field(DESC, "KLY_W1_1")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M4_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M4_CH03_FILT_RAD") {
  field(DESC, "KLY_W1_1")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M4_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M4_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M4_CH03_FILT_RAW") {
  field(DESC, "KLY_W1_1")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[29] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M4_CH03_FILT_ORDER") {
  field(DESC, "KLY_W1_1")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[29] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M4_CH03_FILT_SR") {
  field(DESC, "KLY_W1_1")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[29]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M4_CH03_ALIAS") {
    field(VAL,"KLYS:LI21:11:WNDW1_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:11:WNDW1_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:11:WNDW1_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M4_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:11:WNDW1_TEMP") {
  field(DESC, "KLY_W1_1")
  field(PREC, "1")
  field(INP, "KLYS:LI21:11:WNDW1_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:11:WNDW1_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M5_CH00_RAW") {
  field(DESC, "KLY_W2_8")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:81:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[30]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M5_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[30]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M5_CH00_TEMP") {
  field(DESC, "KLY_W2_8")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:81:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[30]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M5_CH00_FILT_CUTOFF") {
  field(DESC, "KLY_W2_8")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M5_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M5_CH00_FILT_RAD") {
  field(DESC, "KLY_W2_8")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M5_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M5_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M5_CH00_FILT_RAW") {
  field(DESC, "KLY_W2_8")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[30] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M5_CH00_FILT_ORDER") {
  field(DESC, "KLY_W2_8")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[30] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M5_CH00_FILT_SR") {
  field(DESC, "KLY_W2_8")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[30]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M5_CH00_ALIAS") {
    field(VAL,"KLYS:LI21:81:WNDW2_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:81:WNDW2_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:81:WNDW2_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M5_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:81:WNDW2_TEMP") {
  field(DESC, "KLY_W2_8")
  field(PREC, "1")
  field(INP, "KLYS:LI21:81:WNDW2_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:81:WNDW2_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M5_CH01_RAW") {
  field(DESC, "KLY_W1_2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:21:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[30]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M5_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[30]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M5_CH01_TEMP") {
  field(DESC, "KLY_W1_2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:21:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[30]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M5_CH01_FILT_CUTOFF") {
  field(DESC, "KLY_W1_2")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M5_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M5_CH01_FILT_RAD") {
  field(DESC, "KLY_W1_2")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M5_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M5_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M5_CH01_FILT_RAW") {
  field(DESC, "KLY_W1_2")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[30] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M5_CH01_FILT_ORDER") {
  field(DESC, "KLY_W1_2")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[30] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M5_CH01_FILT_SR") {
  field(DESC, "KLY_W1_2")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[30]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M5_CH01_ALIAS") {
    field(VAL,"KLYS:LI21:21:WNDW1_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:21:WNDW1_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:21:WNDW1_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M5_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:21:WNDW1_TEMP") {
  field(DESC, "KLY_W1_2")
  field(PREC, "1")
  field(INP, "KLYS:LI21:21:WNDW1_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "135")
  field(LOLO, "89")
  field(HIGH, "132.7")
  field(LOW, "91.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:21:WNDW1_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M5_CH02_RAW") {
  field(DESC, "KLY_W2_2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:21:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[30]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M5_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[30]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M5_CH02_TEMP") {
  field(DESC, "KLY_W2_2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:21:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[30]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M5_CH02_FILT_CUTOFF") {
  field(DESC, "KLY_W2_2")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M5_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M5_CH02_FILT_RAD") {
  field(DESC, "KLY_W2_2")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M5_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M5_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M5_CH02_FILT_RAW") {
  field(DESC, "KLY_W2_2")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[30] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M5_CH02_FILT_ORDER") {
  field(DESC, "KLY_W2_2")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[30] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M5_CH02_FILT_SR") {
  field(DESC, "KLY_W2_2")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[30]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M5_CH02_ALIAS") {
    field(VAL,"KLYS:LI21:21:WNDW2_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:21:WNDW2_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:21:WNDW2_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M5_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:21:WNDW2_TEMP") {
  field(DESC, "KLY_W2_2")
  field(PREC, "1")
  field(INP, "KLYS:LI21:21:WNDW2_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "135")
  field(LOLO, "89")
  field(HIGH, "132.7")
  field(LOW, "91.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:21:WNDW2_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M5_CH03_RAW") {
  field(DESC, "KLY_W1_3")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:31:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[30]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M5_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[30]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M5_CH03_TEMP") {
  field(DESC, "KLY_W1_3")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:31:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[30]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M5_CH03_FILT_CUTOFF") {
  field(DESC, "KLY_W1_3")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M5_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M5_CH03_FILT_RAD") {
  field(DESC, "KLY_W1_3")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M5_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M5_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M5_CH03_FILT_RAW") {
  field(DESC, "KLY_W1_3")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[30] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M5_CH03_FILT_ORDER") {
  field(DESC, "KLY_W1_3")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[30] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M5_CH03_FILT_SR") {
  field(DESC, "KLY_W1_3")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[30]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M5_CH03_ALIAS") {
    field(VAL,"KLYS:LI21:31:WNDW1_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:31:WNDW1_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:31:WNDW1_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M5_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:31:WNDW1_TEMP") {
  field(DESC, "KLY_W1_3")
  field(PREC, "1")
  field(INP, "KLYS:LI21:31:WNDW1_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:31:WNDW1_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M6_CH00_RAW") {
  field(DESC, "KLY_W2_3")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:31:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[31]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M6_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[31]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M6_CH00_TEMP") {
  field(DESC, "KLY_W2_3")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:31:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[31]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M6_CH00_FILT_CUTOFF") {
  field(DESC, "KLY_W2_3")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M6_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M6_CH00_FILT_RAD") {
  field(DESC, "KLY_W2_3")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M6_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M6_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M6_CH00_FILT_RAW") {
  field(DESC, "KLY_W2_3")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[31] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M6_CH00_FILT_ORDER") {
  field(DESC, "KLY_W2_3")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[31] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M6_CH00_FILT_SR") {
  field(DESC, "KLY_W2_3")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[31]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M6_CH00_ALIAS") {
    field(VAL,"KLYS:LI21:31:WNDW2_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:31:WNDW2_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:31:WNDW2_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M6_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:31:WNDW2_TEMP") {
  field(DESC, "KLY_W2_3")
  field(PREC, "1")
  field(INP, "KLYS:LI21:31:WNDW2_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:31:WNDW2_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M6_CH01_RAW") {
  field(DESC, "KLY_W1_4")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:41:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[31]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M6_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[31]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M6_CH01_TEMP") {
  field(DESC, "KLY_W1_4")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:41:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[31]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M6_CH01_FILT_CUTOFF") {
  field(DESC, "KLY_W1_4")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M6_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M6_CH01_FILT_RAD") {
  field(DESC, "KLY_W1_4")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M6_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M6_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M6_CH01_FILT_RAW") {
  field(DESC, "KLY_W1_4")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[31] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M6_CH01_FILT_ORDER") {
  field(DESC, "KLY_W1_4")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[31] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M6_CH01_FILT_SR") {
  field(DESC, "KLY_W1_4")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[31]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M6_CH01_ALIAS") {
    field(VAL,"KLYS:LI21:41:WNDW1_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:41:WNDW1_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:41:WNDW1_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M6_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:41:WNDW1_TEMP") {
  field(DESC, "KLY_W1_4")
  field(PREC, "1")
  field(INP, "KLYS:LI21:41:WNDW1_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:41:WNDW1_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M6_CH02_RAW") {
  field(DESC, "KLY_W2_4")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:41:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[31]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M6_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[31]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M6_CH02_TEMP") {
  field(DESC, "KLY_W2_4")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:41:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[31]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M6_CH02_FILT_CUTOFF") {
  field(DESC, "KLY_W2_4")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M6_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M6_CH02_FILT_RAD") {
  field(DESC, "KLY_W2_4")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M6_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M6_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M6_CH02_FILT_RAW") {
  field(DESC, "KLY_W2_4")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[31] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M6_CH02_FILT_ORDER") {
  field(DESC, "KLY_W2_4")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[31] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M6_CH02_FILT_SR") {
  field(DESC, "KLY_W2_4")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[31]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M6_CH02_ALIAS") {
    field(VAL,"KLYS:LI21:41:WNDW2_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:41:WNDW2_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:41:WNDW2_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M6_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:41:WNDW2_TEMP") {
  field(DESC, "KLY_W2_4")
  field(PREC, "1")
  field(INP, "KLYS:LI21:41:WNDW2_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:41:WNDW2_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M6_CH03_RAW") {
  field(DESC, "KLY_W1_5")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:51:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[31]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M6_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[31]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M6_CH03_TEMP") {
  field(DESC, "KLY_W1_5")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:51:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[31]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M6_CH03_FILT_CUTOFF") {
  field(DESC, "KLY_W1_5")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M6_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M6_CH03_FILT_RAD") {
  field(DESC, "KLY_W1_5")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M6_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M6_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M6_CH03_FILT_RAW") {
  field(DESC, "KLY_W1_5")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[31] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M6_CH03_FILT_ORDER") {
  field(DESC, "KLY_W1_5")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[31] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M6_CH03_FILT_SR") {
  field(DESC, "KLY_W1_5")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[31]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M6_CH03_ALIAS") {
    field(VAL,"KLYS:LI21:51:WNDW1_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:51:WNDW1_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:51:WNDW1_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M6_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:51:WNDW1_TEMP") {
  field(DESC, "KLY_W1_5")
  field(PREC, "1")
  field(INP, "KLYS:LI21:51:WNDW1_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:51:WNDW1_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M7_CH00_RAW") {
  field(DESC, "KLY_W2_5")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:51:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[32]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M7_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[32]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M7_CH00_TEMP") {
  field(DESC, "KLY_W2_5")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:51:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[32]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M7_CH00_FILT_CUTOFF") {
  field(DESC, "KLY_W2_5")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M7_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M7_CH00_FILT_RAD") {
  field(DESC, "KLY_W2_5")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M7_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M7_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M7_CH00_FILT_RAW") {
  field(DESC, "KLY_W2_5")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[32] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M7_CH00_FILT_ORDER") {
  field(DESC, "KLY_W2_5")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[32] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M7_CH00_FILT_SR") {
  field(DESC, "KLY_W2_5")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[32]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M7_CH00_ALIAS") {
    field(VAL,"KLYS:LI21:51:WNDW2_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:51:WNDW2_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:51:WNDW2_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M7_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:51:WNDW2_TEMP") {
  field(DESC, "KLY_W2_5")
  field(PREC, "1")
  field(INP, "KLYS:LI21:51:WNDW2_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:51:WNDW2_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M7_CH01_RAW") {
  field(DESC, "KLY_W1_6")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:61:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[32]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M7_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[32]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M7_CH01_TEMP") {
  field(DESC, "KLY_W1_6")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:61:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[32]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M7_CH01_FILT_CUTOFF") {
  field(DESC, "KLY_W1_6")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M7_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M7_CH01_FILT_RAD") {
  field(DESC, "KLY_W1_6")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M7_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M7_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M7_CH01_FILT_RAW") {
  field(DESC, "KLY_W1_6")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[32] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M7_CH01_FILT_ORDER") {
  field(DESC, "KLY_W1_6")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[32] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M7_CH01_FILT_SR") {
  field(DESC, "KLY_W1_6")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[32]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M7_CH01_ALIAS") {
    field(VAL,"KLYS:LI21:61:WNDW1_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:61:WNDW1_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:61:WNDW1_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M7_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:61:WNDW1_TEMP") {
  field(DESC, "KLY_W1_6")
  field(PREC, "1")
  field(INP, "KLYS:LI21:61:WNDW1_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:61:WNDW1_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M7_CH02_RAW") {
  field(DESC, "KLY_W2_6")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:61:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[32]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M7_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[32]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M7_CH02_TEMP") {
  field(DESC, "KLY_W2_6")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:61:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[32]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M7_CH02_FILT_CUTOFF") {
  field(DESC, "KLY_W2_6")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M7_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M7_CH02_FILT_RAD") {
  field(DESC, "KLY_W2_6")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M7_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M7_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M7_CH02_FILT_RAW") {
  field(DESC, "KLY_W2_6")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[32] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M7_CH02_FILT_ORDER") {
  field(DESC, "KLY_W2_6")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[32] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M7_CH02_FILT_SR") {
  field(DESC, "KLY_W2_6")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[32]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M7_CH02_ALIAS") {
    field(VAL,"KLYS:LI21:61:WNDW2_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:61:WNDW2_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:61:WNDW2_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M7_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:61:WNDW2_TEMP") {
  field(DESC, "KLY_W2_6")
  field(PREC, "1")
  field(INP, "KLYS:LI21:61:WNDW2_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:61:WNDW2_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M7_CH03_RAW") {
  field(DESC, "KLY_W1_7")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:71:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[32]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M7_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[32]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M7_CH03_TEMP") {
  field(DESC, "KLY_W1_7")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:71:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[32]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M7_CH03_FILT_CUTOFF") {
  field(DESC, "KLY_W1_7")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M7_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M7_CH03_FILT_RAD") {
  field(DESC, "KLY_W1_7")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M7_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M7_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M7_CH03_FILT_RAW") {
  field(DESC, "KLY_W1_7")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[32] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M7_CH03_FILT_ORDER") {
  field(DESC, "KLY_W1_7")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[32] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M7_CH03_FILT_SR") {
  field(DESC, "KLY_W1_7")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[32]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M7_CH03_ALIAS") {
    field(VAL,"KLYS:LI21:71:WNDW1_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:71:WNDW1_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:71:WNDW1_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M7_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:71:WNDW1_TEMP") {
  field(DESC, "KLY_W1_7")
  field(PREC, "1")
  field(INP, "KLYS:LI21:71:WNDW1_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:71:WNDW1_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M8_CH00_RAW") {
  field(DESC, "KLY_W2_7")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:71:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[33]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M8_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[33]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M8_CH00_TEMP") {
  field(DESC, "KLY_W2_7")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:71:WNDW2_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[33]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M8_CH00_FILT_CUTOFF") {
  field(DESC, "KLY_W2_7")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M8_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M8_CH00_FILT_RAD") {
  field(DESC, "KLY_W2_7")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M8_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M8_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M8_CH00_FILT_RAW") {
  field(DESC, "KLY_W2_7")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[33] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M8_CH00_FILT_ORDER") {
  field(DESC, "KLY_W2_7")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[33] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M8_CH00_FILT_SR") {
  field(DESC, "KLY_W2_7")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[33]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M8_CH00_ALIAS") {
    field(VAL,"KLYS:LI21:71:WNDW2_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:71:WNDW2_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:71:WNDW2_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M8_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:71:WNDW2_TEMP") {
  field(DESC, "KLY_W2_7")
  field(PREC, "1")
  field(INP, "KLYS:LI21:71:WNDW2_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:71:WNDW2_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M8_CH01_RAW") {
  field(DESC, "KLY_W1_8")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:81:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[33]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M8_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[33]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M8_CH01_TEMP") {
  field(DESC, "KLY_W1_8")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "KLYS:LI21:81:WNDW1_TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[33]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M8_CH01_FILT_CUTOFF") {
  field(DESC, "KLY_W1_8")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M8_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M8_CH01_FILT_RAD") {
  field(DESC, "KLY_W1_8")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M8_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M8_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M8_CH01_FILT_RAW") {
  field(DESC, "KLY_W1_8")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[33] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M8_CH01_FILT_ORDER") {
  field(DESC, "KLY_W1_8")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[33] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M8_CH01_FILT_SR") {
  field(DESC, "KLY_W1_8")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[33]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M8_CH01_ALIAS") {
    field(VAL,"KLYS:LI21:81:WNDW1_TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "KLYS:LI21:81:WNDW1_TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"KLYS:LI21:81:WNDW1_TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M8_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "KLYS:LI21:81:WNDW1_TEMP") {
  field(DESC, "KLY_W1_8")
  field(PREC, "1")
  field(INP, "KLYS:LI21:81:WNDW1_TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "KLYS:LI21:81:WNDW1_TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M8_CH02_RAW") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR3_M8_CH02_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[33]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M8_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[33]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M8_CH02_TEMP") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR3_M8_CH02_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[33]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M8_CH02_FILT_CUTOFF") {
  field(DESC, "Spare")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M8_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M8_CH02_FILT_RAD") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M8_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M8_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M8_CH02_FILT_RAW") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[33] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M8_CH02_FILT_ORDER") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[33] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M8_CH02_FILT_SR") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[33]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M8_CH02_ALIAS") {
    field(VAL,"PLC:LI21:TM01:CR3_M8_CH02_SPARE")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PLC:LI21:TM01:CR3_M8_CH02_SPARE_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PLC:LI21:TM01:CR3_M8_CH02_SPARE")
  field(INPA, "PLC:LI21:TM01:CR3_M8_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "PLC:LI21:TM01:CR3_M8_CH02_SPARE") {
  field(DESC, "Spare")
  field(PREC, "1")
  field(INP, "PLC:LI21:TM01:CR3_M8_CH02_SPARE_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PLC:LI21:TM01:CR3_M8_CH02_SPARE_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M8_CH03_RAW") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR3_M8_CH03_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[33]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M8_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[33]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M8_CH03_TEMP") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC:LI21:TM01:CR3_M8_CH03_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[33]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M8_CH03_FILT_CUTOFF") {
  field(DESC, "Spare")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M8_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M8_CH03_FILT_RAD") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M8_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M8_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M8_CH03_FILT_RAW") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[33] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M8_CH03_FILT_ORDER") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[33] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M8_CH03_FILT_SR") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[33]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M8_CH03_ALIAS") {
    field(VAL,"PLC:LI21:TM01:CR3_M8_CH03_SPARE")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PLC:LI21:TM01:CR3_M8_CH03_SPARE_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PLC:LI21:TM01:CR3_M8_CH03_SPARE")
  field(INPA, "PLC:LI21:TM01:CR3_M8_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "PLC:LI21:TM01:CR3_M8_CH03_SPARE") {
  field(DESC, "Spare")
  field(PREC, "1")
  field(INP, "PLC:LI21:TM01:CR3_M8_CH03_SPARE_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "1.42e+02")
  field(LOPR, "8.64e+01")
  field(HIHI, "137")
  field(LOLO, "91")
  field(HIGH, "134.7")
  field(LOW, "93.3")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, "9.2000000e-01")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PLC:LI21:TM01:CR3_M8_CH03_SPARE_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M9_CH00_RAW") {
  field(DESC, "ACC_IN_1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:INLETTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[34]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M9_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[34]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M9_CH00_TEMP") {
  field(DESC, "ACC_IN_1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:INLETTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[34]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M9_CH00_FILT_CUTOFF") {
  field(DESC, "ACC_IN_1")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M9_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M9_CH00_FILT_RAD") {
  field(DESC, "ACC_IN_1")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M9_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M9_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M9_CH00_FILT_RAW") {
  field(DESC, "ACC_IN_1")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[34] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M9_CH00_FILT_ORDER") {
  field(DESC, "ACC_IN_1")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[34] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M9_CH00_FILT_SR") {
  field(DESC, "ACC_IN_1")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[34]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M9_CH00_ALIAS") {
    field(VAL,"ACC:LI21:180:INLETTEMP1")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ACC:LI21:180:INLETTEMP1_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ACC:LI21:180:INLETTEMP1")
  field(INPA, "PLC:LI21:TM01:CR3_M9_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "1.9")
}


#Temperature PV for user
record(ai, "ACC:LI21:180:INLETTEMP1") {
  field(DESC, "ACC_IN_1")
  field(PREC, "1")
  field(INP, "ACC:LI21:180:INLETTEMP1_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "130")
  field(LOLO, "100")
  field(HIGH, "125")
  field(LOW, "110")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ACC:LI21:180:INLETTEMP1_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M9_CH01_RAW") {
  field(DESC, "QUAD_211")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:LI21:211:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[34]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M9_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[34]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M9_CH01_TEMP") {
  field(DESC, "QUAD_211")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:LI21:211:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[34]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M9_CH01_FILT_CUTOFF") {
  field(DESC, "QUAD_211")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M9_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M9_CH01_FILT_RAD") {
  field(DESC, "QUAD_211")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M9_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M9_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M9_CH01_FILT_RAW") {
  field(DESC, "QUAD_211")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[34] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M9_CH01_FILT_ORDER") {
  field(DESC, "QUAD_211")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[34] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M9_CH01_FILT_SR") {
  field(DESC, "QUAD_211")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[34]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M9_CH01_ALIAS") {
    field(VAL,"QUAD:LI21:211:TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "QUAD:LI21:211:TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"QUAD:LI21:211:TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M9_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "QUAD:LI21:211:TEMP") {
  field(DESC, "QUAD_211")
  field(PREC, "1")
  field(INP, "QUAD:LI21:211:TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "QUAD:LI21:211:TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M9_CH02_RAW") {
  field(DESC, "QUAD_271")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:LI21:271:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[34]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M9_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[34]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M9_CH02_TEMP") {
  field(DESC, "QUAD_271")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:LI21:271:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[34]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M9_CH02_FILT_CUTOFF") {
  field(DESC, "QUAD_271")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M9_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M9_CH02_FILT_RAD") {
  field(DESC, "QUAD_271")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M9_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M9_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M9_CH02_FILT_RAW") {
  field(DESC, "QUAD_271")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[34] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M9_CH02_FILT_ORDER") {
  field(DESC, "QUAD_271")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[34] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M9_CH02_FILT_SR") {
  field(DESC, "QUAD_271")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[34]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M9_CH02_ALIAS") {
    field(VAL,"QUAD:LI21:271:TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "QUAD:LI21:271:TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"QUAD:LI21:271:TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M9_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "QUAD:LI21:271:TEMP") {
  field(DESC, "QUAD_271")
  field(PREC, "1")
  field(INP, "QUAD:LI21:271:TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "QUAD:LI21:271:TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M9_CH03_RAW") {
  field(DESC, "QUAD_278")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:LI21:278:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[34]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M9_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[34]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M9_CH03_TEMP") {
  field(DESC, "QUAD_278")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:LI21:278:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[34]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M9_CH03_FILT_CUTOFF") {
  field(DESC, "QUAD_278")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M9_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M9_CH03_FILT_RAD") {
  field(DESC, "QUAD_278")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M9_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M9_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M9_CH03_FILT_RAW") {
  field(DESC, "QUAD_278")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[34] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M9_CH03_FILT_ORDER") {
  field(DESC, "QUAD_278")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[34] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M9_CH03_FILT_SR") {
  field(DESC, "QUAD_278")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[34]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M9_CH03_ALIAS") {
    field(VAL,"QUAD:LI21:278:TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "QUAD:LI21:278:TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"QUAD:LI21:278:TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M9_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "QUAD:LI21:278:TEMP") {
  field(DESC, "QUAD_278")
  field(PREC, "1")
  field(INP, "QUAD:LI21:278:TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "QUAD:LI21:278:TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M10_CH00_RAW") {
  field(DESC, "QUAD_315")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:LI21:315:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[35]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M10_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[35]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M10_CH00_TEMP") {
  field(DESC, "QUAD_315")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:LI21:315:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[35]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M10_CH00_FILT_CUTOFF") {
  field(DESC, "QUAD_315")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M10_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M10_CH00_FILT_RAD") {
  field(DESC, "QUAD_315")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M10_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M10_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M10_CH00_FILT_RAW") {
  field(DESC, "QUAD_315")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[35] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M10_CH00_FILT_ORDER") {
  field(DESC, "QUAD_315")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[35] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M10_CH00_FILT_SR") {
  field(DESC, "QUAD_315")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[35]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M10_CH00_ALIAS") {
    field(VAL,"QUAD:LI21:315:TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "QUAD:LI21:315:TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"QUAD:LI21:315:TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M10_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "QUAD:LI21:315:TEMP") {
  field(DESC, "QUAD_315")
  field(PREC, "1")
  field(INP, "QUAD:LI21:315:TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "QUAD:LI21:315:TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M10_CH01_RAW") {
  field(DESC, "QUAD_335")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:LI21:335:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[35]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M10_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[35]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M10_CH01_TEMP") {
  field(DESC, "QUAD_335")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "QUAD:LI21:335:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[35]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M10_CH01_FILT_CUTOFF") {
  field(DESC, "QUAD_335")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M10_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M10_CH01_FILT_RAD") {
  field(DESC, "QUAD_335")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M10_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M10_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M10_CH01_FILT_RAW") {
  field(DESC, "QUAD_335")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[35] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M10_CH01_FILT_ORDER") {
  field(DESC, "QUAD_335")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[35] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M10_CH01_FILT_SR") {
  field(DESC, "QUAD_335")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[35]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M10_CH01_ALIAS") {
    field(VAL,"QUAD:LI21:335:TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "QUAD:LI21:335:TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"QUAD:LI21:335:TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M10_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "QUAD:LI21:335:TEMP") {
  field(DESC, "QUAD_335")
  field(PREC, "1")
  field(INP, "QUAD:LI21:335:TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "QUAD:LI21:335:TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M10_CH02_RAW") {
  field(DESC, "COLL_235")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "COLL:LI21:235:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[35]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M10_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[35]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M10_CH02_TEMP") {
  field(DESC, "COLL_235")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "COLL:LI21:235:TEMP_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[35]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M10_CH02_FILT_CUTOFF") {
  field(DESC, "COLL_235")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M10_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M10_CH02_FILT_RAD") {
  field(DESC, "COLL_235")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M10_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M10_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M10_CH02_FILT_RAW") {
  field(DESC, "COLL_235")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[35] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M10_CH02_FILT_ORDER") {
  field(DESC, "COLL_235")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[35] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M10_CH02_FILT_SR") {
  field(DESC, "COLL_235")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[35]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M10_CH02_ALIAS") {
    field(VAL,"COLL:LI21:235:TEMP")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "COLL:LI21:235:TEMP_CALC") {
  field(CALC,"A+B")
  field(FLNK,"COLL:LI21:235:TEMP")
  field(INPA, "PLC:LI21:TM01:CR3_M10_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.0")
}


#Temperature PV for user
record(ai, "COLL:LI21:235:TEMP") {
  field(DESC, "COLL_235")
  field(PREC, "1")
  field(INP, "COLL:LI21:235:TEMP_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "115")
  field(LOLO, "70")
  field(HIGH, "110")
  field(LOW, "75")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "COLL:LI21:235:TEMP_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M10_CH03_RAW") {
  field(DESC, "ACC_OUT_1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:OUTLTTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[35]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M10_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[35]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M10_CH03_TEMP") {
  field(DESC, "ACC_OUT_1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:OUTLTTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[35]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M10_CH03_FILT_CUTOFF") {
  field(DESC, "ACC_OUT_1")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M10_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M10_CH03_FILT_RAD") {
  field(DESC, "ACC_OUT_1")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M10_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M10_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M10_CH03_FILT_RAW") {
  field(DESC, "ACC_OUT_1")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[35] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M10_CH03_FILT_ORDER") {
  field(DESC, "ACC_OUT_1")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[35] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M10_CH03_FILT_SR") {
  field(DESC, "ACC_OUT_1")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[35]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M10_CH03_ALIAS") {
    field(VAL,"ACC:LI21:180:OUTLTTEMP1")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ACC:LI21:180:OUTLTTEMP1_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ACC:LI21:180:OUTLTTEMP1")
  field(INPA, "PLC:LI21:TM01:CR3_M10_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.3")
}


#Temperature PV for user
record(ai, "ACC:LI21:180:OUTLTTEMP1") {
  field(DESC, "ACC_OUT_1")
  field(PREC, "1")
  field(INP, "ACC:LI21:180:OUTLTTEMP1_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "130")
  field(LOLO, "100")
  field(HIGH, "125")
  field(LOW, "110")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ACC:LI21:180:OUTLTTEMP1_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M11_CH00_RAW") {
  field(DESC, "ACC_OUT_2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:OUTLTTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[36]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M11_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[36]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M11_CH00_TEMP") {
  field(DESC, "ACC_OUT_2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:OUTLTTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[36]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M11_CH00_FILT_CUTOFF") {
  field(DESC, "ACC_OUT_2")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M11_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M11_CH00_FILT_RAD") {
  field(DESC, "ACC_OUT_2")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M11_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M11_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M11_CH00_FILT_RAW") {
  field(DESC, "ACC_OUT_2")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[36] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M11_CH00_FILT_ORDER") {
  field(DESC, "ACC_OUT_2")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[36] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M11_CH00_FILT_SR") {
  field(DESC, "ACC_OUT_2")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[36]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M11_CH00_ALIAS") {
    field(VAL,"ACC:LI21:180:OUTLTTEMP2")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ACC:LI21:180:OUTLTTEMP2_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ACC:LI21:180:OUTLTTEMP2")
  field(INPA, "PLC:LI21:TM01:CR3_M11_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "2.2")
}


#Temperature PV for user
record(ai, "ACC:LI21:180:OUTLTTEMP2") {
  field(DESC, "ACC_OUT_2")
  field(PREC, "1")
  field(INP, "ACC:LI21:180:OUTLTTEMP2_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "130")
  field(LOLO, "100")
  field(HIGH, "125")
  field(LOW, "110")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ACC:LI21:180:OUTLTTEMP2_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M11_CH01_RAW") {
  field(DESC, "ACC_RIGHT_1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:RIGHTTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[36]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M11_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[36]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M11_CH01_TEMP") {
  field(DESC, "ACC_RIGHT_1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:RIGHTTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[36]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M11_CH01_FILT_CUTOFF") {
  field(DESC, "ACC_RIGHT_1")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M11_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M11_CH01_FILT_RAD") {
  field(DESC, "ACC_RIGHT_1")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M11_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M11_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M11_CH01_FILT_RAW") {
  field(DESC, "ACC_RIGHT_1")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[36] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M11_CH01_FILT_ORDER") {
  field(DESC, "ACC_RIGHT_1")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[36] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M11_CH01_FILT_SR") {
  field(DESC, "ACC_RIGHT_1")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[36]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M11_CH01_ALIAS") {
    field(VAL,"ACC:LI21:180:RIGHTTEMP1")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ACC:LI21:180:RIGHTTEMP1_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ACC:LI21:180:RIGHTTEMP1")
  field(INPA, "PLC:LI21:TM01:CR3_M11_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "3.6")
}


#Temperature PV for user
record(ai, "ACC:LI21:180:RIGHTTEMP1") {
  field(DESC, "ACC_RIGHT_1")
  field(PREC, "1")
  field(INP, "ACC:LI21:180:RIGHTTEMP1_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "130")
  field(LOLO, "100")
  field(HIGH, "125")
  field(LOW, "110")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ACC:LI21:180:RIGHTTEMP1_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M11_CH02_RAW") {
  field(DESC, "ACC_RIGHT_2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:RIGHTTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[36]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M11_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[36]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M11_CH02_TEMP") {
  field(DESC, "ACC_RIGHT_2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:RIGHTTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[36]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M11_CH02_FILT_CUTOFF") {
  field(DESC, "ACC_RIGHT_2")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M11_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M11_CH02_FILT_RAD") {
  field(DESC, "ACC_RIGHT_2")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M11_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M11_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M11_CH02_FILT_RAW") {
  field(DESC, "ACC_RIGHT_2")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[36] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M11_CH02_FILT_ORDER") {
  field(DESC, "ACC_RIGHT_2")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[36] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M11_CH02_FILT_SR") {
  field(DESC, "ACC_RIGHT_2")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[36]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M11_CH02_ALIAS") {
    field(VAL,"ACC:LI21:180:RIGHTTEMP2")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ACC:LI21:180:RIGHTTEMP2_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ACC:LI21:180:RIGHTTEMP2")
  field(INPA, "PLC:LI21:TM01:CR3_M11_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "2.9")
}


#Temperature PV for user
record(ai, "ACC:LI21:180:RIGHTTEMP2") {
  field(DESC, "ACC_RIGHT_2")
  field(PREC, "1")
  field(INP, "ACC:LI21:180:RIGHTTEMP2_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "130")
  field(LOLO, "100")
  field(HIGH, "125")
  field(LOW, "110")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ACC:LI21:180:RIGHTTEMP2_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M11_CH03_RAW") {
  field(DESC, "ACC_RIGHT_3")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:RIGHTTEMP3_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[36]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M11_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[36]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M11_CH03_TEMP") {
  field(DESC, "ACC_RIGHT_3")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:RIGHTTEMP3_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[36]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M11_CH03_FILT_CUTOFF") {
  field(DESC, "ACC_RIGHT_3")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M11_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M11_CH03_FILT_RAD") {
  field(DESC, "ACC_RIGHT_3")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M11_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M11_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M11_CH03_FILT_RAW") {
  field(DESC, "ACC_RIGHT_3")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[36] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M11_CH03_FILT_ORDER") {
  field(DESC, "ACC_RIGHT_3")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[36] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M11_CH03_FILT_SR") {
  field(DESC, "ACC_RIGHT_3")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[36]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M11_CH03_ALIAS") {
    field(VAL,"ACC:LI21:180:RIGHTTEMP3")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ACC:LI21:180:RIGHTTEMP3_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ACC:LI21:180:RIGHTTEMP3")
  field(INPA, "PLC:LI21:TM01:CR3_M11_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "0.2")
}


#Temperature PV for user
record(ai, "ACC:LI21:180:RIGHTTEMP3") {
  field(DESC, "ACC_RIGHT_3")
  field(PREC, "1")
  field(INP, "ACC:LI21:180:RIGHTTEMP3_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "130")
  field(LOLO, "100")
  field(HIGH, "125")
  field(LOW, "110")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ACC:LI21:180:RIGHTTEMP3_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M12_CH00_RAW") {
  field(DESC, "ACC_TOP_1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:TOPTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch00[37]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M12_CH00_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch00[37]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M12_CH00_TEMP") {
  field(DESC, "ACC_TOP_1")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:TOPTEMP1_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch00[37]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M12_CH00_FILT_CUTOFF") {
  field(DESC, "ACC_TOP_1")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M12_CH00_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M12_CH00_FILT_RAD") {
  field(DESC, "ACC_TOP_1")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M12_CH00_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M12_CH00_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M12_CH00_FILT_RAW") {
  field(DESC, "ACC_TOP_1")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch00[37] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M12_CH00_FILT_ORDER") {
  field(DESC, "ACC_TOP_1")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch00[37] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M12_CH00_FILT_SR") {
  field(DESC, "ACC_TOP_1")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch00[37]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M12_CH00_ALIAS") {
    field(VAL,"ACC:LI21:180:TOPTEMP1")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ACC:LI21:180:TOPTEMP1_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ACC:LI21:180:TOPTEMP1")
  field(INPA, "PLC:LI21:TM01:CR3_M12_CH00_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "1.3")
}


#Temperature PV for user
record(ai, "ACC:LI21:180:TOPTEMP1") {
  field(DESC, "ACC_TOP_1")
  field(PREC, "1")
  field(INP, "ACC:LI21:180:TOPTEMP1_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "130")
  field(LOLO, "100")
  field(HIGH, "125")
  field(LOW, "110")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ACC:LI21:180:TOPTEMP1_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M12_CH01_RAW") {
  field(DESC, "ACC_TOP_2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:TOPTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch01[37]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M12_CH01_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch01[37]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M12_CH01_TEMP") {
  field(DESC, "ACC_TOP_2")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:TOPTEMP2_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch01[37]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M12_CH01_FILT_CUTOFF") {
  field(DESC, "ACC_TOP_2")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M12_CH01_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M12_CH01_FILT_RAD") {
  field(DESC, "ACC_TOP_2")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M12_CH01_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M12_CH01_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M12_CH01_FILT_RAW") {
  field(DESC, "ACC_TOP_2")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch01[37] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M12_CH01_FILT_ORDER") {
  field(DESC, "ACC_TOP_2")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch01[37] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M12_CH01_FILT_SR") {
  field(DESC, "ACC_TOP_2")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch01[37]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M12_CH01_ALIAS") {
    field(VAL,"ACC:LI21:180:TOPTEMP2")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ACC:LI21:180:TOPTEMP2_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ACC:LI21:180:TOPTEMP2")
  field(INPA, "PLC:LI21:TM01:CR3_M12_CH01_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "1.1")
}


#Temperature PV for user
record(ai, "ACC:LI21:180:TOPTEMP2") {
  field(DESC, "ACC_TOP_2")
  field(PREC, "1")
  field(INP, "ACC:LI21:180:TOPTEMP2_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "130")
  field(LOLO, "100")
  field(HIGH, "125")
  field(LOW, "110")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ACC:LI21:180:TOPTEMP2_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M12_CH02_RAW") {
  field(DESC, "ACC_TOP_3")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:TOPTEMP3_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch02[37]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M12_CH02_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch02[37]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M12_CH02_TEMP") {
  field(DESC, "ACC_TOP_3")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "ACC:LI21:180:TOPTEMP3_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch02[37]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M12_CH02_FILT_CUTOFF") {
  field(DESC, "ACC_TOP_3")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M12_CH02_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M12_CH02_FILT_RAD") {
  field(DESC, "ACC_TOP_3")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M12_CH02_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M12_CH02_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M12_CH02_FILT_RAW") {
  field(DESC, "ACC_TOP_3")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch02[37] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M12_CH02_FILT_ORDER") {
  field(DESC, "ACC_TOP_3")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch02[37] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M12_CH02_FILT_SR") {
  field(DESC, "ACC_TOP_3")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch02[37]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M12_CH02_ALIAS") {
    field(VAL,"ACC:LI21:180:TOPTEMP3")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "ACC:LI21:180:TOPTEMP3_CALC") {
  field(CALC,"A+B")
  field(FLNK,"ACC:LI21:180:TOPTEMP3")
  field(INPA, "PLC:LI21:TM01:CR3_M12_CH02_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "1.4")
}


#Temperature PV for user
record(ai, "ACC:LI21:180:TOPTEMP3") {
  field(DESC, "ACC_TOP_3")
  field(PREC, "1")
  field(INP, "ACC:LI21:180:TOPTEMP3_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "130")
  field(LOLO, "100")
  field(HIGH, "125")
  field(LOW, "110")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "ACC:LI21:180:TOPTEMP3_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
#
# This template is used to monitor and control data from a 
# 5069-IY4 module that monitors a Thermocouple Sensor
#
# All PLC related data is organized in arrays. Arrays are segmented
# by modules. Each 5069-IY4 module holds 4 thermocouples. Each
# array has a name like 'tm_tc_raw' meaning temperature monitoring
# thermocuple raw value.Then the array as a channel 1-4. The index
# represents the module number combined with the crate number as such
# CR*13 + MODULE So for example tm_tc_raw_ch02[05] Is read as 'Temperature 
# monitoring thermocouple raw value for module 5 channel 2 crate 0.
# 13 is the maximum number of modules per crate. 
# note : slot and module are synonymous

#Holds raw thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M12_CH03_RAW") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC_LI21_TM01:CR3_M12_CH03_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_raw_ch03[37]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Holds thermocouple fault readback
record(bi, "PLC:LI21:TM01:CR3_M12_CH03_FAULT") {
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(INP , "@PLC_LI21_TM01 tm_tc_fault_ch03[37]")
  field(ZNAM, "OK")
  field(ONAM, "FAULT")
  field(ZSV, "NO_ALARM")
  field(OSV, "MAJOR")
}


#Holds filtered thermocouple sensor readback
record(ai, "PLC:LI21:TM01:CR3_M12_CH03_TEMP") {
  field(DESC, "Spare")
  field(SCAN, "1 second")
  field(DTYP, "EtherIP")
  field(FLNK, "PLC_LI21_TM01:CR3_M12_CH03_SPARE_CALC")
  field(INP , "@PLC_LI21_TM01 tm_tc_filt_ch03[37]")
#PLC will read 752 if sensor is physically disconnected
  field(HIGH, "752")
  field(HSV, "INVALID")
}

#Setpoint low pass filter cuttoff frequency in hertz
record(ao, "PLC:LI21:TM01:CR3_M12_CH03_FILT_CUTOFF") {
  field(DESC, "Spare")
  field(EGU, "Hertz")
  field(VAL, "10")
  field(FLNK, "PLC:LI21:TM01:CR3_M12_CH03_FILT_RAD")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}

#Converts to rad/s
record(calcout, "PLC:LI21:TM01:CR3_M12_CH03_FILT_RAD") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(CALC,  "A*B")
# Two pi
  field(INPA,  "PLC:LI21:TM01:CR3_M12_CH03_FILT_CUTOFF")
  field(INPB,  "6.283")
  field(OUT , "PLC:LI21:TM01:CR3_M12_CH03_FILT_RAW PP")
}

# Controls low pass filter cutoff 
record(ao, "PLC:LI21:TM01:CR3_M12_CH03_FILT_RAW") {
  field(DESC, "Spare")
  field(EGU, "Rad/Sec")
  field(DTYP, "EtherIP")
  field(OUT , "@PLC_LI21_TM01 tm_tc_cutoff_ch03[37] FORCE")
}

#Controls low pass filter order
record(ao, "PLC:LI21:TM01:CR3_M12_CH03_FILT_ORDER") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(VAL  , 1)
  field(PINI  , "YES")
  field(OUT , "@PLC_LI21_TM01 tm_tc_order_ch03[37] FORCE")
  info(autosaveFields,"VAL")
}


#Holds the sample rate of the filter
record(ai, "PLC:LI21:TM01:CR3_M12_CH03_FILT_SR") {
  field(DESC, "Spare")
  field(DTYP, "EtherIP")
  field(SCAN, "1 second")
  field(INP , "@PLC_LI21_TM01 tm_tc_period_ch03[37]")
}

#Holds mapping between  PLC channel,slot and alias
record(stringout, "PLC:LI21:TM01:CR3_M12_CH03_ALIAS") {
    field(VAL,"PLC_LI21_TM01:CR3_M12_CH03_SPARE")
    field(PINI,"YES")
}

#Adds offset to match pre-existing CAMAC system
record(calc, "PLC_LI21_TM01:CR3_M12_CH03_SPARE_CALC") {
  field(CALC,"A+B")
  field(FLNK,"PLC_LI21_TM01:CR3_M12_CH03_SPARE")
  field(INPA, "PLC:LI21:TM01:CR3_M12_CH03_TEMP NPP MSI")
  #should not be autosaved for security purposes
  #B should only be changed on new release
  field(INPB, "1.4")
}


#Temperature PV for user
record(ai, "PLC_LI21_TM01:CR3_M12_CH03_SPARE") {
  field(DESC, "Spare")
  field(PREC, "1")
  field(INP, "PLC_LI21_TM01:CR3_M12_CH03_SPARE_CALC NPP MSI")
  field(EGU, "DegF")
  field(HOPR, "150")
  field(LOPR, "50")
  field(HIHI, "130")
  field(LOLO, "100")
  field(HIGH, "125")
  field(LOW, "110")
  field(HHSV, "MAJOR")
  field(LLSV, "MAJOR")
  field(HSV, "MINOR")
  field(LSV, "MINOR")
  field(HYST, ".1")
  field(ADEL, ".001")
  field(MDEL, ".001")
  info(autosaveFields,"LOLO LOW HIGH HIHI")
}

#A description or note from operators about thermocouple
record(stringin, "PLC_LI21_TM01:CR3_M12_CH03_SPARE_DESC") {
  field(DESC, "Additional desc")
  field(VAL, " ")
  field(PINI, "YES")
  info(autosaveFields,"VAL")
}
