CalCounterSetFunctionPulseWidth

Purpose

Sets the function mode to Pulse Width.

Syntax

CalCounterSetFunctionPulseWidth (hHandle, nChannel, plStatus)

Parameters

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.

Comments

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.

Example

The following example sets channel 0’s function mode to Pulse Width:

 

LONG   lHandle, lStatus;

 

CalCounterSetFunctionPulseWidth (lHandle, 0, &lStatus);

 

See Also

CalCounterMeasure, CalCounterSetSlope, CalCounterSetGateTime, CalCounterSetTriggerLevel, CalCounterGetError