GxCntSetFunctionPeriod

Purpose

Sets the function mode to Period.

Syntax

GxCntSetFunctionPeriod (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

Sets the mode to Period on the specified channel.

The signal period is measured in exactly the same way as the signal frequency, described above. The period is simply the reciprocal of the frequency, since Period = 1/Frequency.

Example

The following example sets the gate time to 1mS:

 

SHORT nHandle, nStatus;

GxCntSetFunctionPeriod (nHandle, GXCNT_MEASURE_CHANNEL_B, &nStatus);

 

See Also

GxCntSetFunctionFrequency, GxCntSetGateTime, GxCntSetAcquisitionTimeInterval, GxCntSetAcquisitionMode, GxCntGetErrorString