cbCStoreOnInt()

Installs an interrupt handler that will store the current count whenever an interrupt occurs. This function can only be used with 9513 counters. This function will continue to operate in the background until either IntCount is satisfied or cbStopBackground() with CTRFUNCTION is called.

Function Prototype

C/C++

int cbCStoreOnInt(int BoardNum, int IntCount, short CntrControl[], int MemHandle)

Visual Basic

Function cbCStoreOnInt(ByVal BoardNum&, ByVal IntCount&, CntrControl%, ByVal MemHandle&) As Long

Arguments

BoardNum

The number associated with the board when it was installed with InstaCal or created with cbCreateDaqDevice(). BoardNum may be 0 to 99. The specified board must have a 9513 counter.

IntCount

The counters will be read every time an interrupt occurs until IntCount number of interrupts have occurred. If IntCount is = 0, the function will run until cbStopBackground() is called. (Refer below to the MemHandle argument).

CntrControl

The array should have an element for each counter on the board. (5 elements for CTR05 device, 10 elements for a CTR10 device, and so on). Each element corresponds to a counter channel. Each element should be set to either CBDISABLED or CBENABLED. All channels that are set to CBENABLED will be read when an interrupt occurs.

MemHandle

Handle for Windows buffer. If IntCount is non-zero, the buffer referenced by MemHandle must be of sufficient size to hold (IntCount × Number of Counters) points.

Returns

Notes