# CIn()

Reads the current count from a counter.

Member of the MccBoard class.

## Function Prototype

VB .NET

Public Function CIn(ByVal counterNum As Integer, ByRef count As Short) As MccDaq.ErrorInfo

Public Function CIn(ByVal counterNum As Integer, ByRef count As System.UInt16) As MccDaq.ErrorInfo

C# .NET

public MccDaq.ErrorInfo CIn(int counterNum, out ushort count)

public MccDaq.ErrorInfo CIn(int counterNum, out short count)

## Parameters

counterNum

The counter to read the current count from. Valid values are 1 to 20, up to the number of counters on the board.

count

The counter value is returned here.

## Returns

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

## Notes

- Count: Refer to your BASIC manual for information on BASIC integer data types. -32,768 to 32,767 for BASIC languages. BASIC reads counters as:

- –1 reads as 65,535
- –32,768 reads as 32,768
- 32,767 reads as 32,767
- 2 reads as 2
- 0 reads as 0

- CIn() vs CIn32() vs CIn64()
- Although the CIn(), CIn32(), and CIn64() methods perform the same operation, CIn32() is the preferred method to use.
- The only difference between the three is that CIn() returns a 16-bit count value, CIn32() returns a 32-bit value, and CIn64() returns a 64-bit value. Both CIn() and CIn32() can be used, but CIn64() is required whenever you need to read count values greater than 32-bits (counts >4,294,967,295) or the upper (more significant) bits will be truncated.