AioStartAi


Function

Start AD conversion based on the condition settings.

Format

Ret = AioStartAi ( Id )

Parameters

Id [ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the Device ID retrieved from AioInit function.

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
Use the Id retrieved from AioInit to specify the Id in this function.

10002

AIO driver can't be called
At first, perform AioInit function.

20001

This function can't be used by this device

20002

Can not use while by another device works
To use this function, analog input operation must be stopped.

20003

Can not use because another process is using the device
When another process is using the device, all functions except for those that support multi-process can not be performed.

21460

Because sampling clock period error occurs, you must reset a device

21461

Virtual memory can't be allocated
Memory is insufficient. Terminate the unnecessary applications.

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

Remarks

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.

This function cannot be used on devices without the analog input function.
This function can be executed if the device is in operation.

Internal clock specified by function AioSetAiClockType:
Sampling is started since executing this function.
External clock specified by function AioSetAiClockType:
Sampling is started at the timing of the external clock input since executing this function.

Example

Start AD conversion.

C, C++

long Ret;
Ret = AioStartAi ( Id );
 

Python

Ret = ctypes.c_long()
Ret.value = caio.AioStartAi ( Id )
 

See also

AioStopAi AioSingleAi AioMultiAi