Function
This is a function that gets the analog output value of the demo device.
Format
Ret = AioGetDemoAo ( Id , AoChannelNum , AoChannel , AoData )
Parameters
Id
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the device ID retrieved from AioInit.
AoChannelNum
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the number of elements in the channel number array.
AoChannel
[ C, C++ : short * ] [ Python : ctypes.POINTER(ctypes.c_short) ]
Specifies the address of the array that stored the channel number.
AoData
[ C, C++ : float * ] [ Python : ctypes.POINTER(ctypes.c_float) ]
Specifies the address of the array that stores the data.
Return values
Ret [ C, C++ : long ] [ Python : ctypes.c_long ]
Return values |
Content |
0 |
Normality completion |
10001 |
Invalid
Id was specified |
10002 |
AIO
driver can't be called |
18002 |
Pointer to AoChannel, AoData is NULL |
28000 |
The value of AoChannelNum is outside the designated range of the device being used |
28001 |
The value of AoChannel is outside the designated range of the device being used |
28002 |
A driver inner error occurred |
Remarks
This is a function dedicated to the demo device.
The acquired value is voltage or current (switched according to the setting range of the demo device).
You can confirm the current setting range
by calling AioGetAoRange
function.
You can modify the setting range by calling AioSetAoRange
or AioSetAoRangeAll
function.
And also, you can modify the Analog output value bye calling AioSingleAoEx or AioMultiAoEx function.
Example
Gets the analog output value of channel 0 to channel 7.
C, C++ |
long
Ret; |
Python |
Ret
= ctypes.c_long() |
AioGetAoRange, AioSetAoRange, AioSetAoRangeAll, AioSingleAoEx, AioMultiAoEx