GxCntGetChannelTriggerLevelMode

Purpose

Returns the specified channel input trigger level mode.

Syntax

GxCntGetChannelTriggerLevelMode (nHandle, , nChannel, pnMode, 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.
pnMode
PSHORT
Returned channel’s input trigger level mode:
  • 0 = GXCNT_TRIGGER_LEVEL_FIXED
  • 1 = GXCNT_TRIGGER_LEVEL_AUTO
  • 2 = GXCNT_TRIGGER_LEVEL_HOLD_LAST
See comments for details.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The Trigger Level setting defines the input signal voltage that creates a logical event from the input comparator circuit (trigger level is also commonly known as “threshold” voltage). The trigger level can be set anywhere between +5.0V and -5.0V, with 1mV resolution for PCB revision C and above (40mV for previous PCB). User entered values are rounded to the nearest least significant bit.

See GxCntSetChannelTriggerLevelMode function for more details.

The following shows channel A and B values:

0 GXCNT_TRIGGER_LEVEL_FIXED: Sets the trigger level to the value displayed in the Set Level

controls.

1 GXCNT_TRIGGER_LEVEL_AUTO: The board evaluates the peak input signal levels just before each

measurement. The trigger levels are then automatically set to the approximate signal midpoint. Auto trigger

may add up to 250 ms per measurement and is specified only for signal frequencies above 100 Hz. Auto

trigger and Hold can be used together to provide most of the benefits of auto trigger without excessive

measurement time.

2 GXCNT_TRIGGER_LEVEL_HOLD_LAST: The trigger level setting that was active when it was invoked. The

primary application for “Hold” is to maintain an auto trigger set threshold over a number of measurements,

without incurring the auto trigger time penalty on each measurement.

Example

The following example returns channel A Trigger Level setting:

 

SHORT nHandle, nMode, nStatus;

DOUBLE dVoltage;

GxCntGetChannelTriggerLevelMode (nHandle, GXCNT_CHANNEL_A, &dVoltage, &nStatus)

 

See Also

GxCntSetChannelTriggerLevelMode, GxCntSetChannelTriggerLevel, GxCntGetChannelTriggerLevel, GxCntGetErrorString