Technical data

46 N9320A Programmer’s Guide
4 Programming Example
Measuring Phase Noise
/************************************************************/
/* Measuring Phase Noise */
/* */
/* This example is for the N9320A Spectrum Analyzers */
/* */
/* This C programming example does the following. */
/* The SCPI instrument commands used are given as reference. */
/* */
/* - Opens a USB session */
/* - Clears the Analyzer */
/* - Resets the Analyzer */
/* *RST */
/* - Sets the center frequency and span */
/* SENS:FREQ:CENT 50 MHZ */
/* SENS:FREQ:SPAN 10 MHZ */
/* - Set the input port to the 50 MHz amplitude reference */
/* CAL:SOUR:STAT ON */
/* - Set the marker to the maximum peak */
/* CALC:MARK1:MAX */
/* - Activate the phase noise function */
/* CALC:MARK1:PHN ON*/
/* - Set offset to 20 kHz */
/* CALC:PHN:OFFS 20KHz */
/* - Query the phase noise */
/* CALC:MARK:PHN:Y? */
/* - Close the session */
/************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include <string.h>
#include "visa.h"