# to_eng_units()

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

## Function Prototype

to_eng_units(board_num, ul_range, data_value)

## Parameters

board_num (int)

The number associated with the board when it was installed with InstaCal or created with create_daq_device().

ul_range (ULRange)

Voltage (or current) range to use for the conversion to engineering units. When using this function 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 function; refer to board-specific information for a list of the supported A/D ranges of each board.

data_value (int)

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

## Returns

- The engineering units value equivalent to data_value (float).

## Notes

- This function is not supported for hardware with resolution greater than 16 bits.
- The default resolution of this function is 12 bits, so if the device referenced by board_num has neither analog input nor analog output, the result will be a 12-bit conversion.
- If the device referenced by board_num has both analog input and analog output, the resolution and transfer function of the A/D converter on the device is used.