Function
Gets the external signal source. (TTL/Opto-isolated/Line-receiver)
Format
Ret = CntGetChannelSignal ( Id , ChNo , SigType )
Parameters
Id
[ C: short ] [ Python: ctypes.c_short ]
Specifies the device ID retrieved from CntInit.
ChNo
[ C: short ] [ Python: ctypes.c_short ]
Specifies the channel number which you want to get for.
SigType
[ C: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specifies the address of the variable that stores the external signal source.
As for the external signal source, one of the following defined values
is returned.
Definition |
Value |
Description |
CNT_SIGTYPE_ISOLATE |
0 |
Opto-isolated |
CNT_SIGTYPE_TTL |
1 |
TTL |
CNT_SIGTYPE_LINERECEIVER |
2 |
Line-receiver |
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_CH_NO |
20201 |
Channel number is outside the range. |
The other errors: (See also: Details of Error Code)
Initial Value
CNT24-4(PCI)H, CNT-3204IN-USB:Opto-isolated
CNT24-4D(PCI)H:Line-receiver
CPSN-CNT-3202I:Opto-isolated
Remarks
Gets the external signal source for the specified channel.
Example
C |
Ret
= CntGetChannelSignal(Id, ChNo, &SigType); |
Python |
Ret
= ccnt.CntGetChannelSignal(Id, ChNo, ctypes.byref(SigType)) |
See Also
CntSelectChannelSignal