# # 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:${LOCA}:${UNIT}:CR$(CR)_M${SLOT}_CH$(CHAN)_RAW") { field(DESC, "${DESC}") field(SCAN, "1 second") field(DTYP, "EtherIP") field(FLNK, "${ALIAS}_CALC") field(INP , "@$(PLC) tm_tc_raw_ch$(CHAN)[$(INDEX)]") #PLC will read 752 if sensor is physically disconnected field(HIGH, "752") field(HSV, "INVALID") } #Holds thermocouple fault readback record(bi, "PLC:${LOCA}:${UNIT}:CR$(CR)_M${SLOT}_CH${CHAN}_FAULT") { field(SCAN, "1 second") field(DTYP, "EtherIP") field(INP , "@$(PLC) tm_tc_fault_ch$(CHAN)[$(INDEX)]") field(ZNAM, "OK") field(ONAM, "FAULT") field(ZSV, "NO_ALARM") field(OSV, "MAJOR") } #Holds filtered thermocouple sensor readback record(ai, "PLC:${LOCA}:${UNIT}:CR$(CR)_M${SLOT}_CH${CHAN}_TEMP") { field(DESC, "${DESC}") field(SCAN, "1 second") field(DTYP, "EtherIP") field(FLNK, "${ALIAS}_CALC") field(INP , "@$(PLC) tm_tc_filt_ch$(CHAN)[$(INDEX)]") #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:${LOCA}:${UNIT}:CR$(CR)_M${SLOT}_CH${CHAN}_FILT_CUTOFF") { field(DESC, "${DESC}") field(EGU, "Hertz") field(VAL, "10") field(FLNK, "PLC:${LOCA}:${UNIT}:CR$(CR)_M${SLOT}_CH${CHAN}_FILT_RAD") field(PINI, "YES") info(autosaveFields,"VAL") } #Converts to rad/s record(calcout, "PLC:${LOCA}:${UNIT}:CR$(CR)_M${SLOT}_CH${CHAN}_FILT_RAD") { field(DESC, "${DESC}") field(EGU, "Rad/Sec") field(CALC, "A*B") # Two pi field(INPA, "PLC:${LOCA}:${UNIT}:CR$(CR)_M${SLOT}_CH${CHAN}_FILT_CUTOFF") field(INPB, "6.283") field(OUT , "PLC:${LOCA}:${UNIT}:CR$(CR)_M${SLOT}_CH${CHAN}_FILT_RAW PP") } # Controls low pass filter cutoff record(ao, "PLC:${LOCA}:${UNIT}:CR$(CR)_M${SLOT}_CH${CHAN}_FILT_RAW") { field(DESC, "${DESC}") field(EGU, "Rad/Sec") field(DTYP, "EtherIP") field(OUT , "@$(PLC) tm_tc_cutoff_ch$(CHAN)[$(INDEX)] FORCE") } #Controls low pass filter order record(ao, "PLC:${LOCA}:${UNIT}:CR$(CR)_M${SLOT}_CH${CHAN}_FILT_ORDER") { field(DESC, "${DESC}") field(DTYP, "EtherIP") field(VAL , 1) field(PINI , "YES") field(OUT , "@$(PLC) tm_tc_order_ch$(CHAN)[$(INDEX)] FORCE") info(autosaveFields,"VAL") } #Holds the sample rate of the filter record(ai, "PLC:${LOCA}:${UNIT}:CR$(CR)_M${SLOT}_CH${CHAN}_FILT_SR") { field(DESC, "${DESC}") field(DTYP, "EtherIP") field(SCAN, "1 second") field(INP , "@$(PLC) tm_tc_period_ch$(CHAN)[$(INDEX)]") } #Holds mapping between PLC channel,slot and alias record(stringout, "PLC:${LOCA}:${UNIT}:CR$(CR)_M${SLOT}_CH${CHAN}_ALIAS") { field(VAL,"$(ALIAS)") field(PINI,"YES") } #Adds offset to match pre-existing CAMAC system record(calc, "$(ALIAS)_CALC") { field(CALC,"A+B") field(FLNK,"$(ALIAS)") field(INPA, "PLC:${LOCA}:${UNIT}:CR$(CR)_M${SLOT}_CH${CHAN}_TEMP NPP MSI") #should not be autosaved for security purposes #B should only be changed on new release field(INPB, "$(OFF)") } #Temperature PV for user record(ai, "${ALIAS}") { field(DESC, "${DESC}") field(PREC, "1") field(INP, "${ALIAS}_CALC NPP MSI") field(EGU, "$(EGU)") field(HOPR, "$(H)") field(LOPR, "$(L)") field(HIHI, "$(HH)") field(LOLO, "$(LL)") field(HIGH, "$(HI)") field(LOW, "$(LO)") field(HHSV, "MAJOR") field(LLSV, "MAJOR") field(HSV, "MINOR") field(LSV, "MINOR") field(HYST, "$(HY)") field(ADEL, "$(AD)") field(MDEL, "$(MD)") info(autosaveFields,"LOLO LOW HIGH HIHI") } #A description or note from operators about thermocouple record(stringin, "$(ALIAS)_DESC") { field(DESC, "Additional desc") field(VAL, " ") field(PINI, "YES") info(autosaveFields,"VAL") }