National Instruments NI PXI-5404 Manual

CALIBRATION PROCEDURE
NI PXI-5404
This document contains step-by-step instructions for writing a calibration procedure for the
NI PXI-5404 100 MHz Frequency Source.
Contents
Calibration Overview ............................................................................................................... 2
What Is External Calibration? .......................................................................................... 2
Why Should You Calibrate?............................................................................................. 2
How Often Should You Calibrate?................................................................................... 2
Equipment and Other Test Requirements................................................................................. 2
Test Equipment................................................................................................................. 2
Test Conditions.................................................................................................................4
Documentation.................................................................................................................. 4
Software............................................................................................................................ 4
Writing Your Calibration Procedure ........................................................................ 4
Calibration Software................................................................................................. 4
Calibration Procedures in C...................................................................................... 6
Calibration Procedures in LabVIEW........................................................................ 6
Calibration Procedures in Visual Basic .................................................................... 6
Verification ............................................................................................................................... 7
Verifying Frequency Accuracy ........................................................................................ 8
Verifying SINE Out Amplitude Accuracy ....................................................................... 9
Verifying SINE Out Amplitude Passband Flatness.......................................................... 10
Verifying CLOCK Out Duty Cycle Accuracy ................................................................. 13
External Adjustment ................................................................................................................. 14
Overview of Calibration Constants .................................................................................. 14
VCXO DAC ............................................................................................................. 14
GAIN DAC............................................................................................................... 15
SYNC DAC .............................................................................................................. 15
Setting Up and Configuring the NI 5404.......................................................................... 15
Adjusting the NI 5404 ...................................................................................................... 16
Adjusting the VCXO DAC for Frequency Accuracy ............................................... 17
Adjusting the SINE Out Amplitude.......................................................................... 20
Adjusting the CLOCK Out Duty Cycle.................................................................... 25
Closing the Calibration Session........................................................................................ 28
Calibration Function Reference................................................................................................ 28
Where to Go for Support .......................................................................................................... 48

2|ni.com |NI PXI-5404 Calibration Procedure
Calibration Overview
This section describes external calibration and explains why and how often you should calibrate
your modules.
What Is External Calibration?
External calibration is a set of operations that compares the signals generated by a module or a
system to external standards. The result of an external calibration can be used to determine the
output error and can be used to correct the errors in the adjustment process.
The calibration process consists of verification, adjustment, and reverification. During
verification, you compare the measured performance to an external standard of known
measurement uncertainty to confirm that the performance of the module is better than the
published specifications. During adjustment, you correct the generation error of the module by
adjusting the calibration constants and storing the new calibration constants in the onboard
EEPROM. The host computer reads the calibration constants and the software uses them to
compensate for errors and to present a calibrated output to the user. Reverification means
repeating verification after the adjustment process.
Why Should You Calibrate?
The accuracy of electronic components drifts with time and temperature, which can affect
generation accuracy. Calibration restores the NI 5404 to its specified accuracy and ensures that
it still meets National Instruments standards.
How Often Should You Calibrate?
NI recommends performing a complete calibration at least once every year. You can shorten this
interval based on the demands of your application.
Equipment and Other Test Requirements
This section describes the test equipment, test conditions, documentation, and software required
for calibration.
Test Equipment
External calibration requires different equipment for each applicable specification. Refer to
Table 1 for a list of equipment.

NI PXI-5404 Calibration Procedure |© National Instruments |3
Table 1. Equipment Required for Calibrating NI 5404 Modules
Instrument
Applicable
Specification
Minimum
Specifications
Recommended
Instrument(s)
Digital multimeter
(DMM)
SINE out amplitude
accuracy
AC amplitude accuracy
better than ±0.1% at
50 kHz at 4 Vpk-pk
NI PXI-4070
Agilent (HP) 34401A
Keithley 2000
Male banana to female
BNC adapter
— —
Male BNC to female
SMB cable
50 Ω—
Spectrum analyzer/
Frequency Counter
Frequency accuracy Bandwidth >150 MHz
Frequency accuracy to
±500 ppb
NI PXI-5660
Agilent/HP 8560E
Agilent/HP 53131A
or HP 53132A
with timebase option
001, 010, or 012
Rohde & Schwarz
FSU26
Male SMA to female
SMB cable
— —
Oscilloscope CLOCK out duty
cycle accuracy
Bandwidth ≥500 MHz
Timebase Accuracy:
≤200 ppm
Tektronix TDS3054
Male BNC to female
SMB cable
— —
Power meter and thermal
power sensor
SINE out amplitude
passband flatness
±0.12 dB accuracy for
flatness measurements
from 9 kHz to 105 MHz
Rohde & Schwarz
NRVS meter
Rohde & Schwarz
NRV-Z51 or
Rohde & Schwarz
NRV-Z53 sensor
Rohde & Schwarz
NRP-Z91
Female N-Type to
female SMB cable
50 Ω—

4|ni.com |NI PXI-5404 Calibration Procedure
Test Conditions
Follow these guidelines to optimize the connections and the environment during calibration:
• Keep connections to the NI 5404 module short.
• Keep relative humidity below 80%.
• Maintain a temperature between 18 and 28 °C.
Documentation
For information on installing NI 5404 modules, you may find the following documents helpful:
•NI Signal Generators Getting Started Guide
•NI Signal Generators Help
•NI PXI-5404 Specifications
The NI Signal Generators Help includes detailed information on the NI-FGEN instrument driver
functions. You can access this help file by selecting Start»Programs»National Instruments»
NI-FGEN»NI Signal Generators Help. The NI Signal Generators Getting Started Guide
provides instructions for installing and configuring NI signal generators.
For the latest versions of NI manuals, refer to ni.com/manuals.
Software
This section describes the software you need to calibrate the NI 5404.
Writing Your Calibration Procedure
The calibration process is described in the External Adjustment section, including step-by-step
instructions on calling the appropriate calibration functions.
Many of the calibration functions use constants defined in the niArbCal.h file. To use these
constants, you must include niArbCal.h in your code. Refer to Table 2 for file locations.
Calibration Software
Note Only the Traditional NI-DAQ drivers support PXI-5404 calibration. The
required functions of Traditional NI-DAQ are supported only by 32-bit versions of
Windows XP (recommmended) and earlier operating systems.
The calibration procedure requires the latest version of NI-FGEN on the computer system that
is controlling the NI 5404. NI-FGEN configures and controls NI 5404 modules. NI-FGEN ships
with the NI 5404. You can also download NI-FGEN from ni.com/updates. NI-FGEN
supports programming of all NI signal generators using a number of languages, including
LabVIEW, LabWindows™/CVI™, Microsoft Visual C++, and Microsoft Visual Basic. When
you install NI-FGEN, you only need to install support for the programming language that you
intend to use.

NI PXI-5404 Calibration Procedure |© National Instruments |5
Although NI-FGEN includes calibration support, the calibration application programming
interface (API) is separate from NI-FGEN. During verification and adjustment, you use
two APIs: the NI-FGEN API and the NI HSSources API. The NI-FGEN API controls the
module both during normal operation and during the verification procedure. The NI HSSources
API controls the module during the adjustment procedure.
NI-FGEN automatically installs the files listed in Table 2.
Table 2. Calibration File Locations
File Name and Location Description
<system directory>\niArbCal.dll The NI HSSources calibration
toolkit library. This toolkit provides
the functionality for calibrating
your module.
VXIpnp\WinNT(Win95)\lib\msc\
niArbCal.lib
VXIpnp\WinNT(Win95)\lib\bc\
niArbCal.lib
A .lib file that allows you
to create applications that call
functions in the niArbCal.dll:
• If you build an application using
Microsoft Visual C/C++, link to
msc\niArbCal.lib.
• If you build an application using
Borland C/C++, link to
bc\niArbCal.lib.
• If you build an application using
LabWindows/CVI, link to the
library appropriate to your
current compatibility mode
(msc for Microsoft Visual C/
C++, bc for Borland)
VXIpnp\WinNT(Win95)\include\
niArbCal.h
A header file for the accessible
functions in the niArbCal.dll.
You must include this file in any
C code that you write to call these
functions.
VXIpnp\WinNT(Win95)\nifgen\
Examples\Calibration\
ExternalCalibrationExample5404.c
Example written in C that illustrates
a calibration procedure using the
functions in the niArbCal.dll.

6|ni.com |NI PXI-5404 Calibration Procedure
Calibration Procedures in C
To write calibration procedures in C, you must include the niArbCal.h file in the code that
calls the calibration functions, and you must link the niArbCal.lib file into the build of your
executable.
Calibration Procedures in LabVIEW
To write calibration procedures in LabVIEW, you must use the VIs included in the
niHSSources_Cal.llb. This library contains a VI for each function exported by the
niArbCal.dll, as well as other useful functions. After installation, all of these VIs appear
within the Legacy Calibration palette under Functions»Measurement I/O»NI-FGEN»
Calibration»Legacy Device Calibration»Calibrating the 5404. The NI HSSources
Calibration palette also contains example VIs that illustrate how to use the calibration functions.
Calibration Procedures in Visual Basic
To write calibration procedures in Visual Basic, complete the following steps:
1. Configure the project to reference the niArbCal.dll by selecting Project»References
from the menu bar.
2. Click Browse and navigate to your system directory.
3. Find and select niArbCal.dll.
4. Click Open.
5. Click OK.
VXIpnp\WinNT(Win95)\nifgen\Examples\
Calibration\VisualBasic\
SimpleCalibrationExample.vbp
VXIpnp\WinNT(Win95)\nifgen\Examples\
Calibration\VisualBasic\
SimpleCalibrationExample.vbw
VXIpnp\WinNT(Win95)\nifgen\Examples\
Calibration\VisualBasic\
SimpleCalibrationExample.frm
Example written in Visual Basic
that illustrates using the functions
in the niArbCal.dll.
LabVIEW 6 (6.1)\instr.lib\
niHSSources\niHSSources_Calibration\
niHSSources_Cal.llb
This LabVIEW LLB contains VIs
that correspond to the functions in
the niArbCal.dll.
LabVIEW 6 (6.1)\instr.lib\
niHSSources\niHSSources_Calibration\
niHSSources_Cal_5404_External_Calibra
tion_Example.llb
This LabVIEW LLB contains VIs
that demonstrate an external
adjustment procedure using the
VIs in niHSSources_Cal.llb.
Table 2. Calibration File Locations (Continued)
File Name and Location Description

NI PXI-5404 Calibration Procedure |© National Instruments |7
You can then use the niArbCal functions in your code and look up the functions, parameters,
and constants in the Object Browser.
Verification
This section provides step-by-step instructions for verifying the NI 5404 specifications.
Verification determines whether the module is performing within its specifications prior to
adjustment. Verification and adjustment together comprise a complete calibration. To verify that
the NI 5404 still meets its specifications, you must use NI-FGEN to control the NI 5404 module.
The following steps describe the code you use to generate the appropriate signals, as well as the
NI-FGEN function calls you make to verify specifications. The code varies depending on which
API you use: LabVIEW, LabWindows/CVI, or Visual Basic. The examples shown in this
section use LabWindows/CVI code, but LabVIEW has a corresponding VI for each function.
You can verify the following specifications for NI 5404 modules:
• SINE out amplitude accuracy
• Frequency accuracy
• CLOCK out duty cycle accuracy
• SINE out amplitude passband flatness
Refer to Table 1 for information concerning which instrument to use for each characteristic.
The verification procedure for each of these specifications includes setting up, programming,
and cleaning up.

8|ni.com |NI PXI-5404 Calibration Procedure
Figure 1 shows the NI 5404 connectors.
Figure 1. NI 5404 I/O Connectors
Verifying Frequency Accuracy
Use the spectrum analyzer specified in Table 1 to measure the frequency accuracy of the
NI 5404 module. Connect the SINE out of the NI 5404 to the input of the spectrum analyzer
using an SMB to SMA cable.
Generate a 10 MHz frequency using the NI 5404 module by completing the following steps:
1. Call niFgen_init() to initialize the module you are testing and to create an I/O session.
Set the following parameters:
•vi—The output that is passed in by reference to the verification functions as
sessionHandle
•resourceName—"DAQ::#", where #is the device number
•ID Query—True
•Reset Device—True
SINE
REF
OUT
REF
IN
PFI 0
CH 0
CLOCK
ACCESS ACTIVE
NI PXI-5404
100 MHz Freq Source

NI PXI-5404 Calibration Procedure |© National Instruments |9
2. Call niFgen_ConfigureStandardWaveform() to select the channel to output a
waveform. Set the following parameters:
•vi—The output value sessionHandle you obtained from the niFgen_init
function
•Channel_Name—"0"
•Amplitude—2
•Frequency—10000000
•Start phase—0
•DC offset—0
•Waveform—NIFGEN_VAL_WFM_SINE
3. Call niFgen_InitiateGeneration() to initiate signal generation. This function
causes the NI 5404 to leave its configuration state and enter its signal generation state. Set
the following parameter:
•vi—The output value sessionHandle you obtained from the niFgen_init
function
4. Measure the frequency of the SINE output using a spectrum analyzer specified in Table 1.
To determine if the measured frequency is within the specification of the NI 5404, you must
determine the measurement error of the instrument that you used to measure the frequency
and account for this error when comparing the measured frequency to the frequency
accuracy listed in the Specifications for the NI PXI-5404.
5. Call niFgen_close() to close the module I/O session, destroy the instrument driver
session and all of its properties, and release any memory resources the driver uses. Set the
following parameter:
•vi—The output value sessionHandle you obtained from the niFgen_init
function
You have completed verifying the module oscillator frequency accuracy of the NI 5404.
Verifying SINE Out Amplitude Accuracy
Use a DMM specified in Table 1 to measure the SINE out amplitude accuracy of the NI 5404.
Connect the SINE out of the NI 5404 to the input of the DMM using the male banana to female
BNC adapter and the BNC to SMB cable.
Note A 50 Ωterminator is not used for this measurement.
Generate a 4 Vpk-pk (into high impedance) 50 kHz sine wave as follows:
1. Call niFgen_init() to initialize the module you are testing and to create an I/O session.
Set the following parameters:
•vi—The output that is passed in by reference to the verification functions as
sessionHandle
•resourceName—"DAQ::#", where #is the device number

10 |ni.com |NI PXI-5404 Calibration Procedure
•ID Query—True
•Reset Device—True
2. Call niFgen_ConfigureStandardWaveform() to select the channel to output a
waveform. Set the following parameters:
•vi—The output value sessionHandle you obtained from the niFgen_init
function
•Channel_Name—"0"
•Amplitude—2
•Frequency—50000
•Start phase—0
•DC offset—0
•Waveform—NIFGEN_VAL_WFM_SINE
3. Call niFgen_InitiateGeneration() to initiate signal generation. This function
causes the NI 5404 to leave its configuration state and enter its signal generation state. Set
the following parameter:
•vi—The output value sessionHandle you obtained from the niFgen_init
function
4. Measure the rms voltage of the SINE output using a DMM specified in Table 1. To
determine if the measured voltage is within the amplitude accuracy specification of the
NI 5404, you must determine the measurement error of the DMM that you used to measure
the rms voltage and account for this error when comparing the measured voltage to the
amplitude accuracy listed in the Specifications for the NI PXI-5404.
Note A 4 Vpk-pk sine wave has an rms amplitude of 1.41421 Vrms.
5. Call niFgen_close() to close the module I/O session, destroy the instrument driver
session and all of its properties, and release any memory resources the driver uses. Set the
following parameter:
•vi—The output value sessionHandle you obtained from the niFgen_init
function
You have completed verifying the SINE out amplitude accuracy of the NI 5404.
Verifying SINE Out Amplitude Passband Flatness
The following procedure measures SINE out amplitude over several frequencies to verify that
the SINE out amplitude passband flatness meets NI 5404 specifications.
Complete the following steps to verify SINE out amplitude passband flatness:
1. Call niFgen_init() to initialize the module you are testing and to create the I/O session.
Set the following parameters:
•vi—The output that is passed in by reference to the verification functions as
sessionHandle
•resourceName—"DAQ::#", where #is the device number

NI PXI-5404 Calibration Procedure |© National Instruments |11
•ID Query—True
•Reset Device—True
2. Call niFgen_ConfigureStandardWaveform() to configure the sine wave. Set the
following parameters:
•vi—The output that is passed in by reference to the verification functions as
sessionHandle
•Channel_Name—"0"
•Amplitude—2
•Start phase—0
•Frequency—50000
•DC offset—0
•Waveform—NIFGEN_VAL_WFM_SINE
3. Call niFgen_InitiateGeneration(). This function causes the NI 5404 to leave its
configuration state and enter its signal generation state. Set the following parameter:
•vi—The output value sessionHandle you obtained from the niFgen_init
function
4. Measure the SINE out amplitude using a DMM specified in Table 1.
Note The 50 kHz amplitude accuracy of the DMM is better than the 50 kHz
amplitude accuracy of the power meter. To get the best passband flatness results, you
either must calibrate the power meter or use the power meter to make amplitude
measurements, at frequency indices 0-11, which are relative to the absolute
amplitude measurement made by the DMM at frequency index 0. The latter choice is
preferred.
To measure the SINE out amplitude passband flatness using the power meter, complete the
following steps:
a. Measure the 50 kHz amplitude using the AC rms (dBm) function of the DMM. Do not
use a 50 Ωterminator when using the DMM.
b. Subtract 6 dBm from the DMM measurement, because the power meter has a 50 Ω
input impedance. The result of the subtraction is the power level of the 50 kHz SINE
out into a 50 Ωload.
c. Measure the 50 kHz amplitude with the power meter and compare the power result to
the DMM result. If the power meter result is higher than the DMM result, subtract the
difference of the two results (in dBm) from the power meter results for frequency
indexes 0 to 11. If the power meter result is lower than the DMM result, add the
difference of the two results (in dBm) to the power meter results for frequency indexes
0 to 11.
5. Disconnect the SINE out of the NI 5404 from the DMM and connect SINE out to the power
meter using the SMB to N-Type cable.

12 |ni.com |NI PXI-5404 Calibration Procedure
6. Repeat the following steps for each frequency in Table 3:
a. Call niFgen_ConfigureStandardWaveform() to configure the sine wave. Set
the following parameters:
•vi—The output value sessionHandle you obtained from the niFgen_init
function
•Channel_Name—"0"
•Amplitude—2
•Start phase—0
•DC offset—0
•Frequency—The current frequency from Table 3
•Waveform—NIFGEN_VAL_WFM_SINE
b. Measure the SINE out amplitude using a power meter specified in Table 1. To
determine if the measured amplitude is within the specification of the NI 5404, you
must determine the measurement error of the instrument that you used to measure the
amplitude. You must account for this error when comparing the measured amplitude
to the amplitude passband flatness accuracy listed in the Specifications for
NI PXI-5404.
Table 3. Frequencies for Verifying SINE Out Amplitude Passband Flatness
Index Frequency (MHz)
0 1
1 15
2 30
3 45
4 60
5 75
6 88
7 92
8 96
9 99
10 102
11 105

NI PXI-5404 Calibration Procedure |© National Instruments |13
7. Call niFgen_close(). Set the following parameter:
•vi—The output value sessionHandle you obtained from the niFgen_init
function
You have completed verifying the SINE out amplitude passband flatness of your module.
Verifying CLOCK Out Duty Cycle Accuracy
Complete the following steps to measure the duty cycle of the NI 5404 when you use it to
generate a 50% duty cycle:
1. Call niFgen_init() to initialize the module you are testing and to create an I/O session.
Set the following parameters:
•vi—The output that is passed in by reference to the verification functions as
sessionHandle
•resourceName—"DAQ::#", where #is the device number
•ID Query—True
•Reset Device—True
2. Call niFgen_ConfigureStandardWaveform() to select the channel to output a
waveform. Set the following parameters:
•vi—The output value sessionHandle you obtained from the niFgen_init
function
•Channel_Name—"0"
•Amplitude—5
•Frequency—1000000
•Waveform—NIFGEN_VAL_WFM_SQUARE
•Start phase—0
•DC offset—0
3. Call niFgen_SetAttributeViReal64(). Set the following parameters:
•vi—The output value sessionHandle you obtained from the niFgen_init
function
•Channel_Name—"0"
•Attribute_ID—NIFGEN_ATTR_FUNC_DUTY_CYCLE_HIGH
•Value—50.0
Note If you are using LabVIEW, select the property node attribute niFgen»
Standard Function Output»Duty Cycle High.
4. Call niFgen_InitiateGeneration() to initiate signal generation. This function
causes the NI 5404 to leave its configuration state and enter its signal generation state. Set
the following parameter:
•vi—The output value sessionHandle you obtained from the niFgen_init
function

14 |ni.com |NI PXI-5404 Calibration Procedure
5. Measure the duty cycle of the CLOCK output using an oscilloscope specified in Table 1.
To determine if the measured duty cycle is within the specification of the NI 5404, you must
determine the measurement error of the oscilloscope that you used to measure the duty
cycle and account for this error when comparing the measured duty cycle to the duty cycle
accuracy listed in the Specifications for the NI PXI-5404.
6. Call niFgen_ConfigureStandardWaveform() to select the channel to output a
waveform. Set the following parameters:
•vi—The output value sessionHandle you obtained from the niFgen_init
function
•Channel_Name—"0"
•Amplitude—5
•Frequency—25000000
•Waveform—NIFGEN_VAL_WFM_SQUARE
•Start phase—0
•DC offset—0
7. Measure the duty cycle of the CLOCK output using an oscilloscope specified in Table 1.
To determine if the measured duty cycle is within the specification of the NI 5404, you must
determine the measurement error of the oscilloscope that you used to measure the duty
cycle and account for this error when comparing the measured duty cycle to the duty cycle
accuracy listed in the Specifications for the NI PXI-5404.
8. Call niFgen_close() to close the instrument I/O session, destroy the instrument driver
session and all of its properties, and release any memory resources the driver uses. Set the
following parameter:
•vi—The output value sessionHandle you obtained from the niFgen_init
function
External Adjustment
This section describes the basic external adjustment steps for the NI 5404.
Overview of Calibration Constants
External calibration determines the value of several calibration constants, which are stored in
nonvolatile memory on the module. NI-FGEN uses these constants to determine values to write
to the hardware to compensate the output. Three different sets of calibration constants are
determined during external calibration: constants for the voltage controlled crystal oscillator
(VCXO) digital-to-analog converter (DAC), the GAIN DAC, and the SYNC DAC.
VCXO DAC
The VCXO DAC tunes the onboard VCXO. Calibrating the VCXO DAC, therefore, calibrates
the frequency accuracy of the output.

NI PXI-5404 Calibration Procedure |© National Instruments |15
GAIN DAC
Calibrating the GAIN DAC calibrates the amplitude accuracy and the amplitude passband
flatness of the SINE out. Because the characteristics of the output channel vary over the
frequency range of the module, the GAIN DAC must be calibrated over several frequencies.
SYNC DAC
The SYNC DAC adjusts the CLOCK out duty cycle. Calibrating the SYNC DAC, therefore,
calibrates the duty cycle accuracy of the CLOCK out. Because the characteristics of the output
channel vary over the frequency range of the module, the SYNC DAC must be calibrated over
several frequencies.
Setting Up and Configuring the NI 5404
To set up and configure the NI 5404 module for adjustment, complete the following steps:
1. Install the NI 5404 module in the PXI chassis.
2. Configure the NI 5404 module with Measurement & Automation Explorer (MAX).
3. Referring to Table 4 and Figure 1 as guides, make the appropriate connections to measure
the output for the constant you want to adjust.
Table 4. Measuring Calibration Output
Applicable
Adjustment Type of Measurement
Output
Connection
Measurement
Device
SINE out amplitude
accuracy and
passband flatness
accuracy
Magnitude of a sinusoidal
voltage (either amplitude,
peak-to-peak amplitude,
or rms value)
SINE out DMM and power
meter
CLOCK out duty
cycle accuracy
Duty cycle CLOCK out Oscilloscope
Frequency accuracy Frequency SINE out Spectrum analyzer

16 |ni.com |NI PXI-5404 Calibration Procedure
Adjusting the NI 5404
Refer to Figure 2 for an overview of the adjustment process.
Figure 2. General Adjustment Procedure
Apply Session Constants
niHSSources_ApplySessionConstants()
Calibrate theVCXO DAC
for Frequency Accuracy
Calibrate the GAIN DAC for
Sine Amplitude Accuracy
and Passband Flatness Accuracy
Apply Session Constants
niHSSources_ApplySessionConstants()
Calibrate the SYNC DAC
for CLOCK Out
Duty Cycle Accuracy
Disable the Output and
Close the Calibration Session:
niHSSources_SetArbOutput()
niHSSources_CalEnd()
Initialize the Device
and Calibration Session:
niHSSources_CalStart()
niHSSources_DeviceReset()

NI PXI-5404 Calibration Procedure |© National Instruments |17
To adjust the NI 5404, complete the following steps.
Note You may also want to refer to the External Calibration examples in LabVIEW
or C, listed in Table 2.
1. Open a session using the niHSSources Cal CalStart VI.
2. Call niHSSources_Cal_DeviceReset to reset the module to the default state. Set the
following parameter:
•sessionHandle—The handle of the calibration session for the module
3. Complete the following steps:
a. Adjust the VXCO DAC for frequency accuracy as described in the Adjusting the
VCXO DAC for Frequency Accuracy section.
b. Call niHSSources_ApplySessionConstants() (niHSSources Cal Apply
Session Constants VI).
c. Adjust the GAIN DAC for sine amplitude accuracy and passband flatness accuracy as
described in the Adjusting the SINE Out Amplitude section.
d. Call niHSSources_ApplySessionConstants()(niHSSources Cal Apply
Session Constants VI).
e. Adjust the CLOCK out duty cycle accuracy and passband flatness accuracy as
described in the Adjusting the CLOCK Out Duty Cycle section.
4. Call niHSSources_CalEnd (niHSSources Cal CalEnd VI) to close the session using the
following parameters:
•sessionHandle—A pointer to the handle of the calibration session for the module
•action—niHSSources_ABORT or niHSSources_COMMIT_CONSTANTS
You can either save the constants you have calculated or abort the whole session. Aborting does
not save changes to the module.
Adjusting the VCXO DAC for Frequency Accuracy
The VCXO DAC controls the frequency accuracy of the onboard VCXO. Here you use a
calibration procedure that iteratively searches for the optimal VCXO DAC value by repeating a
measurement-adjustment loop 16 times. During each step in the loop,
niHSSources_CalAdjust (niHSSources Cal CalAdjust VI) determines the next VCXO
DAC value by interrogating the measured frequency value passed to
niHSSources_CalAdjust (niHSSources Cal CalAdjust VI) by the previous step. During this
process, the calibration session holds an internal variable for the VCXO DAC value. This
internal value is written to the VCXO DAC after you call niHSSources_CalibrateVCXO
(niHSSources Cal CalibrateVCXO VI).

18 |ni.com |NI PXI-5404 Calibration Procedure
Refer to Figure 3 for an overview of the VCXO adjustment process.
Figure 3. VCXO Adjustment Process
Generate aWaveform
at the Desired Frequency
Call niHSSources_CalibrateVCXO()
Initialize VCXO Calibration
Measure Frequency
Call niHSSources_CalAdjust()
with Measured Frequency
Ye s
No
Module Initialization
Continue to SINE out
Amplitude Adjust
Have youadjusted 16 times?

NI PXI-5404 Calibration Procedure |© National Instruments |19
Complete the following steps to calibrate the VCXO for frequency accuracy:
1. Call niHSSources_GenerateWaveform (niHSSources Cal GenerateWaveform VI) to
generate a sine wave at the desired frequency 1 MHz. Set the following parameters:
•sessionHandle—The handle of the calibration session for the module
•waveType—niHSSources_SINE
•amplitudeInVolts—2
•frequencyInHz—1000000
2. Call niHSSources_SetArbOutput (niHSSources Cal SetArbOutput VI) to enable the
output. Set the following parameters:
•sessionHandle—The handle of the calibration session for the module
•outputState—niHSSources_ENABLE
3. Call niHSSources_InitializeVCXOCalibration (niHSSources Cal
InitializeVCXOCalibration VI) to reset the internal variables held by the session to begin a
VCXO calibration. Set the following parameters:
•sessionHandle—The handle of the calibration session for the module
•type—niHSSources_SET_VCXO
4. Repeat steps 4a–4c 16 times to adjust the frequency accuracy:
a. Call niHSSources_CalibrateVCXO (niHSSources Cal CalibrateVCXO VI) to
program the adjusted VCXO DAC value to the hardware. Set the following
parameters:
•sessionHandle—The handle of the calibration session for the module
•type—niHSSources_SET_VCXO
b. Measure the frequency at the SINE out or CLOCK out on the NI 5404.
c. Call niHSSources_CalAdjust (niHSSources Cal CalAdjust VI) to adjust the
internal VCXO DAC value. Set the following parameters:
•sessionHandle—The handle of the calibration session for the module
•measurementMode—niHSSources_SET_VCXO
•actualData—A pointer to a variable that holds the desired frequency
(1000000 Hz). In LabVIEW, insert all inputs into an array of one element
before passing it to the VI.
•measuredData—A pointer to a variable that holds the measured frequency
(in Hz). In LabVIEW, insert all inputs into an array of one element before passing
it to the VI.
Tip If the difference between the desired and measured frequencies is smaller than
the accuracy or resolution of the measurement device, you can stop the calibration at
any time.

20 |ni.com |NI PXI-5404 Calibration Procedure
Adjusting the SINE Out Amplitude
Calibrating for amplitude accuracy and passband flatness accuracy at the SINE out adjusts the
value written to the GAIN DAC, which adjusts the amplitude of the sine wave output, until the
amplitude reaches the desired value. You determine the correct value for SINE out amplitude
by iterating measurements and adjustments. The calibration session holds an internal variable
for the GAIN DAC value. The program writes this value to the hardware when you call
niHSSources_CalibrateAmplitude (niHSSources Cal CalibrateAmplitude VI). When
the program calls niHSSources_CalAdjust (niHSSources Cal CalAdjust VI), this variable
is adjusted according to the measured amplitude passed in. By repeatedly measuring, adjusting,
and programming the variable value to the hardware, the output amplitude converges on the
desired value. The amplitude is calibrated at several frequencies to flatten the passband response.
For the first frequency, perform 16 adjustment iterations. For all other frequencies, perform only
eight iterations.
Figure 4 shows the programming flow for the SINE out amplitude and passband flatness
adjustments.
Table of contents
Other National Instruments Inverter manuals