Gx3722HighBandwidthRead

Purpose

Measures the frequency and pulse width of the signal on the specified High Bandwidth input channel.

Syntax

Gx3722HighBandwidthRead (nHandle, nChannel, pdFrequency, pdPulseWidth, pnMeasurementStatus, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX3722 board.
nChannel
SHORT
Select the High Bandwidth stimulus channel to use:
1.      GX3722_HBW_STIM_CH1: High Bandwidth output channel 1
2.      GX3722_HBW_STIM_CH2: High Bandwidth output channel 2
3.      GX3722_HBW_STIM_CH3: High Bandwidth output channel 3
4.    GX3722_HBW_STIM_CH4: High Bandwidth output channel 4
pdFrequency
PDOUBLE
Returns the measured frequency in Hz.
pdPulseWidth
PDOUBLE
Returns the measured pulse width in microseconds (uS).
pnMeasurementStatus
PSHORT
Returns information about the measurement:
0.      GX3722_HBW_MEAS_SUCCESS: The reading completed successfully.
1.    GX3722_HBW_MEAS_TIMEOUT: No signal was detected.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The HBW Stimulus channels operate independently from the HBW Measurement channels.

If the signal to the specified measurement channel is intermittent or inconsistent, the resulting measurement will be invalid.  On a stable signal, multiple calls to Gx3722HighBandwidthRead() API should be consistent and the function will after a 1 mSec sampling window is complete.

If no signal is detected after 100 millseconds of calling this function, pnMeasurementStatus will be assigned the value of and the values of pdFrequency and pdPulseWidth will be invalid.

Example

The following example performs a measurement from High Bandwidth measurement channel 1:

 

DOUBLE dFrequency, dPulseWidth;

SHORT nMeasStatus, nStatus;

 

Gx3722HighBandwidthRead (nHandle, GX3722_HBW_MEAS_CH1, &dFrequency, &dPulseWidth, &nMeasStatus, &nStatus);

 

See Also

GxFpgaGetErrorString