Daqcvttcconvert and daqcvtcconvertf, Daqcvttcconvert, Daqcvtcconvertf – Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 171

Advertising
background image

daqCvtTCConvert

and

daqCvTCConvertF

Also See: daqCvtTCSetup, daqCvtTCSetupConvert, daqCvtTCSetupConvertF

Format

daqCvtTCConvert(counts, scans, temp, ntemp)

Purpose

daqCvtTCConvert

and daqCvtTCConvertF each convert raw data acquired from a thermocouple (T/C)

to a Celsius scale. See Note 1.

Parameter Summary

Parameter Type

Description

counts PWORD

Array of one or more scans of raw data

scans DWORD

Number of scans of data in counts array (number of pre-trigger + post-
trigger scans)

temp PSHORT

Variable array to hold converted temperature results (Note 1)

ntemp DWORD

Number of entries in the temperature array

Parameter Values

counts:

valid values range from 0 to 65,536 (each raw data item may be any 16-bit value)

scans:

valid value range from 1 to 4,294,967,295; however, memory limitations may apply

temp:

valid converted values stored in this array range from -2,000 (-200°C) to +13,720 (+1,372°C),
depending on the thermocouple type

ntemp:

value of the ntemp parameter should be equal to number of T/Cs specified in setup times the

number of scans. If averaging is used, then ntemp should be equal to: [(number of T/Cs) *

(scans) * (the value of the avg parameter as set in the daqCvtTCSetup function)]

Returns

DerrTCE_NOSETUP

Setup was not called

DerrTCE_PARAM

Parameter out-of-range

DerrNoError

No error

For more details on error messages refer to the Daq Error Table.

Function Usage

For all functions of the form daqCvt..., raw data to be converted must be unsigned
(i.e., the dafUnsigned value must be set using the daqAdcSetScan function).


For T/C and RTD conversion, users of Daq/2000 Series devices* and/or Daq PC Cards must
be sure that the main unit is using ten volt range gains settings, either unipolar (0 V to 10 V)
or bipolar (-5 V to +5 V).

See the “T/C Gains Settings” section in the daqCvtTCConvert function entry for the
appropriate settings.

*
Daq/2000 Series devices include DaqBook/2000 Series, DaqScan/2000 Series, DaqLab/2000

Series, and DaqBoard/2000 Series devices.

Note 1: daqCvtTCConvert converts temperature readings to values in tenths of degrees Celsius (0.1°C).

daqCvtTCConvertF stores actual temperature values, i.e., actual instead of a value converted
to the nearest tenth of a degree °C.

Programmer’s Manual

908494

Daq API Command Reference 4.3-45


Advertising