LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use the CJC channel with 9211 in labview?

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

0 Kudos
Message 1 of 8
(5,547 Views)

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

---
Brad Keryan
NI R&D
0 Kudos
Message 2 of 8
(5,535 Views)

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.

 

0 Kudos
Message 3 of 8
(5,518 Views)

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

Message Edited by Brad K on 02-26-2010 10:31 AM
---
Brad Keryan
NI R&D
0 Kudos
Message 4 of 8
(5,515 Views)

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?

0 Kudos
Message 5 of 8
(5,506 Views)

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:

  • If you can get a DAQmx global virtual channel to return the temperature of the cold junction (the temperature of the NI 9211's connector), then you can use the example VI you posted with CJC Source set to Channel. Creating a custom scale might help with this.
  • Otherwise, you can acquire from the NI 9211 using a voltage channel instead of a thermocouple channel and do all of the scaling yourself. Look at any of the examples in DAQmx\Analog In\Measure Slow Varying Signal.llb or DAQmx\Analog In\Measure Voltage.llb to see how to create a voltage channel. Convert Thermocouple Reading.vi in the Numeric > Scaling palette might be a good starting point for the scaling code.

 

Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 6 of 8
(5,489 Views)

Ok, so im going to try the first option with the virtual channel.

What should be the CJC Source for that virtual channel?

0 Kudos
Message 7 of 8
(5,473 Views)

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.

0 Kudos
Message 8 of 8
(5,449 Views)