Function
DA Converts the specified channel one time, the conversion data are specified in binary value. This function supports multi-process.
Format
Ret = AioSingleAo ( Id , AoChannel , AoData )
Parameters
Id
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the Device ID retrieved from AioInit function.
AoChannel
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the channel to be converted.
AoData
[ C, C++ : long ] [ Python : ctypes.c_long ]
Specifies 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 |
13000 |
The
value of AoChannel is outside the designated range of the function |
20001 |
This function can't be used by this device |
20002 |
Can
not use while by another device works |
23000 |
The value of AoChannel is outside the designated range of the device being used |
23001 |
DA conversion error occurred |
23002 |
Specify data to establish in AoData in the range of 0 to 4095 |
23003 |
Specify data to establish in AoData in the range of 0 to 65535 |
23019 |
DA conversion error occurred |
Remarks
This function cannot be used on devices without
the analog output function.
If the device is in operation, the function cannot be performed.
When you use this function and "continuous functions", please refer "How to use simple functions and continuous functions at the same time" topics.
CPSN-AO-1602LC CPI-AO-1602LC |
It transparently (one after another output) outputs to the channels in the order of channel 0, 1, 2 and so on. |
Others |
The device has the synchronous output function. |
Example
It outputs binary data 2048 to channel 0.
C, C++ |
long
Ret; |
Python |
Ret
= ctypes.c_long() |
See also