Function
This is a function that gets the digital output of the demo device in bit.
Format
Ret = AioGetDemoDoBit ( Id , DoBitNum , DoBit , DoData )
Parameters
Id
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the device ID retrieved from AioInit.
DoBitNum
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the number of elements in the bit number array.
DoBit
[ C, C++ : short * ] [ Python : ctypes.POINTER(ctypes.c_short) ]
Specifies the address of the array that stored the bit number.
DoData
[ C, C++ : short * ] [ Python : ctypes.POINTER(ctypes.c_short) ]
Specifies the address of the array that stores the data.
Return values
Ret [ C, C++ : long ] [ Python : ctypes.c_long ]
Return values |
Content |
0 |
Normality completion |
10001 |
Invalid
Id was specified |
10002 |
AIO
driver can't be called |
18062 |
Pointer to DoBit, DoData is NULL |
28060 |
The value of DoBitNum is outside the designated range of the device being used |
28061 |
The value of DoBit is outside the designated range of the device being used |
28062 |
A driver inner error occurred |
Remarks
This is a function dedicated to the demo device.
You can modify Digital Output value by calling AioOutputDoBit function.
Example
Gets the digital output data of bit 0 to bit 7.
C, C++ |
long
Ret; |
Python |
Ret
= ctypes.c_long() |
See also
AioGetDemoDoByte, AioOutputDoBit