CntInputDIByte


Function

Read the general-purpose input.

Format

Ret = CntInputDIByte ( Id , Reserved , bData )

Parameters

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

Reserved [ C: short ] [ Python: ctypes.c_short ]
0 is specified.

bData [ C: unsigned char * ] [ Python: ctypes.POINTER(ctypes.c_ubyte) ]
Specifies the address of variable which stores the general-purpose input data.

Return Value

Ret [ C: long ] [ Python: ctypes.c_long ]

Definition

Value

Description

CNT_ERR_SUCCESS

0

Normal Complete

CNT_ERR_DLL_INVALID_ID

10001

Invalid ID is specified.

CNT_ERR_DLL_CALL_DRIVER

10002

Driver cannot be called (failed in ioctl).

CNT_ERR_DLL_MODE

10100

Invalid mode setting.

CNT_ERR_DLL_BUFF_ADDRESS

10101

Invalid data buffer address.

The other errors: (See also: Details of Error Code)

Initial Value

None

Remarks

Reads the general-purpose input.
CntReadStatus function can get the general-purpose input, but this function is more convenient for only taking out the 8 bits of general-purpose input.

Example

C

Ret = CntInputDIByte(Id, Reserved, &bData);
 

Python

Ret = ccnt.CntInputDIByte(Id, Reserved, ctypes.byref(bData))
 

See Also

CntReadStatus