CntGetDigitalFilter


Function

Gets the digital filter value.

Format

Ret = CntGetDigitalFilter ( Id , ChNo , FilterValue )

Parameters

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

ChNo [ C: short ] [ Python: ctypes.c_short ]
Specifies the channel number which you want to get for.

FilterValue [ C: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specifies the address of variable that stores the coefficient for the digital filter value. As for digital filter value, a coefficient in the following table is returned.

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.6μ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: 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_SYS_CH_NO

20201

Channel number is outside the range.

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

Initial Value

Coefficient=0

Remarks

Gets the digital filter for the specified channel.

Example

C

Ret = CntGetDigitalFilter(Id, ChNo, &FilterValue);
 

Python

Ret = ccnt.CntGetDigitalFilter(Id, ChNo, ctypes.byref(FilterValue))
 

See Also

CntSetDigitalFilter