AioMultiAi


Function

Converts the more than one channel one time, the conversion data are returned in binary value. This function supports multi-process.

Format

Ret = AioMultiAi ( Id , AiChannels , AiData )

Parameters

Id [ VB.NET : Short ] [ C, C++ : short ] [ C# : short ] [ Python : ctypes.c_short ]
Specifies the ID retrieved from AioInit function.

AiChannels [ VB.NET : Short ] [ C, C++ : short ] [ C# : short ] [ Python : ctypes.c_short ]
Specifies the number of channels to be converted.

AiData [ VB.NET : Integer() ] [ C, C++ : long * ] [ C# : int[] ] [ Python : ctypes.POINTER(ctypes.c_long) ]
Specifies the address of the array that stores the converted data. The converted data are stored in binary value.
Range of conversion data varies depending on the resolution of the device being used.

Resolution of device used

Range of conversion data

10 bit

0 to 1023

12 bit

0 to 4095

16 bit

0 to 65535

24 bit

0 to 16777215

Return value

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
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.

11440

The value of AiChannels is outside the designated range of the function
Specify the number of channels setting in range: 1 <= AiChannels <= Max number of channels.

11441

Pointer to AiData is NULL
Specify the address of variable to parameter.

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.

21441

The number of conversion channels was exceeded. It is converted on the maximum channel

Remarks

This function cannot be used on devices without the analog input function.
If the device is in operation, the function cannot be performed.

For the device whose channel conversion sequence can be set,
you can use function AioSetAiChannelSequence to change the conversion sequence.

Example

Converts from channel 0 to channel 7 one time.

VB.NET

Dim Ret As Integer
Dim AiData(7) As Integer
Ret = AioMultiAi ( Id , 8 , AiData )
 

C, C++

long Ret;
long AiData[8];
Ret = AioMultiAi ( Id , 8 , &AiData[0] );
 

C#

int Ret;
int[] AiData = new int[8];
Ret = aio.MultiAi ( Id , 8 , AiData );
 

Python

Ret = ctypes.c_long()
AiDataType = ctypes.c_long * 8
AiData = AiDataType()
Ret.value = caio.AioMultiAi ( Id , 8 , AiData )
 

See also

AioSingleAi AioStartAi