The output data is stored in the user buffer in the following format.
The figure above shows how to set the user buffer when channel 0, channel
1, 2 channels in total are used.
For data transfer, a transfer packet with a size of 4 bytes is performed
in the minimum unit.
Please store 2 DA converted data as a binary value in 1 packet.
In the example shown above, data of channel 0 is stored in the lower 2
bytes and data of channel 1 is stored in the upper 2 bytes in one packet.
When using 2 channels, 1 packet (1 number of transfer times) = 1 generating.
The figure above shows the transfer mode to the user buffer when channel
0, channel 1, channel 2, 3 channels in total are used.
Basically, one packet is used with two conversion data, but when odd channel
is used as shown above, set empty to the upper 2 bytes of the packet.
When using 3 channels, 2 packet (2 number of transfer times) = 1 generating.
Set the user buffer with the function AioSetAoTransferData.
Ret = AioSetAoTransferData ( Id , DataNumber , Buffer )
In DataNumber, specify the capacity of application memory in units of
transfer packets.
A transfer packet represents the data size of the smallest unit at the
time of data transfer, and its size is 4 bytes.
In Buffer, specify the array address secured by the application.
The number of arrays must be at least as many as the DataNumber.
Example) When 1000 generating is performed using 2 channels
Since one packet is used for one generating, 1000 numbers of arrays are allocated, and DataNumber = 1000.
Example) When 1000 generating is performed using 3 channels
Since two packet is used for one generating, 2000 numbers of arrays are allocated, and DataNumber = 2000.