#
# Shantha Condamoor:
#
# Caen V965 Charge Integrating ADC (QDC)
# While IP330 signals are temporarily disconnected:
#
# Map the TORO:LTU*:*:CHRG PV to caen QDCRAW
# Map TORO:LTU*:*:TMIT PV to caen QDCRAW with the nC to Nel mapping being the elementary charge 1.60217657e-10 nC/Nel.
# So TMIT in Nel = (CHRG in nC) * (1/elementary charge) = (CHRG) * (1/1.60217657e-10) = (CHRG) * 6241509323.78196
# Set the TMIT multiplier to (6.2415093246e+09) through the ASLO field
#
# Converted Data for TMIT readings in Nel
#
# This is a stop-gap solution as TMIT values are needed by some high lavel matlab scripts
#

record( ai, "$(device):TMIT")
{
	field( DESC, "Charge")
	field( ASG,  "$(asg)")
	field( EGU,	 "Nel")
	field( PINI, "YES")
	field( INP, "$(device):CHRG NPP MS")
	field( LINR, "NO CONVERSION")
	field( ASLO, "6.2415093246e+09")
	field( TSE,  "-1")
	field( HIHI,  "7.4904E9")
	field( HIGH,  "6.8662E9")
	field( LOW,   "-0.12484E9")
	field( LOLO,  "-0.2081E9")
	field( FLNK, "$(device):FANOUT")		
}

record(fanout, "$(device):FANOUT")
{
    field(DESC, "Fanout for BSA PVs")
    field(SELN, "2")
	field(SELM, "All")
	field(LNK1, "$(lnk1)")
	field(LNK2, "$(lnk2)")
}
