# Spear Thermocouple Type "T" Conversion from Voltage to DegC # The voltage data is read from CAMAC SAM module. # Channel 0-15 16-30 are the thermocouple channels # and the reference channels 16, and 31 are the # reference (ambient) voltage. Channel 15 is the reference # channel for SAM channels 0-14, and channel 31 is teh # reference channel for SAM channels 16-30. # Using reference channel convert thermocouple # voltage to mV. record(calc, "$(NAME)VTc") { field(ASG, "Internal") field(CALC, "C=3?D:A*1000+B") field(INPA, "$(NAME)VRaw.VAL") field(INPB, "$(REF)VCor.VAL") field(INPC, "$(NAME)VRaw.SEVR") field(INPD, "-573.0") field(EGU, "mV") field(PREC, "8") field(FLNK, "$(NAME)Calc") } # Convert mV to degC. record(sub, "$(NAME)Calc") { field(DESC, "$(DESC)") field(INAM, "InitPoly") field(SNAM, "CalcPolySpear") field(INPA, "0E00") field(INPB, "2.592800E1") field(INPC, "-7.602961E-1") field(INPD, "4.637791E-2") field(INPE, "-2.165394E-3") field(INPF, "6.048144E-5") field(INPG, "-7.293422E-7") field(INPL, "$(NAME)VTc.VAL NPP MS") field(PREC, "$(PREC=1)") field(BRSV, "INVALID") field(EGU, "Deg. C") field(FLNK, "$(NAME)") } record(ai, "$(NAME)") { field(DESC, "$(DESC)") field(INP, "$(NAME)Calc NPP MS") field(HIHI, "$(HIHI=45)") field(HIGH, "$(HIGH=35)") field(LOLO, "$(LOLO=0)") field(LOW, "$(LOW=10)") field(HHSV, "$(HHSV=MINOR)") field(HSV, "$(HSV=MAJOR)") field(LSV, "$(LSV=MINOR)") field(LLSV, "$(LLSV=MAJOR)") field(HYST, "$(HYST=0)") field(EGU, "Deg. C") field(PREC, "$(PREC=1)") field(ADEL, ".001") field(MDEL, ".001") field(FLNK, "$(NAME)F") } record(calc, "$(NAME)F") { field(DESC, "$(DESC)") field(CALC, "A*1.8+32") field(INPA, "$(NAME) NPP MS") field(EGU, "Deg. F") field(PREC, "$(PREC=0)") field(FLNK, "$(NAME)_T") } # Spear Conversion Methode for Thermocouple type "T" # The channel _T uses the Spear conversion # funtion written by Clemens on VMS, converted # to an EPICS subroutine "C" function AnalogTcTemp. # However, the function is not currently is not # working, and needs further debugging, and the # LCLS thermocouple conversion is used for similar # thermocouples, to produces a very close result # to the Spear conversion. However, for a comparison # of conversion methods the pv $(NAME)_T is provided. # # Calculate the temperature of the thermocouple # SAM channel. Note that if the Iso-Thermal Plane (INPB) # Is near room temperature, voltages (as read by the SAM) # of -8mV to +22mV reprsentthe full range of a valid # temperature of type "T" thermocouples. # # Input: # A - raw data (SAM Channel 0-14,16-30) # B - raw data lower limit range # C - raw data upper limit range # D - Volate error due to the temp of the ref voltage record(sub, "$(NAME)_T") { field(DESC, "$(DESC)") field(INAM, "InitAnalogCalc") field(SNAM, "AnalogTcTemp") field(INPA, "$(NAME)VRaw") field(INPB, "$(NAME)VRaw.LOW") field(INPC, "$(NAME)VRaw.HIGH") field(INPD, "$(REF)VPlate NPP MS") field(EGU, "Deg. C") field(PREC, "1") field(BRSV, "INVALID") }