DioEchoBackByte


Function

Retrieves the status of an output port (8 bits).

Format

Ret = DioEchoBackByte ( Id , PortNo , &Data )

Parameters

Id [C:short] [Python: ctypes.c_short]
Specifies the device ID retrieved from DioInit.

PortNo [C:short] [Python: ctypes.c_short]
Specifies the logical output port number.
The logical output port number is a number, which is assigned from the first output port 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 data.The output datum is returned in hexadecimal from 0H to FFH.

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_PORT_NO

20100

Port 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.

Remarks

Retrieves the status of an output port (8 bits). The output datum is returned in hexadecimal from 0H to FFH.
This function is used for monitoring the outputting contents.

Example

C

Ret = DioEchoBackByte ( Id , PortNo , &Data );
 

Python

Ret = cdio.DioEchoBackByte ( Id , PortNo , ctypes.byref(Data) )
 

See Also

DioOutByte
DioOutBit
DioEchoBackBit
DioOutMultiByte
DioOutMultiBit
DioEchoBackMultiByte
DioEchoBackMultiBit
Logic_Bit