National Instruments 321645c-01 Welding System User Manual


 
Chapter 2 Function Reference AI_VScale
©
National Instruments Corporation 2-21 NI-DAQ FRM for PC Compatibles
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, use the ideal gain
as specified by the gain parameter—set gainAdjust to 1.
offset is the binary offset that needs to be subtracted from the 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, set offset to 0.
reading is the result of the A/D conversion returned by
AI_Read.
voltage is the variable in which NI-DAQ returns the input voltage converted from reading.
Note C Programmers—voltage is a pass-by-reference parameter.
Using This Function
Refer to Appendix B, Analog Input Channel, Gain Settings, and Voltage Calculation, for the
formula
AI_VScale uses to calculate voltage from reading.
If your device polarity and range settings differ from the default settings shown in the
Init_DA_Brds function, be sure to call AI_Configure to inform the driver of the correct
polarity and range before using this function.