Function
This is a function that sets the analog input value of the demo device.
Format
Ret = AioSetDemoAi ( Id , AiChannelNum , AiChannel , AiData )
Parameters
Id
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the device ID retrieved from AioInit.
AiChannelNum
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the number of elements in the channel number array.
AiChannel
[ C, C++ : short * ] [ Python : ctypes.POINTER(ctypes.c_short) ]
Specifies the address of the array that stored the channel number.
AiData
[ C, C++ : float * ] [ Python : ctypes.POINTER(ctypes.c_float) ]
Specifies the address of the array that stored 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 |
18023 |
Pointer to AiChannel, AiData is NULL |
28020 |
The value of AiChannelNum is outside the designated range of the device being used |
28021 |
The value of AiChannel is outside the designated range of the device being used |
28022 |
The value of AiData is outside the designated range of the device being used |
28023 |
A driver inner error occurred |
28024 |
Only available if the waveform type is fixed |
Remarks
This is a function dedicated to the demo device.
Only available when the waveform type is
"Fixed value" by calling AioSetDemoAiType
function.
Values that can be set are allowed outside the range.
You can confirm the current setting range by calling AioGetAiRange function.
And also, please call AioSingleAiEx or AioMultiAiEx function when you want to confirm the current Analog Input values.
Example
Sets the analog input value 5V for channel 0 to channel 7.
C, C++ |
long
Ret; |
Python |
Ret
= ctypes.c_long() |
See also
AioSetDemoAiType, AioGetAiRange, AioSingleAiEx, AioMultiAiEx