GxCntSetFunctionTotalize

Purpose

Sets function to Totalize.

Syntax

GxCntSetFunctionTotalize  (nHandle, , nChannel, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a counter board.
nChannel
SHORT
Specified Channel number:
  • 0 = GXCNT_MEASURE_CHANNEL_A: measure channel A.
  • 1 = GXCNT_MEASURE_CHANNEL_B: measure channel B.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

In Totalize mode counting is controlled explicitly by software commands.

Note: GxCntGetTotalizeGateMode function opens and closes the count gate.

 

GxCntlClear function clears the count.

If the counter is already in the Totalize mode, counting stops and the count is cleared.

The Totalize function allows events on one input channel to be counted for a period of time determined by either manual keyboard inputs, program statements

In the “manual” mode, a mouse click or program statement will explicitly open the count gate, close the count gate, or reset the count to zero. The manual mode provides the most convenient control of counting, but does not allow precise timing.

The “gated” mode allows a second input signal to open and close the gate on user specified signal transitions. After the gate closes, the measurement data is held until explicitly reset by the user or by a program statement.

The gating interval for gated Totalize mode is defined by the “Gated Tot Slopes” entries of the Inputs menu. Selecting like slopes for the start and stop (e.g. both positive) sets the gating interval to one period of the gating signal. Setting opposite slopes for start and stop changes the gating interval to a pulse width of the gating signal.

Example

The following example sets the gate time to 1mS:

 

SHORT nHandle, nStatus;

GxCntSetFunctionTotalize (nHandle, 0.001, &nStatus)

 

See Also

GxCntGetGateTime, GxCntSetAcquisitionTimeInterval, GxCntGetAcquisitionTimeInterval, GxCntSetAcquisitionMode, GxCntGetAcquisitionMode, GxCntGetErrorString