Chapter 2 Function Reference — Calibrate_1200
©
National Instruments Corporation 2-53 NI-DAQ FRM for PC Compatibles
DAC1chan is the analog input channel connected to DAC1 when calOP is 3.
Range: 0 through 7.
calRefVolts is the value of the DC calibration voltage connected to calRefChan when
calOP = 2.
Note If you are calibrating at a gain other than 1, make sure you apply a voltage so that
calRefVolts * gain is within the upper limits of the analog input range of the
device.
gain is the device gain setting at which you want to calibrate when calOP is 2 or 3. When
you perform an analog input operation, a calibration constant for that gain must be available.
When you run the
Calibrate_1200 function at a particular gain, the device only can be used
to collect data accurately at that gain. If you are creating a set of calibration constants that you
intend to use, you must be sure to calibrate at all gains at which you intend to sample.
Range: 1, 2, 5, 10, 50, or 100.
Using This Function
A calibration performed in bipolar mode is not valid for unipolar and vice versa.
Calibrate_1200 performs a bipolar or unipolar calibration, or loads the bipolar or unipolar
constants (calOP=1, EEPROMloc=0), depending on the value of the polarity parameter in
the last call to
AI_Configure and AO_Configure. If analog input measurements are taken
with the wrong set of calibration constants loaded, you might produce erroneous data.
Calibrate for a particular gain if you plan to acquire at that gain. If you calibrate the device
yourself make sure you calibrate at a gain that you are likely to use. Each gain has a different
calibration constant. When you switch gains, NI-DAQ automatically loads the calibration
constant for that particular gain. If you have not calibrated for that gain and saved the constant
earlier, an incorrect value is used.
To set up your own calibration constants in the user area for both unipolar and bipolar
configurations, you need to complete the following steps. The basic steps are to create and
store both unipolar and bipolar ADC calibration constants, and modify the default load table
so that NI-DAQ automatically loads your constants instead of the factory constants.
Step 1. Unipolar calibration—Change the polarity of your device to unipolar (by using the
AI_Configure call or use the NI-DAQ Configuration Utility in Windows). Call
Calibrate_1200 to perform an ADC calibration, as in the following example:
status = Calibrate_1200 (device, 2, 1, EEPROMloc, calRefChan,
grndRefChan, 0, 0, calRefVolts, gain)
where you specify device, EEPROMloc (say 1, for example), calRefChan, grndRefChan,
calRefVolts, and gain.