Tbktcconvert, Tbktcsetup – Measurement Computing TempBook rev.3.0 User Manual
Page 88

9-28 tbkCommand Reference (Standard API)
TempBook User’s Manual
tbkTCConvert
DLL Function
tbkTcConvert (uint *counts, uint scans ,int *temp, uint ntemp);
C
tbkTCConvert(unsigned _far *counts, unsigned scans, int _far *temp, unsigned
ntemp);
QuickBASIC
BtbkTCConvert% (counts%, ByVal scans%, temp%, ByVal ntemp%)
Visual Basic
VBtbkTCConvert% (counts%(), ByVal scans%, temp%(), ByVal ntemp%)
Turbo Pascal
tbkTCConvert(counts:WordP; scans:word; temp:DataP; ntemp:word):integer;
Parameters
uint *counts
Raw A/D data from one or more scans
uint scans
Number of scans of raw data in counts
int * temp
Variable array to hold converted temperatures
uint ntemp
Size of temperature array
Returns
TerrTCE_NOSETUP
- Setup was not called
TerrTCE_PARAM
- Param out of range
TerrNoError
- No Error
See Also
tbkTCSetup, tbkTCSetupConvert
Program References
None
tbkTCConvert
takes raw A/D readings and converts them to temperature readings in tenths of
degrees Celsius. Note: Total number of conversions (scan * chans/scan) must be less than 32 K.
tbkTCSetup
DLL Function
tbkTCSetup(uint nscan, uint cjcPosition, uint ntc , uint tcType, uchar
bipolar, uint avg);
C
tbkTCSetup(unsigned nscan, unsigned cjcPosition, unsigned ntc, unsigned
tcType, unsigned char bipolar, unsigned avg);
QuickBASIC
BtbkTCSetup% (ByVal nscan%, ByVal cjcPosition%, ByVal ntc%, ByVal tcType%,
ByVal bipolar%, ByVal avg%)
Visual Basic
VBtbkTCSetup% (ByVal nscan%, ByVal cjcPosition%, ByVal ntc%, ByVal tcType%,
ByVal bipolar%, ByVal avg%)
Turbo Pascal
tbkTCSetup(nscan, cjcPosition, ntc, tcType:word; bipolar:byte;
avg:word):integer;
Parameters
uint nscan
Number of readings in a scan.
Valid range: 1- 512
uint cjcPosition
Position of CJC reading within a scan.
Valid range: 0 - (nscan-1)
2 -(nscan-1), if auto-zeroing is used.
uint ntc
Number of thermocouples immediately following CJC.
Valid range: 1 - (nscan-cjcposition-1)
uint tcType
Type of thermocouple (see table at end of chapter for valid types)
uint bipolar
Zero for unipolar, non-zero for bipolar.
uint avg
Type of averaging to be used.
Returns
TerrTCE_PARAM
- Parameter out of range
TerrTCE_TYPE
- Invalid thermocouple type
TerrNoError
- No Error
See Also
tbkTCConvert, tbkTCSetupConvert
Program References
None
tbkTCSetup
sets up parameters for subsequent temperature conversions.