# cbAIn32()

Reads an A/D input channel from the specified board, and returns a 32-bit unsigned integer value. If the specified A/D board has programmable gain then it sets the gain to the specified range. The raw A/D value is converted to an A/D value and returned to DataValue. In general, this function should be used with devices with a resolution higher than 16-bits.

## Function Prototype

C/C++

int cbAIn32(int BoardNum, int Chan, int Gain, ULONG *DataValue, int Options);

Visual Basic

Function cbAIn32(ByVal BoardNum&, ByVal Chan&, ByVal Gain&, DataValue&, ByVal Options&) 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.

Chan

A/D channel number. The maximum allowable channel depends on which type of A/D board is being used. For boards with both single ended and differential inputs, the maximum allowable channel number also depends on how the board is configured. For example, a USB-2416 device has 16 differential or 32 single-ended analog input channels. Expansion boards also support this function, so this argument can contain values up to 272. See board specific information for EXP boards if you are using an expansion board.

Gain

A/D Range code. If the selected A/D board does not have a programmable gain feature, this argument is ignored. If the A/D board does have programmable gain, set the Range argument to the desired A/D range. Refer to board specific information for a list of the supported A/D ranges of each board.

DataValue

Pointer or reference to the data value.

Options

Reserved for future use.

## Returns

- Error code or 0 if no errors.
- DataValue - Returns the value of the A/D sample.