CntSetInputType


Function

Change the type for general-purpose input.

Format

Ret = CntSetInputType ( Id , ChNo , InputType )

Parameters

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

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

InputType [ C, C++ : short] [Python: ctypes.c_short]
Specifies the InputType from the following.

Definition

Value

Description

CNT_GENIO_LINERECEIVER

0

Line-receiver

CNT_GENIO_TTL

1

TTL

Return Value

Ret [ C, 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_GENINP

10401

Invalid general-purpose input type.

CNT_ERR_SYS_CH_NO

20201

Channel number is outside the range.

CNT_ERR_SYS_NOT_SUPPORTED

20001

This function cannot be used in this device.

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

Initial Value

Line-receiver

Remarks

Selects the signal source of general-purpose input for CNT24-4D(PCI)H.

Example

C, C++

Ret = CntSetInputType(Id, ChNo, InputType);
 

Python

Ret = ccnt.CntSetInputType(Id, ChNo, InputType)
 

See Also

None