ToEngUnits()

Converts an integer count value to an equivalent single precision voltage (or current) value. This method is typically used to obtain a voltage value from data received from an A/D with methods such as AIn().

Member of the MccBoard class.

Function Prototype

VB .NET

Public Function ToEngUnits(ByVal range As MccDaq.Range, ByVal dataVal As Short, ByRef engUnits As Single) As MccDaq.ErrorInfo



Public Function ToEngUnits(ByVal range As MccDaq.Range, ByVal dataVal As System.UInt16, ByRef engUnits As Single) As MccDaq.ErrorInfo

C# .NET

Public MccDaq.ErrorInfo ToEngUnits(MccDaq.Range range, ushort dataVal, out float engUnits)



Public MccDaq.ErrorInfo ToEngUnits(MccDaq.Range range, short dataVal, out float engUnits)

Parameters

range

Voltage (or current) range to use for the conversion to engineering units. When using this method to obtain engineering units from a value received from an A/D board, keep in mind that some A/D boards have programmable voltage ranges, and others set the voltage range via switches on the board. In either case, the desired range must be passed to this method. Refer to board-specific information for a list of valid range settings.

dataVal

An integer count value (typically, one returned from an A/D board).

engUnits

The single precision voltage (or current) value that is equivalent to dataVal is returned to this variable. The value will be within the range specified by the range parameter.

Returns

Notes