CntSetDigitalFilter


Function

Sets the digital filter value.

Format

Ret = CntSetDigitalFilter ( Id , ChNo , FilterValue )

Parameters

Id [ C, C++ : short] [Python: ctypes.c_short]
Specifies the device ID retrieved from CntInit.

ChNo [ C, C++ : short] [Python: ctypes.c_short]
Specifies the channel number which you want to set.

FilterValue [ C, C++ : short] [Python: ctypes.c_short]
Sets the digital filter value by coefficient. Select the digital filter value from the following table.

Coefficient

Devices with high-performance counter

Devices with Usual Counter

0h

Not used

0.1us

1h

0.1μs

6.5us

2h

0.2μs

25.7us

3h

0.4μs

32.1us

4h

0.8μs

204.9us

5h

1.6μs

211.3us

6h

3.2μs

230.5us

7h

6.4μs

236.9us

8h

12.8μs

819.3us

9h

25.6μs

825.7us

Ah

51.2μs

844.9us

Bh

102.4μs

851.3us

Ch

204.8μs

1024.1us

Dh

409.6μs

1030.5us

Eh

819.2μs

1049.7us

Fh

1638.4μs

1056.1us

 

Return Value

Ret [ C, C++ : long] [Python: ctypes.c_long]

Definition

Value

Description

CNT_ERR_SUCCESS

0

Normal Complete

CNT_ERR_DLL_INVALID_ID

10001

Invalid ID is specified.

CNT_ERR_DLL_CALL_DRIVER

10002

Driver cannot be called (failed in ioctl).

CNT_ERR_DLL_MODE

10100

Invalid mode setting.

CNT_ERR_SYS_MODE

20100

Invalid mode setting.

CNT_ERR_SYS_CH_NO

20201

Channel number is outside the range.

The other errors: (See also: Details of Error Code)

Initial Value

Coefficient=0

Remarks

Specifies the digital filter for the specified channel.
The setting in this function is effective after the counter starts.

Example

C, C++

Ret = CntSetDigitalFilter(Id, ChNo, FilterValue);
 

Python

gin-left: 0;">Ret = ccnt.CntSetDigitalFilter(Id, ChNo, FilterValue)
 

See Also

CntGetDigitalFilter