CntSelectChannelSignal


Function

Selects the external signal source(TTL/Photocoupler/Differential). Supports multi-processing.

Format

Ret = CntSelectChannelSignal ( Id , ChNo , SigType )

Parameters

Id [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
Specify the device ID retrieved from CntInit.

ChNo [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
Specify the channel number for setting.

SigType [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
Specify the external signal source. The external signal source is selected from the following DefinitionValue.

Definition

Value

Description

CNT_SIGTYPE_ISOLATE

0

Photocoupler insulation

CNT_SIGTYPE_TTL

1

TTL

CNT_SIGTYPE_LINERECEIVER

2

Differential

 

Return Value

Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]

Definition

Value

Description

CNT_ERR_SUCCESS

0

Normality completion

CNT_ERR_SYS_RECOVERED_FROM_STANDBY

7

Execute the function CntResetDevice to return from the standby mode.

CNT_ERR_DLL_INVALID_ID

10001

Invalid ID was specified.

CNT_ERR_DLL_CALL_DRIVER

10002

CNT driver can't be called (Failed in the device I/O control).

CNT_ERR_DLL_MODE

10100

Invalid mode setting.

CNT_ERR_SYS_BOARD_EXECUTING

20002

Cannot use while by another device works.

CNT_ERR_SYS_MODE

20100

Invalid mode setting.

CNT_ERR_SYS_CH_NO

20201

 Channel number is out of range.

The others: (See also: Details of Error Code)

Initial Value

CNT24-4(PCI)H

TTL (SigType = CNT_SIGTYPE_TTL)

CNT24-4D(PCI)H

TTL (SigType = CNT_SIGTYPE_TTL)

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

TTL (SigType = CNT_SIGTYPE_TTL)

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

TTL (SigType = CNT_SIGTYPE_TTL)

CNT-3204IN-USB

Photocoupler insulation  (SigType = CNT_SIGTYPE_ISOLATE)

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

Photocoupler insulation  (SigType = CNT_SIGTYPE_ISOLATE)

Remarks

Specifies the external signal source of specified channel.
This function becomes effective, when the counter is started.

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-USB

Usable SigType is Photocoupler insulation.

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

Usable SigType is Photocoupler insulation.

Please refer the hardware manual to know more detail about Signal type for each device.

Example

Sets the external signal source of channel 0 to photocoupler insulation.

VB.NET

Dim Ret As Integer
Ret = CntSelectChannelSignal ( Id , 0 , CNT_SIGTYPE_ISOLATE )
 

C, C++

long Ret;
Ret = CntSelectChannelSignal ( Id , 0 , CNT_SIGTYPE_ISOLATE );
 

C#

int Ret;
Ret = cnt.SelectChannelSignal ( Id , 0 , (short)CcntConst.CNT_SIGTYPE_ISOLATE );
 

Python

Ret = ctypes.c_long()
Ret.value = ccnt.CntSelectChannelSignal ( Id , 0 , ccnt.CNT_SIGTYPE_ISOLATE )
 

See Also

CntGetChannelSignal