AIn()

Reads an A/D input channel, and returns a 16-bit integer value. This method reads the specified A/D channel from the specified board. 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.

Member of the MccBoard class.

Function Prototype

VB .NET

Public Function AIn(ByVal channel As Integer, ByVal range As MccDaq.Range, ByRef dataValue As Short) As MccDaq.ErrorInfo



Public Function AIn(ByVal channel As Integer, ByVal range As MccDaq.Range, ByRef dataValue As System.UInt16) As MccDaq.ErrorInfo




C# .NET

MccDaq.ErrorInfo AIn(int channel, MccDaq.Range range, out ushort dataValue)



public MccDaq.ErrorInfo AIn(int channel, MccDaq.Range range, out short dataValue)

Parameters

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. For example, a USB-1608GX device has 8 differential or 16 single-ended analog input channels. Expansion boards also support this method, so this parameter can contain values up to 272. See board specific information for EXP boards if you are using an expansion board.

range

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

dataValue

Reference to data value.

Returns