Function
Retrieves the analog output status.
Format
Ret = AioGetAoStatus ( Id , AoStatus )
Parameters
Id
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the Device ID retrieved from AioInit function.
AoStatus
[ C, C++ : long * ] [ Python : ctypes.POINTER(ctypes.c_long) ]
Specifies the address of the variable that stores status.
AoStatus have the meanings as following in bit.
Status |
Macro |
Value |
AOS_BUSY |
00000001H |
|
AOS_START_TRG |
00000002H |
|
AOS_DATA_NUM |
00000010H |
|
AOS_SCERR |
00020000H |
|
AOS_AOERR |
00040000H |
|
AOS_DRVERR |
00080000H |
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 |
13380 |
Pointer
to AoStatus is NULL |
20001 |
This function can't be used by this device |
20003 |
Can
not use because another process is using the device |
Initial value
In all devices, AoStatus = 0
Remarks
If "Generating clock period error"
or "DA conversion error" occurs, the conversion stops.
This function cannot be used on devices without the analog output function.
This function can be executed even if the device is in operation.
If the conversion start condition is specified to Event controller output,
Wait the start trigger status will not be notified.
When the device is in operation, using function AioSetAoSamplingData or
AioSetAoSamplingDataEx
to set the sequential output data, if data isn't added in time, the operation
will be terminated without error status.
Example
Retrieves the analog output status.
C, C++ |
long
Ret; |
Python |
Ret
= ctypes.c_long() |
See also