beautypg.com

Tbkzerosetup, Tbkzerosetupconvert – Measurement Computing TempBook rev.3.0 User Manual

Page 91

background image

TempBook User’s Manual

tbkCommand Reference (Standard API) 9-31

tbkZeroSetup

DLL Function

tbkZeroSetup(uint nscan, uint ZeroPosition, uint readingsPosition, uint
nReadings);

C

tbkZeroSetup(unsigned nscan, unsigned zeroPos, unsigned readingsPos,
unsigned nReadings);

QuickBASIC

BtbkZeroSetup% (ByVal nscan%, ByVal zeroPosition%, ByVal readingsPos%, ByVal
nReadings%)

Visual Basic

VBtbkZeroSetup% (ByVal nscan%, ByVal zeroPosition%, ByVal readingsPos%,
ByVal nReadings%)

Turbo Pascal

tbkZeroSetup( nscan:word; zeroPos:word; readingsPos:word;
nReadings:word):integer;

Parameters

uint nscan

The number of readings in a single scan.

uint zeroPosition

The position of the zero reading within the scan

uint

readingsPosition

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

uint nReadings

The number of readings immediately following the zero reading that are sampled at the same gain as
the zero reading.

Returns

TerrZCInvParam

- Invalid parameter value

TerrNoError

- No error

See Also

tbkZeroConvert, tbkZeroSetupConvert, tbkAutoZero

Program References

None

The tbkZeroSetup function configures the location of the shorted channel and the channels to be
zeroed within a scan, the size of the scan and the number of readings to zero. This function does not
do the conversion. A non-zero return value indicates an invalid parameter error. See the Software
Calibration and Zero Compensation chapter for a complete description of zero compensation.

tbkZeroSetupConvert

DLL Function

tbkZeroSetupConvert(uint nscan, uint ZeroPosition, uint readingsPosition,
uint nReadings, uint *counts, uint scans);

C

tbkZeroSetupConvert(unsigned nscan, unsigned zeroPos, unsigned readingsPos,
unsigned nReadings, unsigned *counts, unsigned scans);

QuickBASIC

BtbkZeroSetupConvert% (ByVal nscan%, ByVal zeroPosition%, ByVal
readingsPos%, ByVal nReadings%, counts%, ByVal scans%)

Visual Basic

VBtbkZeroSetupConvert% (ByVal nscan%, ByVal zeroPosition%, ByVal
readingsPos%, ByVal nReadings%, counts%(), ByVal scans%)

Turbo Pascal

tbkZeroSetupConvert(nscan:word;zeroPos:word;readingsPos:word;nReadings:word;
counts:WordP;scans:word):integer;

Parameters

uint nscan

The number of readings in a single scan.

uint zeroPosition

The position of the zero reading within the scan

uint

readingsPosition

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

uint nReadings

The number of readings immediately following the zero reading that are sampled at the same gain as
the zero reading.

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

tbkZeroSetup, tbkZeroConvert, tbkAutoZero

Program References

None

For convenience, both the setup and convert steps can be performed with one call to
tbkZeroSetupConvert

. This is useful when the zero compensation needs to be performed

multiple times because data was read from channels at different gains or polarities. See the Software
Calibration and Zero Compensation chapter for a complete description of zero compensation.