beautypg.com

Tbksetscan – Measurement Computing TempBook rev.3.0 User Manual

Page 84

background image

9-24 tbkCommand Reference (Standard API)

TempBook User’s Manual

tbkSetScan

DLL Function

int tbkSetScan(uint *chans, uchar *gains, uchar polarities, uint count);

C

tbkSetScan(unsigned *chans, unsigned char *gains, unsigned char *polarity,
unsigned count);

QuickBASIC

BtbkSetScan% (chans%, gains%, polarity%, ByVal count%)

Visual Basic

VBtbkSetScan% (chans%(), gains%(), polarity%(), count%)

Turbo Pascal

tbkSetScan( chans:WordP; gains:ByteP; polarity:ByteP; count:word ):integer;

Parameters

uint *chans

An array of up to 512 channel numbers (see table at end of chapter for valid values)

uchar *gains

An array of up to 512 gain values (see table at end of chapter for valid values)

uchar polarities

An array of up to 512 polarity values. Zero value causes TempBook/66 to select Unipolar mode. Non-
zero values causes Bipolar mode.

uint count

The number of values in the chans and gains arrays
Valid values: 1 - 512

Returns

TerrNotCapable

- No high speed digital

TerrInvGain

- Invalid gain

TerrInvChan

- Invalid channel

TerrNoError

- No error

See Also

tbkGetScan, tbkSetMux

Program References

tbkSetScan

configures a scan sequence consisting of multiple channels, polarities and

corresponding gains. As many as 512 entries can be made in the scan configuration. Any analog
input channel at any gain can be included in the scan. Channels can be entered multiple times at the
same or different gain. The high-speed digital I/O port can also be included although its gain value
will be ignored.