You can select the memory type to be used in the transfer mode of device buffer and user buffer.
Memory Type of Device Buffer
1. FIFO
In the FIFO (First In First Out) type, conversion data writing into memory is always performed after the latest data, and data reading from memory is always performed from the oldest data.
If more data than the memory capacity is added, the function AioSetAoSamplingData
or AioSetAoSamplingDataEx
returns an error.
Even if an error occurs in a function, it does not affect the conversion
operation.
During conversion, the output data will continue outputting.
In FIFO, data can be additionally set during
DA conversion.
Write data periodically so that the output data does not become empty,
it is possible to sample for longer than the memory capacity.
2. RING
In RING type, the memory capacity is decided according to the number
of output channels and the number of generating times.
The set data is repeatedly output. You can arbitrarily set the number of
repeats and it is also possible to output indefinitely.
It can be used like a function generator that outputs constant waveform indefinitely.
Memory Type of User Buffer
1. Not overwrite the memory
Transfer stops when conversion data transfer is done to the end of the
user buffer.
It is a valid memory type when the number of generating times has been
confirmed in advance.
2. Overwrite the memory
Transfer does not stop even if conversion data transfer is done to the
end of the user buffer.
Until the conversion stop condition is satisfied, the memory is overwritten
and transfer is performed.
It can be used like a function generator that outputs constant waveform
indefinitely.
Set Memory Type
Use function AioSetAoMemoryType to set memory type.
Ret = AioSetAoMemoryType ( Id , AoMemoryType )
When using device buffer, set AoMemoryType
= 0 in FIFO, set AoMemoryType = 1 in RING.
When using user buffer, set AoMemoryType = 0 to not overwrite, set AoMemoryType
= 1 to overwrite.