GxCntSetChannelSlope

Purpose

Sets the specified channel input slope.

Syntax

GxCntSetChannelSlope (nHandle, nChannel, nSlope, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a counter board.
nChannel

SHORT

Specified Channel number:
  • 0 = GXCNT_CHANNEL_A: Channel A
  • 1 = GXCNT_CHANNEL_B: Channel B.
nSlope
SHORT
Channel’s slope:
  • 0 = GXCNT_POSITIVE_SLOPE: Rising (Positive) edge.
  • 1 = GXCNT_NEGATIVE_SLOPE: Falling (Negative) edge.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The channel slope sets the input signal edge that utilized for the measurement. The slope can specify either rising (Positive) edge or falling (Negative) edge.

Example

The following example sets channel A input slope to negative:

 

SHORT nHandle, nStatus;

GxCntGetChannelSlope (nHandle, GXCNT_CHANNEL_A, GXCNT_NEGATIVE_SLOPE, &nStatus)

 

See Also

GxCntGetChannelSlope, GxCntGetErrorString