Function
Sets the digital filter values for all external control signals.
Format
Ret = AioSetControlFilter ( Id , Signal , Value )
Parameters
Id [ C, C++ : short ] [ Python
: ctypes.c_short ]
Specifies the device ID retrieved from
AioInit.
Signal
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the external control signal for setting filter.
For Z-series devices such as AI-1204Z-PE, 0, 1, 2 or -1 can be set. For
other divide, set -1.
External control signal |
Macro |
Value |
Analog input external clock |
AIO_AIF_CLOCK |
0 |
Analog input external start trigger |
AIO_AIF_START |
1 |
Analog input external stop trigger |
AIO_AIF_STOP |
2 |
Analog output external clock (Reserved) |
AIO_AOF_CLOCK |
3 |
Analog output external start trigger (Reserved) |
AIO_AOF_START |
4 |
Analog output external stop trigger (Reserved) |
AIO_AOF_STOP |
5 |
All control signals above |
AIO_ALLF |
-1 |
Value
[ C, C++ : float ] [ Python : ctypes.c_float ]
Sets the filter time from the following range in the unit of "usec".
Filter time |
0 (Not use) |
0.05 |
1 |
10 |
100 |
128 |
16000 |
Return values
Ret [ C, C++ : long ] [ Python : ctypes.c_long ]
Return values |
Content |
0 |
Normality completion |
7 |
Execute AioResetDevice function because the device has recovered from standby mode |
10001 |
Invalid
Id was specified |
10002 |
AIO
driver can't be called |
10340 |
The value of Signal is outside the designated range of the function |
10341 |
The value of Value is outside the designated range of the function |
20001 |
This function can't be used by this device |
20002 |
Can
not use while by another device works |
20003 |
Can
not use because another process is using the device |
20340 |
The value of Signal is outside the designated range of the device being used |
20341 |
The value of Value is outside the designated range of the device being used |
Initial values
For all signal lines, filter is disabled
Remarks
If the filter is set, the high frequency component (noise, chattering and so on) can be removed.
The larger the value of filter time setting is, the better the noise and chattering can be avoided. But the delay time of switching between ON and OFF will become longer.
If the device is in operation, the function cannot be performed.
For the device whose input terminal of the
external control signal is common with the digital input, you cannot set
the digital filter with this function.
Please use AioSetDiFilter
function.
Specifications based on devices
AI-1204Z-PE |
Usable Value is 0, 0.05, 1, 10, 100. |
AI-1664UG-PE |
Usable Value is 0, 0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 512.0, 1024.0, 2048.0, 4096.0, 8192.0, 16000.0. |
AIO-163202F-PE |
Usable Value is 0, 1, 128, 16000. |
AIO-160802L-LPE |
Usable Value is 0 or 1. |
AI-1616L-LPE |
Usable Value is 0 or 1. |
AO-1604L-LPE |
Usable Value is 0 or 1. |
AIO-163202FX-USB |
Usable Value is 0, 1, 128, 16000. |
AI-1664LAX-USB |
Usable Value is 0 or 1. |
AO-1604LX-USB |
Usable Value is 0 or 1. |
AI-1608AY-USB |
Usable Value is 0 or 1. |
Example
Sets the filter to 1 usec to all control signals.
C, C++ |
long
Ret; |
Python |
Ret
= ctypes.c_long() |