Tbkrdscann, Tbkrdtemp – Measurement Computing TempBook rev.3.0 User Manual
Page 75

TempBook User’s Manual
tbkCommand Reference (Standard API) 9-15
tbkRdScanN
DLL Function
int tbkRdScanN(uint startChan, uint endChan, uint *buf, uint count, uchar
trigger, uchar one Shot, float freq, uchar gain );
C
tbkRdScanN(unsigned startChan, unsigned endChan, unsigned * buf, unsigned
count, unsigned char trigger, unsigned char oneShot, float freq, unsigned
char gain);
QuickBASIC
BtbkRdScanN% (ByVal startChan%, ByVal endChan%, buf%, ByVal count%, ByVal
trigger%, ByVal oneShot%, ByVal freq!, ByVal gain%)
Visual Basic
VBtbkRdScanN% (startChan%, endChan%, buf%(), count%, trigger%, oneShot%,
freq!, gain%)
Turbo Pascal
tbkRdScanN( startChan:word; endChan:word; buf:WordP; count:word;
trigger:byte; oneShot:byte; freq:real; gain:byte ):integer;
Parameters
uint startChan
The starting channel of the scan group (see table at end of chapter for valid values)
uint endChan
The ending channel of the scan group (see table at end of chapter for valid values)
uint *buf
An array where the A/D scans will be placed
uint count
The number of scans to be read
Valid values: 1 - 65536
uchar trigger
The trigger source (see table at end of chapter for valid values)
uchar one Shot
A flag that if non-zero enables one-shot trigger mode
float freq
The sampling frequency in Hz
Valid values: 100000.0 - 0.0002
uchar gain
The channel gain (see table at end of chapter for valid values)
Returns
TerrInvGain
- Invalid gain
TerrInvChan
- Invalid channel
TerrInvTrigSource
- Invalid trigger
TerrInvLevel
- Invalid Level
TerrFIFOFull
- Buffer Overrun
TerrNoError
- No error
See Also
tbkRd, tbkRdN, tbkRdScan, tbkRdNFore, tbkSetClk, tbkSetTrig
Program References
tbkRdScanN
reads multiple scans from multiple A/D channels. This function will configure the
pacer clock, arm the trigger and acquire ‘count’ scans consisting of each channel starting with
‘startChan’ and ending with ‘endChan’.
tbkRdTemp
DLL Function
tbkRdTemp(uint chan, uchar tcType, int * temp)
C
tbkRdTemp(unsigned chan, unsigned tcType, int * temp);
QuickBASIC
BtbkRdTemp% (ByVal chan%, ByVal tcType%, temp%)
Visual Basic
VBtbkRdTemp% (chan%, tcType%, temp%)
Turbo Pascal
tbkRdTemp( chan:word; tcType:word; temp:DataP):integer;
Parameters
uint chan
Single channel number (see table at end of chapter for valid values)
uint tcType
Thermocouple type (see table at end of chapter for valid values)
int *temp
Pointer to a value where the converted temperature is to be stored
Returns
TerrInvChan
- Invalid Channel
TerrTCE_Type
- Invalid Thermocouple Type
See Also
tbkTCSetup, tbkTCConvert, tbkTCSetupConvert
Program References
TEMPEX1 (all languages)
tbkRdTemp
is used to take a single thermocouple reading from the given analog input channel.
The reading will be zero corrected, span corrected, and linearized to yield a temperature reading in
tenths of a degree Celsius. This function will use software triggering to immediately trigger and
acquire one sample.
If a calibration constant file with the default name, “tempbook.cal”, is not visible to the calling
program then no span correction is performed.
tbkSetMode
must be called before this function to configure the TempBook for differential
operation in either unipolar or bipolar mode.