Function
Outputs a bit to an output bit.
Format
Ret = DioOutBit ( Id , BitNo , Data )
Parameters
Id
[C:short] [Python: ctypes.c_short]
Specifies the device ID retrieved from DioInit.
BitNo [C:short]
[Python: ctypes.c_short]
Specifies the logical output bit number.
The logical output bit number is a number, which is assigned from the first
output bit of the device as 0 to the last one serially.
Data [C:unsigned
char] [Python: ctypes.c_ubyte]
Sets the output datum to 0 or 1.
Return Value
Ret [C:long] [Python: ctypes.c_long]
Definition |
Value [Dec] |
Description |
DIO_ERR_SUCCESS |
0 |
Normal complete |
DIO_ERR_DLL_INVALID_ID |
10001 |
Invalid ID is specified. |
DIO_ERR_DLL_CALL_DRIVER |
10002 |
Driver cannot be called (failed in ioctl). |
DIO_ERR_SYS_NOT_SUPPORTED |
20001 |
This function cannot be used for this device. |
DIO_ERR_SYS_BIT_NO |
20102 |
Bit Number is outside of the available range. |
DIO_ERR_SYS_BIT_DATA |
20104 |
Bit data is neither 0 nor 1. |
The other errors: (See also: Error code details)
Initial Value
The initial value of the output datum is 0, after the device was reset.
Remarks
Outputs a bit to the output bit. The output datum is set to 0 or 1.
Example
C |
Ret = DioOutBit ( Id
, BitNo , Data ); |
Python |
Ret = cdio.DioOutBit
( Id , BitNo , Data ) |
See Also
DioOutByte
DioEchoBackByte
DioEchoBackBit
DioOutMultiByte
DioOutMultiBit
DioEchoBackMultiByte
DioEchoBackMultiBit
Logic_Bit