DioEchoBackBit


Function

Retrieves the status of an output bit.

Format

Ret = DioEchoBackBit ( 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.POINTER(ctypes.c_ubyte)]
Specifies the address of variable to store the output datum. The output datum is returned with either 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_DLL_BUFF_ADDRESS

10100

Invalid data buffer address.

DIO_ERR_SYS_NOT_SUPPORTED

20001

This function can not be used for this device.

DIO_ERR_SYS_BIT_NO

20102

Bit number is outside of the available range.

The other errors: (See also: Error code details)

Initial Value

The initial value of output datum is 0, after the device was reset.
This function is used for monitoring the outputting contents.

Remarks

Retrieves the status of an output bit. The output datum is returned with either 0 or 1.
This function is used for monitoring the outputting contents.

Example

C

Ret = DioEchoBackBit ( Id , BitNo , &Data );
 

Python

Ret = cdio.DioEchoBackBit ( Id , BitNo , ctypes.byref(Data) )
 

See Also

DioOutByte
DioOutBit
DioEchoBackByte
DioOutMultiByte
DioOutMultiBit
DioEchoBackMultiByte
DioEchoBackMultiBit
Logic_Bit