AioGetAoEvent


Function

Retrieves the event factor of the message notification that is related to the analog output.

Format

Ret = AioGetAoEvent ( Id , hWnd , AoEvent )

Parameters

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

hWnd [ VB.NET : IntPtr ] [ C, C++ : HWND * ] [ C# : out IntPtr ] [ Python : ctypes.POINTER(ctypes.wintypes.HANDLE) ]
Specifies the address of the variable that stores Window handle.
If the handle doesn't need to be retrieved, specify NULL.

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

The available event factor is based on whether the device buffer is used or whether the user buffer is used.

Event factor

Using Device buffer

Using User buffer

Macro

Value

Event that DA conversion start

Yes

Yes

AOE_START

00000002H

Event that repeat end

Yes

Yes

AOE_RPTEND

00000010H

Event that device operation end

Yes

Yes

AOE_END

00000020H

Event that the specified number of data are output

Yes

No

AOE_DATA_NUM

00000080H

Event that the specified number of data are transferred

No

Yes

AOE_DATA_TSF

00000100H

Event that generating clock period error

Yes

Yes

AOE_SCERR

00020000H

Event that DA conversion error

Yes

Yes

AOE_DAERR

00040000H

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.

13290

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

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.

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, AoEvent = 0

Remarks

This function cannot be used on devices without the analog output function.
If the device is in operation, the function cannot be performed.

Example

Retrieves the event factor of the message notification.

VB.NET

Dim Ret As Integer
Dim hWnd As IntPtr
Dim AoEvent As Integer
Ret = AioGetAoEvent ( Id , hWnd , AoEvent )
 

C, C++

long Ret;
HWND hWnd;
long AoEvent;
Ret = AioGetAoEvent ( Id , &hWnd , &AoEvent );
 

C#

int Ret;
IntPtr hWnd;
int AoEvent;
Ret = aio.GetAoEvent ( Id , out hWnd , out AoEvent );
 

Python

Ret = ctypes.c_long()
handle = ctypes.windll.user32.FindWindowW(0, "Interrupt")
AoEvent = ctypes.c_long()
Ret.value = caio.AioGetAoEvent ( Id , ctypes.byref(handle) , ctypes.byref(AoEvent) )
 

See also

AioSetAoEvent AioSetAoEventSamplingTimes AioGetAoEventSamplingTimes