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 |
TTL (SigType = CNT_SIGTYPE_TTL) |
CNT-3208M-PE |
TTL (SigType = CNT_SIGTYPE_TTL) |
CNT-3204IN-USB |
Photocoupler insulation (SigType = CNT_SIGTYPE_ISOLATE) |
CPS-CNT-3202I |
Photocoupler insulation (SigType = CNT_SIGTYPE_ISOLATE) |
Remarks
Specifies the external signal source of specified
channel.
This function becomes effective, when the counter is started.
CNT24-4(PCI)H |
Usable SigType is Photocoupler insulation or TTL. |
CNT24-4D(PCI)H |
Usable SigType is Differential or TTL. |
CNT-3204MT-LPE |
Usable SigType is TTL. |
CNT-3208M-PE |
Usable SigType is Differential or TTL. |
CNT-3204IN-USB |
Usable SigType is Photocoupler insulation. |
CPS-CNT-3202I |
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 |
C, C++ |
long Ret; |
C# |
int Ret; |
Python |
Ret = ctypes.c_long() |
See Also