Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
32 ratings:
 3.59 out of 5     Rate this Document

How Do I Set the Gain for My Analog Input Channels in LabVIEW?

Primary Software: LabVIEW Development Systems>>Full Development System
Primary Software Version: 7.1
Primary Software Fixed Version: N/A
Secondary Software: LabVIEW Development Systems, Driver Software>>NI-DAQ, Driver Software>>NI-DAQmx
Hardware: Multifunction DAQ (MIO)

Problem: I am using LabVIEW for analog input, and my data acquisition (DAQ) board has software-selectable gain options. How do I tell LabVIEW which gains to apply?

Solution: LabVIEW determines the best gain setting to use based on the signal range that you that you specify in the input limits parameter. You'll find an input limits parameter in the AI Config VI, but it is also present in higher-level VIs and examples (Acquire N Scans for example, in LabVIEW\Examples\DAQ\anlogin\anlogin.llb). The high limit is the highest expected level of the signal you want to measure, and low limit is the lowest expected level of the signal. If you leave the input limits blank, or set them to zero, LabVIEW will use the limits that you specified in the NI-DAQ Configuration Utility. If you use channel names, LabVIEW will select the best gain for your channel configuration.

For example, if your incoming signal is in the range of -1V to 1V, you should set your input limits to +/-1V. LabVIEW will apply a gain of 10 in order to boost the signal up to +/-10V, thereby taking advantage of the full resolution of your DAQ board.

LabVIEW will also take into account external signal conditioning modules in your system, and apply gain at the signal source wherever possible, before using on-board gain. Your LabVIEW documentation explains input limits in more detail, and also shows some examples of how LabVIEW computes the best gain for your configuration.

IMPORTANT: Note that after your signal is amplified and digitized, LabVIEW scales the voltage back down and returns the scaled voltage in software. In the example given above, LabVIEW will return a voltage between -1V and 1V, not the amplified voltage. The returned voltage is scaled, but will be more accurate than if you had not applied any gain.

In LabVIEW 7.x and earlier, refer to the LabVIEW Measurements Manual (linked below) for more information about using input limits in LabVIEW. In LabVIEW 8.0 or later, refer to the Input Limits topic in the LabVIEW Help.

Related Links: Product Manuals: LabVIEW Measurements Manual for 7.0
Product Manuals: LabVIEW Measurements Manual for 6.0 and 6.1

Attachments:





Report Date: 06/12/1998
Last Updated: 09/18/2007
Document ID: 1ABBOQVK

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit