02-25-2010 08:43 AM
Hello there,
I have cDAQ-9172 with the 9211 module for some thermocouple measures.
I want to use 1 channel for the CJC and the others for normal teperature measurements.
I have the VI attached.
Thanks,
Sandro
02-25-2010 06:38 PM
Hi Sandro,
By "I want to use 1 channel for the CJC", are you talking about using the NI 9211's built-in CJC channel, _cjtemp?
If so, go back to the original example code and set the CJC Source control to Built-In. This will cause DAQmx to use _cjtemp as the CJC source. You won't see the CJC temperature on the graph by default: Reading the CJC Values with the Thermocouple Measurements.
If you have an external CJC sensor connected to one of the thermocouple channels (ai0:3), then create a global channel in MAX (thermistor, or voltage w/custom scale), specify the name of that channel in the CJC Channel control, and set CJC Source to Channel. It's better to use the built-in CJC sensor unless the external CJC sensor is definitely more accurate, and not less.
Regarding the Start button you added to the example VI, I would recommend moving the call to DAQmx Create Channel out of the polling loop so that it doesn't leak memory by creating DAQmx tasks that never get used. Adding a call to Wait Until Next ms Multiple (from the Timing palette) or Wait For Front Panel Activity (from the Dialog & User Interface palette) would prevent the polling loop from wasting CPU cycles.
Brad
02-26-2010 10:02 AM
Hello,
Thanks for the reply, i correct the loop, didnt know about that.
About the CJC, i have a thermocouple to use it in ice, so i was thinking about using the channel 0 of the 9211 for the ice, all others (1-3) to do the measurements.
So i created a virtual channel in MAX using the AI0, leave the CJC source in "built-in" (not sure if thats ok) then i created a task to read the other channels and put CJC source => channel => CJC (name of the virtual channel).
Im using only channels 0 and 1 for now, no thermocouple in 2 and 3.
The result is, the measurement in channel 1 is the same as the CJC, channel 0. channel 1 was on my hand, channel 0 was on ice.
Its possible to use only the 9211 to set the CJC and get the data? how?
Thanks again.
02-26-2010 10:26 AM - edited 02-26-2010 10:31 AM
Hi Sandro,
When you plug a thermocouple into the NI 9211, two thermocouple junctions are formed. The "hot" junction is at the end of the thermcouple probe (where the two wires meet), and the "cold" junction is where the thermocouple wires plug into the NI 9211. When DAQmx compensates for the error introduced by the cold junction, it does so by measuring the temperature of the cold junction on the NI 9211's connector using a thermistor, not by measuring the temperature of an ice bath. Taking Thermocouple Temperature Measurements explains this in more detail.
You may be able to compensate for the cold junction temperature on the module by using a second thermocouple in an ice bath, but I suspect that you'll have to use DAQmx AI Voltage channels and do the scaling in your application, because this is not how DAQmx and the NI 9211 are designed to handle CJC.
Brad
02-26-2010 11:29 AM
That was fast.
So to build my system (1 CJC + 3 mesurements) i shoud use only a normal AI module and work on the software to adjust the data?
02-26-2010 07:40 PM
The recommended approach is to plug (up to) 4 thermocouples into the NI 9211 and use the built-in CJC. This way, you don't need to use an ice bath and you don't use up one of the device's thermocouple channels doing cold junction compensation.
If you must use an ice bath instead of the NI 9211's built-in CJC, it will require more work, but you can still use the NI 9211. You don't need a different AI module:
Brad
03-02-2010 12:33 PM
Ok, so im going to try the first option with the virtual channel.
What should be the CJC Source for that virtual channel?
03-03-2010 08:30 AM
Ignore last post. I got it wrong.
I will try to use the 9211 as AI module and see what happens, thanks for the tip.