Sets the function mode to Pulse Width.
CalCounterSetFunctionPulseWidth (hHandle, nChannel, plStatus)
Name |
Type |
Comments |
hHandle |
LONG |
Handle for a Counter. |
nChannel |
SHORT |
Select channel (0-based). |
plStatus |
PLONG |
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 CalCounterSetSlopefunction. Threshold levels can be set using CalCounterSetTriggerLevel.
The following example sets channel 0’s function mode to Pulse Width:
LONG lHandle, lStatus;
CalCounterSetFunctionPulseWidth (lHandle, 0, &lStatus);
CalCounterMeasure, CalCounterSetSlope, CalCounterSetGateTime, CalCounterSetTriggerLevel, CalCounterGetError