CntOutputDOBit


Function

Executes the general-purpose output. Supports multi-processing.

Format

Ret = CntOutputDOBit ( Id , ChNo , Reserved , OutData )

Parameters

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

ChNo [C: short] [Python: ctypes.c_short]
Specifies the channel number which you want to set.

Reserved [C: short] [Python: ctypes.c_short]
Specify 0.

OutData [C: unsigned char] [Python: ctypes.c_ubyte]
Specify the output data in 0 or 1.

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_SYS_OUTPUT_DATA

20305

The output data is out of range.

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

Initial Value

None

Remarks

This function is valid only when the control output signal becomes general-purpose output by setting hardware event. On other mode, it does not operate.

Example

C

Ret = CntOutputDOBit ( Id , 0 , 0 , 1 );
 

Python

Ret = ccnt.CntOutputDOBit ( Id , 0 , 0 , 1 )
 

See Also

CntSetOutputHardwareEvent