Function
Retrieves the analog output range for each channel.
Format
Ret = AioGetAoRange ( Id, AoChannel , AoRange )
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 get the analog output range.
AoRange [VB.NET:Short C,C++:short * C#:ref short]
Specifies the address of the variable that stores the analog output range.
Range |
Macro |
Value |
±10V |
PM10 |
0 |
±5V |
PM5 |
1 |
0 to 10V |
P10 |
50 |
0 to 5V |
P5 |
51 |
0 to 20mA |
P20MA |
100 |
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_AO_CHANNEL |
13500 |
The value of AoChannel is outside the designated range of the function. |
AIO_ERR_PTR_AO_RANGE |
13111 |
Pointer to AoRange is NULL. |
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. |
See also: Error Code Details
Initial Value
It differs by the device type.
Remark
This function cannot be used on devices without the analog output function.
Example
VB.NET Ret = AioGetAoRange ( Id , 0 , AoRange )
C,C++ Ret = AioGetAoRange ( Id , 0 , &AoRange );
C# Ret = AIO.ccapaio.AioGetAoRange ( Id , 0 , ref AoRange );
See Also