beautypg.com

Tbkcalconvert, Tbkcalsetup – Measurement Computing TempBook rev.3.0 User Manual

Page 63

background image

TempBook User’s Manual

tbkCommand Reference (Standard API) 9-3

tbkCalConvert

DLL Function

tbkCalConvert(uint *counts, uint scans);

C

tbkCalConvert(unsigned *counts, unsigned scans);

QuickBASIC

BtbkCalConvert%(counts%, ByVal scans%)

Visual Basic

VBtbkCalConvert% (counts%(), ByVal scans%)

Turbo Pascal

ftbkCalConvert( counts:WordP; scans:word):integer;

Parameters

uint *counts

The raw data from one or more scans.

uint scans

The number of scans of raw data in the counts array.

Returns

TerrZCInvParam

- Invalid parameter value

TerrNoError

- No error

See Also

tbkReadCalFile, tbkCalSetup, tbkCalSetupConvert

Program References

None

The tbkCalConvert function performs the actual calibration of one or more scans according to
the previously called tbkCalSetup function. This function will modify the array of data passed
to it. See the Software Calibration and Zero Compensation chapter for a complete description of
calibration.

tbkCalSetup

DLL Function

tbkCalSetup(uint nscan, uint readingsPos, uint nReadings, uint chanType,
uint chanGain, uint bipolar, uint noOffset);

C

tbkCalSetup(unsigned nscan, unsigned readingsPos, unsigned nReadings,
unsigned chanType, unsigned chanGain, unsigned bipolar, unsigned noOffset);

QuickBASIC

BtbkCalSetup%(ByVal nscan%, ByVal readingsPos%, ByVal nReadings%, ByVal
chanType%, ByVal chanGain%, ByVal bipolar%, ByVal noOffset%)

Visual Basic

VBtbkCalSetup% (ByVal nscan%, ByVal readingsPos%, ByVal nReadings%, ByVal
chanType%, ByVal chanGain%, ByVal bipolar%, ByVal noOffset%)

Turbo Pascal

tbkCalSetup(nscan:word;readingsPos:byte;nReadings:byte;chanType:word;chanGai
n:word;:word;noOffset:word):integer;

Parameters

uint nscan

The number of readings in a single scan.

uint readingsPos

The position of the readings to be calibrated within the scan.

uint nReadings

The number of readings to calibrate.

uint chanType

The type of channel from which the readings to be calibrated are read. This should be set to 1 when

calibrating a CJC channel and 0 when calibrating any other channel.

uint chanGain

The gain setting of the channels to be calibrated.

uint bipolar

Non-zero if the readings are bipolar.

uint noOffset

If non-zero, the offset cal constant will not be used to calibrate the readings.

Returns

TerrZCInvParam

- Invalid parameter value

TerrNoError

- No error

See Also

tbkReadCalFile, tbkCalConvert, tbkCalSetupConvert

Program References

None

The tbkCalSetup function will configure the order and type of data to be calibrated. This
function requires all data to be calibrated to be from channels configured for the same gain, polarity
and channel type. The calibration can be configured to only use the gain calibration constant and not
the offset constant. This allows the offset to be removed at runtime using the zero compensation
functions. See the Software Calibration and Zero Compensation chapter for a complete description
of calibration.