08-11-2010 09:53 AM
I got a NI USB 9213. The CJC reading is around 0.7 V. How it tranform to degree C or degree F?
I know there is a formula degree C = voltage V *100, but it doesn't make sense here. Where is the problem?
Thanks a lot
Solved! Go to Solution.
08-11-2010 10:33 PM
Hi allofdogs,
The USB-9213's CJC sensor is a thermistor, so DAQmx uses the Steinhart-Hart equation with a specific set of coefficients (and an isothermal offset constant) to convert CJC voltages to temperature.
You can read temperatures from the CJC channel using the "AI temperature built-in sensor" channel type. The shipping example that demonstrates this is called DAQmx Acquire CJC Temperature. Select between Celsius and Fahrenheit using the optional "units" input to the create channel VI.
Brad
08-12-2010 07:39 AM
@Brad K wrote:
Hi allofdogs,
The USB-9213's CJC sensor is a thermistor, so DAQmx uses the Steinhart-Hart equation with a specific set of coefficients (and an isothermal offset constant) to convert CJC voltages to temperature.
You can read temperatures from the CJC channel using the "AI temperature built-in sensor" channel type. The shipping example that demonstrates this is called DAQmx Acquire CJC Temperature. Select between Celsius and Fahrenheit using the optional "units" input to the create channel VI.
Brad
Thanks a lot!
Is there any way to see the explicit expression of this equation with coefficient?
08-12-2010 11:31 AM
Hi allofdogs,
This page from the cRIO manual explains the conversion, albeit for cRIO: Converting NI 9213 Data (FPGA Interface). However, DAQmx returns USB-9213 _cjtemp data in the +/-2.5 V range, so don't multiply by 32.
Note that the isothermal offset constant may be different for different types of chassis (explained in Isothermal Errors and Cold-Junction Compensation (CJC) Data Scaling for the NI 9211E and NI 9219E). The equation in the cRIO manual subtracts 1 degree C to account for isothermal offset, but on the USB-9213 you should subtract 0.45 degrees C.
This should leave you with:
Calculate the resistance of the thermistor:
RT = (10000 × CJC Data) ÷ (2.5 – CJC Data)
Calculate the CJC temperature:
T = [ 1 ÷ [A + B(ln(RT)) + C(ln(RT))3]] – 273.15 – 0.45
where | T = temperature in °C |
A = 1.2873851 × 10-3 | |
B = 2.3575235 × 10-4 | |
C = 9.4978060 × 10-8 |
Brad
08-12-2010 11:54 AM
This is great
Thank you very much, brad!
12-05-2011 04:40 PM
Hello,
may I ask you if you can be little bit more specific how exactly you are read CJC temperature?
I am having also NI 9213 in USB chassis and I need to know temperature measured by CJC. I understand how to convert voltage to temp, but I am missing how to get that voltage. From the example posted above I am definitely not smart and I do not understand how to create analog input channel, how to name it etc...
Thanks for reply
Lubos
12-06-2011 10:10 AM
Lubos,
Can you open up Measurement and Automation explorer and see if your device is listed? What sleeve are you using with the 9213?
You should be able to open the example click on the CJC channel and pick whichever channel your CJC is connected to from the drop down box. The example will run once and should output the temperature data.
12-07-2011 04:15 AM
Hello,
Yes, I see the measuring card in MAX listed and I can also take regular measurement with it using DAQ assistant.
As a sleeve for my NI 9213 I am using NI USB 9162.
But when I am trying to run that mentioned example, I got an error (print screen is attached) from subVI DAQmx Create Virtual Channel.vi and I don´t know how to fix this.
thanks for reply Lubos
12-07-2011 05:01 AM
The previous "problem" is solved... Firstly i picked in DAQmx Create Virtual Channel.vi the wrong iterm (I was trying to meassure voltage). Now I changed the selection to Analog input -> More -> Built in Temperature sensor and the whole exampel is running. So sorry for the previous question.
But I unfortunately have one more thing to ask:
The whole equipment is in a room with temperature 21°C, but the value that I am getting from built in cold junction sensor is around 26°C. Do I have to recalculate the final value somehow or why is the obtained temperature so different from the real one?
Thanks Lubos
12-07-2011 01:25 PM
The onboard temperature should be the internal temperature of the cDAQ device. With all the electronic circuits I would expect the devices temperature to be greater the ambient room temperature. If you are wanting to measure ambient temperature try hooking up an external thermocouple to one of the analog channels. Then select Analog Input, Temperature, Thermocouple. You'll have to recreate the constants leading into he create channel vi as the inputs will change. You'll also have to specify the type of thermocouple.
You can also browse in the Find Examples windows go to Hardware Input and Output>>DAQmx>>Analog Measurements>>Temperature>>Acq Thermocouple Sample.vi. It will already be set up for you.
Please don't hesitate to ask if you have more questions.