LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

unscale and scale thermocouple signals

Solved!
Go to solution

Hi all,

I haven't used MAX in a while, and when I did some time ago, I mistakenly only configured the first channel of a task correctly (assuming that I was configuring the entire task,dispite of past knowledge). So I made some measurements with ch0 having a correct type K thermocouple and another 3 channels being scaled as type-J thermocouples.Sigh..

If it isn't too arduous, I would like to attempt to correct those signals. I would have to remove the type J scaling to get back to mV, and then apply a type K scaling. I opportunistically asked chatGPT to provide me with the formulas to do so, but it didn't come up with the expected output. Anyone know of a better way to do this? I was hoping to find some VIs that could do this.

 

Thank you for your suggestions!

Aart-Jan

0 Kudos
Message 1 of 7
(161 Views)

Hi aartjan,

 


@aartjan wrote:

Thank you for your suggestions!


You could use two lookup tables (LUTs) to do your task. Both should list the voltage vs temperature values, one for TC-K and one for TC-J.

  1. Use one LUT for TC-J to convert the given temperature value back to voltage
  2. Use the 2nd LUT for TC-K to convert the voltage into the temperature…

(You will find such LUTs when searching for TC specs from common sensor suppliers.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(158 Views)
Solution
Accepted by topic author aartjan

The scaling is typically a higher order polynomial. The inverse function to undo a higher order polynomial is a bit more tricky, but since this is a nice function (no peaks an valleys), a simple newton method of the forward function would probably converge almost immediately. Still, both directions can be approximated directly, as done in the tools mentioned below.

 

Since you posted in the LabVIEW forum without mentioning LabVIEW, I assume that you are looking for a LabVIEW solution.

You can find the coefficients for the various calibrations and temperature ranges in subVIs use in the "convert thermocouple reading.vi" tool (mathematics-numeric-scaling palette) for both the forward (V to T) and inverse problem (T to V).

 

 

Here's the T to V for type J

 

altenbach_1-1741365874133.png

 

 

.And here's the V to T conversion, also for Type J

 

altenbach_2-1741365987659.png

 

(You can just use these subVIs directly, even if they are not exposed in the palettes(?). Of course I would probably just use an array of coefficient and polynomial evaluation instead of deep stacks of case structures with formula nodes. I assume this code is ancient!)

 

 

Message 3 of 7
(103 Views)

That VI was really what I was looking for. Thank you both for the solutions! 

Shame I had not found the VI earlier. I built an LUT solution yesterday. I have just confirmed that both solutions roughly match each other, which is plenty accurate for this particular measurement.

 

Using the LUT solution, I was able to use the type-T LUT provided by the thermocouple distributor. But it made me wonder what scaling is exactly used in the DAQmx for type-J. What LUT to use to mimic the type-J scaling in DAQmx? I guess it uses the polynomic function from the VI

0 Kudos
Message 4 of 7
(68 Views)

Hi Jan,

 


@aartjan wrote:

What LUT to use to mimic the type-J scaling in DAQmx?


This, that or even that

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 7
(51 Views)

I was mostly wondering actually what scaling is used in a thermocouple task inside MAX. That is what I needed to accurately calculate back to mV. chatGPT gives me this:

aartjan_0-1741460605985.png

 

Anyway. This is now just out of curiosity. I am satisfied with the conversion I have now.

 

0 Kudos
Message 6 of 7
(45 Views)

I am sure NI uses the standard NIST coefficients for an 8th order polynomial, but the actual coefficient cannot be downloaded form the NIST site at the moment (DOGE cost cutting??? 😮 ).

0 Kudos
Message 7 of 7
(40 Views)