Message Notification

Use function AioSetAiEvent to set which event causes a message notification.

Ret = AioSetAiEvent ( Id , hWnd , AiEvent )

In AiEvent, specify the event factor by macro or numeric value from the following range.
AiEvent has the following meaning in bit units, and can be specified by combined them.
Event factors that can be used differ between the device buffer and user buffer.

Event Factor

When Using Device Buffer

When Using User Buffer

Macro

Value

Event that AD conversion start

OK

OK

AIE_START

00000002H

Event that repeat end

OK

OK

AIE_RPTEND

00000010H

Event that device operation end

OK

OK

AIE_END

00000020H

Event that the specified number of data are stored

OK

NG

AIE_DATA_NUM

00000080H

Event that the specified number of data are transferred

NG

OK

AIE_DATA_TSF

00000100H

Event that overflow

OK

OK

AIE_OFERR

00010000H

Event that sampling clock period error

OK

OK

AIE_SCERR

00020000H

Event that AD conversion error

OK

OK

AIE_ADERR

00040000H

Event that AD conversion start (Macro : AIE_START Value : 00000002H)
This event occurs when the start condition of AD conversion is satisfied.
This event is invalid when the conversion start condition is [Software].

Event that repeat end (Macro : AIE_RPTEND Value : 00000010H)
This event occurs each time the repeat operation ends.

Event that device operation end (Macro : AIE_END Value : 00000020H)
This event occurs when all operations including repeat are completed.

Event that the specified number of data are stored (Macro : AIE_DATA_NUM Value : 00000080H)
An event occurs when the number of sampling times in memory exceeds the value set by function AioSetAiEventSamplingTimes. For FIFO memory, an event occurs each time the condition is satisfied. For RING memory, events corresponding to the number of repeat times are generated.
When using [Event that the specified number of data are stored], use function AioSetAiEventSamplingTimes to set the number of sampling times for generating event.

Ret = AioSetAiEventSamplingTimes ( Id , AiSamplingTimes )

In AiSamplingTimes, set the number of sampling times for generating event.
For FIFO memory, an event occurs each time the condition is satisfied. For RING memory, events corresponding to the number of repeat times are generated.

Event that the specified number of data are transferred (Macro : AIE_DATA_TSF Value : 00000100H)
This event occurs each time the number of data are transferred, which is set by function AioSetAiEventTransferTimes.
When using [Event that the specified number of data are transferred], use function AioSetAiEventTransferTimes to set the number of transfer times for generating event.

Ret = AioSetAiEventTransferTimes ( Id , AiTransferTimes )

In AiTransferTimes, set the number of transfer times for generating event.

Event that overflow (Macro : AIE_OFERR Value : 00010000H)
This event occurs when trying to store conversion data in the memory which is in the full state.

Event that sampling clock period error (Macro : AIE_SCERR Value : 00020000H)
This event occurs when the sampling clock period is too fast and the conversion stops.

Event that AD conversion error (Macro : AIE_ADERR Value : 00040000H)
This event occurs when conversion stops due to an AD conversion error.

In HWnd, specify the handle of the application window. How to specify the handle depends on the application to be used. Please refer to the tutorial of the language to use.

Visual Basic .NET
Visual C#
Visual C++ (MFC)