National Instruments 321645c-01 Welding System User Manual


 
Chapter 2 Function Reference DAQ_VScale
NI-DAQ FRM for PC Compatibles 2-146
©
National Instruments Corporation
gainAdjust is the multiplying factor to adjust the gain. Refer to Appendix B, Analog Input
Channel, Gain Settings, and Voltage Calculation, for the procedure for determining
gainAdjust. If you do not want to do any gain adjustment, (for example, the ideal gain as
specified by the parameter gain) you must set gainAdjust to 1.
offset is the binary offset that needs to be subtracted from reading. Refer to Appendix B,
Analog Input Channel, Gain Settings, and Voltage Calculation, for the procedure for
determining offset. If you do not want to do any offset compensation, offset must be set to
zero. The data type is double to allow for offset fractional LSBs. For example, you could use
DAQ_Op to acquire many samples from a grounded input channel and average them to obtain
the offset.
binArray is an array of acquired binary data.
For DSA devices, binArray should be an array of i32.
voltArray is an array of double-precision values returned by
DAQ_VScale and is the voltage
representation of binArray.
Using This Function
Refer to Appendix B, Analog Input Channel, Gain Settings, and Voltage Calculation, for the
formula used by
DAQ_VScale to calculate voltage from binary reading.