# cbVIn32()

Reads an A/D input channel, and returns a voltage value. This function is similar to cbVIn(), but returns a double precision float value instead of a single precision float value. If the specified A/D board has programmable gain, then this function sets the gain to the specified range. The voltage value is returned to DataValue.

## Function Prototype

C/C++

int cbVIn32(int BoardNum, int Chan, int Gain, double* DataValue, int Options);

Visual Basic

Function cbVIn32(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. The specified board must have an A/D.

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.

Gain

A/D range code. If the board has a programmable gain, it will be set according to this argument value. Keep in mind that some A/D boards have a programmable gain feature, and others set the gain via switches on the board. In either case, the range that the board is configured for must be passed to this function. Refer to board specific information for a list of the supported A/D ranges of each board.

DataValue

A pointer or reference to the data value.

Options

Board-specific operations to apply to the operation.

## Returns

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

### Options argument values

Default

Reserved for future use.