Function
Sets the output data.
Format
Ret = AioSetAoSamplingData ( Id , AoSamplingTimes , AoData )
Parameters
Id
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the Device ID retrieved from AioInit function.
AoSamplingTimes
[ C, C++ : long ] [ Python : ctypes.c_long ]
Sets the number of generating for the output data.
AoData
[ C, C++ : long * ] [ Python : ctypes.POINTER(ctypes.c_long) ]
Specifies the address of array which stores the output data. Please specify
the data in binary value.
The available value differs by the device.
Resolution of device is 12 bit |
0 to 4095 |
Resolution of device is 16 bit |
0 to 65535 |
Return value
Ret [ C, C++ : long ] [ 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 |
10002 |
AIO
driver can't be called |
13220 |
The
value of AoSamplingTimes is outside the designated range of the
function |
13221 |
Pointer
to AoData is NULL |
20001 |
This function can't be used by this device |
20002 |
Can
not use while by another device works |
20003 |
Can
not use because another process is using the device |
23220 |
Output data exceed memory capacity |
23221 |
Failed in the allocation of the memory |
Remarks
The usage differs by the memory type.
In FIFO memory
The output data is added at the end of the memory after this function is
executed every time.
Clear the data from the memory by using AioResetAoMemory
function.
The output data can be added even if the device is in operation.
In RING memory
It ensures the output data which is set by function in the memory.
If this function is executed once more, the last memory data are lost.
It can't be used if the device is in operation.
Before this function is executed, please perform AioSetAoMemoryType function.
When you use this function and "simple functions", please refer "How to use simple functions and continuous functions at the same time" topics.
Example
Sets the 1000 generating output data.
C, C++ |
long
Ret; |
Python |
Ret
= ctypes.c_long() |
See also
AioGetAoSamplingTimes, AioSetAoSamplingDataEx