Gx3722HighBandwidthGetFrequency

Purpose

Returns the programmed frequency of the specified High Bandwidth output channel.

Syntax

Gx3722HighBandwidthGetFrequency (nHandle, nChannel, pnFrequency, 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.
pnFrequency
PSHORT
Returns the frequency of the selected channel:
0.      GX3722_HBW_STIM_FREQ_OFF: Channel does not output.
1.      GX3722_HBW_STIM_FREQ_125KHZ: Frequency is 125 KHz.
2.      GX3722_HBW_STIM_FREQ_250KHZ: Frequency is 250 KHz.
3.      GX3722_HBW_STIM_FREQ_500KHZ: Frequency is 500 KHz.
4.      GX3722_HBW_STIM_FREQ_1MHZ: Frequency is 1 MHz.
5.      GX3722_HBW_STIM_FREQ_2MHZ: Frequency is 2 MHz.
6.      GX3722_HBW_STIM_FREQ_4MHZ: Frequency is 4 MHz.
7.    GX3722_HBW_STIM_FREQ_8MHZ: Frequency is 8 MHz.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

When programmed by a call to Gx3722HighBandwidthSetFrequency() API, the specified channel will output a square wave: a pulse train with a fixed duty cycle of 50%.  This function can be used to retrieve the frequency selection of an actively outputting channel.

Example

The following example gets the programmed frequency of High Bandwidth channel 2:

 

Gx3722HighBandwidthGetFrequency (nHandle, GX3722_HBW_STIM_CH2, &nFrequency, &nStatus);

 

See Also

Gx3722HighBandwidthSetFrequency, GxFpgaGetErrorString