AioGetAoStatus


Function

Retrieves the analog output status.

Format

Ret = AioGetAoStatus ( Id , AoStatus )

Parameters

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

AoStatus [ VB.NET : Integer ] [ C, C++ : long * ] [ C# : out int ] [ Python : ctypes.POINTER(ctypes.c_long) ]
Specifies the address of the variable that stores status.
AoStatus have the meanings as following in bit.

Status

Macro

Value

Device is running

AOS_BUSY

00000001H

Wait the start trigger

AOS_START_TRG

00000002H

The specified number of data are output

AOS_DATA_NUM

00000010H

Generating clock period error

AOS_SCERR

00020000H

DA conversion error

AOS_AOERR

00040000H

Driver spec error

AOS_DRVERR

00080000H

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.

13380

Pointer to AoStatus is NULL
Specify the address of variable to parameter.

20001

This function can't be used by this device

20003

Can not use because another process is using the device
When another process is using the device, all functions except for those that support multi-process can not be performed.

Initial value

In all devices, AoStatus = 0

Remarks

If "generating clock period error" or "DA conversion error" occurs, the conversion stops.
This function cannot be used on devices without the analog output function.
This function can be executed even if the device is in operation.
If the conversion start condition is specified to Event controller output, Wait the start trigger status will not be notified.
When the device is in operation, using function AioSetAoSamplingData or AioSetAoSamplingDataEx
to set the sequential output data, if data isn't added in time, the operation will be terminated without error status.

Example

Retrieves the analog output status.

VB.NET

Dim Ret As Integer
Dim AoStatus As Integer
Ret = AioGetAoStatus ( Id , AoStatus )
 

C, C++

long Ret;
long AoStatus;
Ret = AioGetAoStatus ( Id , &AoStatus );
 

C#

int Ret;
int AoStatus;
Ret = aio.GetAoStatus ( Id , out AoStatus );
 

Python

Ret = ctypes.c_long()
AoStatus = ctypes.c_long()
Ret.value = caio.AioGetAoStatus ( Id , ctypes.byref(AoStatus) )
 

See also

AioResetAoStatus