GxCntSetFunctionRatio

Purpose

Sets the function mode to Ratio.

Syntax

GxCntSetFunctionRatio (nHandle, nMode, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a counter board.
nMode
SHORT
Measurement Mode:
  • 0 = GXCNT_MEASURE_A_DIVIDED_BY_B: measure channel A divided by channel B.
  • 1 = GXCNT_MEASURE_B_DIVIDED_BY_A: measure channel B divided by channel A.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

This mode determines the ratio between the signal frequency on one input channel and the signal frequency on the second input channel. The measurement is performed during a user definable interval or gate time: (long gate time produce higher resolution results).

The counter tests the input signals and automatically selects the internal connections that maximize resolution. The measurement results are automatically converted to the specified mode (e.g. A/B or B/A).

Note: Only one of the input signals may exceed 25MHz and should not be used when signal frequencies drop below 400 Hz.

Example

The following example sets the function mode to Ratio B/A:

 

SHORT nHandle, nStatus;

GxCntSetFunctionRatio (nHandle, GXCNT_MEASURE_B_DIVIDED_BY_A, &nStatus);

 

See Also

GxCntSetFunctionAutoRatio, GxCntSetGateTime, GxCntSetAcquisitionTimeInterval, GxCntSetAcquisitionMode, GxCntGetAcquisitionMode, GxCntGetErrorString