record(ai, "MODU:$(MICRO,undefined):$(CRAT,undefined)$(SLOT,undefined):CH$(CHAN,undefined)") { field(DESC, "$(NAME,undefined)") field(DTYP, "SAM") field(SCAN, "1 second") field(INP, "#B0 C$(CRAT,undefined) N$(SLOT,undefined) F17 A$(CHAN,undefined)@DATA") field(EGU, "V") field(PREC, "8") field(ADEL, ".0001") field(HOPR, "10") field(LOPR, "-10") field(PINI, "YES") field(FLNK, "$(NAME,undefined)VRaw") # field(SDIS, "MODU:$(MICRO,undefined):$(CRAT,undefined)$(SLOT,undefined):STATUS NPP") } record(ai, "$(NAME,undefined)VRaw") { field(DESC, "SAM Card $(SLOT,undefined) Ch $(CHAN,undefined)") field(INP, "MODU:$(MICRO,undefined):$(CRAT,undefined)$(SLOT,undefined):CH$(CHAN,undefined)") field(PREC, "8") field(EGU, "V") field(HOPR, "10") field(LOPR, "-10") field(LOW, "-0.008") field(HIGH, "0.022") field(HSV, "INVALID") field(LSV, "INVALID") field(HYST, "0") field(ADEL, "0.0001") field(MDEL, "0") field(SIOL, "$(NAME,undefined)SimVRaw") field(SIML, "$(NAME,undefined)Sim") field(FLNK, "$(NAME,undefined)VTc") } # Simulation PVs record(ai, "$(NAME,undefined)SimVRaw") { field(DESC,"Simulatated Raw Volts") field(PINI, "YES") } record(bo, "$(NAME,undefined)Sim") { field(DESC, "Simulation Mode") field(PINI, "YES") field(ZNAM, "Off") field(ONAM, "On") } # Information PVs # from the Spear EPICS application # EtherIoc/etherIocApp/tempInfo.db # record (stringout,"$(NAME,undefined)Desc") { field(DESC, "Description") field(VAL, "$(DESC,undefined)") field(PINI, "YES") } record (stringout,"$(NAME,undefined)RLoc") { field(DESC, "Reference Location") field(VAL, "$(RLOC,undefined)") field(PINI, "YES") } record (stringout,"$(NAME,undefined)TCDwg") { field(DESC, "Thermocouple Drawing") field(VAL, "$(DWG,undefined)") field(PINI, "YES") } # 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,undefined)VTc") { field(ASG, "Internal") field(CALC, "C=3?D:A*1000+B") field(INPA, "$(NAME,undefined)VRaw.VAL") field(INPB, "$(REF,undefined)VCor.VAL") field(INPC, "$(NAME,undefined)VRaw.SEVR") field(INPD, "-573.0") field(EGU, "mV") field(PREC, "8") field(FLNK, "$(NAME,undefined)Calc") } # Convert mV to degC. record(sub, "$(NAME,undefined)Calc") { field(DESC, "$(DESC,undefined)") 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,undefined)VTc.VAL NPP MS") field(PREC, "1") field(BRSV, "INVALID") field(EGU, "Deg. C") field(FLNK, "$(NAME,undefined)") } record(ai, "$(NAME,undefined)") { field(DESC, "$(DESC,undefined)") field(INP, "$(NAME,undefined)Calc NPP MS") field(HIHI, "45") field(HIGH, "35") field(LOLO, "0") field(LOW, "10") field(HHSV, "MINOR") field(HSV, "MAJOR") field(LSV, "MINOR") field(LLSV, "MAJOR") field(HYST, "0") field(EGU, "Deg. C") field(PREC, "1") field(ADEL, ".001") field(MDEL, ".001") field(FLNK, "$(NAME,undefined)F") } record(calc, "$(NAME,undefined)F") { field(DESC, "$(DESC,undefined)") field(CALC, "A*1.8+32") field(INPA, "$(NAME,undefined) NPP MS") field(EGU, "Deg. F") field(PREC, "0") field(FLNK, "$(NAME,undefined)_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,undefined)_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,undefined)_T") { field(DESC, "$(DESC,undefined)") field(INAM, "InitAnalogCalc") field(SNAM, "AnalogTcTemp") field(INPA, "$(NAME,undefined)VRaw") field(INPB, "$(NAME,undefined)VRaw.LOW") field(INPC, "$(NAME,undefined)VRaw.HIGH") field(INPD, "$(REF,undefined)VPlate NPP MS") field(EGU, "Deg. C") field(PREC, "1") field(BRSV, "INVALID") }