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
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the Device ID retrieved from AioInit function.
AiChannels
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the number of channels to be converted.
AiData
[ C, C++ : long * ] [ 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.
Resolution of device is 10 bit |
0 to 1,023 |
Resolution of device is 12 bit |
0 to 4,095 |
Resolution of device is 16 bit |
0 to 65,535 |
Resolution of device is 24 bit |
0 to 16,777,215 |
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 |
11440 |
The
value of AiChannels is outside the designated range of the function |
11441 |
Pointer
to AiData is NULL |
20001 |
This function can't be used by this device |
20002 |
Can
not use while by another device works |
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.
When you use this function and "continuous functions", please refer "How to use simple functions and continuous functions at the same time" topics.
Example
Converts from channel 0 to channel 7 one time.
C, C++ |
long
Ret; |
Python |
Ret
= ctypes.c_long() |
See also