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 methods such as AOut().
Member of the MccBoard class.
VB .NET
Public Function FromEngUnits(ByVal range As MccDaq.Range, ByVal engUnits As Single, ByRef dataVal As Short) As MccDaq.ErrorInfo
Public Function FromEngUnits(ByVal range As MccDaq.Range, ByVal engUnits As Single, ByRef dataVal As System.UInt16) As MccDaq.ErrorInfo
C# .NET
public MccDaq.ErrorInfo FromEngUnits(MccDaq.Range range, float engUnits, out ushort dataVal)
public MccDaq.ErrorInfo FromEngUnits(MccDaq.Range range, float engUnits, out short dataVal)
range
The voltage (or current) range to use for the conversion to counts. When using this method 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 method. Refer to board-specific information for a list of valid range settings.
engUnits
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 range parameter.
dataVal
Returns an integer count to this variable that is equivalent to the engUnits parameter using the resolution of the D/A on the board (if any).