GxCntGetChannelSlope

Purpose

Returns the specified channel input slope.

Syntax

GxCntGetChannelSlope (nHandle, nChannel, pnSlope, 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.
pnSlope
PSHORT
Returned 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 returns channel A input slope:

 

SHORT nHandle, nMode, nStatus;

GxCntGetChannelSlope (nHandle, GXCNT_CHANNEL_A, &nMode, &nStatus)

 

See Also

GxCntSetChannelSlope, GxCntGetErrorString