GxCntSetFunctionWidth

Purpose

Sets the function mode to Pulse Width.

Syntax

GxCntSetFunctionPulseWidth (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 this mode the counter measures pulse width on the specified channel. The pulse polarity (i.e. positive or negative) is set by GxCntSetChannelSlope function. Measurement resolution is 10nS for GC2210/GTX2210, and 100pS for GC2220/GC2230/GTX2220/GTX2230. Threshold levels can be set either to auto trigger GxCntSetChannelTriggerLevelMode or explicitly GxCntSetChannelTriggerLevel.

Example

The following example sets the function to measure pulse width on channel B:

 

SHORT nHandle, nStatus;

GxCntSetFunctionPulseWidth (nHandle, GXCNT_MEASURE_CHANNEL_B, &nStatus);

 

See Also

GxCntGetGateTime, GxCntSetChannelSlope, GxCntSetChannelTriggerLevelMode, GxCntSetChannelTriggerLevel, GxCntGetErrorString