GxCntGetPrescalerMode

Purpose

Returns the pre-scale mode for both channels.

Syntax

GxCntGetPrescalerMode (nHandle, , pnMode, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a counter board.
pnMode
PSHORT
Returns the pre-scale mode:
  • 0 = GXCNT_PRESCALE_OFF: Prescaling set to off.
  • 1 = GXCNT_PRESCALE_ON: Prescaling set to on, the counter continuously prescales the actual measurement.
  • 2 = GXCNT_PRESCALE_AUTO: The counter determines the need for prescaling automatically by making a quick frequency check prior to the actual measurement. The process takes about 20 S.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Prescaling is necessary when the input frequency exceeds 10MHz in Frequency, Period, Ratio, and AutoRatio modes (see Specifications). Prescaling does not affect resolution or accuracy in any way.

The by the user, or it can be set to auto mode.

If the input frequency exceeds 10MHz and arming is enabled, the prescaler must be explicitly turned on. The prescaler reverts to the off state whenever arming is enabled, to reduce potential measurement start point ambiguity (up to 4 Acquisitions of the input signal may pass before the counter starts).

Example

The following example returns the prescale mode:

 

SHORT nHandle, nMode, nStatus;

GxCntGetPrescalerMode (nHandle, &nMode, &nStatus)

 

See Also

GxCntSetGateTime, GxCntSetAcquisitionTimeInterval, GxCntGetAcquisitionTimeInterval, GxCntSetAcquisitionMode, GxCntGetAcquisitionMode, GxCntGetErrorString