Chapter 3
Adjustment
©
National Instruments Corporation
3-19
•
actualData
—
¤tOutput
•
measuredData
—
¤tCalADCValue
Determining the Frequency Response across
the Passband
Calibration constants representing the analog channel’s response across
a wide range of frequencies are stored to correct for signal attenuation at
high frequencies. For both the terminated and unterminated cases, you
measure the amplitude of a sinusoid output from 0 to 16 MHz, in 1 MHz
increments. These measurements should be stored in an array such that the
measurement at 0 MHz is the first element, 1 MHz the second, and so on.
The 0 MHz measurement should be taken from a sinusoid at a frequency
between 100 and 1000 Hz. You can measure amplitude, peak-to-peak,
or RMS, as long as the measurements are consistent.
1.
Make sure the output is unterminated.
2.
Enable the analog filter by calling the function
ni54xx_SetAnalogFilter
. Set the following parameters:
•
sessionHandle
—The handle of the calibration session for the
device
•
filterState
—
NI54XX_ENABLE
3.
Adjust the gain and offset by calling the function
ni54xx_SetAdjustedGainAndOffset
rather than setting the gain
and offset calibration DACs directly. This function uses the current
calibration constants, including the ones set during the current session, to
calculate the values to write to the DACs. The function takes as
parameters the desired offset, the amount of attenuation that has been
applied to the channel, and whether the output is terminated. Call the
function
ni54xx_SetAdjustedGainAndOffset
using the following
parameters:
•
sessionHandle
—The handle of the calibration session for the
device
•
offsetInVolts
—
0
•
attenuationInDb
—
0
•
terminationState
—
NI54XX_UNTERMINATED
4.
Generate a low frequency full scale (10 V) sine wave by calling the
function
ni54xx_GenerateWaveform
. Set the following parameters:
•
sessionHandle
—The handle of the calibration session for the
device