Example Code

NI 5402/5406 Calibration Procedure - Verifying the Oscillator Frequency Accuracy

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Modular Instrumentation

    Software

  • LabVIEW

    Driver

  • Other

Code and Documents

Attachment

Overview

This example shows the LabVIEW code for programmatically verifying and oscillator frequency accuracy of the NI 5402/5406

 

Description

This example shows the LabVIEW code for programmatically verifying and oscillator frequency accuracy of the NI 5402/5406 as described on page 11 of the NI 5403/5406 Calibration Procedure.

 

Requirement

Software:
  Labview 2012 (or compatible)
  NI-Fgen driver which is compatible with your hardware and version of LabVIEW
Hardware:
  NI 5402 or 5406 device

 

Steps to Implement or Execute Code

Complete this test to verify the frequency accuracy of the oscillator on the NI 5402/5406. In this test, you generate a 10 MHz sine wave with the NI 5402/5406 and measure the sine wave frequency with a frequency counter.

 

  1. Connect the NI 5402/5406 CH 0 front panel connector to the frequency counter.
  2. Open an instrument driver session, initialize the device for operation, and return a session handle that will be used to identify the device in future NI-FGEN calls by calling the niFgen Initialize VI.
  3. Configure the waveform by calling the niFgen Configure Standard Waveform VI.
  4. Initiate waveform generation by calling the niFgen Initiate Generation VI.
  5. Use the frequency counter to measure the frequency output at the CH 0 front panel connector of the NI 5402/5406. This value is the measured frequency of the generated sine wave.
  6. Compare the measured frequency of the generated sine wave to the calibration test limits and published specifications shown in the table below.
  7. Abort waveform generation by calling the niFgen Abort Generation VI.
  8. Close the instrument driver session, destroy the instrument driver session and all of its properties, and release any memory resources NI-FGEN uses by calling the niFgen Close VI.
  9. If any of the errors are greater than the calibration test limits, perform an external Adjustment.

 

Calibration Test Limits ±4.5 ppm Published Specifications ±25 ppm
Low High Low High
9,999,955 Hz 10,000,045 Hz 9,999,750 Hz 10,000,250 Hz

 

Additional Information or References

Block Diagram

 136.png

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Barron
Applications Engineering
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.