Function
Sets the factor for counter error event.
Format
Ret = CntSetCounterErrorEvent ( Id , Start )
Parameters
Id
[ C: short ] [ Python: ctypes.c_short ]
Specifies the device ID retrieved from CntInit.
Start
[ C: short ] [ Python: ctypes.c_short ]
Specifies whether to start the the notification of counter error by one
of the following defined values.
Definition |
Value |
Description |
CNT_CNT_ERR_STOP |
0 |
Mask the interrupt |
CNT_CNT_ERR_START |
1 |
Enable the interrupt |
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_CREATE_THREAD |
10005 |
Failed in creating thread. |
CNT_ERR_SYS_NOT_SUPPORTED |
20001 |
This function can't be used by this device. |
The other errors: (See also: Details of Error Code)
Remarks
It is the function which accept the interrupt by using the counter error interrupt function of hardware.
Callback function actually accepts the interrupt.
Callback is specified in CntSetCounterErrorCallbackProc.
CPI-CNT-3201I |
Only one process can receive events. |
CNT-3204IN-ETH |
If communication with the device is lost, the process will be unregistered and events will no longer be notified. You can check the registration status of the current process using the CntGetNetCommunicationInfo function. |
Example
C |
Ret
= CntSetCounterErrorEvent (Id, Start); |
Python |
Ret
= ccnt.CntSetCounterErrorEvent (Id, Start) |
See Also
CntSetCounterErrorCallbackProc CntGetNetCommunicationInfo