# CStatus()

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

Member of the MccBoard class.

## Function Prototype

VB .NET

Public Function CStatus(ByVal counterNum As Integer, ByRef statusBits As MccDaq.StatusBits) As MccDaq.ErrorInfo

C# .NET

public MccDaq.ErrorInfo CStatus(int counterNum,out MccDaq.StatusBits statusBits)

## Parameters

CounterNum

The 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 parameter values" section below.

## Returns

- An ErrorInfo object that indicates the status of the operation.

### statusBits parameter values

All of the statusBits settings are MccDaq.StatusBits enumerated constants. To set a variable to one of these constants, you must refer to the MccDaq object and the StatusBits enumeration (for example, variable = MccDaq.StatusBits.UnderFlow, variable = MccDaq.StatusBits.Overflow, and so on).

Compare | Set to 1 whenever the count matches the preset register. Is cleared to 0 whenever CStatus() is called.
Error | Set to 1 whenever an error occurs due to excessive noise on the input. Is cleared to 0 by calling C7266Config().
Index | Set to 1 when index is valid. Is cleared to 0 when index is not valid.
Overflow | Set to 1 whenever the count increments past it's upper limit. Is cleared to 0 whenever CStatus() is called.
Sign | Set to 1 when the MSB of the count is 1. Is cleared to 0 whenever the MSB of the count is set to 0.
Underflow | Set to 1 whenever the count decrements past 0. Is cleared to 0 whenever CStatus() is called.
UpDown | Set to 1 when counting up. Is cleared to 0 when counting down