Function
Sets the conversion start condition.
Format
Ret = AioSetAiStartTrigger ( Id , AiStartTrigger )
Parameters
Id
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the Device ID retrieved from AioInit function.
AiStartTrigger
[ C, C++ : short ] [ Python : ctypes.c_short ]
Sets the conversion start condition from the following range.
The available value differs by the device.
0 |
Software |
1 |
External trigger rising edge |
2 |
External trigger falling edge |
3 |
Level comparison |
4 |
In Range comparison |
5 |
Out Range comparison |
10 |
Event controller output |
Return value
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 |
11160 |
The value of AiStartTrigger 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 |
21160 |
The value of AiStartTrigger is outside the designated range of the device being used |
Initial value
Software start for all devices
Remarks
If the conversion start condition is "Level
comparison", please use AioSetAiStartLevel
function to set Level comparison start.
If the conversion start condition is "In Range comparison", please
use AioSetAiStartInRange function
to set In Range comparison start.
If the conversion start condition is "Out Range comparison",
please use AioSetAiStartOutRange
function to set Out Range comparison start.
If the event controller output is used as the clock, please use AioSetEcuSignal
function to connect Event controller.
If you only perform this function, the connection of the event controller
isn't changed.
This function cannot be used on devices without
the analog input function.
If the device is in operation, the function cannot be performed.
Specifications based on devices
AI-1204Z-PE |
Available AiStartTrigger is 0, 1, 2, 3, 4, 5, 10. |
AI-1664UG-PE |
Available AiStartTrigger is 0, 1, 2, 3, 4, 5, 10. |
AIO-160802L-LPE |
Available AiStartTrigger is 0, 1, 2, 3. |
AI-1616L-LPE |
Available AiStartTrigger is 0, 1, 2, 3. |
AD12-16(PCI)EV |
Available AiStartTrigger is 0, 1, 2, 3. |
AD12-64(PCI) |
Available AiStartTrigger is 0, 2, 3. |
AI-1604CI2-PCI |
Available AiStartTrigger is 0, 2, 3. |
AI-1608AY-USB |
Available AiStartTrigger is 0, 1, 2, 3. |
AIO-163202FX-USB |
Available AiStartTrigger is 0, 1, 2, 3, 4, 5, 10. |
AI-1664LAX-USB |
Available AiStartTrigger is 0, 1, 2, 3. |
AIO-121602LN-USB |
Available AiStartTrigger is 0, 1, 2, 3. |
AI-1608VIN-USB |
Available AiStartTrigger is 0, 1, 2, 3. |
CPS-AI-1608LI |
Available AiStartTrigger is 0. |
AIO-16256256-DEMO |
Available AiStartTrigger is 0, 1, 2, 3. |
Precautions when using level comparison (range comparison) as the conversion start condition for USB devices
When using a USB device, level comparison is determined by driver software processing.
Therefore, when the StartAI() function is executed with the level comparison start condition, USB transfer of data between the USB device and the driver software will start.
If the USB transfer is not done in time even before the start condition is satisfied, the buffer overflow error on the USB device may occur.
If an error occurs, it is necessary to execute the AioResetAiMemory() function separately to clear the error.
Note that the following USB devices are designed to perform level comparison judgments in processing on the devices.
Therefore, improvements have been made so that buffer overflow does not occur before the start condition is satisfied.
AI-1608AIN-USB、AI-1608VIN-USB
Example
Sets "Software" as the conversion start condition.
C, C++ |
long
Ret; |
Python |
Ret
= ctypes.c_long() |
See also