Sets the specified channel input trigger level mode.
GxCntSetChannelTriggerLevelMode (nHandle, , nChannel, nMode, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a counter board. |
nChannel |
SHORT |
Specified Channel number:
|
nMode |
SHORT |
Channel’s input trigger level mode:
See comments for details. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
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:
GXCNT_TRIGGER_LEVEL_FIXED: Sets the trigger level to the value displayed in the Set Level controls.
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.
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.
The following example sets channel A Trigger Level mode to auto:
SHORT nHandle, nMode, nStatus;
DOUBLE dVoltage;
GxCntGetChannelTriggerLevelMode (nHandle, GXCNT_TRIGGER_LEVEL_AUTO, &dVoltage, &nStatus)
GxCntGetChannelTriggerLevelMode, GxCntSetChannelTriggerLevel, GxCntGetChannelTriggerLevel, GxCntGetErrorString