Function
Retrieves the total number of count channels of the device.
Format
Ret = DioGetMaxCountChannels ( Id , ChannelNum )
Parameters
Id
[ C, C++: short] [Python: ctypes.c_short]
Specifies the device ID retrieved from DioInit.
ChannelNum
[ C, C++: short *] [Python: ctypes.POINTER(ctypes.c_short)]
Specifies the address of the variable to obtain the number of channels.
Return Value
Ret [ C, C++: long] [Python: ctypes.c_long]
Definition |
Value [Dec] |
Description |
DIO_ERR_SUCCESS |
0 |
Normal complete |
DIO_ERR_DLL_INVALID_ID |
10001 |
Invalid ID is specified. |
DIO_ERR_DLL_CALL_DRIVER |
10002 |
Driver cannot be called (failed in ioctl). |
DIO_ERR_DLL_BUFF_ADDRESS |
10100 |
Invalid data buffer address |
The other errors: (See also: Error code details)
Remarks
The maximum number of channels differs by
the device that you use.
If the device without the count function, ChannelNum = 0.
Example
C, C++ |
Ret = DioGetMaxCountChannels(
Id , &ChannelNum ); |
Python |
Ret = cdio.DioGetMaxCountChannels(
Id , ctypes.byref(ChannelNum) ) |
See Also
None