GxCntSetChannelFilterValue  

Purpose

Returns the specified channel filter value.

Syntax

GxCntSet (nHandle, nChannel, pdValue, 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.
pnValue
PSHORT
Return the specified channel filter value. The filter value is an integer representing filter value in uSec, e.g. value of 50 represents 50uSec. Filter value range from 5 to 6400, (5uSec to 6400uSec).
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The Filter should be used when measuring low frequencies (less then 20KHz) superimposed with a high-frequency noise. The Filter value adds a delay equal to pdValue in microseconds. After first trigger is detected the counter will disregard any additional trigger events for pdValue microseconds.

Note: The delay needs to be less than half of the expected frequency signal duty cycle. Filter value can be set when the filter mode is set to GXCNT_FILTER_VALUE_FIXED.

The filter value should be set according to the following equation:

Filter value ±     1.0E + 6              

                    Expected Frequency*4

E.g.: if the expected value is about 10KHz then filter value should be around 25uSec.

Example

The following example returns channel A filter value to 55uSec:

 

SHORT nHandle, nStatus;

SHORT nValue

GxCntGetChannelFilterValue (nHandle, GXCNT_CHANNEL_A, &nValue, &nStatus))

 

See Also

GxCntSetChannelFilterValue, GxCntGetErrorString