# ToEngUnits32()

Converts an integer count value to an equivalent double 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 AIn32().

Member of the MccBoard class.

## Function Prototype

VB .NET

Public Function ToEngUnits32(ByVal range As MccDaq.Range, ByVal dataVal As Integer, ByRef engUnits As Double) As MccDaq.ErrorInfo

Public Function ToEngUnits32(ByVal range As MccDaq.Range, ByVal dataVal As UInteger, ByRef engUnits As Double) As MccDaq.ErrorInfo

C# .NET

Public MccDaq.ErrorInfo ToEngUnits32(MccDaq.Range range, uint dataVal, out double engUnits)

public MccDaq.ErrorInfo ToEngUnits32(MccDaq.Range range, int dataVal, out double 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 valid range settings.

dataVal

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

engUnits

The double 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 using the resolution of the A/D on the board.

## Returns

- An ErrorInfo object that indicates the status of the operation.
- engUnits – the engineering units value equivalent to dataVal is returned to this variable.

## Notes

- This method is typically used to obtain a voltage (or current) value from data received from an A/D with methods such as AIn32().
- This method should be used for devices with a resolution of 20-bits or more.
- The default resolution of this method is 32-bits, so if the device has neither analog input nor analog output, the result will be a 32-bit conversion.
- If the device has both analog input and analog output, the resolution and transfer function of the D/A converter on the device is used.