Step 3 : Set Transfer Mode

There are two kinds of transfer method of conversion data.

Device Buffer Mode

Store the output data of the application in the device buffer (the memory of the device or the memory inside the driver) once.

After conversion starts, the output data of the device buffer is outputted to the device.

The device buffer can be used as FIFO or RING memory.

In the device buffer mode, the conversion data can be handled with the number of generating times as a unit, and the function to directly set the conversion data by the voltage value is prepared, and it can be used more easily than the user buffer mode.

In addition, because functions that can be used for most applications are prepared, it is usually recommended to use the device buffer mode.

 

User Buffer Mode

Register the application memory where the output data is stored before conversion starts.

After the conversion starts, the converted data is output directly to the device via the driver.

The user buffer can select whether to overwrite the memory or not. The user buffer can select Overwrite the memory/Not overwrite the memory.

For devices with bus master transfer function, bus master transfer is automatically used in user buffer mode.
When using bus master transfer, please select user buffer mode.

Use function AioSetAiTransferMode to set transfer mode.

Ret = AioSetAoTransferMode ( Id , AoTransferMode )

Set the transfer mode to AoTransferMode. AoTransferMode = 0 is in device buffer mode, AoTransferMode = 1 is in user buffer mode.

When using user buffer mode, please set user buffer.