Status Register-Determine When A Measurement Is Done - Agilent Technologies ESA-E Series Programmer's Manual

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

Advertisement

Status Register–Determine When a
Measurement is Done
/************************************************************/
/* Status Register - Determine when a measurement is done
/*
/* This C programming example does the following.
/* The SCPI instrument commands used are given as
/* reference.
/*
/* - Opens an HP-IB session at address 18
/* - Resets the Analyzer
/*
*RST
/* - Clears the analyzer status byte
/*
*CLS
/* - Sets the analyzer to single sweep mode
/*
INIT:CONT 0
/* - Route the amplitude reference to the analyzer input
/*
CAL:SOUR:STAT ON
/* - Set the analyzer center frequency, span and Res BW
/*
SENS:FREQ:CENT 50 MHz
/*
SENS:FREQ:SPAN 10 MHz
/*
SENS:BAND:RES 300 kHz
/* - Trigger a sweep and wait for completion of sweep
/*
INIT:IMM
/*
*OPC?
/* - Sets the service request mask to assert SRQ when
/*
either a measurement is uncalibrated or an error
/*
message has occurred.
/*
*SRE 32
/*
*ESE 35
/* - Set the computer to response to an interrupt
/* - Send an undefined command to the ESA
/*
IDN (illegal command)
/* - Wait for the SRQ
/* - When an interrupt occurs, poll all instruments
/* - Report the nature of the interrupt on the ESA analyzer */
/* - Pause 5 seconds to observe the analyzer
/* - Set the ESA to perform 80 video averages
/*
SENS:AVER:TYPE LPOW
/*
SENS:AVER:COUN 80
/*
SENS:AVER:STAT ON
/* - Trigger a measurement, and set OPC bit when done
/*
INIT:IMM
Chapter 3
Status Register–Determine When a Measurement is Done
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
Programming Examples
3-57

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents