beautypg.com

2 tcdiff measurement instruction – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 158

background image

Section 4. CRBasic – Native Language Programming

To send the PRT temperature of the module in the forth slot to the variable
RefTemp (using a 100 microsecond measurement integration time) the code is:

ModuleTemp(RefTemp, 1, 4, 100)

4.2.10.2 TCDiff Measurement Instruction

The TCDiff instruction makes temperature measurements using a thermocouple
connected to a differential channel of CR9050/CR9051E or CR9058 modules
installed in the CR9000X datalogger.

TCDiff automatically converts the voltage measured between the leads of the
thermocouple into its native output of degrees Celsius using the result from the
ModuleTemp for its reference temperature. This automatic conversion is done
using a polynomial specific to the types of metals contained in the wire leads of
the thermocouple.

The TCDiff instruction has this structure:

TCDiff (Dest, Reps, Range, ASlot, DiffChan, TCType, TRef, RevDiff, Settle,
Integ, Mult, Offset
)

Dest

Name of the variable (array) in which to store the measurement
results. The Dest variable array must be dimensioned large
enough to hold the results of the number of measurements
specified by the Reps parameter, starting with the element of the
array specified in the Destination parameter.

For example, if TC(4) was entered for the Destination element,
the Reps parameter was set to 3, and DiffChan was set to 10, then
the measurement result from differential channel 10 would be
placed in the 4th element of the TC array (TC(4)), the
measurement result from differential channel 11 would be placed
in the 5th element of the TC array (TC(5)), and the measurement
result from differential channel 12 would be placed in the 6th
element of the TC array (TC(6)). So the TC variable array would
need to be declared with minimum of 6 elements (Public TC(6)).

Rep

Number of thermocouples to measure. Will fill sequential
elements of the Dest variable array with the measurement results
from sequential differential channels starting with the channel
specified by the DiffChan parameter.

If Reps requires the use of multiple modules, the modules must
reside in sequential slots in the CR9000X chassis. Reps cannot
roll to another module when using CR9058E Isolation modules.

Range

Voltage range to make the measurement on. For the best
measurement resolution, the smallest range code that will
encompass the output from the sensor should be selected.

It depends on which analog input module that is being used as to
what voltage ranges are available.

For most thermocouple measurements, the output from the sensor
will never exceed 50 mV. The exceptions for this are when using
Type E thermocouples in temperatures greater than 1220 degrees
F (660 degrees C), and Type K thermocouples in temperatures

4-30