Chapter 3
Adjustment
3-26
ni.com
3.
Set the gain and offset using
ni54xx_SetAdjustedGainAndOffset
with 0 offset and 0 attenuation, in the unterminated case. Use the
following parameters:
•
sessionHandle
—The handle of the calibration session for the
device
•
offsetInVolts
—
0
•
attenuationInDb
—
0
•
terminationState
—
NI54XX_UNTERMINATED
4.
Initialize the VCXO calibration for normal mode by calling the function
ni54xx_InitializeVCXOCalibration
. Set the following
parameters:
•
sessionHandle
—The handle of the calibration session for the
device
•
type
—
NI54XX_SET_VCXO
5.
Set the VCXO with the current “best-guess” value (normal mode) by
calling the function
ni54xx_CalibrateVCXO
. Set the following
parameters:
•
sessionHandle
—The handle of the calibration session for the
device
•
type
—
NI54XX_SET_VCXO
6.
Use the counter to measure the frequency of the signal on SYNC OUT
(
currentFrequency
).
7.
While the |frequency – 1 MHz| is greater than the tolerance
and
while you
have not entered this loop more than 12 times, follow these steps:
Note
While defining your tolerance, leave adequate margins to accommodate for drift
frequency due to temperature.
a.
Call
ni54xx_CalAdjust
for measurement mode
NI54XX_SET_VCXO
which calculates the next “best-guess” VCXO
DAC value. The
measuredData
should be a pointer to the
measured frequency and the
actualData
should be a pointer to the
desired frequency (1 MHz). Call the function
ni54XX_CalAdjust
using the following parameters:
•
sessionHandle
—The handle of the calibration session for the
device
•
measurementMode
—
NI54XX_SET_VCXO