# from_eng_units()

Converts a single precision voltage (or current) value in engineering units to an integer count value. This function is typically used to obtain a data value from a voltage value for output to a D/A with functions such as a_out().

## Prototype

from_eng_units(board_num, ul_range, eng_units_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)

The voltage (or current) range to use for the conversion to counts. When using this function to obtain a value to send to a D/A board, keep in mind that some D/A 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 the supported A/D ranges of each board.

eng_units_value (float)

The single precision voltage (or current) value to use for the conversion to counts. Set the value to be within the range specified by the ul_range parameter.

## Returns

- An integer count that is equivalent to the eng_units_value parameter using the resolution of the D/A on the board referenced by board_num. (int)

## Notes

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