Function
This is a function that sets the digital input of the demo device in bit.
Format
Ret = AioSetDemoDiBit ( Id , DiBitNum , DiBit , DiData )
Parameters
Id
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the device ID retrieved from AioInit.
DiBitNum
[ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the number of elements in the bit number array.
DiBit
[ C, C++ : short * ] [ Python : ctypes.POINTER(ctypes.c_short) ]
Specifies the address of the array that stored the bit number.
DiData
[ C, C++ : short * ] [ Python : ctypes.POINTER(ctypes.c_short) ]
Specifies the address of the array that stored the data.
0 |
OFF |
1 |
ON |
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 |
18103 |
Pointer to DiBit, DiData is NULL |
28100 |
The value of DiBitNum is outside the designated range of the device being used |
28101 |
The value of DiBit is outside the designated range of the device being used |
28102 |
The value of DiData is outside the designated range of the device being used |
28103 |
A driver inner error occurred |
Remarks
This is a function dedicated to the demo device.
The initial value is 0 (OFF).
Please call AioInputDiBit function when you want to confirm the current Digital Input value.
Example
Sets the digital input data 1 (ON) for bit 0 to bit 7.
C, C++ |
long
Ret; |
Python |
Ret
= ctypes.c_long() |
See also
AioSetDemoDiByte, AioInputDiBit