Measuring Harmonic Distortion (Rs-232) - Agilent Technologies ESA-E Series Programmer's Manual

Esa spectrum analyzers
Hide thumbs Also See for ESA-E Series:
Table of Contents

Advertisement

Programming Examples

Measuring Harmonic Distortion (RS-232)

Measuring Harmonic Distortion (RS-232)

/************************************************************/
/* Measuring Harmonic Distortion (RS-232)
/*
/* This C programming example does the following.
/* The SCPI instrument commands used are given as
/* reference.
/*
/* - Opens an RS-232 session to the COM1 serial port
/* - Clears the Analyzer
/*
*CLS
/* - Resets the Analyzer
/*
*RST
/* - Set the input port to the 50 MHz reference
/*
CAL:SOUR:STAT ON
/* - Set the analyzer center frequency to the fundamental
/*
SENS:FREQ:CENT freq
/* - Set the analyzer to 10 MHz span
/*
SENS:FREQ:SPAN 10 MHZ
/* - Set the analyzer to single sweep mode
/*
INIT:CONT 0
/* - Trigger a sweep
/*
INIT:IMM
/* - Check for operation complete
/*
*OPC?
/* - Perform the peak search
/*
CALC:MARK:MAX
/* - Set the marker to reference level
/*
CALC:MARK:SET:RLEV
/* - Trigger a sweep
/*
INIT:IMM
/* - Check for operation complete
/*
*OPC?
/* - Perform the peak search
/*
CALC:MARK:MAX
/* - Change VISA timeout to 60 seconds
/* - Activate signal track
/*
CALC:MARK:TRCK:STAT ON
/* - Perform narrow span and wait
/*
SENS:FREQ:SPAN 10e4
/* - Check for operation complete
/*
*OPC?
/* - De-activate signal track
3-78
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
Chapter 3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents