Data Acquisition (DAQ) and Control from Microstar Laboratories

DAPL Operating System | Processing Command


Convert resistance measurements to the corresponding temperature for an RTD device.




Input resistance values in ohms
Coefficients for polynomial conversion model
Output data pipe, temperatures in degrees Centigrade


The RTD command converts resistance values received from the RIN pipe, using the device model specified by the VMODEL vector, and delivering the corresponding output temperatures in degrees C to the TEMPOUT pipe.

Though their temperature response is almost linear, RTD devices need a nonlinear conversion for full accuracy. The device model is a polynomial curve, with the number of terms required dependent on the material type used to fabricate the RTD. Devices have standardized conversion curves, but actual devices don't always match the standardized curves perfectly. For best accuracy, you can fit a polynomial curve to measured resistance and the corresponding temperatures, thus calibrating your own response curves.

The following conversion characteristic for an RTD device is suitable for wide temperature ranges and a variety of RTD device types.

   R  =  R0 ( 1.0 + c1 T + c2 T2  + c3 T3 ...)

The RTD command supports terms up to order 6. The R0 term corresponds to the nominal resistance of the device at 0 degrees C. For example, a type JPT200 RTD will have a nominal resistance of 200 ohms, and a perfectly manufactured device will have a base resistance R0 exactly equal to 200. The zero-order term of the conversion polynomial is always normalized to 1.0, so it is not stored, and the base resistance value is recorded in that location.

Some curve forms provided by manufacturers and standards bodies will not correspond to the general polynomial form. For these, you will need to adjust the coefficients. An important example is the platinum PT device series. It uses a conversion polynomial of the Callendar - Van Dusen form

   R  =  R0 ( 1.0 + a1 T + a2 T2  + a3(T-100) T3 )

The appropriate conversions to the general polynomial form are:

   c1  =  a1
   c2  =  a2
   c3  =  -100.0 a3
   c4  =  a3

There is an additional complication with standard platinum RTD devices. The IEC751 standard specifies a different polynomial for temperatures below 0 degrees C and above 0 degrees C. To allow for this, and also to allow you to calibrate your own piecewise polynomial curves, the RTD command allows multiple polynomial curve sections. The nominal RTD resistance is the same for all sections. In the second, third, subsequent pieces, the zero order term location is used to store the temperature level above which the evaluation scheme switches to that piece of the composite curve. The additional 6 coefficient terms for that piece follow the temperature break-point level term.

The following table provides coefficients that you can use for typical device types.

Device type c1 c2 c3 c4 c5 c6
Platinum (PT family,

above 0 degrees C

below 0 degrees C












Platinum (JPT family,






(limited range)
5.485e-3 6.6650e-6 0.0 2.805e-11 0.0 0.0
(limited range)
4.270e-3 0.0 0.0 0.0 0.0 0.0

To summarize the layout of the device characteristic vector, the terms are specified in the following sequence.

  1. Initial conversion curve
    1. Base resistance at 0 degrees C
    2. Coefficients c1, c2, c3, c4, c5, c6
      for first piece of conversion curve
  2. Additional sections of the curve, as needed
    1. Temperature above which curve section is used
    2. Coefficients c1, c2, c3, c4, c5, c6
      for this piece of conversion curve

When the operating temperature range is within interval T=0 to T=100 degrees Centigrade, and maximum accuracy is not required, the simplified "alpha coefficient" model is often used. The alpha coefficient is the slope of a straight line that matches the nonlinear conversion curve at the points T=0 and T=100. If you substitute the alpha coefficient for the c1 coefficient in the conversion data, and set all of the other coefficients to zero, the conversion is linear and fast, with maximum conversion error a fraction of a degree near the center of the range. This often is good enough.

For wider temperature ranges, the conversion curves are not in the most useful form. An RTD curve yields resistance given the temperature, so calculating temperature requires evaluation of the inverse characteristic. The evaluation is almost perfect for low-order characteristics and moderate temperature ranges. For devices with significant nonlinearities at temperature extremes, the conversion error is typically better than 0.1 degrees C.


  VECTOR  vPT100POS  FLOAT = ( 100.0, 
      3.9083e-3,   -5.7750e-7,   0.0,         0.0, 
      0.0,  0.0 )

A type PT100 RTD is used, but temperatures never go below 0 degrees C. The characteristic terms for the sub-zero piece of the standard conversion curve are omitted. Otherwise, the conversion curve in vector vPT100POS matches the IEC751 standard for this device type. The nominal 100 ohms base resistance at 0 degrees C is used. When the RTD command executes, measurements of resistance in ohms are obtained from pipe PRESIST. Each resistance value is converted to the corresponding operating temperature of the RTD device by solving the inverse of the device characteristic. The resulting temperatures in degrees C are placed into pipe TEMPR.

  VECTOR  vPT100  FLOAT = (   99.86, 
      3.9083e-3,   -5.7750e-7,   4.1830e-10,  -4.1830e-12, 
      0.0,  0.0,
      3.9083e-3,   -5.7750e-7,   0.0,         0.0, 
      0.0,  0.0 )

The same example, except that temperatures can range both below and above 0 degrees C. The resistance of the RTD device is calibrated by measuring accurately at 0 degrees C, and the observed value 99.86 ohms is specified as the base resistance. The first set of polynomial terms conform to the the IEC751 standard for temperatures below 0.000 degrees. For temperatures above 0.000 degrees, the conversion processing switches over to the second set of terms.

See also: