Start AD conversion based on the condition settings. This function returns after A/D convert finished.
Ret = AioStartAiSync ( Id , TimeOut )
Id
[ VB.NET : Short ] [ C, C++ : short ] [ C# : short ] [ Python : ctypes.c_short
]
Specifies the ID retrieved from AioInit function.
TimeOut
[ VB.NET : Integer ] [ C, C++ : long ] [ C# : int ] [ Python : ctypes.c_long
]
The timeout period until the function returns is specified in millisecond.
If 0 is specified, it keeps waiting until operation stops.
Ret [ VB.NET : Integer ] [ C, C++ : long ] [ C# : int ] [ 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 |
12382 |
Timeout occurred. Please reset the device, or extend the timeout period. |
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 |
21460 |
Because sampling clock period error occurs, you must reset a device |
21461 |
Virtual
memory can't be allocated |
21463 |
In the software start, set up the repeat number in 1 |
21466 |
A user buffer isn't set up |
21469 |
Buffer overflow error occurred, you must reset a memory |
When this
function is executed, AD conversion is started based on the set condition.
The sampling clock period error and AD conversion error are automatically reset.
If Device
buffer is used, the memory in the device are not reset. If the older conversion
data exists in the memory, the latest conversion data are stored after
the older data.
If User buffer is used, the conversion data are stored from the head of
buffer whose memory is reset when perform this function.
AioStartAi function returns processing at
once after it executes it.
But, AioStartAiSync function doesn't return processing until either of
the following conditions consist though.
- Operation end of device
- Operation stop by overflow, and sampling clock period error, etc.
- Generation of time-out
This function cannot be used on devices without
the analog input function.
If the device is in operation, the function cannot be performed.
Start AD conversion without time-out.
VB.NET |
Dim
Ret As Integer |
C, C++ |
long
Ret; |
C# |
int
Ret; |
Python |
Ret
= ctypes.c_long() |