From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

cant read thermocouples in CW2.0

I am trying to read thermocouples via SCXI chassis and SCXI 1100 mux. Using
the included thermocouple example with CW 2.0 I noticed that the resulting
temperatures are about 8 degrees too low.

Futher investigation shows that the example does not include binary offset
scaling (via CALGND channel), thus can not possibly be accurate for low
voltage signals like thermocoples. Labview 5.0 had a "scaling constant
tuner.vi" to account for this, but how is this done in CW???

I attempted to read binary values in from CALGND then add them to the raw
binary data from the thermocouple channels, then scale the data to volts
with the CWAIChannel.Scalemultiplier and CWAIChannel.ScaleOffset functions,
but this provided wildy innaccurat
e results.

Where/how do I add CALGND in this scaling function?

Interesting note: there is a function in the NIDAQ test panel (measurement
& automation neighborhood) that allows you to test an individual channel
directly. This too is innacurate for thermocouples until you click the
"advanced" tab then choose "Enable 0 mode Once at start". Once this is
chosen, the measurement becomes accurate. I assume that this provides a
function call to the CALGND channel. Thus NIDAQ supports it, Labview
supports it, but Component Works does not?

-michael annucci
Senior programmer/analyst
University of Florida
mike@energy.ufl.edu
0 Kudos
Message 1 of 2
(3,206 Views)
Much appologies about answering my own post, but I discovered the error.
What I have found:
Reading thermocouples via the method used in the included CW SCXI example
provides highly inaccurate results due to the fact that the CALGND offset
was never incorporated into the results.

To correct the problem you must do the following steps:
1.) Read the coldjunction compensation MTEMPchannel.
2.) Read binaryCodes from the CALGND channel.
3.) Read binaryCodes from the input channels.
4.) Scale the raw thermocouple binary data into channel voltages by using
the following algorithym:
chanVolts = (rawTCbinary * CWAIChannel.ScaleMultiplier)
+(CWAIChannel.ScaleOffset - CalGNDOffset)
5.) Scale chanVolts into temperatures via the DAQTools.ConvertTC function.

NOTE: Make
sure that CWAI.readSpec.ReturnDataType is excplicitly set to
cwBinaryCodes (either in hard code, or property pages of the CWAI control).

its really that easy,
thanks

Michael Annucci
Senior Programmer/Analyst
University of Florida
352-392-3121
mike@energy.ufl.edu
0 Kudos
Message 2 of 2
(3,206 Views)