AioSingleAoEx


Function

DA Converts the specified channel one time, the conversion data are specified in voltage/current. This function supports multi-process.

Format

Ret = AioSingleAoEx ( Id , AoChannel , AoData )

Parameters

Id [ VB.NET : Short ] [ C, C++ : short ] [ C# : short ] [ Python : ctypes.c_short ]
Specifies the ID retrieved from AioInit function.

AoChannel [ VB.NET : Short ] [ C, C++ : short ] [ C# : short ] [ Python : ctypes.c_short ]
Specifies the channel to be converted.

AoData [ VB.NET : Single ] [ C, C++ : float ] [ C# : float ] [ Python : ctypes.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 ] [ Python : ctypes.c_long ]

Return values

Content

0

Normality completion

7

Execute AioResetDevice function because the device has recovered from standby mode

10001

Invalid Id was specified
Use the Id retrieved from AioInit to specify the Id in this function.

10002

AIO driver can't be called
At first, perform AioInit function.

13500

The value of AoChannel is outside the designated range of the function
Specify the channel setting in range: 0 <= AoChannel <= Max channel.

20001

This function can't be used by this device

20002

Can not use while by another device works
To use this function, analog output operation must be stopped.

23500

The value of AoChannel is outside the designated range of the device being used

Remarks

Before this function is executed, you must set the output range by AioSetAoRange or AioSetAoRangeAll function
This function cannot be used on devices without the analog output function.
If the device is in operation, the function cannot be performed.

Example

It outputs voltage data 5V to channel 0.

VB.NET

Dim Ret As Integer
Ret = AioSingleAoEx ( Id , 0 , 5.0 )
 

C, C++

long Ret;
Ret = AioSingleAoEx ( Id , 0 , 5.0 );
 

C#

int Ret;
Ret = aio.SingleAoEx ( Id , 0 , 5.0F );
 

Python

Ret = ctypes.c_long()
Ret.value = caio.AioSingleAoEx ( Id , 0 , 5.0 )
 

See also

AioMultiAoEx