MODEL 20B
              THERMOCOUPLE THERMOMETER

                                             LAWSON LABS, INC.
                                             3217 Phoenixville Pike 
                                             Malvern, PA 19355

                                               610 725-8800
                                                    or
                                               800 321-5355

Rev. D

                       TABLE OF CONTENTS

INTRODUCTION                                        Page 2

1.  INTERCONNECTIONS                                Page 3

2.  CONNECTING THERMOCOUPLES                        Page 4

3.  OPERATION                                       Page 5

4.  USING MULTIPLE MODEL 20Bs                       Page 10

5.  THERMOCOUPLE BASICS                             Page 12

6.  TROUBLESHOOTING                                 Page 13

7.  INPUT CODE SUMMARY                              Page 14

8.  INTERNAL ADJUSTMENT & CALIBRATION               Page 14

9.  SPECIFICATIONS                                  Page 15

WARRANTY                                            Page 16

INTRODUCTION

     The Lawson Labs Model 20B Thermocouple Thermometer, in
combination with any Lawson Labs precision A/D card, allows a
personal computer to be used as a multi-channel thermometer.

     Thermocouples are sturdy, accurate temperature sensors
suited for a wide variety of applications. Low-cost thermocouples
are available for measuring temperatures from well below zero to
about 1370 degrees Centigrade (2500 degrees Fahrenheit). The
Model 20B takes advantage of the flexibility of the host computer
to obtain high accuracy at minimum cost. Despite the low per
channel cost, the Model 20B delivers highly accurate and stable
data when properly applied.

     Thermocouples are differential temperature sensors; that is,
their output is a measure of the difference in temperature
between the measuring end, called the hot junction, and the
instrument end, called the cold junction. In order to determine
the hot junction temperature, the temperature of the cold
junction must be known. The Model 20B uses a solid-state
temperature sensor which is cast into the same thermally
conductive mass that contains the cold junction terminals. This
arrangement provides maximum convenience while minimizing cold
junction compensation errors. In addition, different thermocouple
types can be attached to the same cold junction block.

     By adjusting for thermocouple type and correcting for
thermocouple non-linearity in software, the circuitry needed can
be substantially simplified and standardized. Lawson Labs
provides, at no extra cost, linearization programs for
thermocouple types J, K, T, and E. Each program will reduce
linearity errors to 0.5 degrees Centigrade maximum. (More precise
linearization programs, and programs for other thermocouple
types, are also available from Lawson Labs.) A complete 1 degree
Centigrade accuracy, 0.1 degree resolution thermometer program,
written in BASIC, is provided.

     The inputs to the Model 20B are protected against transient
overvoltages of up to 120 volts or 65 volts continuous.

     Four Model 20Bs can be used with one Model 134 or Model 140
A/D card. Two Model 20Bs can be used with one Model 141 A/D card.
Systems up to 512 channels can be assembled using Model 66
Expansion modules. Much larger systems are possible. Contact the
factory for details.

SECTION 1.    INTERCONNECTIONS

     Seven wires will be needed to connect the Model 20B to the
A/D card. See the appropriate section in the A/D card's manual
for pin locations. The interconnecting wire can be of any
general-purpose type. We strongly recommend shielded wire for all
connections. Small diameters and long lengths of wire will not
interfere with system function except in extreme cases. For
example, 250 feet of 26AWG shielded wire will not significantly
affect the system. The "+" output should connect to one of the
plus input pins on the A/D's connector and the "-" output should
connect to the corresponding minus input at the A/D card. The
examples in this manual assume the first Model 20B is connected
to input #0. If another input is used, the control codes should
be adjusted as described in the A/D manual. The ground terminal
(GND) on the Model 20B should be connected to chassis ground at
the computer.

WARNING: Use a cover-securing screw (without paint) for chassis
ground.

     On some portable computers, no metal chassis contact is
accessible. In that case, use the center screw of the power
outlet as ground. We do not recommend using the ground pin on the
A/D card connector instead of chassis ground because it is
possible that under certain catastrophic conditions the ground
current might be large enough to cause damage to the computer.

     The control inputs to the Model 20B should now be connected
to the isolated control output lines on the A/D card connector.
Input A is connected to output A on the A/D, input B is connected
to output B on the A/D, and input C is connected to output C on
the A/D card. Connect the Guard pin on the A/D card connector to
the GND terminal on the Model 20B.

NOTE: There should now be two separate wires from the computer
connected to the GND terminal of the Model 20B.

FIGURE 1.    INTERCONNECTION DIAGRAM FOR MODEL 20B

SECTION 2.    CONNECTING THERMOCOUPLES

     Any type of thermocouple may be used with the Model 20B
Thermocouple Thermometer. Documentation is provided in this
manual for types J, K, T, and E. Information concerning other
thermocouple types, expanded ranges, and tighter tolerance
linearizations is available through Lawson Labs.

NOTE: No thermocouples need be connected to test operation. You
may want to connect one thermocouple only and then check its
operation before connecting additional thermocouples.

     The thermocouple connections for the thermometer are inside
the case to prevent air currents from causing rapid temperature
fluctuations at the cold junction. Unplug the power supply and
then remove the four screws at the extreme corners of the cover.
Inside the 20B you will find six pairs of screw terminals
embedded in a solid disk and six ground terminals. For shipment,
the input terminals are connected together and to ground. The
ground wires prevent static discharges, which can be of extremely
high voltage, from damaging the circuitry. You will find a
diagram of the input terminal locations on the circuit card
itself.

FIGURE 2.    MODEL 20B THERMOMETER INPUT CONNECTIONS

     Run the first thermocouple wire through one of the holes in
the case. Remove the grounding wire from terminal pair #1 and
connect the plus thermocouple wire to the plus terminal and the
minus thermocouple wire to the minus terminal. Standard
color-coded thermocouple extension wire uses red insulation on
the minus wire. If a shield is present, connect it to one of the
ground terminals (labeled G). If the thermocouple has an
ungrounded junction, also connect the minus terminal to a ground
terminal. You may use any type of wire for the ground connection.
If multiple thermocouples are in electrical contact with the same
conductive material, only one ground path should be provided. For
example, if two thermocouples are touching an ungrounded metal
plate, then either the plate should be grounded or one (and only
one) of the thermocouple minus leads should be jumpered to ground
at the cold junction block.

CAUTION: Excessive torque can damage the ground terminals.

     Connect any other thermocouples in the same fashion. Holes
are provided at the card's edge for strain relief. Secure the
thermocouple wires to the card with lacing cord or cable ties for
protection against mechanical failure. Replace the cover and
securing screws.

NOTE: If a thermocouple is removed from the input terminals, it
must be replaced by a grounding wire.

     Best noise immunity will be achieved when each thermocouple
is shielded with the shield grounded. If a grounded junction
thermocouple is in contact with a grounded metallic object,
remove the thermocouple's shield from its ground terminal at the
Model 20B end.

SECTION 3.    OPERATION

     After the interconnections have been completed, plug in the
power cord and turn on the computer. If you are using the Lawson
Labs PC64 Data Logging Software, run the program. Configure the
A/D channel to which you have connected the Model 20B as a
thermometer and enter the K factor. Also enter the G factor and
thermocouple type. You should now see temperature displayed on
the screen.

     The following detailed description is for programmers who
want to integrate Model 20B support into their application
programs. In the following example, the Model 20B is assumed to
be at A/D channel #0. The Model 134 example assumes all switches
are OFF. The Model 140 example assumes switch #4 is in the ON
position. The Model 141 example assumes switches #1, 4, 5 and 6
are ON and all others are OFF. If your address switches are set
differently, see your A/D manual for the correct ADC address.

     Enter the following program. Set BOARDCODE in line 2030 to
128 for a Model 141; set it to 0 for a Model 134 or 140. If you
are using a Model 141, refer to the A/D board manual and be sure
to calibrate the 141 card in bipolar mode before proceeding.

     The main program below begins at line 1000. It calls various
subroutines to perform the necessary operations. Subroutine 2000
sets the constants for your particular combination of Model 20B
and A/D board. PAUSE for the Model 141 should be set to the
settling time of the A/D board plus 0.1 second. The settling time
is listed in the 141 manual. The 20B itself requires only one
millisecond settling time. The 0.1 second pause is needed because
of the resolution of the TIMER function. Subroutine 3000 reads
and displays the offset from channel #0 of the Model 20B. The
format for display may be changed if desired to display fewer
digits. Subroutine 7000 provides the necessary delay for the
hardware. Subroutine 8000, which depends on A/D board type, does
the actual reading of the data and the conversion to millivolts.

1000 REM Sample program
1010 GOSUB 2000: REM Set constants for your system
1020 ADCHAN = 0: REM Assume A/D board channel #0
1030 GOSUB 3000: REM Read and display offset
1090 END

2000 REM Set constants
2010 PAUSE = 0.1: REM For the 141, enter settling time + 0.1
2020 ADC = [value]: REM Your A/D board address
2030 BOARDCODE = [value]: REM 128 for Model 141, 0 for others
2070 RETURN

3000 REM Read and display offset
3010 OUT ADC, BOARDCODE + ADCHAN * 16
3020 GOSUB 8000
3030 OFFSET = V
3040 PRINT USING "A/D Channel ##"; ADCHAN;
3050 PRINT USING "    Offset #####.#### mv"; OFFSET
3060 RETURN

7000 REM Delay for settling time of PAUSE sec.
7010 IF TIMER > 86395 THEN GOTO 7010
7020 START = TIMER
7030 IF TIMER < START + PAUSE THEN GOTO 7030
7040 RETURN

   Include this subroutine if you are using a Model 140.

8000 REM Returns Model 140 voltage in millivolts
8010 OUT ADC + 1, 0
8020 IF INP(ADC) AND 128 THEN 8020
8030 X = INP(ADC)
8040 V = X MOD 16 + (INP(ADC + 1) MOD 16) * 10  + (INP( ADC + 2)
     MOD 16) * 100 + (INP(ADC + 3) MOD 16) * 1000
8050 IF X AND 32 THEN V = V + 10000
8060 IF X AND 64 THEN V = -V
8070 V = V * .25
8080 RETURN

     Include this subroutine if you are using a Model 134. In
line 8030, you may set AVERAGE anywhere from 1 to 255. Larger
numbers reduce noise while smaller numbers increase speed.

8000 REM Returns Model 134 voltage in millivolts
8010 GOSUB 7000
8020 X = INP(ADC)
8030 TOTAL = 0: AVERAGE = 20
8040 FOR X = 1 TO AVERAGE
8050 IF INP(ADC - 1) AND 2 THEN 8050
8060 V = INP(ADC + 1) * 256! + INP(ADC)
8070 TOTAL = TOTAL + V
8080 NEXT X
8090 TOTAL = TOTAL / AVERAGE: V = (TOTAL - 32768) * .152588
8100 RETURN

     Include this subroutine if you are using a Model 141.

8000 REM Returns Model 141 voltage in millivolts
8010 GOSUB 7000
8020 OUT ADC + 1, 1
8030 H = (INP(ADC + 2) AND &H0F)
8040 M = INP(ADC + 1)
8050 L = INP(ADC)
8060 OUT ADC + 1, 0
8070 COUNT = L + M * 256 + H * 65536
8080 V = COUNT * 9.536743E-03 - 5000
8090 RETURN

     RUN the program. The offset voltage from the 20B is
displayed on the screen. The value of the offset for the
thermometer should be close to -3500 mv. If the short-term
variation exceeds a millivolt, check for loose connections or
improper grounding. The large negative offset for the thermometer
allows the major portion of the operating range to be in the
direction of higher temperatures. If you are measuring very low
temperatures with type E thermocouples, you may want to reset the
offset adjustment (See SECTION 8). Note that channel 0 on the
Model 20B is a dedicated offset channel.

     In order to read thermocouple temperatures you must first
know the temperature of the cold junction block inside the Model
20B. Add the following lines of code to your program.

1040 GOSUB 4000: REM Read and display cold junction

2040 K = [value]: REM Calibration constant, from Model 20B case

4000 REM Read and display cold junction
4010 OUT ADC, BOARDCODE + ADCHAN * 16 + 3
4020 GOSUB 8000
4030 C = (V - OFFSET) / K - 273
4040 PRINT USING "A/D Channel ##"; ADCHAN;
4050 PRINT USING "    Cold junction ###.## deg C"; C
4060 RETURN

     If Fahrenheit is preferred, change line 4050.

4050 PRINT USING "    Cold junction ###.## deg F"; 1.8 * C + 32

     RUN the program again. The offset is displayed first
followed by the cold junction temperature. If the temperature
varies, double check the chassis ground connection. If you read
-273 deg C you are missing the connection to Guard. Also make
sure you have entered the proper K value in line 2040.

     You now have enough information to read and compute
temperatures based on the voltages at the thermocouple inputs.
Add the following lines to your program. MAXTC in line 2060 is
the number of thermocouples attached to your Model 20B assuming
the first thermocouple is connected to channel 1.

1050 FOR TC = 1 TO MAXTC
1060 GOSUB 5000: REM Read and display temperature
1070 NEXT TC

2050 G = [value]: REM 100/gain, from Model 20B case
2060 MAXTC = [value]: REM number of thermocouples attached

5000 REM Read and display temperature
5010 M20BCHAN = TC
5020 IF TC > 2 THEN M20BCHAN = M20BCHAN + 1
5030 OUT ADC, BOARDCODE + ADCHAN * 16 + M20BCHAN
5040 GOSUB 8000
5050 V = (V - OFFSET) * G
5060 GOSUB 9000
5070 PRINT USING "A/D Channel ##"; ADCHAN;
5080 PRINT USING "    Thermocouple ##"; TC;
5090 PRINT USING "    ####.## deg C"; T
5100 RETURN

     If Fahrenheit scale is preferred, change line 5090.

5090 PRINT USING "    ####.## deg F"; 1.8 * T + 32

     Also enter the following linearization routine corresponding
to the type of thermocouple that you are using.

NOTE: If you are not using the full temperature range of the
thermocouple, then the program lines concerned with temperatures
outside the range of interest can be omitted. For example, for
type K thermocouples, if the highest temperature of interest is
800 degrees C then lines 9220 through 9250 could be eliminated.
The 870 in line 9220 indicates that program line only affects
temperatures above 870 degrees C. Similarly, if the lowest
temperature of interest is -100 degrees C, then lines 9010
through 9120 may be omitted. Do not omit line 9000.

LINEARIZATION PROGRAM FOR TYPE K THERMOCOUPLES

9000 V = V + C * 4.05
9010 IF V < -645.5 THEN T = -267 + (V + 645.5) / .1: RETURN
9020 IF V < -644.6 THEN T = -262 + (V + 644.6) / .18: RETURN
9030 IF V < -642.5 THEN T = -255 + (V + 642.5) / .3: RETURN
9040 IF V < -638.8 THEN T = -247 + (V + 638.8) / .4625: RETURN
9050 IF V < -632.2 THEN T = -237 + (V + 632.2) / .66: RETURN
9060 IF V < -621.3 THEN T = -225 + (V + 621.3) / .9083: RETURN
9070 IF V < -603.5 THEN T = -210 + (V + 603.5) / 1.1867: RETURN
9080 IF V < -573.0 THEN T = -190 + (V + 573.0) / 1.525: RETURN
9090 IF V < -535.4 THEN T = -170 + (V + 535.4) / 1.88: RETURN
9100 IF V < -491.2 THEN T = -150 + (V + 491.2) / 2.21: RETURN
9110 IF V < -427.6 THEN T = -125 + (V + 427.6) / 2.544: RETURN
9120 IF V < -355.3 THEN T = -100 + (V + 355.3) / 2.892: RETURN
9130 IF V < -258.6 THEN T = -70 + (V + 258.6) / 3.2233: RETURN
9140 IF V < -152.7 THEN T = -40 + (V + 152.7) / 3.53: RETURN
9150 IF V < 0 THEN T = V / 3.8175: RETURN
9160 IF V < 326.6 THEN T = V / 4.0825: RETURN
9170 IF V < 653.9 THEN T = 80 + (V - 326.6) / 4.0912: RETURN
9180 IF V < 1138.1 THEN T = 160 + (V - 653.9) / 4.035: RETURN
9190 IF V < 1936.3 THEN T = 280 + (V - 1138.1) / 4.2011: RETURN
9200 IF V < 2929.6 THEN T = 470 + (V - 1936.3) / 4.2449: RETURN
9210 IF V < 3612.1 THEN T = 704 + (V - 2929.6) / 4.1114: RETURN
9220 IF V < 4274.0 THEN T = 870 + (V - 3612.1) / 3.9399: RETURN
9230 IF V < 4809.5 THEN T = 1038 + (V - 4274.0) / 3.7711: RETURN
9240 IF V < 5239.8 THEN T = 1180 + (V - 4809.5) / 3.5858: RETURN
9250 T = 1300 + (V - 5239.8) / 3.4403: RETURN

LINEARIZATION PROGRAM FOR TYPE J THERMOCOUPLES

9000 V = V + C * 5.2
9010 IF V < -777.8 THEN T = -195 + (V + 777.8) / 2.12: RETURN
9020 IF V < -740.2 THEN T = -180 + (V + 740.2) / 2.5067: RETURN
9030 IF V < -682.1 THEN T = -160 + (V + 682.1) / 2.905: RETURN
9040 IF V < -615.9 THEN T = -140 + (V + 615.9) / 3.31: RETURN
9050 IF V < -503.6 THEN T = -110 + (V + 503.6) / 3.7433: RETURN
9060 IF V < -378.5 THEN T = -80 + (V + 378.5) / 4.1667: RETURN
9070 IF V < -196.0 THEN T = -40 + (V + 196.0) / 4.5625: RETURN
9080 IF V < 0 THEN T = V / 4.9: RETURN
9090 IF V < 413.2 THEN T = V / 5.2937: RETURN
9100 IF V < 2738.8 THEN T = 79 + (V - 413.2) / 5.5335: RETURN
9110 IF V < 3368.3 THEN T = 500 + (V - 2738.8) / 5.7227: RETURN
9120 IF V < 3913.0 THEN T = 610 + (V - 3368.3) / 6.0522: RETURN
9130 T = 700 + (V - 3913.0) / 6.32: RETURN

LINEARIZATION PROGRAM FOR TYPE E THERMOCOUPLES

9000 V = V + C * 6.1
9010 IF V < -982.1 THEN T = -265 + (V + 982.1) / .28: RETURN
9020 IF V < -978.4 THEN T = -258 + (V + 978.4) / .52857: RETURN
9030 IF V < -971.9 THEN T = -250 + (V + 971.9) / .8125: RETURN
9040 IF V < -960.4 THEN T = -240 + (V + 960.4) / 1.15: RETURN
9050 IF V < -945.5 THEN T = -230 + (V + 945.5) / 1.49: RETURN
9060 IF V < -917.2 THEN T = -215 + (V + 917.2) / 1.8867: RETURN
9070 IF V < -882.4 THEN T = -200 + (V + 882.4) / 2.32: RETURN
9080 IF V < -827.3 THEN T = -180 + (V + 827.3) / 2.755: RETURN
9090 IF V < -763.1 THEN T = -160 + (V + 763.1) / 3.21: RETURN
9100 IF V < -671.4 THEN T = -135 + (V + 671.4) / 3.668: RETURN
9110 IF V < -546.0 THEN T = -105 + (V + 546.0) / 4.18: RETURN
9120 IF V < -405.8 THEN T = -75 + (V + 405.8) / 4.6733: RETURN
9130 IF V < -225.4 THEN T = -40 + (V + 225.4) / 5.1543: RETURN
9140 IF V < 0 THEN T = V / 5.635: RETURN
9150 IF V < 368.3 THEN T = V / 6.1383: RETURN
9160 IF V < 837.7 THEN T = 60 + (V - 368.3) / 6.7057: RETURN
9170 IF V < 1490.9 THEN T = 130 + (V - 837.7) / 7.2578: RETURN
9180 IF V < 2496.1 THEN T = 220 + (V - 1490.9) / 7.7323: RETURN
9190 IF V < 5629.1 THEN T = 350 + (V - 2496.1) / 8.0333: RETURN
9200 IF V < 6878.3 THEN T = 740 + (V - 5629.1) / 7.8075: RETURN
9210 T = 900 + (V - 6878.3) / 7.575: RETURN

LINEARIZATION PROGRAM FOR TYPE T THERMOCOUPLES

9000 V = V + C * 4.05
9010 IF V < -624.8 THEN T = -265 + (V + 624.8) / 0.2: RETURN
9020 IF V < -622.4 THEN T = -258 + (V + 622.4) / 0.3429: RETURN
9030 IF V < -618.1 THEN T = -250 + (V + 618.1) / 0.5375: RETURN
9040 IF V < -610.5 THEN T = -240 + (V + 610.5) / 0.76: RETURN
9050 IF V < -595.0 THEN T = -225 + (V + 595.0) / 1.0333: RETURN
9060 IF V < -575.3 THEN T = -210 + (V + 575.3) / 1.3133: RETURN
9070 IF V < -543.9 THEN T = -190 + (V + 543.9) / 1.57: RETURN
9080 IF V < -506.9 THEN T = -170 + (V + 506.9) / 1.85: RETURN
9090 IF V < -464.8 THEN T = -150 + (V + 464.8) / 2.105: RETURN
9100 IF V < -405.1 THEN T = -125 + (V + 405.1) / 2.388: RETURN
9110 IF V < -337.8 THEN T = -100 + (V + 337.8) / 2.692: RETURN
9120 IF V < -247.5 THEN T = -70 + (V + 247.5) / 3.01: RETURN
9130 IF V < -129.9 THEN T = -35 + (V + 129.9) / 3.36: RETURN
9140 IF V < 0 THEN T = V / 3.7114: RETURN
9150 IF V < 203.5 THEN T = V / 4.07: RETURN
9160 IF V < 474.9 THEN T = 50 + (V - 203.5) / 4.5233: RETURN
9170 IF V < 823.5 THEN T = 110 + (V - 474.9) / 4.98: RETURN
9180 IF V < 1257.2 THEN T = 180 + (V - 823.5) / 5.4213: RETURN
9190 IF V < 1781.6 THEN T = 260 + (V - 1257.2) / 5.8267: RETURN
9200 T = 350 + (V - 1781.6) / 6.106: RETURN

     RUN the program. The temperatures will print in sequence on
the screen. Channels with grounded inputs should read near the
cold junction temperature. Note that different thermocouple types
can be used by entering other linearization routines with changed
line numbers and conditionally changing the GOSUB in line 5060.

SECTION 4.    USING MULTIPLE MODEL 20Bs

     It is possible to connect two, three, or four Model 20Bs.
When multiple Model 20Bs are connected, all must be powered for
the system to function properly.

FIGURE 3.    INTERCONNECTION DIAGRAM FOR MULTIPLE MODEL 20Bs

                      
     Add or change the following lines marked by asterisks in the
program. MAXCHAN is the highest A/D channel number which has a
Model 20B connected to it. Insert all the applicable K and G
constants identified by their channel numbers.

  1000 REM Sample program
  1010 GOSUB 2000: REM Set constants for your system
* 1020 FOR ADCHAN = 0 TO MAXCHAN
  1030 GOSUB 3000: REM Read and display offset
  1040 GOSUB 4000: REM Read and display cold junction
* 1050 FOR TC = 1 TO MAXTC(ADCHAN)
  1060 GOSUB 5000: REM Read and display temperature
  1070 NEXT TC
* 1080 NEXT ADCHAN
  1090 END

  2000 REM Set constants
  2010 PAUSE = 0.1: REM For the 141, enter settling time + 0.1
  2020 ADC = [value]: REM Your A/D board address
  2030 BOARDCODE = [value]: REM 128 for Model 141, 0 for others
* 2040 K(0)= [value]: K(1)= [value]: K(2)= [value]: K(3)= [value]
* 2050 G(0)= [value]: G(1)= [value]: G(2)= [value]: G(3)= [value]
* 2060 MAXTC(0)= [value]: MAXTC(1)= [value]: MAXTC(2)= [value]:
       MAXTC(3)= [value]
  2070 RETURN

  3000 REM Read and display offset
  3010 OUT ADC, BOARDCODE + ADCHAN * 16
  3020 GOSUB 8000
  3030 OFFSET = V
  3040 PRINT USING "A/D Channel ##"; ADCHAN;
  3050 PRINT USING "    Offset #####.#### mv"; OFFSET
  3060 RETURN

  4000 REM Read and display cold junction
  4010 OUT ADC, BOARDCODE + ADCHAN * 16 + 3
  4020 GOSUB 8000
* 4030 C = (V - OFFSET) / K(ADCHAN) - 273
  4040 PRINT USING "A/D Channel ##"; ADCHAN;
  4050 PRINT USING "    Cold junction ###.## deg C"; C
  4060 RETURN

  5000 REM Read and display temperature
  5010 M20BCHAN = TC
  5020 IF TC > 2 THEN M20BCHAN = M20BCHAN + 1
  5030 OUT ADC, BOARDCODE + ADCHAN * 16 + M20BCHAN
  5040 GOSUB 8000
* 5050 V = (V - OFFSET) * G(ADCHAN)
  5060 GOSUB 9000
  5070 PRINT USING "A/D Channel ##"; ADCHAN;
  5080 PRINT USING "    Thermocouple ##"; TC;
  5090 PRINT USING "    ####.## deg C"; T
  5100 RETURN

     RUN the program again. The temperatures for all A/D channels
and Model 20B channels will be displayed.

SECTION 5.    THERMOCOUPLE BASICS

     A thermocouple is a wire loop made of two different metals. 
When the junctions between metals are at different temperatures,
a current will flow in the loop. This principle is called the
Seebeck effect. In practice, a third metal, copper, is included
in the loop, but if the two connections involving copper are at
the same temperature then no additional current will be
generated. For these reasons, thermocouple wire must be used to
connect the hot junction to the thermometer. The connections from
the thermometer to the computer are of ordinary wire. It is often
necessary to add an extra length of thermocouple wire between the
thermocouple leads and the thermometer. Thermocouple extension
wire is used for the purpose. It is made of the same materials as
the thermocouple itself but the alloys need not be as closely
controlled.

     Connections between the thermocouple and the extension wire
can be soldered. Exposing such solder joints to high temperatures
can degrade the accuracy of the thermocouple because impurities
will cause spurious Seebeck effects. Note that any time
thermocouple extension wire is exposed to steep temperature
gradients similar errors will occur if flaws or impurities are
present. When replacing aged thermocouples, it is good practice
to also replace any sections of extension wire that have been
exposed to high heat. If a thermocouple wire is broken,
unpredictable readings will result. If a thermocouple is
short-circuited, the thermometer will read the temperature at the
short.

     The Model 20B is specified for system accuracy including all
errors except thermocouple conformity errors. A standard grade
type K thermocouple is only guaranteed to match the ideal
thermocouple curve to within 2.2 degrees C or .75%, whichever is
greater. Special grade thermocouples are available which have
half as much conformity error as standard thermocouples.
Nonetheless, the majority of the error in a system is likely to
stem from the thermocouple itself. Greater accuracy can be
obtained by calibrating a particular thermocouple at several
points and making the appropriate corrections. The calibration
should be repeated periodically to account for aging effects.

SECTION 6.    TROUBLESHOOTING

GENERAL:   If problems occur, first short the thermocouple
terminals at the thermometer. If that channel then reads near
room temperature, then the problem is probably with the
thermocouple.

A.  If temperature reads near absolute zero, check that the cord
is plugged in and that the outlet is live. The thermometer output
could also be short-circuited.  Double-check that guard on the
A/D card is connected to GND on the thermometer.

B.  If the temperature readings get larger when they should get
smaller, reverse the thermocouple leads.

C.  If the temperature reads near room temperature when other
readings are expected, check for a shorted thermocouple lead
wire.

D.  If the temperature readings seem random check for a broken
thermocouple wire. Check that unused input terminals are
grounded. Also make sure that the correct input channel is being
selected.

E.  If the temperature readings are consistent but wrong, make
sure the linearization program matches the thermocouple type
actually in use. Also carefully check the thermometer program for
errors. Check for redundant thermocouple grounds.

F.  If the temperature readings show excessive scatter check for
loose connections. Make sure the GND terminal on the thermometer
is connected to chassis ground at the computer and that
ungrounded junction thermocouples have a connection from minus in
to G. Perhaps shielding for the thermometer output wires is
needed.

G.  If temperatures in one range are inconsistent check the
linearization program for errors.

H.  If more than one device is connected to the output port, all
must be turned on for any to work properly.

I.  If the temperature readings appear to drift, check that the
thermocouple extension wire is not connected backwards.

J.  If a particular thermocouple is reading erratically in a
multiple 20B system, check the like-numbered thermocouples on the
other boxes.

K.  Erratic readings can be caused by ground loops or missing
grounds. Try removing redundant ground wires or adding a
connection from the minus thermocouple input terminal to ground.

L.  Erratic readings can also be caused by an extremely fast
computer over-running the settling ability of the Model 20B. Try
adding a longer pause in the program after the channel selection
but before the A/D conversion is initiated.
SECTION 7.    INPUT CODE SUMMARY

CODE         BINARY              THERMOMETER
           C    B    A              INPUT

 0         0    0    0            (OFFSET)
 1         0    0    1         THERMOCOUPLE #1
 2         0    1    0         THERMOCOUPLE #2
 3         0    1    1         (COLD JUNCTION)
 4         1    0    0         THERMOCOUPLE #3
 5         1    0    1         THERMOCOUPLE #4
 6         1    1    0         THERMOCOUPLE #5
 7         1    1    1         THERMOCOUPLE #6

NOTE: There are no input terminals on channel #0 of the Model 20B
Thermometer. That channel is used only for software offset
correction.

SECTION 8.    INTERNAL OFFSET ADJUSTMENT & CALIBRATION

     The only trim adjustment inside the Model 20B is an offset
trim. It is normally set at the factory to -3.5 volts for the
thermometer. The output should be set with input code #0
selected. The offset will change slightly with temperature but
the effects are cancelled in software and the drift will not
cause errors. With the offset at -3.5 volts the Model 20B has a
large range in the positive direction and a small negative range.
If more range is needed in the negative direction, the offset can
be moved toward zero by rotating the shaft of the trimpot with a
small screwdriver.

     The amplifier gain and cold junction temperature sensor are
not adjustable. Instead they are accounted for in software. You
can make slight changes in the G factor to maximize accuracy for
a particular thermocouple at an elevated temperature. If a change
of more than 2% seems indicated, something else is probably
wrong. To adjust the K factor, place a thermocouple in a room-
temperature bath with an accurate thermometer. Adjust the K
factor for agreement. If you wish to have the calibration
checked, contact Lawson Labs for details.

SECTION 9.    SPECIFICATIONS

THERMOCOUPLE
INPUTS:                 6 fully differential channels

INPUT OVERVOLTAGE
PROTECTION:             120 volts transient
                        65 volts continuous

INPUT IMPEDANCE:        1000 megohms typical

LINEARITY:              0.05% of full scale

SETTLING TIME:          400 microseconds

OVERALL ACCURACY:       System accuracy not including
                        thermocouple conformity error is
                        +/- 1 degree Centigrade with the
                        amplifier at room temperature. The
                        standard linearization programs add
                        0.5 degrees C variation.

COLD JUNCTION
COMPENSATION:           Exposing the amplifier to a step change
                        of 20 degrees Centigrade will cause a
                        temporary additional measuring error of
                        less than 0.5 degrees Centigrade.

RANGE:                  The amplifier accommodates the full range
                        of all common thermocouple types.
                        Platinum thermocouple users may want a
                        custom gain setting for improved
                        resolution.

CONTROL INPUTS:         6 volt logic, negative true. Compatible
                        with all Lawson Labs A/D cards.

POWER
REQUIREMENT:            105-135 VAC, 50-60HZ, 6 Watts

SIZE:                   6.25 x 3.75 x 2 inches

OPTIONS:                Premium low-noise amplifier
                        Custom gain setting (x2 to x400)
                        DC powered, panel mounting

                     LIMITED WARRANTY

     All Lawson Labs, Inc. products are guaranteed against
defects in materials and workmanship for a period of one year
from the date of delivery. Products must be returned to Lawson
Labs for warranty service. Contact Lawson Labs, Inc. at
800 321-5355 for return authorization before returning anything
for service. The above warranty is in lieu of all warranties
express or implied. Lawson Labs will not be liable for indirect
or consequential damages caused by any defect in this product.
Some states do not allow the limitation of consequential damages,
so the above exclusion may not apply to you.