TemperatureLAB Version
2.1
(c) 10/1999 James
D. Purdy
DESCRIPTION
TemperatureLAB
is a library written for the HP-48 series
calculator to perform temperature measurement
and calibration calculations using
NTC thermistors and 100 Ohm Platinum RTD's.
It is based on industry standard Hart-Stienhart
and second-order Callendar equations for conversion
of temperature and resistance values.
There are two conversion programs, one for RTD's
and one for thermistors, along with common
supporting utilities.
TemperatureLAB
is written in SysRPL and does not contain any machine-spacific calls,
so it will be compatible with most HP's.
TemperatureLAB
allows the user to easily perform the following functions:
-
Convert between temperature and resistance for NTC
(negative temperature coefficient) thermistors and RTD's.
The conversion is automatic if units of
ohms or Deg C are given. The user may select the direction
of conversion
and omit the units; however,
the conversion is always done in the
appropriate direction if units are specified.
-
Produce calibration tables for each device give a
start value, in ohms or degrees C, and an increment value.
This function may be useful if multiple conversions
are necessary or values close to a measurement point are desired.
The user may jump to a value or change the increment
value while running this program.
-
Enter and/or edit the equation constants for
each conversion program. This allows the user
the flexibility to use instruments which are supplied
with calibration constants.
-
Curve fit calibration data given several known temperature
resistance pairs. These are supplied in the form of a matrix
and the required constants for the conversion
equations are calculated and stored.
FILES IN
THIS LIBRARY
TemperatureLAB
is supplied in two configurations.
The library TLAB has all of the
features listed above and
is about 5k. TLABlt contains the convertor programs
but not the Temperature
Table program TBL. This library is about 3k.
There ia a data directory
TLAB.DIR with two sub directories DATA and CONS.
DATA contains
several data sets so that
the curve fitting program may be examined. CONS
contains
constant files which correspond
to ASTM standard thermistors and the ITS-90 standard RTD.
INSTALLATION
and Startup
-
Download the library into the
HP using KERMIT or HP Explorer.
-
Store the library in any port.
-
Delete the downloaded library
.
-
Cycle the power to the calculator.
-
More detailed installation instruction
may be found here. Installation
-
Before the conversion programs will run correctly,
constants must be entered.
-
A default and set of constants is stored in the correct
variables by running >TCON and
>RCON as described
below.
-
The variables are stored in
the current directory.
COMMANDS AND THEIR USE
THERM
converts between temperature and resistance
for NTC thermistors.
Enter the value to be converted on the stack in
x and run the program. The output is
given the degrees C or ohms depending on the conversion
direction or supplied input.
Values given with units of ohms or degrees C will
always be automatically converted.
Example:
1245 THERM ---> 50_C ( if THERM is
set for Resistance to Temperature )
50_C THERM ---> 1245_ohms ( regardless of how THERM is
set )
Remember, values units of will always
be automatically converted the appropriate direction.
>TCON
allows entry and/or editing of the constants for the conversion equations
for THERM.
The constants are stored in the variable tcons.
This variable is a list containing the constants
in this order { A B C D a b c d } , refer to the
references for a description of these constants.
This program should be run after installation
to create a constants file.
While running this program,
you are prompted with two screens containing four
constants each. You must accept both screens to
store the constants. In other words,
if you cancel either of the screens the constants will not be stored.
The default values stored by
>TCON are usable for many devices. Also, the
data files (cons) supplied
may be copied
into tcons to allow THERM
to conform to the device curves.
To reinitialize the equations,
in the event that an error was accepted, simply
erase the tcons file and re-run this program.
RTD
converts between temperature and resistance for PT RTD's. Enter the
value to be converted
on the stack in x and run the program.
The output is given the degrees C or ohms depending
on the
conversion direction or supplied input.
This program works the same as THERM -- if units are
supplied, the conversion is done regardless of
the direction setting.
>RCON
allows entry and/or editing of the constants for the conversion equations
for RTD.
The constants are stored in the variable rcons.
This variable is a list containing the constants
in this order { R0 a b } , refer to the reference
files for a description of these constants.
This program should be run after installation
to create a constants file. The default values
stored are usable for most RTD's.
FIT
performs a least squares curve fit
on a supplied data set in order to calculate the equation constants.
This data set must be in
the form of a two-column matrix. FIT requires at least four points
to curve fit the THERM
data and will calculate all eight constants.
RTD needs three or more points. Fit will calculate a value for R0
if a value at 0 degrees
is not given. In general, the data
points should be evenly spaced and include the range to be calibrated.
To run this program, enter a data set on the stack
in X and run FIT. Next, you are prompted for the equation
to fit
for either thermistor or RTD. Finally,
the respective editing program is run either >TCON or >RCON
to allow access
to the constants. Several data sets
are supplied in the DATA directory for example runs.
R<->T
allows the default the conversion direction for THERM
and RTD to be set.
The conversion
direction of each program can be toggled by pressing
the appropriate key. Setting
the conversion direction allow the you to
enter and convert data quickly without specifying
units. As mentioned previously, data specified with a unit
of Ohms or Degrees C will be
converted appropriately regardless of this setting.
TBL
generates a table of values for the specified
device. TBL
will
prompt for the conversion program, direction
, start
value and increment. A data table
is then produced form these specifications.
This program uses several softkeys to perform
various functions they are as follows:
Up
and Down arrow menu keys increment or decrement the table by one
value.
PGup and PGdn increment or decrement 6 lines at a time.
JMP
allows entry of a new start value . The current increment is
used.
INC allows entry of a new increment
value. The lowest value (top line)
displayed is kept
and a new screen of values is produced using the
new increment number.
When a continually smaller increment is
specified, it has the effect of "magnifying" the scale so
finer changes in the
input/output relationship may be seen.
The MTH key resets the table to the specified start value after
extensive paging has been done.
ENTER and ON/Cancel exit the program.
Note: TBL does not round its
calculations; therefore, the display should be set for 3 to 4 digits
after the decimal place to insure proper display.
REFERENCES
and BACKGROUND INFORMATION
The
equations used in this program were taken from the following standards:
ASTM E 879-93 Standard
Specification for Thermistor Sensors for Clinical Laboratory Temperature
Measurements
ASTM E 1137-97 Standard
Specification for Industrial Platinum Resistance Thermometers.
These standards may be
obtained through the American Society of Testing and Materials
ASTM
A very Informative group of papers regarding resistance
thermometry can be found at ITS-90
PAPERS
which is part of the International
Temperature Scale website.
In addition, detailed information on thermistors
and RTD's and related instrumentation can be obtained at Omega
Please send comments or questions to me:
Jim Purdy
jpurdy@home.com