Function
Retrieves the count values.
Format
Ret = DioReadCount ( Id , ChNo , ChNum , Count)
Parameters
Id
[C:short] [Python: ctypes.c_short]
Specifies the device ID retrieved from DioInit.
ChNo [C:short
*] [Python: ctypes.POINTER(ctypes.c_short)]
Specifies the start address of the array that stores the channel numbers
for which count values are to be acquired.
ChNum [C:short]
[Python: ctypes.c_short]
Specifies the number of channels specified in ChNo.
Count[C:unsigned
int *] [Python: ctypes.POINTER(ctypes.c_uint)]
Specifies the start address of the array that stores the count values.
Return Value
Ret [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. |
DIO_ERR_SYS_NOT_SUPPORTED |
20001 |
This function cannot be used for this device. |
DIO_ERR_SYS_CH_NO |
20105 |
Channel No. is outside the setting range. |
DIO_ERR_SYS_CH_NUM |
20106 |
Channel number is outside the setting range. |
The other errors: (See also: Error code details)
Remarks
Retrieves the count values of the specified channels.
In the case of a wireless I/O device, it
acquires the data of the slave unit stored in the master unit.
Please note that it is not real time information of the slave unit.
Please use the DioReadCountSR function
when acquiring the real time information of the slave unit.
Example
C |
Ret = DioReadCount(
Id , &ChNo[0] , ChNum , &Count[0] ); |
Python |
Ret = cdio.DioReadCount(
Id , ChNo , ChNum , Count ) |
See Also