Sets the function mode to Pulse Width.
GxCntSetFunctionPulseWidth (nHandle, , nChannel, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a counter board. |
nChannel |
SHORT |
Specified Channel number:
|
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
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.
The following example sets the function to measure pulse width on channel B:
SHORT nHandle, nStatus;
GxCntSetFunctionPulseWidth (nHandle, GXCNT_MEASURE_CHANNEL_B, &nStatus);
GxCntGetGateTime, GxCntSetChannelSlope, GxCntSetChannelTriggerLevelMode, GxCntSetChannelTriggerLevel, GxCntGetErrorString