Tbksetfreq, Tbksetmode – Measurement Computing TempBook rev.3.0 User Manual

Page 81

Advertising
background image

TempBook User’s Manual

tbkCommand Reference (Standard API) 9-21

tbkSetFreq

DLL Function

int tbkSetFreq(float freq);

C

tbkSetFreq(float freq);

QuickBASIC

BtbkSetFreq% (ByVal freq!)

Visual Basic

VBtbkSetFreq% (freq!)

Turbo Pascal

tbkSetFreq( freq:real ):integer;

Parameters

float freq

The sampling frequency in Hz
Valid values: 100000.0 - 0.0002

Returns

TerrNoError

- No error

See Also

tbkGetFreq, tbkSetClk

Program References

None

tbkSetFreq

calculates then sets the frequency of the pacer clock using the specified frequency in

Hz. The frequency is converted to two counter values that control the frequency of the pacer clock.
In this conversion, some resolution of the frequency may be lost. tbkRdFreq can be used to read
the exact frequency setting of the pacer clock. tbkSetClk can be used to explicitly set the two
counter values of the pacer clock. The pacer clock can be used to control the sampling rate of the
A/D converter.

tbkSetMode

DLL Function

tbkSetMode(uchar di_se, uchar polarity);

C

tbkSetMode(unsigned char di_se, unsigned char polarity);

QuickBASIC

BtbkSetMode% (ByVal di_se%, ByVal polarity%)

Visual Basic

VBtbkSetMode% (ByVal di_se%, ByVal polarity%)

Turbo Pascal

tbkSetMode( di_se:byte; polarity:byte ):integer;

Parameters

uchar di_se

Zero value causes TempBook to go to single-ended mode (power-on default).
Non-zero value causes differential mode.

uchar polarity

Zero value causes TempBook to default to Unipolar mode. Non-zero value causes default Bipolar
mode. All ADC conversions except those started with

tbkSetScan

will use the default polarity.

Returns

TerrNoError

- No error

See Also
Program References

None

tbkSetMode

is used to program the gain amp for single-ended or differential operation and to set

the default polarity.

Single-ended operation measures the voltage of the selected channel referred to analog ground.
Differential operation measures differences in voltage between a pair of selected channels.

Polarity is unipolar or bipolar:

Unipolar maximum voltage range is 0 to +10 V

Bipolar maximum voltage range is -10 to +10 V.

Advertising