Function
Read the count value for the specified channels.
Format
Ret = CntReadCount ( Id , ChNo , ChNum , CntDat )
Parameters
Id
[C: short] [Python: ctypes.c_short]
Specifies the device ID retrieved from CntInit.
ChNo
[C: short *] [Python: ctypes.POINTER(ctypes.c_short)]
Specifies the base address of array which stores the channel number to
get count.
ChNum
[C: short] [Python: ctypes.c_short]
Specifies the number of channels which is specified in ChNo array.
CntDat
[C: unsigned long *] [Python: ctypes.POINTER(ctypes.c_ulong)]
Specifies the base address of array which stores the count value.
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_DLL_BUFF_ADDRESS |
10101 |
Invalid data buffer address. |
CNT_ERR_SYS_CH_NO |
20201 |
Channel number is outside the range. |
CNT_ERR_SYS_CH_NUM |
20202 |
Number of channels is outside the range. |
The other errors: (See also: Details of Error Code)
Initial Value
None
Remarks
Read the counter value for the specified
channels.
Channel number is stored in an array.
The corresponding count values are stored into it's array in the order
that the channel numbers were stored into it's array
Example
C |
Ret = CntReadCount (
Id , &ChNo[0] , ChNum , &CntDat[0] ); |
Python |
Ret = ccnt.CntReadCount
( Id , ChNo , ChNum , CntDat ) |
See Also