cbVIn()

Reads an A/D input channel, and returns a voltage 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 cbVIn(int BoardNum, int Channel, int Range, float *DataValue, int Options);

Visual Basic

Function cbVIn(ByVal BoardNum&, ByVal Channel&, ByVal Range&, 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.

Channel

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.

Range

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

Reserved for future use.

Returns

Options argument values

Default

Reserved for future use.