Returns the specified channel filter value.
GxCntGetChannelFilterValue (nHandle, nChannel, nValue, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a counter board. |
nChannel |
SHORT |
Specified Channel number:
|
nValue |
SHORT |
Sets 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. |
The Filter should be used when measuring low frequencies (less than 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:
![]()
E.g.: if the expected value is about 10KHz then filter value should be around 25uSec.
The following example returns channel A filter value:
SHORT nHandle, nStatus;
DOUBLE dValue
GxCntGetChannelFilterValue (nHandle, GXCNT_CHANNEL_A, &dValue, &nStatus)
GxCntSetChannelFilterValue, GxCntGetErrorString