GxCntSetCommonInput

Applies To

GTX2210, GTX2220, GTX2230

Purpose

Sets the common input mode state and active input channel.

Syntax

GxCntSetCommonInput (nHandle, bEnable, nActiveInputChannel, pnStatus)

Parameters

Name
Type
Description
nHandle
SHORT
Handle to a counter board.
bEnable
BOOL
Sets the common input mode:
  • 0 = FALSE: Common input mode is disabled.
  • 1 = TRUE: Common input mode is enabled.
nActiveInputChannel
SHORT
Specified active channel from the common input:
  • 0 = GXCNT_CHANNEL_A: Channel A
  • 1 = GXCNT_CHANNEL_B: Channel B.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Enabling this mode allows the user to make measurements like rise and fall time on the same input signal without the need to connect both inputs.

Valid only for GTX2210/20/30 board with firmware versions 0xCXXX and above.

In the common input mode, nActiveInputChannel input is connected internally to both channels.

The following example summarizes how to use the Common Input setting to make a rise/fall measurement on a single channel:

Measurement
Connected to
Slope "A"
Threshold "A"
Slope "B"
Threshold "B"
Measurement Function
Rise time
Ch A
Positive
0.5
Positive
4.5V
Interval A to B
Rise time
Ch A
Positive
4.5V
Positive
0.5V
Interval B to A
Rise time
Ch B
Positive
4.5V
Positive
0.5V
Interval B to A
Rise time
Ch B
Positive
0.5V
Positive
4.5V
Interval A to B
Fall time
Ch A
Negative
0.5V
Negative
0.5V
Interval A to B
Fall time
Ch A
Negative
0.5V
Negative
4.5V
Interval B to A
Fall time
Ch B
Negative
4.5V
Negative
4.5V
Interval B to A
Fall time
Ch B
Negative
4.5V
Negative
0.5V
Interval A to B

Example

The following example enables the common input mode and set channel B as the active input channel:

 

GxCntSetCommonInput(nHandle, TRUE, GXCNT_CHANNEL_B: Channel B, &nStatus);

 

See Also

GxCntGetCommonInput, GxCntGetErrorString