Function
DA Converts the specified channel one time, the conversion data is specified in voltage or current.
Format
Ret = AioSingleAoEx ( Id , AoChannel , AoData )
Parameter
Id [VB.NET:Short C,C++:short C#:short]
Specifies the device ID retrieved from AioInit.
AoChannel [VB.NET:Short C,C++:short C#:short]
Specifies the channel to be converted.
AoData [VB.NET:Single C,C++:float C#:float]
Specifies the output data. Please specify the data in voltage or current.
The available value differs by the device
Return Value
Ret [VB.NET:Integer C,C++:long C#:int]
Define |
Value |
Description |
AIO_ERR_SUCCESS |
0 |
Normality completion |
AIO_ERR_DLL_INVALID_ID |
10001 |
Invalid ID was specified. |
AIO_ERR_DLL_TIMEOUT |
28004 |
Communication time out occurred. |
AIO_ERR_ACCESS_RIGHT |
28003 |
Access rights error. |
AIO_ERR_NOT_START |
28002 |
Device dose not start. |
AIO_ERR_AO_CHANNEL |
13000 |
The value of AoChannel is outside the designated range of the function. |
AIO_ERR_SYS_NOT_SUPPORTED |
20001 |
This function can't be used by this device. |
AIO_ERR_AO_DEVICE_CHANNEL |
23000 |
The value of AoChannel is outside the designated range of the device being used. |
AIO_ERR_DA_ERROR |
23001 |
DA conversion error occurred. |
See also: Error Code Details
Remark
Before this function is executed, you must set the output range by AioSetAoRangeAll function.
This function cannot be used on devices without the analog output function.
Example
Converts Channel 0 one time.
VB.NET Ret = AioSingleAoEx ( Id , 0 , AoData )
C,C++ Ret = AioSingleAoEx ( Id , 0 , AoData );
C# Ret = AIO.ccapaio.AioSingleAoEx ( Id , 0 , AoData );
See Also