GxCntGetClockSource

Purpose

Returns the board clock source.

Syntax

GxCntGetClockSource(nHandle, pnSource, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a counter board.
pnSource
PSHORT
Returned clock source:
  • 0 = GXCNT_CLOCK_INTERNAL: Selects the internal clock installed on the board.
  • 1 = GXCNT_CLOCK_EXTERNAL: External clock input as the clock.
  • 2 = GXCNT_CLOCK_ALTERNATE: When measuring only one channel the second (or alternate) channel can be defined as the reference frequency input. The main input channels provide better signal conditioning than the External Clock input. This mode affects only Frequency, FastFrequency, Period, Single Period and Width functions.
  • 3 = GXCNT_CLOCK_PXI_10MHZ_CLOCK: The PXI chassis backplane 10MHz clock line (PXI_CLK10) is the clock. Applied only to GTX2220/30 models.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Settings the clock source to GXCNT_CLOCK_PXI_10MHZ_CLOCK (GTX2220/30 only):

The PXI chassis has a 10 MHz clock line (PXI_CLK10) in its backplane that allows devices plugged into the non-star controller slots (slots 3 and higher) to phase-lock their oscillators to the backplane clock. A single backplane clock can control this way the drift in the oscillators on all the devices in the non-star controller slots. The GTX2220/30board, when plugged into the star-controller slot (slot 2) can replace the PXI backplane clock with its much more stable oscillator. Alternatively, when plugged into one of the non-star controller slots (slots 3 and higher), the GTX2220/30board can be programmed that its clock source will use the PXI backplane clock.

Caution: The reference frequency must be within 5% of 10 MHz, or the resolution may be significantly reduced.

Example

The following example returns the clock source:

 

SHORT nHandle, nSource, nStatus;

GxCntGetClockSource (nHandle, &nSource, &nStatus)

 

See Also

GxCntSetClockSource, GxCntSetCounterRefClockToPxiRefClockState, GxCntGetCounterRefClockToPxiRefClockState, GxCntGetErrorString