DRV_QCounterConfig

INT32U DRV_QCounterConfig (
   PTR_T DeviceHandle, 
   PT_QCounterConfig *lpQCounterConfig );

Purpose

On the device indicated by the DeviceHandle, it configures the specified counter for an event-counting operation. Please call DRV_QCounterStart to start the event-counting.

Parameters

Some parameters, such as target counter channel (counter), latch triggering source (LatchSrc) and latch overflow status (LatchOverflow), are stored in the PT_QCounterConfig structure pointed by the lpQCounterConfig.

Name Direction Range Description
DeviceHandle input default The pointer retrieved from DRV_DeviceOpen which specifies the target device.
lpQCounterConfig input / output default The pointer to indicate the user-prepared structure PT_QCounterConfig that stores counter number (INT16U counter), latch source (INT16U LatchSrc), overflow status (INT16U LatchOverflow), reset mark (INT16U ResetOnLatch), and reset value (INT16U ResetValue).

Return

   1. 0 Successful.
   2. InvalidDeviceHandle The Devicehandle is NULL.
   3. InvalidChannel The target channel is out of range.
   4. Other value Please reference ErrorCodes