CntSelectChannelSignal


Function

Select the external signal source. (TTL/Photocoupler/Differential)

Format

Ret = CntSelectChannelSignal ( Id , ChNo , SigType )

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.

SigType [ C, C++ : short] [Python: ctypes.c_short]
Specifies the external signal source. Select the external signal source from the following defined values.

Definition

Value

Description

CNT_SIGTYPE_ISOLATE

0

Photocoupler insulation

CNT_SIGTYPE_TTL

1

TTL

CNT_SIGTYPE_LINERECEIVER

2

Differential

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_MODE

10100

Invalid mode setting.

CNT_ERR_SYS_MODE

20100

Invalid mode setting.

CNT_ERR_SYS_CH_NO

20201

Channel number is outside the range.

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

Initial Value

CNT24-4(PCI)H

Photocoupler insulation

CNT24-4D(PCI)H

Differential

CNT-3204MT-LPE
CNT32-4MT(LPCI)

TTL

CNT-3208M-PE
CNT32-8M(PCI)

TTL

CNT-3204IN-ETH

CNT-3204IN-USB

Photocoupler insulation

CPI-CNT-3201I

CPS-CNT-3202I
CPSN-CNT-3201I
CPSN-CNT-3201I2

Photocoupler insulation

Remarks

Specifies the external signal source for the specified channel.
The setting in this function is effective after the counter starts.

Specifications based on devices

CNT24-4(PCI)H

Usable SigType is Photocoupler insulation or TTL.

CNT24-4D(PCI)H

Usable SigType is Differential or TTL.

CNT-3204MT-LPE
CNT32-4MT(LPCI)

Usable SigType is TTL.

CNT-3208M-PE
CNT32-8M(PCI)

Usable SigType is Differential or TTL.

CNT-3204IN-ETH
CNT-3204IN-USB

Usable SigType is Photocoupler insulation.
Selecting TTL or Differential will not result in an error, but the device will be configured with Photocoupler insulation.

CPI-CNT-3201I

CPS-CNT-3202I
CPSN-CNT-3201I
CPSN-CNT-3201I2

Usable SigType is Photocoupler insulation.

Example

C, C++

Ret = CntSelectChannelSignal ( Id , ChNo , SigType );
 

Python

Ret = ccnt.CntSelectChannelSignal ( Id , ChNo , SigType )
 

See Also

CntGetChannelSignal