Function
Sets the waveform type used for the analog input value of the demo device.
Format
Ret = AioSetDemoAiType ( Id , AiChannelNum , AiChannel , AiType , AiPeriod )
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.
AiType
[ C, C++ : short * ] [ Python : ctypes.POINTER(ctypes.c_short) ]
Specifies the address of the array that stored the waveform type.
0 |
Fixed value |
1 |
Sin wave |
2 |
Triangle wave |
3 |
Square wave |
AiPeriod
[ C, C++ : short * ] [ Python : ctypes.POINTER(ctypes.c_short) ]
Specifies the address of the array that stored the period (number of 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 |
18044 |
Pointer to AiChannel, AiType, AiPeriod is NULL |
28040 |
The value of AiChannelNum is outside the designated range of the device being used |
28041 |
The value of AiChannel is outside the designated range of the device being used |
28042 |
The value of AiType is outside the designated range of the device being used |
28043 |
The value of AiPeriod is outside the designated range of the device being used |
28044 |
A driver inner error occurred |
Remarks
This is a function dedicated to the demo device.
The initial value is fixed value: 0V.
Please call AioSetDemoAi function to modify
Analog Input value when the Demo AI Type is "fixed" type.
The one cycle of waveform is indicated by
"AiPeriod" parameter.
The minimum and maximum of the waveform match the range setting of the
demo device.
You can confirm the current range by calling AioGetAiRange
function.
Please call AioSingleAiEx
or AioMultiAiEx
function when you confirm the current Analog Input values.
Example
Sets the waveform type
"Sin wave" used for the analog input value for channel 0 to
channel 7.
The period (number of data) is 1000.
C, C++ |
long
Ret; |
Python |
Ret
= ctypes.c_long() |
See also
AioSetDemoAi, AioGetAiRange, AioSingleAiEx, AioMultiAiEx