Function
Retrieves the digital filter value. Supports multi-processing.
Format
Ret = CntGetDigitalFilter ( Id , ChNo , FilterValue )
Parameters
Id
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
Specify the device ID retrieved from CntInit
ChNo
[ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short
]
Specify the channel number for retrieving.
FilterValue
[ VB.NET: Short ] [ C, C++: short * ] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_short)
]
Specify the address of the variable that stores the retrieved digital filter
value coefficient. Digital filter value is returned from the following
table.
[Devices with sampling function]
Coefficient |
Value |
Input frequency |
0h |
Not used |
|
1h |
0.1us |
Approx. 1MHz max. |
2h |
0.2us |
Approx. 505kHz max. |
3h |
0.4us |
Approx. 250kHz max. |
4h |
0.8us |
Approx. 125kHz max. |
5h |
1.6us |
Approx. 62.5kHz max. |
6h |
3.2us |
Approx. 31.3kHz max. |
7h |
6.4us |
Approx. 15.6Hz max. |
8h |
12.8us |
Approx. 7.8kHz max. |
9h |
25.6us |
Approx. 3.9kHz max. |
Ah |
51.2us |
Approx. 2kHz max. |
Bh |
102.6us |
Approx. 980Hz max. |
Ch |
204.8us |
Approx. 490Hz max. |
Dh |
409.6us |
Approx. 240Hz max. |
Eh |
819.2us |
Approx. 120Hz max. |
Fh |
1.6384ms |
Approx. 61Hz max. |
[Other devices]
Coefficient |
Value |
Input frequency |
0h |
0.1us |
Approx. 1MHz max. |
1h |
6.5us |
Approx. 15kHz max. |
2h |
25.7us |
Approx. 3.5kHz max. |
3h |
32.1us |
Approx. 3kHz max. |
4h |
204.9us |
Approx. 480Hz max. |
5h |
211.3us |
Approx. 470Hz max. |
6h |
230.5us |
Approx. 430Hz max. |
7h |
236.9us |
Approx. 420Hz max. |
8h |
819.3us |
Approx. 122Hz max. |
9h |
825.7us |
Approx. 121Hz max. |
Ah |
844.9us |
Approx. 118Hz max. |
Bh |
851.3us |
Approx. 117Hz max. |
Ch |
1024.1us |
Approx. 97Hz max. |
Dh |
1030.5us |
Approx. 96Hz max. |
Eh |
1049.7us |
Approx. 95Hz max. |
Fh |
1056.1us |
Approx. 94Hz max. |
Return Value
Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]
Definition |
Value |
Description |
CNT_ERR_SUCCESS |
0 |
Normality completion |
CNT_ERR_SYS_RECOVERED_FROM_STANDBY |
7 |
Execute the function CntResetDevice to return from the standby mode. |
CNT_ERR_DLL_INVALID_ID |
10001 |
Invalid ID was specified. |
CNT_ERR_DLL_CALL_DRIVER |
10002 |
CNT driver can't be called (Failed in the device I/O control). |
CNT_ERR_DLL_BUFF_ADDRESS |
10101 |
Invalid data buffer address. |
CNT_ERR_SYS_BOARD_EXECUTING |
20002 |
Cannot use while by another device works. |
CNT_ERR_SYS_CH_NO |
20201 |
Channel number is out of range. |
The others: (See also: Details of Error Code)
Initial Value
Coefficient=0
Remarks
Retrieves the digital filter value of specified channel.
Example
Retrieves the digital filter value of channel 0.
VB.NET |
Dim Ret As Integer |
C, C++ |
long Ret; |
C# |
int Ret; |
Python |
Ret = ctypes.c_long() |
See Also