Gx3788AnalogInScanGetSampleRate

Purpose

Returns the analog input measurement sample rate.

Syntax

Gx3788AnalogInScanGetSampleRate (nHandle, pdSampleRate, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX3788 board.
pdSampleRate
PDOUBLE
Returns the sample rate of the analog in scan operation in Hz, range is 1 to 75,000.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The actual sample rates possible is limited by the master clock and clock divider.  This is more noticeable at higher frequencies (see table below).  After calling this API, you should call Gx3788AnalogInScanGetSampleRate() API to see the actual programmed sample rate.

1 to 20,000, accuracy ± 0.5%.

20,000 to 50,000, accuracy ± 1.5%.

50,000 to 75,000, accuracy ± 3.0%.

Note: See the Gx3788AnalogInScanStart() API for a complete example code.

Example

The following example sets the analog in scan rate to 100 Hz, and gets the analog in scan rate:

 

SHORT nStatus;

DOUBLE dSampleRate;

 

Gx3788AnalogInScanSetSampleRate (nHandle, 100, &nStatus);

Gx3788AnalogInScanGetSampleRate (nHandle, &dSampleRate, &nStatus);

 

See Also

Gx3788AnalogInScanGetLastRunCount,  Gx3788AnalogInScanIsRunning, Gx3788AnalogInScanReadMemoryRawData, Gx3788AnalogInScanReadMemoryVoltages, Gx3788AnalogInScanSetChannelListIndex, Gx3788AnalogInScanSetCount, Gx3788AnalogInScanSetSampleRate, Gx3788AnalogInScanStart, GxFpgaGetErrorString