Hi John,
Try one of the following two suggestions. First, you can remove DAQmxCreateAIVoltageChan from your task and let DAQmx access the built in CJC directly when setting up your DAQmxCreateAIThrmcplChan function. For this, set it up as follows:
DAQmxCreateAIThrmcplChan(*pTH,"cDAQ3Mod1/ai0","", -100.0, 1000.0,DAQmx_Val_DegC, DAQmx_Val_J_Type_TC, DAQmx_Val_BuiltIn, 0.0,"");
The other way is to take what you have but make a minor modification. Give your first virtual channel a name (in the third parameter) and then reference that name, instead of the physical channel, in the last parameter of your thermocouple channel. For example:
nNIStatus = DAQmxCreateAIVoltageChan(*pTH,"cDAQ3Mod1/_cjtemp","My CJC Value",DAQmx_Val_Cfg_Default,-0.08,0.08,DAQmx_Val_Volts,NULL );
if (CheckNIError(nNIStatus)) return(nNIStatus);
nNIStatus = DAQmxCreateAIThrmcplChan(*pTH,"cDAQ3Mod1/ai0","",-100.0,1000.0,DAQmx_Val_DegC,DAQmx_Val_J_Type_TC,DAQmx_Val_Chan,0.0,"My CJC Value" );
if (CheckNIError(nNIStatus)) return(nNIStatus);
PBear
NI RF