GxCntSetChannelFilterMode

Purpose

Sets the specified channel filter mode.

Syntax

GxCntSetChannelFilterMode (nHandle, nChannel, nMode, 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.
nMode
SHORT
Sets channel’s filter mode:
  • 0 = GXCNT_FILTER_OFF: The filter is disabled.
  • 1 = GXCNT_FILTER_AUTO: In this mode the filter is enabled and the driver analyzes the measured signal and determines the best filter value each time GxCntReadMeasurement or GxCntReadMeasurementString is called.
  • 2 = GXCNT_FILTER_VALUE_FIXED: In this mode the filter is enabled and the user sets the filter value see GxCntSetChannelFilterValue for details.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The Filter should be enabled when measuring low frequencies (less than 20KHz) superimposed with a high-frequency noise. When enabled the Filter adds a delay in microseconds after first trigger is detected. The counter will then disregard any additional trigger events for the duration of the delay.

Example

The following example sets channel A filter mode to auto:

 

SHORT nHandle, nStatus;

GxCntGetChannelFilterMode (nHandle, GXCNT_CHANNEL_A, GXCNT_FILTER_AUTO, &nStatus)

 

See Also

GxCntGetChannelFilterMode, GxCntGetErrorString