cbCStatus()

Returns status information about the specified counter (7266 counters only).

For more information, refer to the LS7261 data sheet (LS7266R1.pdf) in the Documents subdirectory where you installed the UL (C:\Program files\Measurement Computing\DAQ by default).

Function Prototype

C/C++

int cbCStatus(int BoardNum, int CounterNum, unsigned long *StatusBits)

Visual Basic

Function cbCStatus(ByVal BoardNum&, ByVal CounterNum&, StatusBits&) 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 an LS7266 counter.

CounterNum

Number of the counter whose status bits you want to read. Valid values are 1 to N, where N is the number of counters on the board.

StatusBits

Current status from selected counter is returned here. The status consists of individual bits that indicate various conditions within the counter. Set it to one of the constants in the "StatusBits argument values" section below.

Returns

StatusBits argument values

C_UNDERFLOWSet to 1 whenever the count decrements past 0. Is cleared to 0 whenever cbCStatus() is called.
C_OVERFLOWSet to 1 whenever the count increments past it's upper limit. Is cleared to 0 whenever cbCStatus() is called.
C_COMPARESet to 1 whenever the count matches the preset register. Is cleared to 0 whenever cbCStatus() is called.
C_SIGNSet to 1 when the MSB of the count is 1. Is cleared to 0 whenever the MSB of the count is set to 0.
C_ERRORSet to 1 whenever an error occurs due to excessive noise on the input. Is cleared to 0 by calling cbC7266Config()
C_UP_DOWNSet to 1 when counting up. Is cleared to 0 when counting down.
C_INDEXSet to 1 when index is valid. Is cleared to 0 when index is not valid.