HP ESA-E Series Programmer's Manual

Esa spectrum analyzers
Table of Contents

Advertisement

Programmer's Guide
HP ESA Spectrum Analyzers
This guide provides documentation for the following instruments:
Manufacturing Part Number: E4401-90093
© Copyright 1999 Hewlett-Packard Company
HP ESA-E Series
HP E4401B
HP E4402B
HP E4404B
HP E4405B
HP E4407B
and
HP ESA-L Series
HP E4403B
HP E4408B
HP E4411B
Printed in USA
April 1999

Advertisement

Table of Contents
loading

Summary of Contents for HP ESA-E Series

  • Page 1 Programmer’s Guide HP ESA Spectrum Analyzers This guide provides documentation for the following instruments: HP ESA-E Series HP E4401B HP E4402B HP E4404B HP E4405B HP E4407B HP ESA-L Series HP E4403B HP E4408B HP E4411B Manufacturing Part Number: E4401-90093...
  • Page 2 The information contained in this document is subject to change without notice. Hewlett-Packard makes no warranty of any kind with regard to this material, including but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material.
  • Page 3 The instruction documentation symbol. The product is marked with this symbol when it is necessary for the user to refer to the instructions in the documentation. This symbol is used to mark the on position of the power line switch. This symbol is used to mark the standby position of the power line switch.
  • Page 4 Warranty This Hewlett-Packard instrument product is warranted against defects in material and workmanship for a period of three years from date of shipment. During the warranty period, Hewlett-Packard Company will, at its option, either repair or replace products which prove to be defective.
  • Page 5 Where to Find the Latest Information Documentation is updated periodically. For the latest information about HP ESA Spectrum Analyzers, including firmware upgrades and application information, please visit the following Internet URL: http://www.hp.com/go/esa...
  • Page 7: Table Of Contents

    Reading Trace Data using ASCII Format (HP-IB) ....... . 3-23...
  • Page 8 Measuring Harmonic Distortion (HP-IB)........
  • Page 9 Contents NdBstate ............. . . 5-11 Test Current Trace Data Against all Limit Lines .
  • Page 10 Contents Return Channel Power........... . 5-45 Return Channel Power Density.
  • Page 11 Contents Move Data to File ............5-61 Delete a File .
  • Page 12 HP-IB Address ........
  • Page 13 Select Power Units of Measure..........5-131 6. HP 8590/HP ESA Spectrum Analyzers Programming Conversion Guide 7.
  • Page 14 Contents...
  • Page 15: Programming Fundamentals

    Programming Fundamentals The purpose of this chapter is to serve as a reminder of SCPI (Standard Commands for Programmable Instruments) fundamentals to those who have previous experience in programming SCPI. This chapter is not intended to teach you everything about the SCPI programming language.
  • Page 16 Codes, Formats, Protocols and Common Commands for Use with ANSI/IEEE Std 488.1-1987. New York, NY, 1992. Valid HP ESA Spectrum Analyzer SCPI commands are used for examples in this chapter. Topics included in this chapter are: • “Creating Valid Commands”...
  • Page 17: Creating Valid Commands

    Programming Fundamentals Creating Valid Commands Creating Valid Commands Commands are not case sensitive and there are often many different ways of writing a particular command. These are examples of valid commands for a given command syntax: Command Syntax Sample Valid Commands The following sample commands are all [:SENSe]:BANDwidth[:RESolution] identical.
  • Page 18: Command Notation Syntax

    Programming Fundamentals Command Notation Syntax Command Notation Syntax A typical command is made up of key words set off by colons. The key words are followed by parameters that can be followed by optional units. Example: :TRIGger:SEQuence:VIDeo:LEVel 2.5V The instrument does not distinguish between upper and lower case letters.
  • Page 19: Special Characters In Commands

    Programming Fundamentals Special Characters in Commands Special Characters in Commands Special Meaning Example Character A vertical stroke between Command:[:SENSe]:DETect parameters indicates or[:FUNCtion] alternative choices. The NEGative|POSitive|SAMP effect of the command is different depending on The choices are neg, pos, and which parameter is samp..
  • Page 20: Parameters In Commands

    Programming Fundamentals Special Characters in Commands Special Meaning Example Character Parameters in braces can Command: optionally be used in the [SENSe:]CORRection:CSE command either not at all, T[1]|2|3|4:DATA:MERGe once, or several times. <freq>,<rel_ampl>{,<fr eq>,<rel_ampl>} A valid form of this command [SENSe:]CORRection:CSE T1:DATA:MERGe 740000,.94 1250000,.31 3320000,1.7...
  • Page 21 Programming Fundamentals Parameters in Commands DEFault - resets the parameter to its default value. Include the key word MINimum, MAXimum, or DEFault after the question mark in a query in order to return the numeric value of the key word. Example query: :[SENSE]:FREQuency:CENTer? DEFAULT Variable Parameters <freq>...
  • Page 22: Putting Multiple Commands On The Same Line

    IEEE Standard Codes, Formats, Protocols and Common Commands for Use with ANSI/IEEE Std 488.1-1987. New York, NY, 1992. The following are some examples of good and bad commands. The examples are created from an HP ESA spectrum analyzer with the simple set of commands indicated below: [:SENSe]...
  • Page 23 Programming Fundamentals Putting Multiple Commands on the Same Line :FREQuency :STARt :POWer [:RF] :MIXer :RANGe [:UPPer] Bad Command Good Command PWR:ATT 40dB POW:ATT 40dB The short form of POWER is POW, not PWR. FREQ:STAR 30MHz;MIX:RANG FREQ:STAR –20dBm 30MHz;POW:MIX:RANG –20dBm The MIX:RANG command is in the same :SENSE subsystem as FREQ, but executing the FREQ command puts you back at the SENSE level.
  • Page 24: Overview Of Hp-Ib

    Programming Fundamentals Overview of HP-IB Overview of HP-IB HP-IB Instrument Nomenclature An instrument that is part of an HP-IB network is categorized as a listener, talker, or controller, depending on its current function in the network. Listener A listener is a device capable of receiving data or commands from other instruments.
  • Page 25 (sometimes called: local, resume). • A clear function that causes all HP-IB instruments, or addressed instruments, to assume a cleared condition. The definition of clear is unique for each instrument (sometimes called: clear, reset, control, send).
  • Page 26: Settings For The Serial Interface

    Programming Fundamentals Overview of RS-232 Overview of RS-232 Serial interface programming techniques are similar to most general I/O applications. Due to the asynchronous nature of serial I/O operations, special care must be exercised to ensure that data is not lost by sending to another device before the device is ready to receive.
  • Page 27: Modem Line Handshaking

    Programming Fundamentals Overview of RS-232 Modem Line Handshaking To use modem line handshaking for data transfer you would consider the following tasks: 1. Set Data Terminal Ready and Request-to-Send modem lines to active state. 2. Check Data Set Ready and Clear-to-Send modem lines to be sure they are active.
  • Page 28: Printer Setup And Operation

    Printer Setup and Operation Printer Setup and Operation Equipment • HP ESA Spectrum Analyzer equipped with Options A4H (HP-IB and Parallel Interface) or 1AX (RS-232 and Parallel Interface). • IEEE 1284 compliant printer cable (such as C2950A). • Supported printer equipped with a parallel interface. (A supported printer is one that accepts Printer Control Language Level 3 or 5).
  • Page 29 Programming Fundamentals Printer Setup and Operation 6. Press to access the menu keys. Press Printer Type Printer Type Auto make the analyzer attempt to identify the connected printer. When you press , the analyzer will respond in one of the three Auto following ways: •...
  • Page 30: Testing Printer Operation

    Programming Fundamentals Printer Setup and Operation Testing Printer Operation When you have completed the printer setup for the analyzer, press Print and then press on the front panel. If the Setup Print (Screen) Print printer is ready and the printer setup was successful, a printout of the analyzer display will be printed.
  • Page 31: Hp Esa Status Registers

    HP ESA Status Registers This chapter describes what status registers are and how to use them. Also provided is a comprehensive description of all bits of the registers in HP ESA analyzers.
  • Page 32: Using The Analyzer Status Registers

    HP ESA Status Registers Using the Analyzer Status Registers Using the Analyzer Status Registers The status system is comprised of multiple registers which are arranged in a hierarchical order. The lower-priority status registers propagate their data to the higher-priority registers in the data structures by means of summary bits.
  • Page 33: Using The Status Registers

    HP ESA Status Registers Using the Analyzer Status Registers 1. Determine which register contains the bit that reports the condition. 2. Send the unique SCPI query that reads that register. 3. Examine the bit to see if the condition has changed.
  • Page 34: Setting And Querying The Registers

    HP ESA Status Registers Using the Analyzer Status Registers • Monitor a change in the condition of a particular bit, or bits. Once you have enabled a bit, the analyzer will monitor it for a change in its condition. The transition registers are preset to register the conditions going from 0 to 1, positive transitions.
  • Page 35 HP ESA Status Registers Using the Analyzer Status Registers 3. Send GPIB commands to enable the bit that monitors the condition and to enable the summary bits that report the condition to the RQS bit. 4. Enable the controller to respond to service requests.
  • Page 36 HP ESA Status Registers Using the Analyzer Status Registers When you read the analyzer status byte register with a serial poll, the NOTE RQS bit is reset to 0. Other bits in the register are not affected. Restarting a measurement (:INITiate command) can cause the measuring bit to pulse low, which causes an SRQ if the status register is configured to SRQ on end-of-measurement.
  • Page 37: Overall Status Byte Register System

    HP ESA Status Registers Using the Analyzer Status Registers Overall Status Byte Register System Status Register Overview Status Byte Register STATus: QUEStionable:POWer Reserved Unused Source Unleveled Source LO Unleveled Unused LO Unleveled 50 MHz Osc Unleveled Error/Event Queue Summary Reserved...
  • Page 38: Status Byte Register

    HP ESA Status Registers Using the Analyzer Status Registers Status Byte Register Status Byte Register Unused Unused Error/Event Queue Summary Bit Questionable Status Summary Bit Message Available (MAV) Standard Event Summary Bit Request Service Summary (RQS) Operation Status Summary Bit &...
  • Page 39 HP ESA Status Registers Using the Analyzer Status Registers Bit Number *STB? Status Byte Register ck764a Description 0, 1 These bits are always set to 0. A 1 in this bit position indicates that the SCPI error queue is not empty. The SCPI error queue contains at least one error message.
  • Page 40 HP ESA Status Registers Using the Analyzer Status Registers command *SRE <number> where <number> is the sum of the decimal values of the bits you want to enable plus the decimal value of bit 6. For example, assume that you want to enable bit 7 so that whenever the operation status summary bit is set to 1 it will trigger a service request.
  • Page 41 HP ESA Status Registers Using the Analyzer Status Registers Summary Bit Creation Through Condition, Filters, and Events Registers Status registers (except for the Status Byte Register) consist of registers whose contents are programmed in order to produce status summary bits. These summary bits are then manipulated as follows: The condition register passes summary bits to the negative and positive transition filters, after which they are stored in the event register.
  • Page 42 HP ESA Status Registers Using the Analyzer Status Registers Standard Event Status Register Operation Complete Request Bus Control Query Error Device Dependent Error Execution Error Command Error User Request Power On Event Register & & & & & & &...
  • Page 43 HP ESA Status Registers Using the Analyzer Status Registers Bit Number *ESR? Standard Event Status Register ck765a Description A 1 in this bit position indicates that all pending operations were completed following execution of the *OPC command. analyzer This bit is always set to 0. (The does not request control.)
  • Page 44 HP ESA Status Registers Using the Analyzer Status Registers returned. Bit Number *ESE <num> *ESE? Standard Event Status Enable Register ck728a The event enable register in the Standard Event Status Register lets you choose which bits will set the summary bit (bit 5 of the Status Byte Register) to 1.
  • Page 45 HP ESA Status Registers Using the Analyzer Status Registers Operation Status Register Figure 2-2. Status Operation Register CALibrating Unused Unused SWEeping Unused Waiting for TRIGger Unused Unused Reserved Reserved Reserved Reserved Reserved Reserved Reserved Always Zero (0) Operation Status 14 13...
  • Page 46 “wait for trigger” state. Unused. These bits are always set to 0. 8–14 Reserved. These bits are not used by the analyzer, but are for future use with other HP products. Always Zero (0). This refers to any measurement under the key.
  • Page 47 HP ESA Status Registers Using the Analyzer Status Registers command :STATus:OPERation:NTRansition <num> (negative transition) or :STATus:OPERation:PTRansition <num> (positive transition) where <num> is the sum of the decimal values of the bits you want to enable. The Operation Status Event Register latches transition events from the condition register as specified by the transition filters.
  • Page 48 HP ESA Status Registers Using the Analyzer Status Registers Questionable Status Register Figure 2-5. Questionable Status Register Reserved Reserved Reserved POWer Summary Reserved FREQuency Summary Reserved Reserved CALibration Summary INTregrity Sum Reserved Reserved Reserved Reserved Reserved Always Zero (0) QUEStionable...
  • Page 49 Description 0–2 Reserved. These bits are not used by the analyzer, but are for future use with other HP products. This is the summary bit for the Questionable Status Power Register. These bits are reserved for undocumented use. This is the summary bit for the Questionable Frequency Status Register.
  • Page 50 HP ESA Status Registers Using the Analyzer Status Registers Description Always Zero (0). The Questionable Status condition register continuously monitors the hardware and firmware status of the analyzer. Condition registers are read-only. To query the condition register, send the command :STATus:QUEStionable:CONDition? The response will be the decimal sum of the bits which are set to 1.
  • Page 51 HP ESA Status Registers Using the Analyzer Status Registers set to 1, send the command :STAT:QUES:ENAB 520 (512 + 8). The command :STATus:QUEStionable:ENABle? returns the decimal value of the sum of the bits previously enabled with the :STATus:QUEStionable:ENABle <num> command.
  • Page 52 HP products. A 1 in this bit position indicates that the input overload protection (HP ESA models E4401B and E4411B only) is tripped. A 1 in this bit position indicates that the first local osillator (LO) output is unlevelled.
  • Page 53 HP ESA Status Registers Using the Analyzer Status Registers The Questionable Status Power Condition Register continuously monitors output power status of the analyzer. Condition registers are read-only. To query the condition register, send the command :STATus:QUEStionable:POWer:CONDition? The response will be the decimal sum of the bits which are set to 1.
  • Page 54 HP ESA Status Registers Using the Analyzer Status Registers Questionable Status Frequency Register Figure 2-11. Questionable Status Frequency Register Source Synth Unlocked Freq Ref Unlocked Reserved Reserved Synth Unlocked Invalid BW Reserved Reserved Reserved Unused Unused Unused Unused Unused Unused...
  • Page 55 A 1 in this bit position indicates that the analyzer frequency reference is unlocked. Reserved. These bits are not used by the analyzer, but are for future use with other HP products. A 1 in this bit position indicates that the analyzer synthesizer is unlocked.
  • Page 56 HP ESA Status Registers Using the Analyzer Status Registers :STATus:QUEStionable:FREQuency:CONDition? The response will be the decimal sum of the bits which are set to 1. The negative and positive transition filters specify which types of bit state changes in the condition register will set corresponding bits in the event register.
  • Page 57 HP ESA Status Registers Using the Analyzer Status Registers Questionable Status Calibration Register Figure 2-14. Questionable Status Calibration Register Reserved Reserved TG Align Failure RF Align Failure IF Align Failure LO Align Failure ADC AlignFailure FM Demod Align Failure Qpeak Align Failure...
  • Page 58 0, 1 Reserved. These bits are not used by the analyzer, but are for future use with other HP products. A 1 in this bit position indicates that a failure has occurred while trying to align the tracking generator (TG).
  • Page 59 Reserved. These bits are not used by the analyzer, but are for future use with other HP products. A 1 in this bit position indicates that a full alignment is needed, perhaps due to a large temperature change having been detected with auto align off, or due to default data being used.
  • Page 60 HP ESA Status Registers Using the Analyzer Status Registers The Questionable Status Calibration event enable register lets you choose which bits will set the calibration summary bit (bit 8 of the Questionable Status Register) to 1. Send the command :STATus:QUEStionable:CALibration:ENABle <num> where <num> is the sum of the decimal values of the bits you want to enable.
  • Page 61 HP ESA Status Registers Using the Analyzer Status Registers Questionable Status Integrity Register Figure 2-17. Questionable Status Integrity Register Reserved Reserved Reserved Measurement Uncal IF/ADC Over Range Reserved Reserved Reserved Reserved Reserved Reserved Reserved Invalid Data Reserved Reserved Always Zero (0)
  • Page 62 Description Reserved. These bits are not used by the analyzer, but are for future use with other HP products. A 1 in this bit position indicates that the analyzer is in a state that could lead to uncalibrated measurements. Auto coupling may resolve this problem.
  • Page 63 HP ESA Status Registers Using the Analyzer Status Registers command :STATus:QUEStionable:CALibration:NTRansition <num> (negative transition) or :STATus:QUEStionable:CALibration:PTRansition <num> (positive transition) where <num> is the sum of the decimal values of the bits you want to enable. The Questionable Status Integrity Event Register latches transition events from the condition register as specified by the transition filters.
  • Page 64 HP ESA Status Registers Using the Analyzer Status Registers 2-34 Chapter 2...
  • Page 65: Programming Examples

    Programming Examples...
  • Page 66: Types Of Examples

    This section includes examples of how to program the analyzer using the analyzer SCPI programming commands. The examples are written for use on a PC computer having HP-IB and RS-232 I/O. They are written in the C programming language. The VISA transition library should be installed and the card configured.
  • Page 67: C Programming Examples Using Vtl

    This section includes some basic information about programming in the C language. Refer to your C programming language documentation for more details. (This information is taken from the manual “HP VISA Transition Library”, HP part number E2090-90026.) The following topics are included: “Typical Example Program Contents”...
  • Page 68: Linking To Vtl Libraries

    Programming Examples C Programming Examples using VTL device identification (*IDN?). The viScanf call is then used to read the results. NOTE: Refer to Chapter 5, Language Reference, for an explanation of the full use of commands *RST and *IDN? This function must be used to close each session. When viClose you close a device session, all data structures that had been allocated for the session will be deallocated.
  • Page 69 Programming Examples C Programming Examples using VTL • You may wish to add the include file and library file search paths. They are set by doing the following: 1. Select Tools | Options from the menu. 2. Click on the Directories button to set the include file path. 3.
  • Page 70: Example Program

    Programming Examples C Programming Examples using VTL Example Program This example program queries an HP-IB device for an identification string and prints the results. Note that you must change the address. /*idn.c - program filename */ #include "visa.h" #include <stdio.h>...
  • Page 71: Opening A Session

    Programming Examples C Programming Examples using VTL Opening a Session A session is a channel of communication. Sessions must first be opened on the default resource manager, and then for each device you will be using. The following is a summary of sessions that can be opened: •...
  • Page 72 The above function first opens a session with the default resource manager. The session returned from the resource manager and a device address is then used to open a session with the HP-IB device at address 22. That session will now be identified as dmm when using other VTL functions.
  • Page 73: Addressing A Session

    This is the logical address of the VXI instrument. primary address This is the primary address of the HP-IB device. secondary address This optional parameter is the secondary address of the HP-IB device. If no secondary address is specified, none is assumed.
  • Page 74: Closing A Session

    Programming Examples C Programming Examples using VTL The following is an example of opening a device session with the HP-IB device at primary address23. ViSession defaultRM, vi; viOpenDefaultRM (&defaultRM); viOpen (defaultRM, “GPIB0::23::INSTR”, VI_NULL,VI_NULL,&vi); viClose(vi); viClose (defaultRM); Closing a Session The viClose function must be used to close each session. You can close the specific device session, which will free all data structures that had...
  • Page 75: Using Marker Peak Search And Peak Excursion

    Using Marker Peak Search and Peak Excursion This C programming example does the following: • Open an HP-IB session at address 18. • Clear the analyzer. • Reset the analyzer. • Set the analyzer center frequency and span to 50 MHz.
  • Page 76 = 0.0; double dMarkerAmpl = 0.0; float fPeakExcursion =0.0; long lOpc = 0L; /*Open session to HP-IB address 18*/ viStatus=viOpenDefaultRM(&defaultRM); viStatus=viOpen(defaultRM,"GPIB0::18",VI_NULL,VI_NULL ,&viESA); if(viStatus) printf("Could not open a session to HP-IB device at address 18!\n"); exit(0); 3-12 Chapter 3...
  • Page 77 Programming Examples Using Marker Peak Search and Peak Excursion /*Clear the analyzer*/ viClear(viESA); /*Reset the analyzer*/ viPrintf(viESA,"*RST\n"); /*Set the analyzer center frequency to 50 MHz*/ viPrintf(viESA,"SENS:FREQ:CENT 50e6\n"); /*Set the analyzer span to 50 MHz*/ viPrintf(viESA,"SENS:FREQ:SPAN 50e6\n"); /*Display the program heading*/ printf("\n\t\t Marker Program \n\n"...
  • Page 78 Programming Examples Using Marker Peak Search and Peak Excursion /*Set the marker to the maximum peak*/ viPrintf(viESA,"CALC:MARK:MAX \n"); /*Query and read the marker frequency*/ viPrintf(viESA,"CALC:MARK:X? \n"); viScanf(viESA,"%lf",&dMarkerFreq); printf("RESULT: Marker Frequency is: %lf MHz \n",dMarkerFreq/10e5); /*Query and read the marker amplitude*/ viPrintf(viESA,"CALC:MARK:Y?\n");...
  • Page 79: Using Marker Delta Mode And Marker Minimum Search

    Using Marker Delta Mode and Marker Minimum Search This C programming example does the following: • Open an HP-IB session at address 18. • Clear the analyzer. • Reset the analyzer. • Set the input port to the 50 MHz reference.
  • Page 80 = 0; double dStartFreq = 0.0; double dStopFreq = 0.0; double dMarkerAmplitude = 0.0; long lOpc = 0L; /*Open an HP-IB session at address 18*/ viStatus=viOpenDefaultRM(&defaultRM); viStatus=viOpen(defaultRM,"GPIB0::18",VI_NULL,VI_NULL,& viESA); if(viStatus) printf("Could not open a session to HP-IB device at 3-16 Chapter 3...
  • Page 81 Programming Examples Using Marker Delta Mode and Marker Minimum Search address 18!\n"); exit(0); /*Clear the analyzer*/ viClear(viESA); /*Reset the analyzer*/ viPrintf(viESA,"*RST\n"); /*Display the program heading*/ printf("\n\t\t Marker Delta Program \n\n" ); /*Check for the analyzer model number and route the 50 MHz signal accordingly*/ Route50MHzSignal();...
  • Page 82 Programming Examples Using Marker Delta Mode and Marker Minimum Search /*Set the analyzer to active delta marker mode*/ viPrintf(viESA,"CALC:MARK:MODE DELT; \n"); /*Trigger a sweep*/ viPrintf(viESA,"INIT:IMM; \n"); /*Check for operation complete*/ viQueryf(viESA, "*OPC?\n", "%d", &lOpc); if (!lOpc) printf("Program Abort! error ocurred: last command was not completed!\n");...
  • Page 83: Performing Internal Self-Alignment

    Performing Internal Self-alignment Performing Internal Self-alignment This C programming example does the following: • Open an HP-IB session at address 18. • Clear the analyzer. • Reset the analyzer. • VISA function sets the time out to infinite for this specified session.
  • Page 84 =0L; long lResult =0L; /*Open an HP-IB session at address 18*/ viStatus=viOpenDefaultRM(&defaultRM); viStatus=viOpen(defaultRM,"GPIB0::18",VI_NULL,VI_NULL,& viESA); if(viStatus) printf("Could not open a session to HP-IB device at address 18!\n"); exit(0); /*Clear the analyzer*/ viClear(viESA); /*Reset the analyzer*/ viPrintf(viESA,"*RST\n"); /*Display the program heading*/ printf("\n\t\t Calibration Correction Program \n\n"...
  • Page 85 Programming Examples Performing Internal Self-alignment /*Check for the analyzer model number and route the 50 MHz signal accordingly*/ Route50MHzSignal(); /*VISA function sets the time out to infinite for this specified session*/ viSetAttribute(viESA, VI_ATTR_TMO_VALUE, VI_TMO_INFINITE); printf("\t Performing intial self alignment .." ); /*Initiate a self-alignment*/ viPrintf(viESA,"CAL:ALL;...
  • Page 86 Programming Examples Performing Internal Self-alignment /*Close the session*/ viClose(viESA); viClose(defaultRM); 3-22 Chapter 3...
  • Page 87: Example

    Reading Trace Data using ASCII Format (HP-IB) This C programming example does the following: • Open an HP-IB session at address 18. • Clear the analyzer. • Reset the analyzer. • Set the input port to the 50 MHz amplitude reference.
  • Page 88 Programming Examples Reading Trace Data using ASCII Format (HP-IB) iResult = 0; /*Set the input port to the 50 MHz amplitude reference*/ void Route50MHzSignal() viQueryf(viESA, "*IDN?\n", "%t", &cIdBuff); iResult = (strncmp( cIdBuff, hpESA_IDN_E4401B, strlen(hpESA_IDN_E4401B)) && strncmp( cIdBuff, hpESA_IDN_E4411B, strlen(hpESA_IDN_E4411B))); if( iResult == 0 )
  • Page 89 Programming Examples Reading Trace Data using ASCII Format (HP-IB) viStatus=viOpenDefaultRM(&defaultRM); viStatus=viOpen(defaultRM,"GPIB0::18",VI_NULL,VI_NULL,& viESA); if(viStatus) printf("Could not open a session to HP-IB device at address 18!\n"); exit(0); /*Clear the analyzer*/ viClear(viESA); /*Reset the analyzer*/ viPrintf(viESA,"*RST\n"); /*Display the program heading*/ printf("\n\t\t : Read in Trace Data using ASCII format (HPIB) Program \n\n"...
  • Page 90 Programming Examples Reading Trace Data using ASCII Format (HP-IB) /*Trigger a sweep*/ viPrintf(viESA,"INIT:IMM; \n"); /*Read the operation complete query*/ viQueryf(viESA, "*OPC?\n", "%d", &lOpc); if (!lOpc) printf("Program Abort! error ocurred: last command was not completed!\n"); exit(0); /*Query the trace data using ASCII format*/ viQueryf(viESA,"%s\n", "%#t","TRAC:DATA? TRACE1;"...
  • Page 91: Example

    Programming Examples Reading Trace Data Using 32-bit Real Format (HP-IB) Reading Trace Data Using 32-bit Real Format (HP-IB) This C programming example does the following: • Open an HP-IB session at address 18. • Clear the analyzer. • Reset the analyzer.
  • Page 92 = 0L; int iSize = 0; FILE *fTraceFile; /* Open an HP-IB session at address 18*/ viStatus=viOpenDefaultRM(&defaultRM); viStatus=viOpen(defaultRM,"GPIB0::18",VI_NULL,VI_NULL,& viESA); if(viStatus) printf("Could not open a session to HP-IB device at address 18!\n"); exit(0); /*Clear the analyzer */ viClear(viESA); 3-28 Chapter 3...
  • Page 93 Programming Examples Reading Trace Data Using 32-bit Real Format (HP-IB) /*Reset the analyzer */ viPrintf(viESA,"*RST\n"); /*Display the program heading */ printf("\n\t\t Read in Trace Data using 32-bit Real Format (using HP-IB) \n\n" ); /* Set the input port to the 50 MHz amplitude reference */ Route50MHzSignal();...
  • Page 94 Programming Examples Reading Trace Data Using 32-bit Real Format (HP-IB) viRead (viESA,(ViBuf)cResult,iSize,&lRetCount); /*Extract the trace data*/ memcpy(dTraceArray,cResult+6,(size_t)lNumberBytes); /*Save trace data to an ASCII file*/ fTraceFile=fopen("C:\\temp\\ReadTrace32Hpib.txt","w"); fprintf(fTraceFile,"ReadTrace32Hpib.exe Output\nHewlett-Packard 1999\n\n"); fprintf(fTraceFile,"The %d trace data points of the spectrum:\n\n",(lNumberBytes/4)); for ( long i=0;i<lNumberBytes/4;i++) fprintf(fTraceFile,"\tAmplitude of point[%d] = %.2lf...
  • Page 95: Example

    Programming Examples Reading Trace Data Using ASCII Format (RS-232) Reading Trace Data Using ASCII Format (RS-232) This C programming example does the following: • Open a serial session at COM1/COM2. • Clear the analyzer. • Reset the analyzer. • Set the input port to the 50 MHz amplitude reference. •...
  • Page 96 && strncmp( cIdBuff, hpESA_IDN_E4411B, strlen(hpESA_IDN_E4411B))); if( iResult == 0 ) /*Set the input port to the 50 MHz amplitude reference for HP models E4401B or E4411B/ viPrintf(viESA,"CAL:SOUR INT \n"); viPrintf(viESA,"CAL:SOUR:STAT ON \n"); else /*For analyzers having frequency limits 3 GHz, prompt...
  • Page 97 Programming Examples Reading Trace Data Using ASCII Format (RS-232) viStatus=viOpenDefaultRM(&defaultRM); (viStatus=viOpen(defaultRM,"ASRL1::INSTR",VI_NULL,VI_NULL,&v iESA) != VI_SUCCESS) printf("Could not open a session to ASRL device at COM1!\n"); exit(0); /*Clear the analyzer*/ viClear(viESA); /*Reset the analyzer*/ viPrintf(viESA,"*RST\n"); /*Display the program heading*/ printf("\n\t\tRead in Trace Data using ASCII format (RS232) Program \n\n"...
  • Page 98 Programming Examples Reading Trace Data Using ASCII Format (RS-232) /*Trigger a sweep*/ viPrintf(viESA,"INIT:IMM; \n"); /*Read the operation complete query*/ viQueryf(viESA, "*OPC?\n", "%d", &lOpc); if (!lOpc) printf("Program Abort! error ocurred: last command was not completed!\n"); exit(0); /*Query the trace data using ASCII format*/ viQueryf(viESA,"%s\n", "%#t","TRAC:DATA? TRACE1;"...
  • Page 99: Example

    Reading Trace Data Using 32-bit Real Format (RS-232) This C programming example does the following: • Open an HP-IB session at address 18. • Clear the analyzer. • Reset the analyzer. • Set the input port to the 50 MHz amplitude reference •...
  • Page 100 Programming Examples Reading Trace Data Using 32-bit Real Format (RS-232) ViSession defaultRM, viESA; ViStatus errStatus; ViChar cIdBuff[256]= {0}; char cEnter = 0; iResult = 0; /*Set the input port to the 50 MHz amplitude reference*/ void Route50MHzSignal() viQueryf(viESA, "*IDN?\n", "%t", &cIdBuff); iResult = (strncmp( cIdBuff, hpESA_IDN_E4401B, strlen(hpESA_IDN_E4401B)) &&...
  • Page 101 Programming Examples Reading Trace Data Using 32-bit Real Format (RS-232) /*Program Variables*/ ViStatus viStatus= 0; ViChar _VI_FAR cResult[5000] = {0}; ViReal32 dTraceArray[401] = {0}; char cBufferInfo[6]= {0}; long lNumberBytes =0L; long lOpc =0L; unsigned long lRetCount = 0L; int iSize = 0; FILE fTraceFile;...
  • Page 102 Programming Examples Reading Trace Data Using 32-bit Real Format (RS-232) /* Specify dB per division of each vertical division & Units */ viPrintf(viESA,"DISP:WIND:TRAC:Y:SCAL:PDIV 10dB; \n"); viPrintf(viESA,"UNIT:POW DBM; \n"); /*Set analyzer trace data format to 32-bit Real */ viPrintf(viESA,"FORM:DATA REAL,32; \n"); /*Set the binary byte order to SWAP */ viPrintf(viESA, "FORM:BORD SWAP;\n");...
  • Page 103 Programming Examples Reading Trace Data Using 32-bit Real Format (RS-232) for ( long i=0;i<lNumberBytes/4;i++) fprintf(fTraceFile,"\tAmplitude of point[%d] = %.2lf dBm\n",i+1,dTraceArray[i]); fclose(fTraceFile); /*Close the session*/ viClose(viESA); viClose(defaultRM); Chapter 3 3-39...
  • Page 104: Example

    Creating a Limit Line Creating a Limit Line This C programming example does the following: • Open an HP-IB session at address 18. • Clear the analyzer. • Reset the analyzer. • Set the input port to the 50 MHz amplitude reference.
  • Page 105 Programming Examples Creating a Limit Line #define hpESA_IDN_E4401B "Hewlett-Packard, E4401B" #define hpESA_IDN_E4411B "Hewlett-Packard, E4411B" ViSession defaultRM, viESA; ViStatus errStatus; ViChar cIdBuff[256]= {0}; char cEnter = 0; iResult = 0; long lLimitTest =0L; /*Set the input port to the 50 MHz amplitude reference*/ void Route50MHzSignal() viQueryf(viESA, "*IDN?\n", "%t", &cIdBuff);...
  • Page 106 ("\n\t..Limit Test Pass\n"); void main() /*Program Variable*/ ViStatus viStatus = 0; long lOpc =0L; /* Open an HP-IB session at address 18*/ viStatus=viOpenDefaultRM(&defaultRM); viStatus=viOpen(defaultRM,"GPIB0::18",VI_NULL,VI_NULL,& viESA); if(viStatus) printf("Could not open a session to HP-IB device at address 18!\n"); 3-42 Chapter 3...
  • Page 107 Programming Examples Creating a Limit Line exit(0); /*Clear the analyzer*/ viClear(viESA); /*Reset the analyzer*/ viPrintf(viESA,"*RST\n"); /* Check for the analyzer model number and route the 50 MHz signal accordingly*/ Route50MHzSignal(); /*Display the program heading */ printf("\n\t\t Limit Lines Program \n\n" ); /*Turn on Frequency Mode*/ viPrintf(viESA,"CALC:LLINE1:CONT:DOM FREQ\n");...
  • Page 108 Programming Examples Creating a Limit Line /*Set the analyzer to a center frequency of 50 MHz, span to 20 MHz, and resolution bandwidth to 1 MHz.*/ viPrintf(viESA,"SENS:FREQ:CENT 50e6\n"); viPrintf(viESA,"SENS:FREQ:SPAN 20e6\n"); viPrintf(viESA,"SENS:BWID:RES 10e5\n"); /*Set the analyzer reference level to 0 dBm*/ viPrintf(viESA,"DISP:WIND:TRAC:Y:SCAL:RLEV 0 \n");...
  • Page 109 Programming Examples Creating a Limit Line /* The limit line test should fail.*/ printf ("Limit Line status after de-activating the 50MHZ signal \n"); printResult(); /*Reset the analyzer*/ viPrintf(viESA,"*RST\n"); /*Close the session*/ viClose(viESA); viClose(defaultRM); Chapter 3 3-45...
  • Page 110: Example

    Programming Examples Measuring Noise Measuring Noise This C programming example does the following: • Open an HP-IB session at address 18. • Clear the analyzer. • Reset the analyzer. • Set the analyzer center frequency to 50 MHz. • Set the analyzer span to 10 MHz.
  • Page 111 ("..Press any key to continue \n"); scanf( "%c",&cEnter); /*Externally route the 50 MHz signal*/ viPrintf(viESA,"CAL:SOUR:STAT ON \n"); void main() /*Program Variables*/ ViStatus viStatus = 0; double dMarkAmp = 0.0; long lOpc=0L; /*Open an HP-IB session at address 18*/ viStatus=viOpenDefaultRM(&defaultRM); viStatus=viOpen(defaultRM,"GPIB0::18",VI_NULL,VI_NULL,& viESA); if(viStatus) Chapter 3 3-47...
  • Page 112 Programming Examples Measuring Noise printf("Could not open a session to HP-IB device at address 18!\n"); exit(0); /*Clear the analyzer*/ viClear(viESA); /*Reset the analyzer*/ viPrintf(viESA,"*RST\n"); /*Display the program heading*/ printf("\n\t\t Noise Program \n\n" ); /*Check for the analyzer model number and route the 50 MHz signal accordingly*/ Route50MHzSignal();...
  • Page 113 Programming Examples Measuring Noise printf("Program Abort! error ocurred: last command was not completed!\n"); exit(0); /*Set the analyzer to single sweep mode*/ viPrintf(viESA,"INIT:CONT 0 \n"); /*Trigger a sweep*/ viPrintf(viESA,"INIT:IMM; \n"); /*Set the analyzer to active delta marker mode*/ viPrintf(viESA,"CALC:MARK:MODE DELT \n"); /*Set the marker delta frequency to 2 MHz.
  • Page 114: Example

    Entering Amplitude Correction Data Entering Amplitude Correction Data This C programming example does the following: • Open an HP-IB session at address 18. • Clear the analyzer. • Reset the analyzer. • Set the analyzer stop frequency to 1.5 GHz.
  • Page 115 = 0; int iNum =0; int iNoOfPoints =0; long lCount = 0L; long lFreq=0L; long lAmpltd=1; static ViChar *cToken; /*Number of amplitude corrections points*/ iNoOfPoints = 3; /*Open an HP-IB session at address 18*/ viStatus=viOpenDefaultRM(&defaultRM); viStatus=viOpen(defaultRM,"GPIB0::18",VI_NULL,VI_NULL,& viESA); Chapter 3 3-51...
  • Page 116 Programming Examples Entering Amplitude Correction Data if(viStatus) printf("Could not open a session to HP-IB device at address 18!\n"); exit(0); /*Clear the analyzer*/ viClear(viESA); /*Reset the analyzer*/ viPrintf(viESA,"*RST\n"); /*Display the program heading*/ printf("\n\t\t Amplitude Correction Program \n\n" ); /*Set the stop frequency to 1.5 GHz*/ viPrintf(viESA,"SENS:FREQ:STOP 1.5 GHz\n");...
  • Page 117 Programming Examples Entering Amplitude Correction Data /*Remove the "," token from the amplitude correction for analyzing data*/ cToken = strtok(cResult,","); /*Store the array (frequency) value into a two-dimensional real array*/ aRealArray[lFreq=0][lCount=0] = atof( cToken); /*Remove the "," token from the amplitude correction for analyzing data*/ cToken =strtok(NULL,",");...
  • Page 118 Programming Examples Entering Amplitude Correction Data /*Close the session*/ viClose(viESA); viClose(defaultRM); 3-54 Chapter 3...
  • Page 119: Status Register-Determine When A Measurement Is Done

    When interrupt occurs it will be handled by interrupt handler. • When an interrupt occurs, recognize it. • Report the nature of the interrupt on the HP ESA analyzer. • Disable and uninstall the interrupt handler. • Clear the status register of the analyzer.
  • Page 120 Programming Examples Status Register–Determine When a Measurement is Done report the result. • Close the context before returning. Example: #include <stdio.h> #include <stdlib.h> #include <math.h> #include <conio.h> #include <ctype.h> #include <string.h> #include <windows.h> #include "visa.h" #define hpESA_IDN_E4401B "Hewlett-Packard, E4401B" #define hpESA_IDN_E4411B "Hewlett-Packard, E4411B"...
  • Page 121 Programming Examples Status Register–Determine When a Measurement is Done long lCount2 =0; printf("."); while ((lCount2++ < 100) && (iSrqOccurred ==0)) YIELD; printf("\n"); /*Set the input port to the 50 MHz amplitude reference*/ void Route50MHzSignal(){ viQueryf(viESA, "*IDN?\n", "%t", &cIdBuff); iResult = (strncmp( cIdBuff, hpESA_IDN_E4401B, strlen(hpESA_IDN_E4401B)) &&...
  • Page 122 "analyzer at HP-IB Address xxx Has Generated an Interrupt").*/ printf ("\n\n SRQ event occurred!\n"); printf ("\n ... Original Device Session = %t\n",viESA); /*Get the HP-IB address of the insrument, which has interrupted*/ viQueryf(viESA,"SYST:COMM:GPIB:SELF:ADDR?\n","%t", cBuf); printf ("\n Instrument at HP-IB address %s has generated an interrupt!\n",cBuf);...
  • Page 123 /* Open an HP-IB session at address 18*/ viStatus=viOpenDefaultRM(&defaultRM); int address =18; viStatus=viOpen(defaultRM,"GPIB0::18",VI_NULL,VI_NULL,& viESA); if(viStatus) printf("Could not open a session to HP-IB device at address 18!\n"); exit(0); /*Clear the analyzer*/ viClear(viESA); /*Reset the analyzer*/ viPrintf(viESA,"*RST\n"); /*Clear the status byte of the analyzer*/ viPrintf(viESA,"*CLS\n");...
  • Page 124 Programming Examples Status Register–Determine When a Measurement is Done /*Tune the analyzer resolution bandwidth to 300 Khz*/ viPrintf(viESA,"SENS:BAND:RES 300 kHz\n"); /*Set the analyzer to 10 MHz span*/ viPrintf(viESA,"SENS:FREQ:SPAN 10MHz\n"); /*Trigger a sweep*/ viPrintf(viESA,"INIT:IMM\n"); /*Make sure the previous command has been completed*/ viQueryf(viESA, "*OPC?\n", "%d", &lOpc);...
  • Page 125 Programming Examples Status Register–Determine When a Measurement is Done /*Wait for SRQ */ WaitForSRQ(); /*Disable and uninstall the interrupt handler*/ viDisableEvent (viESA, VI_EVENT_SERVICE_REQ,VI_HNDLR); viUninstallHandler(viESA, VI_EVENT_SERVICE_REQ, mySrqHdlr,ViAddr(10)); /*Clear the analyzer status register*/ viPrintf(viESA,"*SRE 0 \n"); /*Clear the status byte of the analyzer*/ viPrintf(viESA,"*CLS\n");...
  • Page 126: Example

    • Configure the computer to respond to an interrupt. • Set analyzer to an uncalibrated state. • When an interrupt occurs, poll all instruments. • Report the nature of the interrupt on the HP ESA analyzer. • Clear the analyzer status register. • Continue monitoring for an interrupt.
  • Page 127 Programming Examples Determine if an Error has Occurred #define YIELD Sleep(10) ViSession defaultRM, viESA; ViStatus errStatus; ViChar cIdBuff[256] = {0}; char cEnter =0; iResult =0; iSrqOccurred = 0; char cBuf[3]={0}; /*Wait until SRQ is generated and for the handler to be called.
  • Page 128 Programming Examples Determine if an Error has Occurred viQueryf(viESA, "*IDN?\n", "%t", &cIdBuff); iResult = (strncmp( cIdBuff, hpESA_IDN_E4401B, strlen(hpESA_IDN_E4401B)) && strncmp( cIdBuff, hpESA_IDN_E4411B, strlen(hpESA_IDN_E4411B))); if( iResult == 0 ) /*Set the input port to the 50 MHz amplitude reference for the models E4411B, E4401B*/ viPrintf(viESA,"CAL:SOUR:STAT ON \n");...
  • Page 129 “Instrument at HP-IB Address xxx Has Generated an Interrupt").*/ printf ("\n SRQ Event Occured!\n"); printf ("\n ... Original Device Sesion = %1d\n",viESA); /*Get the HP-IB address of the insrument, which has interrupted*/ viQueryf(viESA,"SYST:COMM:GPIB:SELF:ADDR?\n","%t", cBuf); printf ("\n Instrument at HP-IB Address %s Has Generated an Interrupt!\n",cBuf);...
  • Page 130 0L; /* Open an HP-IB session at address 18*/ viStatus=viOpenDefaultRM(&defaultRM); viStatus=viOpen(defaultRM,"GPIB0::18",VI_NULL,VI_NULL,& viESA); if(viStatus) printf("Could not open a session to HP-IB device at address 18!\n"); exit(0); /*Clear the analyzer*/ viClear(viESA); /*Reset the analyzer*/ viPrintf(viESA,"*RST\n"); /*Clear the status byte of the analyzer*/ viPrintf(viESA,"*CLS\n");...
  • Page 131 Programming Examples Determine if an Error has Occurred /*Configure the computer to respond to an interrupt,install the handler and enable it */ viInstallHandler(viESA, VI_EVENT_SERVICE_REQ, sSrqHdlr,ViAddr(10)); viEnableEvent(viESA, VI_EVENT_SERVICE_REQ,VI_HNDLR,VI_NULL); iSrqOccurred /*Set the analyzer to a 500 MHz center frequency*/ viPrintf(viESA,"SENS:FREQ:CENT 500 MHZ \n"); /*Set the analyzer to a 100 MHz span*/ viPrintf(viESA,"SENS:FREQ:SPAN 100 MHZ\n");...
  • Page 132 Programming Examples Determine if an Error has Occurred /*Clear the analyzer status register*/ viPrintf(viESA,"*SRE 0 \n"); viPrintf(viESA,"*ESE 0 \n"); viPrintf(viESA,"STAT:QUES:ENAB 0\n"); viPrintf(viESA,"STAT:QUES:INT:ENAB 0\n"); /*Clear the status byte of the analyzer*/ viPrintf(viESA,"*CLS\n"); /*Close the session*/ viClose(viESA); viClose(defaultRM); 3-68 Chapter 3...
  • Page 133: Measuring Harmonic Distortion (Hp-Ib)

    Measuring Harmonic Distortion (HP-IB) Measuring Harmonic Distortion (HP-IB) This C programming example does the following: • Open an HP-IB session at address 18. • Clear the analyzer. • Reset the analyzer. • Set the input port to the 50 MHz amplitude reference.
  • Page 134: Example

    Programming Examples Measuring Harmonic Distortion (HP-IB) • Read the marker amplitude in volts, This is the fundamental amplitude in volts. • Read the marker frequency. • Change the center frequency step size equal to the marker frequency. • Measure each harmonic amplitude as follows: •...
  • Page 135 Programming Examples Measuring Harmonic Distortion (HP-IB) #define hpESA_IDN_E4411B "Hewlett-Packard, E4411B" ViSession defaultRM, viESA; ViStatus errStatus; ViChar cIdBuff[256] = {0}; char cEnter = 0; iResult = 0; long lOpc = 0L; void TakeSweep() /*Take a sweep and wait for the sweep completion*/ viPrintf(viESA,"INIT:IMM...
  • Page 136 = 5; dFundamental = 50.0; /* Open an HP-IB session at address 18*/ viStatus=viOpenDefaultRM(&defaultRM); viStatus=viOpen(defaultRM,"GPIB0::18",VI_NULL,VI_NULL,& viESA); if(viStatus) printf("Could not open a session to HP-IB device at address 18!\n"); exit(0); /*Clear the analyzer*/ viClear(viESA); /*Reset the analyzer*/ viPrintf(viESA,"*RST\n"); /*Display the program heading */ printf("\n\t\t Harmonic Distortion Program \n\n"...
  • Page 137 Programming Examples Measuring Harmonic Distortion (HP-IB) /*Set the analyzer center frequency to the fundamental frequency. */ viPrintf(viESA,"SENS:FREQ:CENT %lf MHz \n;",dFundamental); /*Set the analyzer to 10 MHz Span */ viPrintf(viESA,"SENS:FREQ:SPAN 10 MHZ\n"); /*Put the analyzer in a single sweep mode */ viPrintf(viESA,"INIT:CONT 0 \n");...
  • Page 138 Programming Examples Measuring Harmonic Distortion (HP-IB) /*Perform narrow span and wait */ viPrintf(viESA,"SENS:FREQ:SPAN 10e4 \n"); /*Make sure the previous command has been completed */ viQueryf(viESA, "*OPC?\n", "%d", &lOpc); if (!lOpc) printf("Program Abort! Error occurred: last command was not completed! \n");...
  • Page 139 Programming Examples Measuring Harmonic Distortion (HP-IB) dFundamental = dMarkerFreq; /*Change the center frequency step size equal to the marker frequency. */ viPrintf(viESA,"CALC:MARK:SET:STEP \n"); /*Measure each harmonic amplitude as follows: */ for ( lNum=2; lNum2=MaxHarmonic; iNum+l) /*Measuring the Harmonic No#[%d] message */ printf("Measuring the Harmonic No [%d] \n",iNum );...
  • Page 140 Programming Examples Measuring Harmonic Distortion (HP-IB) /*Take a sweep and wait for the sweep completion*/ TakeSweep(); /*Query and read the Marker Amplitude in volts and store the result in the Harmonic_V(*) array.*/ viQueryf(viESA,"CALC:MARK:Y?\n","%1f", &fHarmV[i]); /*Change the amplitude units to DBM viPrintf(viESA,"UNIT:POW DBM;...
  • Page 141 Programming Examples Measuring Harmonic Distortion (HP-IB) \n",i,fRelAmptd[i]); /*Total harmonic distortion in percent*/ printf("Total Harmonic Distortion: %lf \n",dPrcntDistort); /*Close the session*/ viClose(viESA); viClose(defaultRM); Chapter 3 3-77...
  • Page 142: Measuring Harmonic Distortion (Rs-232)

    Programming Examples Measuring Harmonic Distortion (RS-232) Measuring Harmonic Distortion (RS-232) This C programming example does the following: • Open a serial session at COM1/COM2 • Clear the analyzer • Reset the analyzer. • Set the input port to the 50 MHz amplitude reference. •...
  • Page 143: Example

    Programming Examples Measuring Harmonic Distortion (RS-232) • Take a sweep and wait for the sweep completion. • Check for operation complete. • Read the marker amplitude in volts, This is the fundamental amplitude in volts. • Read the marker frequency. •...
  • Page 144 Programming Examples Measuring Harmonic Distortion (RS-232) #include "visa.h" #define hpESA_IDN_E4401B "Hewlett-Packard, E4401B" #define hpESA_IDN_E4411B "Hewlett-Packard, E4411B" ViSession defaultRM, viESA; ViStatus errStatus; ViChar cIdBuff[256]= {0}; char cEnter = 0; iResult = 0; long lOpc =0L ; /*Set the input port to the 50 MHz amplitude reference*/ void Route50MHzSignal() viQueryf(viESA, "*IDN?\n", "%t", &cIdBuff);...
  • Page 145 Programming Examples Measuring Harmonic Distortion (RS-232) void main() /*Program Variables*/ ViStatus viStatus = 0; double dFundamental = 0.0; float fHarmV[10] ={0.0}; float fHarmDbm[10]={0.0}; float fRelAmptd[10]={0.0}; float fFundaAmptdDbm=0.0; double dFundaAmptdV=0.0; double dMarkerFreq = 0.0; double dPrcntDistort =0.0; double dSumSquare =0.0; long lMaxHarmonic =0L;...
  • Page 146 Programming Examples Measuring Harmonic Distortion (RS-232) /* Open a serial session at COM1 */ viStatus=viOpenDefaultRM(&defaultRM); if (viStatus = viOpen(defaultRM,"ASRL1::INSTR",VI_NULL,VI_NULL,&viESA) != VI_SUCCESS) printf("Could not open a session to ASRL device at COM1!\n"); exit(0); /*Clear the analyzer*/ viClear(viESA); /*Reset the analyzer*/ viPrintf(viESA,"*RST\n"); /*Display the program heading */ printf("\n\t\t Harmonic Distortion Program \n\n"...
  • Page 147 Programming Examples Measuring Harmonic Distortion (RS-232) /*Trigger a sweep */ viPrintf(viESA,"INIT:IMM\n"); /*Check for operation complete */ viQueryf(viESA, "*OPC?\n", "%d", &lOpc); if (!lOpc) /*Perform a peak search */ viPrintf(viESA,"CALC:MARK:MAX \n"); /*Perform activate signal track */ viPrintf(viESA,"CALC:MARK:TRCK:STAT ON \n"); /*Perform narrow span and wait */ viPrintf(viESA,"SENS:FREQ:SPAN 10e4 \n");...
  • Page 148 Programming Examples Measuring Harmonic Distortion (RS-232) calculation).*/ viPrintf(viESA,"CALC:MARK:Y?\n"); viScanf(viESA,"%lf",&dFundaAmptdV); dFundamental = dMarkerFreq; /*Change the center frequency step size equal to the marker frequency. */ viPrintf(viESA,"CALC:MARK:SET:STEP \n"); /*Measure each harmonic amplitude as follows: */ for ( lNum=2;lNum<=lMaxHarmonic;lNum++) /*Measuring the Harmonic No#[%d] message */ printf("Measuring the Harmonic No [%d] \n",lNum );...
  • Page 149 Programming Examples Measuring Harmonic Distortion (RS-232) /*Perform a peak search and wait for completion */ viPrintf(viESA,"CALC:MARK:MAX;*OPC?\n"); viScanf(viESA,"%d",&lOpc); /*Activate signal track */ viPrintf(viESA,"CALC:MARK:TRCK:STAT ON \n"); /*Zoom down to a 100 kHz span */ viPrintf(viESA,"SENS:FREQ:SPAN 10e4; \n"); /*Take a sweep and wait for the sweep completion*/ TakeSweep();...
  • Page 150 Programming Examples Measuring Harmonic Distortion (RS-232) /*Calculate the total harmonic distortion by dividing the square root of the sum of the squares (dSumSquare) by the fundamental amplitude in volts (dFundaAmptdV).Multiply this value by 100 to obtain a result in percent*/ dPrcntDistort = ((sqrt(double (dSumSquare))) /dFundaAmptdV) *100 ;...
  • Page 151: Programming Command Cross References

    Programming Command Cross References...
  • Page 152: Functional Index To Scpi Subsection

    Programming Command Cross References Functional Index to SCPI Subsection Functional Index to SCPI Subsection The following table lists the SCPI subsections or subsystems associated with the instrument function category you wish to perform. The commands listed that begin with an asterisk (*) are IEEE common commands.
  • Page 153 Programming Command Cross References Functional Index to SCPI Subsection Function Category SCPI Subsection or Subsystem FREQUENCY SPAN [:SENSe]:FREQuency [:SENSe]:OBWidth INPUT and OUTPUT :INPut :OUTPut [:SENSe]:ACPower [:SENSe]:AVERage [:SENSe]:BANDwidth [:SENSe]:CHPower [:SENSe]:CORRection [:SENSe]:DEMod [:SENSe]:DETector [:SENSe]:EBWidth [:SENSe]:POWer [:SENSe]:SWEep :STATus:QUEStionable :UNIT INTERNAL ATTENUATION and :OUTPut SOURCE [:SENSe]:POWer :SOURce...
  • Page 154 Programming Command Cross References Functional Index to SCPI Subsection Function Category SCPI Subsection or Subsystem SPAN [:SENSe]:EBWidth see also functional category: FREQUENCY SPAN SPEAKER :SYSTem SWEEP [:SENSe]:HARMonics [:SENSe]:SWEep :SOURce SYNCHRONIZATION *OPC? *WAI :SYSTem SYSTEM INFORMATION *CLS *ESE <number> *IDN? *ESR? *LRN? :STATus :STATus:QUEStionable...
  • Page 155: Language Reference

    Language Reference This chapter contains SCPI (Standard Commands for Programmable Instruments) programming commands for the HP ESA spectrum analyzers.
  • Page 156 Chapter 7, “Error Messages,” which supplements the information presented in this chapter. In addition, refer to Chapter 6, “Front Panel Key Reference” in the HP ESA Spectrum Analyzers User’s Guide for additional information about the operation of each analyzer function.
  • Page 157 Language Reference TRIGger UNIT Refer to Chapter 6, “HP 8590/HP ESA Spectrum Analyzers Programming Conversion Guide,” for specific backwards compatibility information between commands for HP 8590-Series spectrum analyzers and HP ESA analyzers. Chapter 5...
  • Page 158: Ieee Common Commands

    HP AMPTD REF OUT INPUT ESA spectrum analyzers except HP models E4401B and E4411B. Except for the models indicated that do not require the cable, the alignment will fail if the cable is not connected. Front Panel...
  • Page 159: Standard Event Status Register Query

    Language Reference IEEE Common Commands Standard Event Status Register Query *ESR? Queries and clears the standard event status event register. (This is a destructive read.) Range: Integer, 0 to 255 Identification Query *IDN? Returns an instrument identification information string. The string will contain the model number, serial number and firmware revision.
  • Page 160: Operation Complete

    Query Instrument Options *OPT? This command is not implemented in the HP ESA analyzers as an IEEE common command. However the function is provided in the ESA SCPI language reference in the SYSTem subsystem under :SYSTem:OPTions?.
  • Page 161: Save

    See also the :INITiate:IMMediate command Self Test Query *TST? This query is used by some instruments for a self test. For HP ESA analyzers, *TST? always returns 0; no tests are performed. Front Panel Access: System, Alignments, Align All Now...
  • Page 162: Wait-To-Continue

    Language Reference IEEE Common Commands Wait-to-Continue *WAI This command causes the instrument to wait until all pending commands are completed before executing any additional commands. There is no query form to the command. Chapter 5...
  • Page 163: Abort Subsystem

    Language Reference ABORt Subsystem ABORt Subsystem Abort :ABORt Stops any sweep or measurement in progress and resets the sweep or trigger system. A measurement refers to any of the measurements found in the menu. MEASURE If :INITiate:CONTinuous is off (single measure), then :INITiate:IMMediate will start a new single measurement.
  • Page 164: Calculate Subsystem

    Language Reference CALCulate Subsystem CALCulate Subsystem This subsystem is used to perform post-acquisition data processing. In effect, the collection of new data triggers the CALCulate subsystem. In this instrument, the primary functions in this subsystem are markers and limits. NdBpoints :CALCulate:BWIDth|BANDwidth:NDB <rel_ampl>...
  • Page 165: Ndbstate

    Language Reference CALCulate Subsystem NdBstate :CALCulate:BWIDth|BANDwidth[:STATe] OFF|ON|0|1 :CALCulate:BWIDth|BANDwidth[:STATe]? Controls the bandwidth measurement function. The function measures the bandwidth, at the number of dB down specified in :CALCulate:BWIDth:NDB, of the maximum signal on the display. Factory Preset and *RST: Remarks: When this command is turned on, the bandwidth measurement function (N dB Points) is associated with the active marker, and a peak search is performed.
  • Page 166 Language Reference CALCulate Subsystem Remarks: Once this function is defined, the selected type is persistent. Persistent means that it retains the setting previously selected, even through a power cycle. Front Panel Access: Display, Limits, Modify, Amptd Interp Log Lin Set Fixed or Relative Limit Lines :CALCulate:LLINe:CMODe FIXed|RELative :CALCulate:LLINe:CMODe? Specifies whether the current limit lines are fixed or relative.
  • Page 167 Language Reference CALCulate Subsystem limit line is not affected by this command. Front Panel Access: Display, Limits, Properties, Limits Fixed Rel Set Limit Line X-axis Units :CALCulate:LLINe:CONTrol:DOMain FREQuency|TIME :CALCulate:LLINe:CONTrol:DOMain? Selects how the limit line segments are defined: according to frequency, or according to the sweep time setting of the spectrum analyzer.
  • Page 168 Language Reference CALCulate Subsystem Define Limit Line Values :CALCulate:LLINe[1]|2:DATA <x-axis>,<ampl>,<connected>{,<x-axis>,<ampl>,<connected>} :CALCulate:LLINe[1]|2:DATA? Defines limit line values, and destroys all existing data. Up to 200 points may be defined for each limit. No units are allowed. • <x-axis> – can be frequency or time values as specified by :CALCulate:LLINe:CONTrol:DOMain.
  • Page 169 Language Reference CALCulate Subsystem For log amplitude interpolation and linear frequency interpolation, the interpolation is computed as: log y – log y log y ---------------------------------------- - f f – log y – For log amplitude interpolation and log frequency interpolation, the interpolation is computed as: log y –...
  • Page 170 Language Reference CALCulate Subsystem <x-axis> –30 GHz to +30 GHz for frequency limits <ampl> –120 dBm to +100 dBm <connected> 0 or 1 Front Panel Access: Display, Limits, Properties, X Axis Units Freq Time Delete Limit Line :CALCulate:LLINe[1]|2:DELete Deletes the selected limit line. Display the Limit Line :CALCulate:LLINe[1]|2:DISPlay OFF|ON|0|1 :CALCulate:LLINe[1]|2:DISPlay?
  • Page 171 Language Reference CALCulate Subsystem Display the Limit Margin :CALCulate:LLINe[1]|2:MARGin:STATe OFF|ON|0|1 :CALCulate:LLINe[1]|2:MARGin:STATe? Allows you to display a measurement margin that is added to the designated limit line to do secondary testing of the data. Factory Preset and *RST: Front Panel Access: Display, Limits, Modify, Margin On Off Control Limit Line Testing :CALCulate:LLINe[1]|2:STATe OFF|ON|0|1...
  • Page 172: Calculate:marker Subsection

    Language Reference CALCulate Subsystem CALCulate:MARKer Subsection Markers All Off on All Traces :CALCulate:MARKer:AOFF Turns off all markers on all the traces. Front Panel Access: Marker, Marker All Off Continuous Peaking Marker Function :CALCulate:MARKer[1]|2|3|4:CPEak[:STATe] OFF|ON|0|1 :CALCulate:MARKer[1]|2|3|4:CPEak[:STATe]? Turns on or off continuous peaking. It continuously puts the selected marker on the highest displayed signal peak.
  • Page 173 Language Reference CALCulate Subsystem Front Panel Access: Freq Count, Resolution Auto Man Frequency Counter Marker :CALCulate:MARKer[1]|2|3|4:FCOunt[:STATe] OFF|ON|0|1 :CALCulate:MARKer[1]|2|3|4:FCOunt[:STATe]? :CALCulate:MARKer[1]:FCOunt:X? Turns on or off the marker frequency counter. To query the frequency counter, use :CALCulate:MARKer[1]:FCOunt:X? Factory Preset and *RST: Remarks: If query with frequency count off, 9e15 is returned. Front Panel Access: Freq Count, Marker Count On Off...
  • Page 174 Language Reference CALCulate Subsystem Marker Peak (Maximum) Left Search :CALCulate:MARKer[1]|2|3|4:MAXimum:LEFT Places the selected marker on the next highest signal peak to the left of the current marked peak. Remarks: The marker will be placed at the next highest peak that rises and falls by at least the peak excursion above the peak threshold.
  • Page 175 Marker Mode :CALCulate:MARKer[1]|2|3|4:MODE POSition|DELTa|BAND|SPAN :CALCulate:MARKer[1]|2|3|4:MODE? Selects the type of markers that you want to activate. Refer to the “HP ESA Analyzers User’s Guide” for a more complete explanation of this function. Position selects a normal marker that can be positioned on a trace and from which trace information will be generated.
  • Page 176 Language Reference CALCulate Subsystem Front Panel Access: Search, Search Param, Peak Excursn Define Peak Search :CALCulate:MARKer:PEAK:SEARch:MODE PARameter|MAXimum :CALCulate:MARKer:PEAK:SEARch:MODE? Sets the peak search mode. See command :CALCulate:MARKer[1]|2|3|4:MAXimum NOTE Factory Preset and *RST: MAXimum Remarks: If mode is set to MAXimum, peak search will place the marker at the maximum amplitude in the trace.
  • Page 177 Language Reference CALCulate Subsystem Peak to Peak Delta Markers :CALCulate:MARKer[1]|2|3|4:PTPeak Positions delta markers on the highest and lowest points on the trace. Factory Preset and *RST: Front Panel Access: Search, Pk-Pk Search Set Center Frequency to the Marker Value :CALCulate:MARKer[1]|2|3|4[:SET]:CENTer Sets the center frequency equal to the specified marker frequency, which moves the marker to the center of the screen.
  • Page 178 Language Reference CALCulate Subsystem Front Panel Access: Marker –>, Mkr –> Start Set Center Frequency Step Size to the Marker Value :CALCulate:MARKer[1]|2|3|4[:SET]:STEP Sets the center frequency step size to match the frequency difference between the markers.. In delta marker mode, the center frequency step size will be set to the frequency difference between the markers.
  • Page 179 Language Reference CALCulate Subsystem Marker to Trace :CALCulate:MARKer[1]|2|3|4:TRACe <integer> :CALCulate:MARKer[1]|2|3|4:TRACe? Assigns the specified marker to the designated trace 1, 2, or 3. Factory Preset and *RST: Range: 1 to 3 Front Panel Access: Marker, Marker Trace Auto 1 2 3 Marker to Trace Auto :CALCulate:MARKer[1]|2|3|4:TRACe:AUTO OFF|ON|0|1 :CALCulate:MARKer[1]|2|3|4:TRACe:AUTO?
  • Page 180 Language Reference CALCulate Subsystem Marker X Value :CALCulate:MARKer[1]|2|3|4:X <param> :CALCulate:MARKer[1]|2|3|4:X? Position the designated marker on its assigned trace at the specified trace X value. The value is in the X-axis units (which is often frequency or time). The query returns the current X value of the designated marker. Default Unit: Matches the units of the trace on which the marker is positioned...
  • Page 181 Language Reference CALCulate Subsystem Span Markers Center Frequency X Position :CALCulate:MARKer[1]|2|3|4:X:POSition:CENTer <param> :CALCulate:MARKer[1]|2|3|4:X:POSition:CENTer? Position the center frequency, of the designated span-type marker pair, at the specified trace X position. A trace is composed of 401 points (X positions.) Use :CALCulate:MARKer:MODE SPAN to select span markers.
  • Page 182 Language Reference CALCulate Subsystem Front Panel Access: Marker, <active marker>, Start Band Markers Stop Frequency X Position :CALCulate:MARKer[1]|2|3|4:X:POSition:STOP <param> :CALCulate:MARKer[1]|2|3|4:X:POSition:STOP? Position the right-most marker, the stop frequency of the designated band-type marker pair, at the specified trace X position. A trace is composed of 401 points (X positions.) Use :CALCulate:MARKer:MODE BAND to select band markers.
  • Page 183 Language Reference CALCulate Subsystem position the markers at the desired trace X values. The value is in the X-axis units (which is often frequency or time). Use :CALCulate:MARKer:MODE SPAN to select span markers. The query returns the current X-value frequency span of the designated markers.
  • Page 184: Calculate:ntdata Subsection

    Language Reference CALCulate Subsystem Marker Read Y Value :CALCulate:MARKer[1]|2|3|4:Y? Read the current Y value for the designated marker or delta on its assigned trace. The value is in the Y-axis units for the current trace (which is often dBm). Default Unit: Matches the units of the trace on which the marker is positioned Remarks:...
  • Page 185: Calibration Subsystem

    HP AMPTD REF OUT INPUT ESA spectrum analyzers except HP models E4401B and E4411B. Except for the models indicated that do not require the cable, the alignment will fail if the cable is not connected. Front Panel...
  • Page 186: Automatic Alignment

    Language Reference CALibration Subsystem Front Panel Access: System, Alignments, Auto Align, All System, Alignments, Auto Align, All but RF Automatic Alignment :CALibration:AUTO[:STATe] OFF|ON|0|1 :CALibration:AUTO[:STATe]? Turns the automatic alignment on and off. This is run continuously, at the end of each sweep. Factory Preset and *RST: On at power-up...
  • Page 187: Query The Internal Or External Frequency Reference

    Language Reference CALibration Subsystem Query the Internal or External Frequency Reference :CALibration:FREQuency:REFerence? This is a query only. Front Panel Access: none Coarse Adjust the Frequency Reference :CALibration:FREQuency:REFerence:COARse <setting> :CALibration:FREQuency:REFerence:COARse? Allows coarse adjustment of the internal 10 MHz reference oscillator timebase of the analyzer. :CALibration:ALL is required after COARse is set.
  • Page 188: Align The Rf Circuitry

    HP AMPTD REF OUT INPUT ESA spectrum analyzers except HP models E4401B and E4411B. Except for the models indicated that do not require the cable, the alignment will fail if the cable is not connected. Front Panel...
  • Page 189: Calibrate The Tracking Generator

    HP AMPTD REF OUT INPUT ESA spectrum analyzers except HP models E4401B and E4411B. Except for the models indicated that do not require the cable, the alignment will fail if the cable is not connected. Front Panel...
  • Page 190: Configure Subsystem

    Language Reference CONFigure Subsystem CONFigure Subsystem CONFigure subsystem commands apply only to measurements found in menu. These commands stop the current measurement MEASURE and set up the instrument for the specified measurement using the factory default instrument settings. :CONF:<measurement> will always set :INIT:CONT OFF (single mode), and also places the measurement in the idle state.
  • Page 191: Couple Subsystem

    Language Reference COUPle Subsystem COUPle Subsystem Some measurement settings are automatically coupled together to optimize speed and accuracy. These commands control that coupling. COUPle the Function to Other Settings :COUPle ALL|NONE The instrument can automatically couple instrument settings together for accurate measurements and optimum dynamic range. This command is used to override the coupling for special measurement needs.
  • Page 192: Display Subsystem

    Language Reference DISPlay Subsystem DISPlay Subsystem The DISPlay subsystem controls the selection and presentation of textual, graphical, and trace information. Within a display, information may be separated into individual windows. Display Viewing Angle :DISPlay:ANGLe <integer> :DISPlay:ANGLe? Changes the viewing angle for better viewing in different environments.
  • Page 193: Display Annotation Title Data

    Language Reference DISPlay Subsystem which means that it retains the setting previously selected, even through a power cycle. Front Panel Access: System, Time/Date, Time/Date On Off Display Annotation Title Data :DISPlay:ANNotation:TITLe:DATA <string> :DISPlay:ANNotation:TITLe:DATA? Enters the text that will be displayed in the user title area of the display.
  • Page 194: Trace Graticule Display

    Language Reference DISPlay Subsystem Trace Graticule Display :DISPlay:WINDow:TRACe:GRATicule:GRID[:STATe] OFF|ON|0|1 :DISPlay:WINDow:TRACe:GRATicule:GRID[:STATe]? Turns the graticule on or off. Factory Preset and *RST: Front Panel Access: Display, Preferences, Graticule On Off Trace X-Axis Scale Offset :DISPlay:WINDow:TRACe:X[:SCALe]:OFFSet <freq> :DISPlay:WINDow:TRACe:X[:SCALe]:OFFSet? Specifies the frequency offset for all frequency readouts such as center frequency, except that it does not affect marker count.
  • Page 195: Control The Display Line

    Language Reference DISPlay Subsystem Control the Display Line :DISPlay:WINDow:TRACe:Y:DLINe:STATe OFF|ON|0|1 :DISPlay:WINDow:TRACe:Y:DLINe:STATe? Turns the display line on or off. Factory Preset and *RST: Front Panel Access: Display, Display Line On Off Normalized Reference Level :DISPlay:WINDow:TRACe:Y[:SCALe]:NRLevel <rel_ampl> :DISPlay:WINDow:TRACe:Y[:SCALe]:NRLevel? Sets the normalized reference level. See command :CALCulate:NTData[STATe] OFF|ON|0|1 NOTE Factory Preset...
  • Page 196: Trace Y-Axis Scaling

    Language Reference DISPlay Subsystem Trace Y-Axis Scaling :DISPlay:WINDow:TRACe:Y[:SCALe]:PDIVision <rel_ampl> :DISPlay:WINDow:TRACe:Y[:SCALe]:PDIVision? Sets the per-division display scaling for the y-axis. Factory Preset and *RST: 10 dB Range: 0.01 to 20.0 dB Default Unit: Front Panel Access: AMPLITUDE/Y Scale, Scale/Div Trace Y-Axis Reference Level :DISPlay:WINDow:TRACe:Y[:SCALe]:RLEVel <ampl>...
  • Page 197: Vertical Axis Scaling

    Language Reference DISPlay Subsystem Remarks: The sum of (reference level offset + reference level) is clipped to the range –327.6 to 327.6. So, the attainable values of reference level offset depend on the current reference level. Front Panel Access: Amplitude Y Scale, Ref Level Offst Vertical Axis Scaling :DISPlay:WINDow:TRACe:Y[:SCALe]:SPACing LINear|LOGarithmic :DISPlay:WINDow:TRACe:Y[:SCALe]:SPACing?
  • Page 198: Fetch Subsystem

    Language Reference FETCh Subsystem FETCh Subsystem FETCh subsystem commands apply only to measurements found in the menu. FETCh commands can only be used as queries. MEASURE FETCh commands put valid data into the output buffer, but do not initiate data acquisition. Use the :INITiate[:IMMediate] command to acquire data.
  • Page 199: Return Upper Channel Power

    Language Reference FETCh Subsystem Return Upper Channel Power :FETCh:ACPower:UPPer? This command returns the value of the upper channel power relative to the main channel power, in dB. Return Channel Power and Density :FETCh:CHPower? This command returns scalar results of main channel power, and power density.
  • Page 200: Return Harmonic Amplitudes

    Language Reference FETCh Subsystem Remarks: The total harmonic distortion precision for SCPI and the display is three significant digits. Front Panel Access: MEASURE, Harmonic Dis Return Harmonic Amplitudes :FETCh:HARMonics:AMPLitude[:ALL]? Returns a comma-separated list of the amplitudes of the ten harmonics. Range: –180 dBm to 70 dBm Default Unit:...
  • Page 201: Return Harmonic N Frequency

    Language Reference FETCh Subsystem harmonic frequency precision for SCPI and the display is four significant digits. Front Panel Access: MEASURE, Harmonic Dist Return Harmonic N Frequency :FETCh:HARMonics:FREQuency[n]? Returns the frequency of harmonic number n, measured in Hz. Range: 0 Hz to the maximum frequency range of the analyzer Default Unit: Remarks: The harmonic frequency precision for SCPI and the...
  • Page 202: Format Subsystem

    Language Reference FORMat Subsystem FORMat Subsystem The FORMat subsystem sets a data format for transferring numeric and array information. TRACe[:DATA] and TRACe[:DATA]? are affected by FORMat subsystem commands. Byte Order :FORMat:BORDer NORMal|SWAPped :FORMat:BORDer? This command selects the binary data byte order for data transfer. It controls whether binary data is transferred in normal or swapped mode.
  • Page 203 Language Reference FORMat Subsystem ASCii - Amplitude values are in ASCII, in amplitude units, separated by commas. INTeger, 32 - Binary 32-bit integer values in internal units (mdBm) REAL, 32 (or 64) - Binary 32-bit, or 64-bit, real values in amplitude units.
  • Page 204: Hcopy Subsystem

    Language Reference HCOPy Subsystem HCOPy Subsystem The HCOPy subsystem controls the setup of plotting and printing to an external device. Abort the Print :HCOPy:ABORt Aborts hard copy printout of results. Front Panel Access: (with print in progress) Printer Type :HCOPy:DEVice:TYPE AUTO|CUSTom|NONE :HCOPy:DEVice:TYPE? Sets up the printer by selecting printer type.
  • Page 205: Print A Hard Copy

    Language Reference HCOPy Subsystem Front Panel Access: Print Setup, Color On Off Print a Hard Copy :HCOPy[:IMMediate] The entire screen is output to the parallel port. Front Panel Access: Print Form Feed the Print Item :HCOPy:ITEM:FFEed[:IMMediate] Sends the printer a command to form feed. Front Panel Access: Print Setup, Eject Page...
  • Page 206 Language Reference HCOPy Subsystem Factory Preset and *RST: The factory default is 1. This parameter is persistent, which means that it retains the setting previously selected, even through a power cycle. Range: Integer, 1 or 2 Front Panel Access: Print Setup, Prints/Page 1 2 5-52 Chapter 5...
  • Page 207: Initiate Subsystem

    Language Reference INITiate Subsystem INITiate Subsystem The INITiate subsystem is used to control the initiation of the trigger. Refer to the TRIGger and ABORt subsystems for related commands. Continuous or Single Measurements :INITiate:CONTinuous OFF|ON|0|1 :INITiate:CONTinuous? Selects whether the trigger system is continuously initiated or not. This command affects sweep if not in a measurement, and affects trigger when in a measurement.
  • Page 208: Take New Data Acquisitions

    Language Reference INITiate Subsystem *RST: Continuous, or On Front Panel Access: Sweep, Sweep Cont Single Single Sweep, Sweep Cont Single Meas Control, Measure Cont Single Take New Data Acquisitions :INITiate[:IMMediate] This command initiates a sweep if not in a measurement. If in a measurement, it triggers the instrument, if external triggering is the type of trigger event selected.
  • Page 209: Input Subsystem

    Resets the overload protection circuitry for the input connector. There is no query form of this command. This command is valid only for HP ESA models E4401B and E4411B. NOTE The excessive input signal may have caused 15 dB of attenuation to be switched in, or it may have completely switched the input connector out so that it is connected to the internal reference signal.
  • Page 210: Measurement Subsystem

    Language Reference MEASurement Subsystem MEASurement Subsystem MEASurement subsystem commands apply only to measurements found in the menu. These commands primarily control MEASURE measurements in single mode. Use the single commands in this subsystem to quickly make measurements using the factory default instrument settings. MEASure commands stop the present measurement and set up the instrument for the specified measurement using the factory default values.
  • Page 211: Measure Upper Channel Power

    Language Reference MEASurement Subsystem Measure Upper Channel Power :MEASure:ACPower:UPPer? This command returns the value of the upper channel power relative to the main channel power, in dB. Measure Channel Power and Density :MEASure:CHPower? This command returns scalar results of main channel power, and power density.
  • Page 212: Return Harmonic Amplitudes

    Language Reference MEASurement Subsystem Default Unit: Remarks: The total harmonic distortion precision for SCPI and the display is three significant digits. Front Panel Access: MEASURE, Harmonic Dist Return Harmonic Amplitudes :MEASure:HARMonics:AMPLitude[:ALL]? Returns a comma-separated list of the amplitudes of the ten harmonics. Range: –180 dBm to 70 dBm Default Unit:...
  • Page 213: Return Harmonic N Frequency

    Language Reference MEASurement Subsystem Remarks: If fewer than ten harmonics are measured, the value NaN is returned for any harmonic not measured. The harmonic frequency precision for SCPI and the display is four significant digits. Front Panel Access: MEASURE, Harmonic Dist Return Harmonic N Frequency :MEASure:HARMonics:FREQuency[n]? Returns the frequency of harmonic number n, measured in Hz.
  • Page 214: Mmemory Subsystem

    The purpose of the MMEMory subsystem is to provide access to mass storage devices such as internal or external disk drives. HP ESA analyzers use two types of mass storage devices: • 3.5 inch disk drive (high density, 1.44 MBytes formatted) designated “A:”...
  • Page 215: Move Data To File

    Language Reference MMEMory Subsystem Move Data to File :MMEMory:DATA <file_name>,<definite_length_block> :MMEMory:DATA? <file_name> Loads <definite_length_block> into the memory location <file_name>. The query returns the contents of the <file_name> in the format of a definite length block. This command can be used for copying files out of the analyzer over the remote bus.
  • Page 216: Load An Instrument State From A File

    Language Reference MMEMory Subsystem Load an Instrument State from a File :MMEMory:LOAD:STATe 1, <file_name> The contents of the state file are loaded into the specified register. To then load the register into the current instrument state use *RCL. Example: :MMEM:LOAD:STATE 1,"C:mystate.sta" Front Panel Access: File, Load, State...
  • Page 217: Store A Screen Image In A Graphic File

    Language Reference MMEMory Subsystem Store a Screen Image in a Graphic File :MMEMory:STORe:SCReen <file_name> Saves the current instrument screen image, as a graphic file, to the specified file in memory. The file must have a .gif or .wmf file extension. The specified file extension determines which file format the instrument will use to save the image.
  • Page 218: Output Subsystem

    Language Reference OUTPut Subsystem OUTPut Subsystem The OUTPut subsystem controls the characteristics of the tracking generator output port. Commands for controlling the tracking generator output are found under :SOURce:POWer. Turn Output On/Off :OUTPut[:STATe] OFF|ON|0|1 :OUTPut[:STATe]? Controls the tracking generator output. Factory Preset and *RST: Front Panel...
  • Page 219: Read Subsystem

    Language Reference READ Subsystem READ Subsystem READ subsystem commands apply only to measurements found in the menu. READ commands do not preset the measurement to MEASURE the factory default values, as do the MEASurement subsystem commands. Instead, they use settings from the last measurement. Read commands initiate the measurement and put valid data into the output buffer.
  • Page 220: Measure Channel Power And Density

    Language Reference READ Subsystem Measure Channel Power and Density :READ:CHPower? This command returns scalar results of main channel power, and power density. Remarks: The main channel power is returned in the current amplitude units, and the density value is returned in current amplitude units/Hz.
  • Page 221: Return Harmonic Amplitudes

    Language Reference READ Subsystem Return Harmonic Amplitudes :READ:HARMonics:AMPLitude[:ALL]? Returns a comma-separated list of the amplitudes of the ten harmonics. Range: –180 dBm to 70 dBm Default Unit: dBm (from fundamental); dBc (all others) Remarks: The first value (for the fundamental) is measured in dBm;...
  • Page 222: Return Harmonic N Frequency

    Language Reference READ Subsystem Return Harmonic N Frequency :READ:HARMonics:FREQuency[n]? Returns the frequency of harmonic number n, measured in Hz. Range: 0 Hz to the maximum frequency range of the analyzer Default Unit: Remarks: The harmonic frequency precision for SCPI and the display is four significant digits.
  • Page 223: Sense Subsystem

    Language Reference SENSe Subsystem SENSe Subsystem Sets the instrument state parameters so that you can measure the input signal. SENSe subsystem commands used for measurements in the MEASURE menus may only be used to set parameters of a specific Meas Setup measurement when the measurement is active.
  • Page 224: Sense:acpower Subsection

    Language Reference SENSe Subsystem SENSe:ACPower Subsection Set Adjacent Channel Power Number of Averages [:SENSe]:ACPower:AVERage:COUNt <integer> Set the adjacent channel power measurement number of averages. Remarks: This command is used for measurements in the menu. MEASURE Front Panel Access: none Adjacent Channel Power Averaging On/Off [:SENSe]:ACPower:AVERage[:STATe]OFF|ON|0|1 Turn on or off the adjacent channel power measurement averaging.
  • Page 225 Language Reference SENSe Subsystem Set Adjacent Channel Spacing [:SENSe]:ACPower:CSPacing <freq> Set the adjacent channel spacing. Remarks: This command is used for measurements in the menu. MEASURE Front Panel Access: Meas Setup, Main Chan Spacing Chapter 5 5-71...
  • Page 226: Sense:average Subsection

    Language Reference SENSe Subsystem SENSe:AVERage Subsection Clear the Current Average [:SENSe]:AVERage:CLEar Re-start the trace averaging function. Front Panel Access: none Set the Average Count [:SENSe]:AVERage:COUNt <integer> [:SENSe]:AVERage:COUNt? Specifies the number of measurements that are combined. Factory Preset and *RST: Range: 1 to 8192 Front Panel Access:...
  • Page 227 Language Reference SENSe Subsystem units are dBm). This command is equivalent to pressing front panel keys BW/Avg, Average Type, Video. POWer averages the linear power of successive measurements (typical units are watts). Factory Preset and *RST: LPOWer Front Panel Access: BW/Avg, Average Type, Video Power Chapter 5 5-73...
  • Page 228: Sense:bandwidth Subsection

    Language Reference SENSe Subsystem SENSe:BANDwidth Subsection Resolution Bandwidth [:SENSe]:BANDwidth|BWIDth[:RESolution] <freq> [:SENSe]:BANDwidth|BWIDth[:RESolution]? Specifies the resolution bandwidth. Factory Preset and *RST: 3 MHz Range: 10 Hz to 5 MHz with Option 1DR, narrow resolution bandwidth; 1 kHz to 5 MHz without Option 1DR. Default Unit: Front Panel Access:...
  • Page 229 Language Reference SENSe Subsystem Factory Preset and *RST: Front Panel Access: BW/Avg, Video BW Auto Man Video to Resolution Bandwidth Ratio [:SENSe]:BANDwidth|BWIDth:VIDeo:RATio <number> [:SENSe]:BANDwidth|BWIDth:VIDeo:RATio? Specifies the ratio of the video bandwidth to the resolution bandwidth. Factory Preset and *RST: Range: 0.00001 to 3.0e6 Front Panel Access:...
  • Page 230: Sense:chpower Subsection

    Language Reference SENSe Subsystem SENSe:CHPower Subsection Set Channel Power Number of Averages [:SENSe]:CHPower:AVERage:COUNt <integer> Set the channel power measurement number of averages. Remarks: This command is used for measurements in the menu. MEASURE Front Panel Access: none Channel Power Averaging On/Off [:SENSe]:CHPower:AVERage[:STATe] OFF|ON|0|1 Turn on or off the channel power measurement averaging.
  • Page 231: Sense:correction Subsection

    Language Reference SENSe Subsystem SENSe:CORRection Subsection Perform Amplitude Correction [:SENSe]:CORRection:CSET:ALL[:STATe] OFF|ON|0|1 [:SENSe]:CORRection:CSET:ALL[:STATe]? Turns On or Off the amplitude corrections. When turned On, only the correction sets that were turned on are enabled. When turned Off, all of the correction sets are disabled. Factory Preset and *RST: Remarks:...
  • Page 232 Language Reference SENSe Subsystem AMPLITUDE/Y Scale, Corrections, Modify, Select, Antenna AMPLITUDE/Y Scale, Corrections, Modify, Select, Cable AMPLITUDE/Y Scale, Corrections, Modify, Select, Other AMPLITUDE/Y Scale, Corrections, Modify, Select, User AMPLITUDE/Y Scale, Corrections, Modify, Edit, Point AMPLITUDE/Y Scale, Corrections, Modify, Edit, Frequency AMPLITUDE/Y Scale, Corrections, Modify, Edit, Amplitude AMPLITUDE/Y Scale, Corrections, Modify, Edit, Delete Point Merge Additional Values into the Existing Amplitude...
  • Page 233 Amplitude correction is applied to the display data to adjust for measurement situations where the unit under test has a different impedance than the 50Ω input impedance of the analyzer. Some HP ESA analyzers have Option 1DP, 75Ω input. In this case, you may want to convert the data to make measurements in a 50Ω...
  • Page 234 Language Reference SENSe Subsystem Range: 50 or 75 ohms Default Unit: ohms Front Panel Input, Input Z Corr 50 Ω 75 Ω Access: External Amplifier Correction [:SENSe]:CORRection:OFFSet[:MAGNitude] <rel_ampl> [:SENSe]:CORRection:OFFSet[:MAGNitude]? A single value of amplitude correction can be applied to the displayed trace data to compensate for signal losses or gains that are due to other devices in the measurement setup, rather than the unit under test.
  • Page 235: Sense:demod Subsection

    Language Reference SENSe Subsystem SENSe:DEMod Subsection Type of Demodulation [:SENSe]:DEMod AM|FM [:SENSe]:DEMod? Sets the type of demodulation. Factory Preset and *RST: Front Panel Access: Det/Demod, Demod, AM Det/Demod, Demod, FM FM Deviation [:SENSe]:DEMod:FMDeviation <freq> [:SENSe]:DEMod:FMDeviation? Sets the total FM frequency deviation for full screen demodulation. Factory Preset and *RST: 100 kHz...
  • Page 236 Language Reference SENSe Subsystem Factory Preset and *RST: 500 ms Range: 2 ms to 100 s Default Unit: seconds Front Panel Access: Det/Demod, Demod, Demod Time 5-82 Chapter 5...
  • Page 237: Sense:detector Subsection

    Language Reference SENSe Subsystem SENSe:DETector Subsection Type of Detection [:SENSe]:DETector[:FUNCtion] NEGative|POSitive|SAMPle [:SENSe]:DETector[:FUNCtion]? Specifies the detection mode. Negative peak detection displays the lowest sample taken during the interval being displayed. Positive peak detection displays the highest sample taken during the interval being displayed. Sample detection displays the first sample taken during the interval being displayed.
  • Page 238: Sense:ebwidth Subsection

    Language Reference SENSe Subsystem SENSe:EBWidth Subsection Set Emission BW Number of Averages [:SENSe]:EBWidth:AVERage:COUNt <integer> Set the emission bandwidth measurement number of averages. Remarks: This command is used for measurements in the menu. MEASURE Front Panel Access: none Emission BW Averaging On/Off [:SENSe]:EBWidth:AVERage[:STATe] OFF|ON|0|1 Turn on or off the channel power measurement averaging.
  • Page 239 Language Reference SENSe Subsystem Front Panel Access: Meas Setup, Max Hold On Off Set Emission BW X dB Value [:SENSe]:EBWidth:XDB <rel_ampl> This commands allows you to set the dB value (X dB) below the maximum value on the signal at which to measure the emission bandwidth.
  • Page 240: Sense:frequency Subsection

    HP ESA E4405B: 6.6 GHz HP ESA E4407B, E4408B: 13.25 GHz Range: HP ESA E4401B, E4411B: –80 MHz to 1.58 GHz HP ESA E4402B, E4403B: –80 MHz to 3.10 GHz HP ESA E4404B: –80 MHz to 6.78 GHz HP ESA E4405B: –80 MHz to 13.3 GHz HP ESA E4407B, E4408B: –80 MHz to 27.0 GHz...
  • Page 241 HP ESA E4405B: 13.2 GHz HP ESA E4407B, E4408B: 26.5 GHz Range: HP ESA E4401B, E4411B: 0 Hz to 1.58 GHz HP ESA E4402B, E4403B: 0 Hz to 3.10 GHz HP ESA E4404B: 0 Hz to 6.78 GHz HP ESA E4405B: 0 Hz to 13.3 GHz HP ESA E4407B, E4408B: 0 Hz to 27.0 GHz...
  • Page 242 Factory Preset and *RST: 0 Hz Range: HP ESA E4401B, E4411B: –80 MHz to 1.58 GHz HP ESA E4402B, E4403B: –80 MHz to 3.10 GHz HP ESA E4404B: –80 MHz to 6.78 GHz HP ESA E4405B: –80 MHz to 13.3 GHz HP ESA E4407B, E4408B: –80 MHz to 27.0 GHz...
  • Page 243 HP ESA E4405B: 13.2 GHz HP ESA E4407B, E4408B: 26.5 GHz Range: HP ESA E4401B, E4411B: –80 MHz to 1.58 GHz HP ESA E4402B, E4403B: –80 MHz to 3.10 GHz HP ESA E4404B: –80 MHz to 6.78 GHz HP ESA E4405B: –80 MHz to 13.3 GHz HP ESA E4407B, E4408B: –80 MHz to 27.0 GHz...
  • Page 244: Sense:harmonics Subsection

    Language Reference SENSe Subsystem SENSe:HARMonics Subsection Harmonic Measurement Averages [:SENSe]:HARMonics:AVERage:COUNt <integer> [:SENSe]:HARMonics:AVERage:COUNt? Set the number of averages for the harmonic measurement. Factory Preset and *RST: Range: 1 to 1,000 Remarks: This command specifies the number of sweep averages over which the amplitude of each harmonic and the total harmonic distortion will be calculated.
  • Page 245 Language Reference SENSe Subsystem Set the sweep time used for measuring each harmonic. Factory Preset and *RST: 200/resolution bandwidth (RBW) Range: 10 ms to the maximum sweep time of the analyzer Default Unit: seconds Remarks: When set to 1 (Auto), the sweep time for measuring each harmonic will be set to 200/RBW, where RBW is the resolution bandwidth setting in Hz.
  • Page 246 Language Reference SENSe Subsystem Range: 2 to 10, limited to the maximum frequency range of the analyzer Remarks: This command sets the number of harmonics to measure before computing the total harmonic distortion. The minimum number is two (the fundamental and the second harmonic). Front Panel Access: MEASURE, Harmonic Dist, Meas Setup, Harmonics...
  • Page 247: Sense:obwidth Subsection

    Language Reference SENSe Subsystem SENSe:OBWidth Subsection Set OBW Number of Averages [:SENSe]:OBWidth:AVERage:COUNt <integer> Set the occupied bandwidth measurement number of averages. Remarks: This command is used for measurements in the menu. MEASURE Front Panel Access: none OBW Averaging On/Off [:SENSe]:OBWidth:AVERage[:STATe] OFF|ON|0|1 Turn on or off occupied bandwidth averaging.
  • Page 248: Sense:power Subsection

    Factory Preset and *RST: 10 dB Range: HP ESA E4401B, E4411B: 0 to 60 dB HP ESA E4402B, E4403B: 0 to 75 dB HP ESA E4404B: 0 to 75 dB HP ESA E4405B: 0 to 75 dB HP ESA E4407B, E4408B: 0 to 65dB...
  • Page 249 –250 MHz to 250 MHz Default Unit: Remarks: This command is available only on HP ESA models E4404B, E4405B, E4407B, and E4408B. Use this command for signals close to the noise level, multiple signals close together, or for other conditions when the preselector is not tuned to the frequency of interest.
  • Page 250 Centers the preselector tracking to maximize the amplitude accuracy of the signal at the specified marker. Maximum signal amplitude occurs by minimizing the loss through the filter. This command is available only on HP ESA models E4404B, E4405B, NOTE E4407B, and E4408B.
  • Page 251: Sense:sweep Subsection

    Language Reference SENSe Subsystem SENSe:SWEep Subsection Sweep Time [:SENSe]:SWEep:TIME <time> [:SENSe]:SWEep:TIME? Specifies the time in which the instrument sweeps the display. Remarks: A span value of 0 Hz causes the analyzer to enter zero span mode. In zero span the X-axis represents time rather than frequency.
  • Page 252 Language Reference SENSe Subsystem Time Gating Delay [:SENSe]:SWEep:TIME:GATE:DELay <time> [:SENSe]:SWEep:TIME:GATE:DELay? Sets the delay time from when the gate trigger occurs to when the gate opens. This is for EDGE triggering only. Factory Preset 1 µs and *RST: 0.3 µs to 429 seconds Range: Default Unit: seconds...
  • Page 253 Language Reference SENSe Subsystem triggering only. Factory Preset and *RST: Positive Front Panel Access: Sweep, Gate Setup, Edge Setup, Edge Pos Neg Preset Time Gate [:SENSe]:SWEep:TIME:GATE:PRESet Presets the time-gated spectrum analysis capability. Remarks: This command resets gate parameters to default values, as follows: Gate trigger type = edge Gate polarity = positive...
  • Page 254 Language Reference SENSe Subsystem Factory Preset and *RST: Edge Front Panel Access: Sweep, Gate Setup, Trig Type Edge Level 5-100 Chapter 5...
  • Page 255: Source Subsystem

    HP ESA E4405B: 8 dB HP ESA E4407B, E4408B: 8 dB Range: HP ESA E4401B, E4411B: 0 dB to 60 dB HP ESA E4402B, E4403B: 0 dB to 56 dB HP ESA E4404B: 0 dB to 56 dB HP ESA E4405B: 0 dB to 56 dB...
  • Page 256: Automatic Source Attenuation

    Factory Preset −10 dBm and *RST: Range: HP ESA E4401B, E4411B: –70 dBm to 3 dBm HP ESA E4402B, E4403B: –66 dBm to 3 dBm HP ESA E4404B: –66 dBm to 3 dBm HP ESA E4405B: –66 dBm to 3 dBm HP ESA E4407B, E4408B: –66 dBm to 3 dBm...
  • Page 257: Set The Source Sweep Power Range

    Language Reference SOURce Subsystem Factory Preset and *RST: Fixed Front Panel Access: Source, Power Sweep On Off Set the Source Sweep Power Range :SOURce:POWer:SPAN <rel_ampl> :SOURce:POWer:SPAN? Specifies the range of power levels through which the source output will sweep. Use :SOURce:POWer:STARt to set the power level at the start of the power sweep.
  • Page 258: Set The Output Power Step Size

    Factory Preset and *RST: 0 dBm Range: HP ESA E4401B, E4411B: –70 dBm to 3 dBm HP ESA E4402B, E4403B: –66 dBm to 3 dBm HP ESA E4404B: –66 dBm to 3 dBm HP ESA E4405B: –66 dBm to 3 dBm HP ESA E4407B, E4408B: –66 dBm to 3 dBm...
  • Page 259: Output Power Tracking Peak

    Language Reference SOURce Subsystem Front Panel Access: Source, Man Track Adj Output Power Tracking Peak :SOURce:POWer:TRCKing:PEAK Automatically adjusts the tracking of the source output with the spectrum analyzer sweep so that the power is maximized for the present resolution bandwidth. Factory Preset and *RST: none...
  • Page 260: Status Subsystem

    Language Reference STATus Subsystem STATus Subsystem The STATus subsystem controls the SCPI-defined status-reporting structures. Operation Condition Query :STATus:OPERation:CONDition? This query returns the decimal value of the sum of the bits in the Status Operation Condition register. The data in this register is continuously updated and reflects the NOTE current conditions.
  • Page 261: Operation Negative Transition

    Language Reference STATus Subsystem Operation Negative Transition :STATus:OPERation:NTRansition <number>|<non-decimal numeric> :STATus:OPERation:NTRansition? This command determines what bits in the Operation Condition register will set the corresponding bit in the Operation Event register when that bit has a negative transition (1 to 0). The variable <number> is the sum of the decimal values of the bits that you want to enable.
  • Page 262: Status:questionable Subsection

    Language Reference STATus Subsystem STATus:QUEStionable Subsection This subsection controls the SCPI-defined status-reporting structures. Questionable Calibration Condition :STATus:QUEStionable:CALibration:CONDition? This query returns the decimal value of the sum of the bits in the Questionable Calibration Condition register. The data in this register is continuously updated and reflects the NOTE current conditions.
  • Page 263 Language Reference STATus Subsystem that you want to enable. Factory Preset and *RST: Range: 0 to 32767 Questionable Calibration Positive Transition :STATus:QUEStionable:CALibration:PTRansition <number> :STATus:QUEStionable:CALibration:PTRansition? This command determines what bits in the Questionable Calibration Condition register will set the corresponding bit in the Questionable Calibration Event register when that bit has a negative transition (1 to 0).
  • Page 264 Language Reference STATus Subsystem Factory Preset and *RST: Range: 0 to 32767 Questionable Event Query :STATus:QUEStionable[:EVENt]? This query returns the decimal value of the sum of the bits in the Questionable Event register. The register requires that the equivalent PTR or NTR filters be set NOTE before a condition register bit can set a bit in the event register.
  • Page 265 Language Reference STATus Subsystem The register requires that the equivalent PTR or NTR filters be set NOTE before a condition register bit can set a bit in the event register. The data in this register is latched until it is queried. Once queried, the data is cleared.
  • Page 266 Language Reference STATus Subsystem Questionable Integrity Enable :STATus:QUEStionable:INTegrity:ENABle <number> :STATus:QUEStionable:INTegrity:ENABle? This command determines what bits in the Questionable Integrity Condition Register will set bits in the Questionable Integrity Event register, which also sets the Integrity Summary bit (bit 9) in the Questionable Register.
  • Page 267 Language Reference STATus Subsystem The variable <number> is the sum of the decimal values of the bits that you want to enable. Factory Preset and *RST: 32767 (all 1’s) Range: 0 to 32767 Questionable Negative Transition :STATus:QUEStionable:NTRansition <number> :STATus:QUEStionable:NTRansition? This command determines what bits in the Questionable Condition register will set the corresponding bit in the Questionable Event register when that bit has a negative transition (1 to 0).
  • Page 268 Language Reference STATus Subsystem Questionable Power Event Query :STATus:QUEStionable:POWer[:EVENt]? This query returns the decimal value of the sum of the bits in the Questionable Power Event register. The register requires that the equivalent PTR or NTR filters be set NOTE before a condition register bit can set a bit in the event register.
  • Page 269 Language Reference STATus Subsystem <number> is the sum of the decimal values of the bits that you want to enable. Factory Preset and *RST: 32767 (all 1’s) Range: 0 to 32767 Chapter 5 5-115...
  • Page 270: System Subsystem

    HP-IB Address :SYSTem:COMMunicate:GPIB[1]|2|3|4[:SELF]:ADDRess <integer> :SYSTem:COMMunicate:GPIB[1]|2|3|4[:SELF]:ADDRess? Sets and queries the HP-IB address. This command applies only to analyzers having Option A4H, HP-IB NOTE and Parallel I/O). Factory Preset and *RST: It is set to 18 by :SYSTem:PRESet:PERSistent, which sets the persistent state values to their factory defaults.
  • Page 271: Serial Port Rts Setup

    Language Reference SYSTem Subsystem There can potentially be four I/O cards installed (1, 2, 3, or 4). Each card may have up to two ports: Card one uses port numbers 1 and 2 Card two uses port numbers 3 and 4 Card three uses port numbers 5 and 6 Card four uses port numbers 7 and 8 Factory Preset...
  • Page 272: Serial Port Baud Rate Setup

    Language Reference SYSTem Subsystem Factory Preset (no *RST): The factory default is IBFull. This parameter is persistent, which means that it retains the setting previously selected, even through a power cycle. Front Panel Access: none Serial Port Baud Rate Setup :SYSTem:COMMunicate:SERial[1]|2|3|4|5|6|7|8[:RECeive]:BAUD <baud_rate>...
  • Page 273: Serial Port Transmit Pace Setup

    Language Reference SYSTem Subsystem Card two uses port numbers 3 and 4 Card three uses port numbers 5 and 6 Card four uses port numbers 7 and 8 Factory Preset (no *RST): The factory default is none. This parameter is persistent, which means that it retains the setting previously selected, even through a power cycle.
  • Page 274: Display The Hardware Configuration

    Language Reference SYSTem Subsystem Display the Hardware Configuration :SYSTem:CONFigure:HARDware:STATe OFF|ON|0|1 :SYSTem:CONFigure:HARDware:STATe? Shows the current hardware configuration of the instrument on the display. Factory Preset and *RST: Front Panel Access: System, Show Hdwr System Configuration Query :SYSTem:CONFigure[:SYSTem]? Returns string of information about the configurations of the instrument.
  • Page 275: Error Information Query

    Language Reference SYSTem Subsystem Error Information Query :SYSTem:ERRor[:NEXT]? This command queries the earliest entry to the error queue and then deletes that entry. *CLS clears the entire error queue. Front Panel Access: System, Show Errors Query Instrument Options :SYSTem:OPTions? Returns a list of the options that are installed. It is a comma separated list such as: “1DS,1D6,UTA,A4H,A4J,1DN”...
  • Page 276: Preset

    Sets the persistent state values to their factory defaults. The term persistent means that the command retains the setting previously selected, even through a power cycle. Examples of persistent functions are: HP-IB address, power-on type, and preset type. Front Panel Access:...
  • Page 277: Save User Preset

    Language Reference SYSTem Subsystem Save User Preset :SYSTem:PRESet[:USER]:SAVE Saves the current instrument conditions as the user preset condition. Front Panel Access: System, Power On/Preset, Save User Preset Speaker Control :SYSTem:SPEaker[:STATe] OFF|ON|0|1 :SYSTem:SPEaker[:STATe]? Turns the internal speaker on or off. Factory Preset and *RST: Front Panel Access:...
  • Page 278: Trace Subsystem

    ASCII, the data needs to be comma-separated ASCII data. The query returns the current values of the designated trace. The data is terminated with <NL><END> (for HP-IB that is newline, or linefeed, followed by EOI set true.) This command does not allow setting all trace points to the same NOTE amplitude value by sending just a single value.
  • Page 279: Exchange Traces

    Language Reference TRACe Subsystem Example: :TRAC:DATA TRACE1,#4 1604 <binary trace data> Remarks: Commands :MMEM:STOR:TRAC and :MMEM:LOAD:TRAC are used to transfer trace data to, or from, the internal hard drive or floppy drive of the instrument. There are 401 points in a trace. If the data format is Real, the data is transferred in block format.
  • Page 280: Mean Trace Data

    Language Reference TRACe Subsystem is equivalent to : (trace 2 = trace 1 + trace 3) Mean Trace Data :TRACe:MATH:MEAN? <trace> Returns the mean of the amplitudes of the trace amplitude elements in measurement units. Traces are: TRACE[1|2|3] Query the Signal Peaks :TRACe:MATH:PEAK[:DATA]? Outputs the signal peaks by frequency or by amplitude.
  • Page 281: Query Number Of Peaks Found

    Language Reference TRACe Subsystem Query Number of Peaks Found :TRACe:MATH:PEAK:POINts? Outputs the number of signal peaks identified. The amplitude of the peaks can then be queried with :TRACe:MATH:PEAK:DATA? Peak Sorting :TRACe:MATH:PEAK:SORT AMPLitude|FREQuency :TRACe:MATH:PEAK:SORT? Determines if the signals in the :TRACe:MATH:PEAK:DATA? query are sorted by frequency or amplitude.
  • Page 282: Trace Math Subtract From Display Line

    Language Reference TRACe Subsystem Example: :TRAC:MATH:SUBT TRACE3,TRACE3,TRACE2 is equivalent to: (trace 3 = trace 3 − trace 2) Trace Math Subtract From Display Line :TRACe:MATH:SUBTract:DLINe <trace> Subtracts the magnitude of the display line from the selected trace and places the result back in the selected trace. Trace is: TRACE[1|2|3] Example: :TRAC:MATH:SUBT:DLIN TRACE1...
  • Page 283: Trigger Subsystem

    Language Reference TRIGger Subsystem TRIGger Subsystem The TRIGger subsystem is used to set the controls and parameters associated with triggering the data acquisitions. Other trigger-related commands are found in the INITiate and ABORt subsystems. Rear Panel External Trigger Delay Value :TRIGger[:SEQuence]:[1]:DELay <level>...
  • Page 284: Trigger Source

    Language Reference TRIGger Subsystem Trigger Source :TRIGger[:SEQuence]:SOURce IMMediate|VIDeo|LINE|EXTernal :TRIGger[:SEQuence]:SOURce? Specifies the source (or type) of triggering used to start a measurement. Immediate is free-run triggering Video triggers on the video signal level Line triggers on the power line signal External allows you to connect an external trigger source Factory Preset and *RST: Immediate...
  • Page 285: Unit Subsystem

    Language Reference UNIT Subsystem UNIT Subsystem Select Power Units of Measure :UNIT:POWer DBM|DBMV|DBUV|V|W :UNIT:POWer? Specifies amplitude units for the input, output and display. Factory Preset and *RST: dBm in log amplitude scale volts in linear amplitude scale Front Panel Access: AMPLITUDE/Y Scale, Amptd Units AMPLITUDE/Y Scale, Amptd Units, dBm AMPLITUDE/Y Scale, Amptd Units, dBmV...
  • Page 286 Language Reference UNIT Subsystem 5-132 Chapter 5...
  • Page 287: Hp 8590/Hp Esa Spectrum Analyzers Programming Conversion Guide

    HP 8590/HP ESA Spectrum Analyzers Programming Conversion Guide...
  • Page 288 Programming Conversion Guide HP 8590/HP ESA Spectrum Analyzers This guide provides documentation for the following instruments: HP ESA-E Series HP E4401B HP E4402B HP E4404B HP E4405B HP E4407B HP ESA-L Series HP E4403B HP E4408B HP E4411B Manufacturing Part Number: E4401-90094...
  • Page 289 The information contained in this document is subject to change without notice. Hewlett-Packard makes no warranty of any kind with regard to this material, including but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material.
  • Page 290 The instruction documentation symbol. The product is marked with this symbol when it is necessary for the user to refer to the instructions in the documentation. This symbol is used to mark the on position of the power line switch. This symbol is used to mark the standby position of the power line switch.
  • Page 291 Warranty This Hewlett-Packard instrument product is warranted against defects in material and workmanship for a period of three years from date of shipment. During the warranty period, Hewlett-Packard Company will, at its option, either repair or replace products which prove to be defective.
  • Page 292 HP 8590/HP ESA Spectrum Analyzers Conversion Guide...
  • Page 293 SCPI command, and column 3 describes the function of the command, along with helpful comments. The Appendix contains a table that lists alternate commands used by the HP 8566A/B, HP 8568A/B, and HP 70000 Series analyzers and the associated HP 8590-Series command.
  • Page 294 • non-block response termination in the HP 8590-Series analyzers is <CR><LF>, but in the HP ESA analyzers it is <LF><-EOI> • boolean queries in HP 8590-Series analyzers return ON or OFF, whereas boolean queries in HP ESA analyzers return 1 or 0 •...
  • Page 295 HP 8590-Series Analyzers Command(s) Corresponding SCPI Command(s) Description/Comments ABORT Stops the execution of all user-defined functions and readies the instrument for the next command received. Places the absolute value of the source values in the destination. Performs the adjacent channel power measurement.
  • Page 296 HP 8590-Series Analyzers Command(s) Corresponding SCPI Command(s) Description/Comments ACPMK Determines if the graph marker function is enabled or disabled for the adjacent channel power (ACP) graph. ACPPAR Determines if the spectrum analyzer settings used for the adjacent channel power (ACP),...
  • Page 297 The data format for the command and query is always TDF P. The HP 8590-Series analyzer returns data in the format: -57.71, -58.12, -56.87. The HP ESA analyzer returns data in the format: -5.46380000E+001, -5.44410000E+001, -5.47590000E+001. This is an example of IEEE...
  • Page 298 :DISPlay:WINDow:ANNotation[:ALL] OFF|ON|0|1 ANNOT? :DISPlay:WINDow:ANNotation[:ALL]? The HP 8590-Series analyzer returns ON or OFF. The HP ESA analyzer returns 1 or 0. Adds trace A to trace B and sends the result to trace A. :TRACe:MATH:ADD <destination_trace>, <source_trace1>, Adds TRACE1 (trace A) to TRACE2 (trace B) <source_trace2>...
  • Page 299 HP 8590-Series Analyzers Command(s) Corresponding SCPI Command(s) Description/Comments AUNITS Specifies amplitude units for input, output, and display. :UNIT:POWer DBM|DBMV|DBUV|V|W Specifies amplitude units for the input, output, and display for the active window. AUNITS? :UNIT:POWer? AUTO Couples the active functions automatically.
  • Page 300 The Transmit baud rate is set to the same value as the receive baud rate. BAUDRATE? :SYSTem:COMMunicate:SERial[1]|2|3|4|5|6|7|8 The HP 8590-Series analyzers return data in [:RECeive]:BAUD? the format: 1200. The HP ESA analyzers return data in the format: +1200. Returns the state of a bit.
  • Page 301 HP 8590-Series Analyzers Command(s) Corresponding SCPI Command(s) Description/Comments Transfers trace B into trace C. :TRACe:COPY TRACE2, TRACE3 Transfers TRACE2 (trace B) into TRACE3 (trace C). Exchanges trace B and trace C. :TRACe:EXCHange TRACE2, TRACE3 Exchanges TRACE2 (trace B) with TRACE3 (trace C), point by point.
  • Page 302 Specifies center frequency. CF <value> [:SENSe]:FREQuency:CENTer <freq> CF UP|DN [:SENSe]:FREQuency:CENTer? The HP 8590-Series analyzer outputs data in the format: 750000000. The HP ESA analyzer outputs data in the format: +750000000. Performs the channel power measurement. CHPGR Determines if the channel power graph function is enabled or disabled.
  • Page 303 Allows query of error queue. CNTLA Sets the control line A of the auxiliary interface high or low. HP ESA spectrum analyzers do not have an auxiliary interface. CNTLB Sets the control line B of the auxiliary interface high or low.
  • Page 304 Description/Comments CNTLD Sets the interface control line D of the auxiliary interface high or low. HP ESA spectrum analyzers do not have an auxiliary interface. CNTLI Returns a "1" when the interface control line I of the auxiliary interface is high, and "0" if the line is low.
  • Page 305 HP 8590-Series Analyzers Command(s) Corresponding SCPI Command(s) Description/Comments COUPLE Selects direct-current (dc) coupling or alternating-current (ac) coupling COUPLE AC|DC :INPut:COUPling AC|DC Selects ac or dc coupling for the front panel RF INPUT port. A blocking capacitor is switched in for the ac mode.
  • Page 306 DEMOD ON|OFF [:SENSe]:DEMod:STATe OFF|ON|0|1 Turns demodulation on or off. DEMOD? [:SENSe]:DEMod:STATe? The HP 8590-Series analyzer returns AM, FM or OFF. The HP ESA analyzer returns 1 (corresponding to the HP 8590-Series response AM or FM), or 0 (corresponding to OFF).
  • Page 307 Deletes user-defined functions and frees spectrum analyzer memory that was previously allocated for user-defined operands. The HP 8590-Series analyzer returns NEG or POS. The HP ESA analyzer returns 1 or 0. Divides source 1 by source 2 and places the result in the destination.
  • Page 308 Allows you to determine when the spectrum analyzer has started to execute all commands prior to and including DONE. *OPC DONE? *OPC? The HP 8590-Series analyzer outputs data in the format: 1. The HP ESA analyzer outputs data in the format: +1.
  • Page 309 ENTER Allows the spectrum analyzer to receive data from other devices on the HP-IB. Enter parameter from front panel. Sends values entered on the spectrum analyzer number keyboard to the present active function value.
  • Page 310 Description/Comments Specifies the start frequency. FA <value> [:SENSe]:FREQuency:STARt <freq> FA UP|DN [:SENSe]:FREQuency:STARt? The HP 8590-Series analyzer outputs data in the format: 750000000. The HP ESA analyzer outputs data in the format: +750000000. Specifies the stop frequency. FA <value> [:SENSe]:FREQuency:STOP <freq>...
  • Page 311 HP 8590-Series Analyzers Command(s) Corresponding SCPI Command(s) Description/Comments FFTMM Changes the FFT mid-display frequency of the spectrum analyzer to the frequency of the FFT marker. FFTMS Changes the FFT stop frequency of the spectrum analyzer to the frequency of the FFT marker.
  • Page 312 [:SENSe]:DEMod:FMDeviation <freq> FMGAIN UP|DN FMGAIN? [:SENSe]:DEMod:FMDeviation? The HP 8590-Series analyzer outputs data in the format: 10. The HP ESA analyzer outputs data in the format: +1.00000000E+001. FOFFSET Specifies the frequency offset for all absolute frequency readouts such as center frequency.
  • Page 313 Edge triggers the gate when the edge of a signal is encountered, set to either a negative-going edge or a positive-going edge. GATECTL? [:SENSe]:SWEep:TIME:GATE:TYPE? The HP 8590-Series analyzer returns EDGE or LEVEL. The HP ESA analyzer returns EDGE or LEV. Presets Option 105, the time-gated spectrum analysis capability.
  • Page 314 This is for EDGE triggering only. GD UP|DN [:SENSe]:SWEep:TIME:GATE:DELay? The HP 8590-Series analyzer outputs data in the format: 1E-6. The HP ESA analyzer outputs data in the format: +1.00000000E-006. GDRVCLPAR Clears the pulse parameters (pulse width,...
  • Page 315 HP 8590-Series Analyzers Command(s) Corresponding SCPI Command(s) Description/Comments GDRVPWID Enters the specified value as the pulse width. Specifies the gate time length in seconds. For EDGE triggering only. GDRVRBW Couples or uncouples the resolution bandwidth to the specified pulse width.
  • Page 316 1. GRAT Turns the graticule on or off. GRAT ON|OFF :DISPlay:WINDow:TRACe:GRATicule:GRID[:STATe] OFF|ON|0|1 GRAT? :DISPlay:WINDow:TRACe:GRATicule:GRID[:STATe]? The HP 8590-Series analyzer outputs ON or OFF. The HP ESA analyzer outputs 1 or 0. HAVE Used by menus for testing for hardware configuration.
  • Page 317 Unlocks the harmonic band. Provides a method for putting values into trace B. Returns the spectrum analyzer model number. *IDN? The HP 8590-Series analyzer returns the model number in the format: HP8592L. The HP ESA analyzer returns the format: HP E4411B. IF etc IF/THEN/ELSE/ENDIF forms a decision and branching construct.
  • Page 318 50 Ohm input impedance. INZ? [:SENSe]:CORRection:IMPedance[:INPut][:MAGNitude]? The HP 8590-Series analyzer outputs data in the format: 50. The HP ESA analyzer outputs data in the format: +50. Performs an instrument preset. :SYSTem:PRESet KEYCLR Clears softkeys 1 through 6.
  • Page 319 LG <value> :DISPlay:WINDow:TRACe:Y[:SCALe]:SPACing LOGarithmic :DISPlay:WINDow:TRACe:Y[:SCALe]:PDIVision <rel_ampl> :DISPlay:WINDow:TRACe:Y[:SCALe]:PDIVision? LG UP|DN :DISPlay:WINDow:TRACe:Y[:SCALe]:SPACing? The HP 8590-Series analyzer outputs data in the format: 10.00. The HP ESA analyzer outputs data in the format: +1.00000000E+001. LIMIDEL Deletes all segments in the current limit-line table.
  • Page 320 :CALCulate:LLINe:CONTrol:DOMain FREQuency|TIME LIMIHALF Edit/specify upper or lower limit line only. <no equivalent SCPI command> There is no similar function in HP ESA analyzers. LIMIHI Allows you to specify a fixed trace as the upper limit line.
  • Page 321 Reflects the current definition about the amplitude axis at the largest frequency or the largest sweep time in the definition. <no equivalent SCPI command> There is no similar function in HP ESA analyzers. LIMIMODE Determines whether the limit-line entries are...
  • Page 322 HP 8590-Series Analyzers Command(s) Corresponding SCPI Command(s) Description/Comments LIMISEGT Adds new segments to the current sweep time limit line in either the upper limit line or the lower limit line. :CALCulate:LLINe[1]|2:DATA:MERGe <x> is frequency in Hz. <x-axis>,<ampl>,<connected> <ampl> is amplitude in dB.
  • Page 323 HP 8590-Series Analyzers Command(s) Corresponding SCPI Command(s) Description/Comments LOAD For loading a trace, amplitude correction, limit, or state. :MMEMory:LOAD:STATe <reg_number>,<file_name> For loading the analyzer state from a file. :MMEMory:LOAD:TRACe TRACE1|TRACE2|TRACE3, For loading a trace. <file_name> Takes the logarithm (base 10) of the source, multiplies the result by the scaling factor, then stores it in the destination.
  • Page 324 HP 8590-Series Analyzers Command(s) Corresponding SCPI Command(s) Description/Comments MEAN Returns the mean value of the given trace in measurement units. MEAN TRA? :TRACe:MATH:MEAN? <trace> Returns the mean of the amplitudes of the MEAN TRB? trace amplitude elements in measurement MEAN TRC? units.
  • Page 325 The value is in the y-axis units for the trace (dBm, volts, and so forth). The HP 8590-Series analyzer outputs data in the format: -66.9. The HP ESA analyzer outputs data in the format: -6.69000000E+001.
  • Page 326 Specifies the active marker. MKACT 1|2|3|4 :CALCulate:MARKer[1]|2|3|4:STATe ON|1 MKACT? <no SCPI equivalent> The HP 8590-Series analyzer outputs data in the format: 1. The HP ESA analyzer outputs data in the format: +1. MKACTV Makes the current active marker the active function. MKBW Returns the bandwidth at the specified power...
  • Page 327 X value. The value is in the x axis units (which is often frequency or time). MKF? :CALCulate:MARKer[1]|2|3|4:X? The HP 8590-Series analyzer outputs data in the format: 750E6. The HP ESA analyzer outputs data in the format: +7.50000000E+008. MKFC Turns the marker frequency counter on or off.
  • Page 328 MKFCR UP|DN :CALCulate:MARKer:FCOunt:RESolution? The HP 8590-Series analyzer outputs data in the format: 1000. The HP ESA analyzer MKFCR? outputs data in the format: +1000. MKMIN Moves active marker to minimum signal detected.
  • Page 329 Selects the marker function for the specified marker. NOISe is a noise measurement. :CALCulate:MARKer[1]|2|3|4:FUNCtion? The HP 8590-Series analyzer outputs ON or MKNOISE? OFF. The HP ESA analyzer outputs 1 or 0. MKOFF Turns off either the active marker or all the markers. :CALCulate:MARKer[1]|2|3|4:STATe OFF|ON|0|1 Turns the selected marker on or off.
  • Page 330 :CALCulate:MARKer[1]|3|3|4:X:POSition <integer> MKP? :CALCulate:MARKer[1]|3|3|4:X:POSition? The HP 8590-series analyzer outputs data in the format: 200. The HP ESA series analyzer outputs data in the format: +2.00000000E+002. MKPAUSE Pauses the sweep at the active marker for the duration of the delay period.
  • Page 331 This applies to all traces and all windows. MKPX UP|DN MKPX? :CALCulate:MARKer:PEAK:EXCursion? The HP 8590-Series analyzer outputs data in the format: 6.00. The HP ESA analyzer outputs data in the format: +6.00000000E+000. MKREAD Selects the type of active trace information displayed by the spectrum analyzer marker readout.
  • Page 332 MKSTOP Stops the sweep at the active marker. MKTBL Turns the marker table on or off. :CALCulate:MARKer:TABLe:STATe OFF|ON|0|1 MKTBL? :CALCulate:MARKer:TABLe:STATe? The HP 8590-Series analyzer outputs ON or OFF. The HP ESA analyzer outputs 1 or 0.
  • Page 333 MKTRACK? :CALCulate:MARKer[1]|2|3|4:TRCKing[:STATe]? The HP 8590-Series analyzer outputs ON or OFF. The HP ESA analyzer outputs 1 or 0. MKTYPE Changes the type of the current active marker.
  • Page 334 ML UP|DN [:SENSe]:POWer[:RF]:MIXer:RANGe[:UPPer]? The HP 8590-Series analyzer outputs data in the format: -10. The HP ESA analyzer outputs data in the format: -1.00000000E+001. Stores the remainder from the division of source 1 by source 2 in the destination.
  • Page 335 N dB points measurement (NDBPNT). :CALCulate:BWIDth|BANDwidth:NDB<rel_ampl> NDB? :CALCulate:BWIDth|BANDwidth:NDB? The HP 8590-Series analyzer outputs data in the format: -3. The HP ESA analyzer outputs data in the format: -3.00000000E+000. NDBPNT Turns the N dB points measurement on or off.
  • Page 336 NDBPNTR? Returns the bandwidth measured by the N dB points measurement (NDBPT). :CALCulate:BWIDth|BANDwidth:RESult? The HP 8590-Series analyzer outputs data in the format: -1E1. The HP ESA analyzer outputs data in the format: -1.00000000E+002. Sets the normalized reference level. :DISPlay:WINDow:TRACe:Y[:SCALe]:NRLevel <rel_ampl>...
  • Page 337 (P1,P2). OUTPUT Allows the spectrum analyzer to send data to other devices on the HP-IB. Moves the pen to a vector location on the spectrum analyzer screen relative to the reference coordinates (0,0).
  • Page 338 HP 8590-Series Analyzers Command(s) Corresponding SCPI Command(s) Description/Comments PCTAM Turns the percent AM measurement on or off. PCTAMR Returns the percent AM measured by the percent AM measurement (PCTAM). Instructs the spectrum analyzer to plot vectors on the spectrum analyzer screen until a PU command is received.
  • Page 339 HP 8590-Series Analyzers Command(s) Corresponding SCPI Command(s) Description/Comments PEAKS Sorts signal peaks by frequency or amplitude, stores the results in the destination trace, and returns the number of peaks found. :TRACe:MATH:PEAK[:DATA]? Outputs the signal peaks to the controller, sorted by frequency or by amplitude. The sort mode is determined by the command :TRACe:MATH:PEAK:SORT.
  • Page 340 PLOT Initiates a plotter output of the screen data to the remote interface. PLTPRT Directs the plotter output to HP-IB, serial or parallel ports. POWERON Selects the state the spectrum analyzer will be in when it is turned on: IP (instrument preset) or LAST state.
  • Page 341 [:SENSe]:CORRection:OFFSet [MAGNitude] <rel_ampl> PREAMPG? [:SENSe]:CORRection:OFFSet[MAGNitude]? The HP 8590-Series analyzer outputs data in the format: 10.00. The HP ESA analyzer outputs data in the format: +1.00000000E+001. PREFX Specifies or changes the prefix used in save and recall operations.
  • Page 342 Corresponding SCPI Command(s) Description/Comments PRNPRT Directs the printer output to HP-IB, serial or parallel ports. PRNTADRS Allows you to set the HP-IB address of the printer. PSTATE Protects all of the spectrum analyzer user state and trace registers from being changed.
  • Page 343 HP 8590-Series spectrum analyzers. RB UP|DN [:SENSe]:BANDwidth|BWIDth[:RESolution]? The HP 8590-Series analyzer outputs data in the format: 750000000. The HP ESA analyzer outputs data in the format: +750000000. RCLS Recalls spectrum analyzer state data from one of nine state registers in spectrum analyzer memory.
  • Page 344 The active window is assumed when no window is specified. RL UP|DN :DISPlay:WINDow:TRACe:Y[:SCALe]:RLEVel? The HP 8590-Series analyzer outputs data in the format: 10.00. The HP ESA analyzer outputs data in the format: +1.00000000E+001. RLPOS Selects the position of reference level.
  • Page 345 When no window is specified, the active window is assumed. ROFFSET? :DISPlay:WINDow:TRACe:Y[:SCALe]:RLEVel:OFFSet? The HP 8590-Series analyzer outputs data in the format: 10.00. The HP ESA analyzer outputs data in the format: +1.00000000E+001. Sets a bit mask for service requests. SAVEMENU Saves menu 1 under the specified menu...
  • Page 346 .TRB, .TRA, and .STA. A disk drive name (C: or A:) must be included in the file name. States and traces saved using HP 8590-Series analyzers cannot be read by HP ESA analyzers. SAVET Saves the selected trace data and state...
  • Page 347 Returns the serial number suffix of the spectrum analyzer. For example, serial number 4537450345 will return 0345. The HP 8590-Series analyzer returns the *IDN serial number suffix in the format: 0345. The HP ESA analyzer returns the format: Hewlett-Packard, HP ESA-E1500B, US4537450345, A.00.00. SER? *IDN?
  • Page 348 SETDATE? :SYSTem:DATE? The HP 8590-Series analyzer returns the instrument date in the format: YYMMDD. The HP ESA analyzer returns the format: +YYYY, +MM, +DD. SETTIME Sets the time of the real-time clock. :SYSTem:TIME <hour>,<minute>,<second> Hour must be an integer 0 to 23.
  • Page 349 Changes the total displayed frequency range symmetrically about the center frequency. SP <value> [:SENSe]:FREQuency:SPAN <freq> Set the frequency span. SP UP|DN [:SENSe]:FREQuency:SPAN? The HP 8590-Series analyzer outputs data in the format: 750000000. The HP ESA analyzer outputs data in the format: +750000000.
  • Page 350 HP 8590-Series Analyzers Command(s) Corresponding SCPI Command(s) Description/Comments SPEAKER Turns the internal speaker on or off. SPEAKER :SYSTem:SPEaker[:STATe] OFF|ON|0|1 ON|OFF SPZOOM Places a marker on the highest on-screen signal (if an on-screen marker is not present), turns on the signal track function, and activates the span function.
  • Page 351 :SOURce:POWer:STEP[:INCRement] <ampl> Specifies the source power step size to be <numeric> one vertical scale division. SRCPSTP AUTO :SOURce:POWer:STEP:AUTO ON|1 SRCPSTP? :SOURce:POWer:STEP[:INCRement]? The HP 8590-Series analyzer outputs data in the format: 10.00. The HP ESA analyzer outputs data in the format: +1.00000000E+001.
  • Page 352 (fixed) or to sweep through a range of power levels. SRCPSWP? :SOURce:POWer:SWEep? The HP 8590-Series analyzer outputs data in the format: 10.00. The HP ESA analyzer outputs data in the format: +1.00000000E+001. SRCPWR Selects the source power level. :SOURce:POWer[:LEVel][:IMMediate][:AMPLitude] <ampl>...
  • Page 353 SRCTK? :SOURce:POWer:TRCKing? The HP 8590-Series analyzer outputs data in the format: 2048. The HP ESA analyzer outputs data in the format: +2048. SRCTKPK Adjusts tracking of source output with spectrum-analyzer sweep (3.0 GHz tracking generator only).
  • Page 354 SS AUTO [:SENSe]:FREQuency:CENTer:STEP:AUTO OFF|ON|0|1 SS UP|DN [:SENSe]:FREQuency:CENTer:STEP[:INCRement]? The HP 8590-Series analyzer outputs data in the format: 750000000. The HP ESA analyzer outputs data in the format: +750000000. Specifies the time in which the spectrum analyzer sweeps the displayed frequency (or time) range.
  • Page 355 Specifies the type of automatic coupling for SANalyzer the fastest sweep time at the current span. This varies based on the current measurement mode. SWPCPL? [:SENSe]:SWEep:TIME:AUTO:MODE? The HP 8590-Series analyzer returns SR or SA. The HP ESA analyzer returns SRES or SAN.
  • Page 356 HP 8590-Series Analyzers Command(s) Corresponding SCPI Command(s) Description/Comments SYNCMODE Selects either the horizontal and vertical synchronizing constants, or the synchronization rate for the internal monitor. Returns trace A amplitude values from the spectrum analyzer to the controller. TRACe[DATA]? TRACE1 Returns TRACE1 (trace A) amplitude values from the spectrum analyzer to the controller.
  • Page 357 :SYSTem:TIME? +DD for the date query, and +HH, +MM, +SS for the time query. Both individual SCPI queries need to be sent in order to receive the same amount of information as was given with the single HP 8590-Series query.
  • Page 358 The time and date pertain to all windows. TIMEDSP? :DISPlay:ANNotation:CLOCk[:STATe]? The HP 8590-Series analyzer outputs ON or OFF. The HP ESA analyzer outputs 1 or 0. TITLE :DISPlay:ANNotation:TITLe:DATA <string> Activates the screen title mode.
  • Page 359 TDF P. TRC? The HP 8590-Series analyzer returns data in the format: -57.71, -58.12, -56.87. The HP ESA analyzer returns data in the format: -5.46380000E+001, -5.44410000E+001, -5.47590000E+001. This is an example of IEEE NR3 numeric response data.
  • Page 360 CLRW A;BLANK B;BLANK C;. The HP ESA analyzer returns the format: WRIT;BLAN;BLAN. All three traces in the HP ESA analyzer will be queried, with an EOI after each response. Starts and completes one full sweep before the next command is executed.
  • Page 361 Creates a window trace array for the fast Fourier transform (FFT) function. Increases the active function by the applicable step size. Each HP 8590-Series command to which DN can be applied will have <step> = DOWN|UP as a parameter in the SCPI command.
  • Page 362 Specifies the video bandwidth. VB <value> [:SENSe]:BANDwidth|BWIDth:VIDeo <freq> VB AUTO [:SENSe]:BANDwidth|BWIDth:VIDeo:AUTO OFF|ON|0|1 Couples the video bandwidth to the resolution bandwidth. VB UP|DN [:SENSe]:BANDwidth|BWIDth:VIDeo? The HP 8590-Series analyzer outputs data in the format: 750000000. The HP ESA analyzer outputs data in the format: +750000000.
  • Page 363 VBR UP|DN VBR? [:SENSe]:BANDwidth|BWIDth:VIDeo:RATio? The HP 8590-Series analyzer outputs data in the format: .3000000. The HP ESA analyzer outputs data in the format: +3.00000000E-001. VIEW Displays trace A, trace B, or trace C, and stops taking new data into the viewed trace.
  • Page 364 HP 8590-Series Analyzers Command(s) Corresponding SCPI Command(s) Description/Comments Exchanges traces. :TRACe:EXCHange <trace_1>,<trace_2> Exchanges two traces, point by point. TRA|TRB|TRC, Trace_1 choices are: TRACE[1|2|3] TRA|TRB|TRC Trace_2 choices are: TRACE[1|2|3] ZMKCNTR Positions the zone marker at the specified frequency. ZMKPKNL Places the zone marker at the next signal peak that is left of the current position of the zone marker.
  • Page 365 The alternate commands listed in the following table provide compatibility with commands used by the HP 8566A/B, HP 8568A/B, and HP 70000 Series analyzers. The equivalent commands for the HP 8590 Series spectrum analyzers are listed in the far right column.
  • Page 366 Alternate HP 8590 Series Commands Description Command dBm amplitude units AUNITS DBM dBmV amplitude units AUNITS DBMV dBµV amplitude units AUNITS DBUV Volt amplitude units AUNITS V Screen title TITLE Video average on VAVG ON Video average off VAVG OFF...
  • Page 367 Alternate HP 8590 Series Commands Description Command Activates illegal command service request only RQS 32 Activates end of sweep, illegal command RQS 36 Activates broken hardware, illegal command RQS 40 Activates units key pressed, illegal command RQS 34 Recall state...
  • Page 368 Error Messages...
  • Page 369: Error Messages

    Error Messages Error Messages Error Messages The analyzer can generate various messages that appear on the display during operation. There are four types of messages. • Status Messages appear on the right side of the analyzer display and/or set status bits in the SCPI Status Register system. These messages indicate a condition that may result in erroneous data being displayed.
  • Page 370: Status Messages

    . Restore the Align Now alignment by pressing System Alignments Align Now . On all HP ESA spectrum analyzer models except HP E4401B and HP E4411B you must connect the to the with the appropriate AMPTD REF OUT INPUT cable to perform this alignment.
  • Page 371 The IF section has been overloaded. Measurement results may be invalid. Input is internal (no corresponding status bit) This message applies to the HP E4401B and E4411B only. Indicates the selection 50 MHz Amptd Ref . With the 50 MHz amplitude reference on, the input is routed through an internal signal path.
  • Page 372 Couple Overload: Reduce Signal and press <ESC> (Input Overload Tripped) This message applies to the HP E4401B and E4411B only. A signal has been applied to the input connector that caused the overload protection circuitry to engage. The input signal must be reduced. After the...
  • Page 373 Error Messages Status Messages (RF Align Failure) status bit only, no message A failure has occurred during the alignment of the RF section. Measurement results may be invalid. Source LO Unlevel (Source LO Unleveled) The internal circuitry of the local oscillator (LO) in the tracking generator has become unleveled.
  • Page 374: Informational Messages

    Error Messages Informational Messages Informational Messages The following messages provide information that requires no intervention. The information provided in brackets, for example <filename> or <name> is a variable that represents a specific input provided previously. <filename> file loaded The filename indicated has been successfully loaded. <filename>...
  • Page 375: Error Queues

    Error Messages Error Queues Error Queues When a user-error condition occurs in the instrument as a result of SCPI activity, it is reported to both the front-panel display-error queue and the SCPI (remote interface) error queue. If it is a result of front-panel activity it reports to the front panel display error queue, and may also report to the SCPI error queue depending on the error.
  • Page 376: Error Message Format

    Error Messages Error Message Format Error Message Format The system-defined error numbers are chosen on an enumerated (“1 of N”) basis. The error messages are listed in alphabetical order within each error message type section. In this chapter, an explanation is included with each error to further clarify its meaning.
  • Page 377: Error Message Types

    The <error_message> string for a positive error is not defined by SCPI. A positive error indicates that the instrument detected an error within the HP-IB system, within the instrument firmware or hardware, during the transfer of block data, or during calibration.
  • Page 378: No Error

    Error Messages 0: No Error No Error No error The queue is empty. Every error in the queue has been read or the queue was purposely cleared by power-on or *CLS. Chapter 7 7-11...
  • Page 379: Query Errors

    Error Messages -499 to -400: Query Errors -499 to -400: Query Errors The instrument output queue control has detected a problem with the message exchange protocol described in IEEE 488.2, Chapter 6. Errors in this class set the query error bit (bit 2) in the event status register (IEEE 488.2, section 11.5.1).
  • Page 380 Error Messages -499 to -400: Query Errors -440 Query UNTERMINATED after indefinite response Indicates that a query was received in the same program message after a query requesting an indefinite response was executed (see IEEE 488.2, 6.3.7.5). Chapter 7 7-13...
  • Page 381 Error Messages -199 to -100: Command Errors -199 to -100: Command Errors The instrument parser detected an IEEE 488.2 syntax error. Errors in this class set the command error bit (bit 5) in the event status register (IEEE 488.2, section 11.5.1). In this case: •...
  • Page 382 GET not allowed A Group Execute Trigger was received within a program message (see IEEE 488.2, 7.7). Correct the HP-IB controller program so that the GET does not occur within a line of HP-IB program code. -111 Header separator error A character which is not a legal header separator was encountered while parsing the header.
  • Page 383 Error Messages -199 to -100: Command Errors -114 Header suffix out of range The value of a header suffix attached to a program mnemonic makes the header invalid. -161 Invalid block data A block data element was expected, but was invalid (see IEEE 488.2, 7.7.6.2).
  • Page 384 Error Messages -199 to -100: Command Errors -131 Invalid suffix The suffix does not follow the syntax described in IEEE 488.2, 7.7.3.2, or the suffix is inappropriate for this device. -109 Missing parameter Fewer parameters were received than required for the header.
  • Page 385 Error Messages -199 to -100: Command Errors -158 String data not allowed A string data element was encountered, but not allowed by the device at this point in the parsing. -130 Suffix error This error, as well as errors -131 through -139, are generated when parsing a suffix.
  • Page 386 The <error_message> string for a positive error is not defined by SCPI. A positive error indicates that the instrument detected an error within the HP-IB system, within the instrument firmware or hardware, during the transfer of block data, or during calibration.
  • Page 387 Error Messages 201 to 799: Device-Specific Errors Connect Amptd Ref Output to Input For HP E4402B, E4403B, E4404B, E4405B, E4407B, and E4408B only: you must connect the AMPTD REF to the analyzer with the appropriate OUTPUT INPUT cable. Connect RF OUT to INPUT Attempt to align the tracking generator without its output connected.
  • Page 388 Error Messages 201 to 799: Device-Specific Errors Floppy disk error An unknown error has occurred while accessing the floppy disk. Floppy disk full The floppy disk is full. Clear some space by deleting unwanted files. Illegal write access of Flash memory Attempt to write to an unavailable area of internal flash memory.
  • Page 389 Error Messages 201 to 799: Device-Specific Errors Media is corrupt A save was attempted to a corrupt device. Media is not writable A save was attempted to a read-only device. Media is protected A save was attempted to a write-protected device. No peak found No signal peak was found.
  • Page 390 Error Messages 201 to 799: Device-Specific Errors RS-232 Interface Error An error occurred on the serial interface. Span limited to 5MHz when RBW < 1kHz In narrow (digital) resolution bandwidths, below 1 kHz, spans greater than 5 MHz are not available. TG start freq is less than 1/2 res bw TG uncalibrated at start frequencies below 1/2 the current resolution bandwidth.
  • Page 391 Error Messages 201 to 799: Device-Specific Errors Unable to load state from register Loading a state from an internal state register failed. Unable to load user state, factory preset was done An attempt to perform a failed, so the User Preset values were used.
  • Page 392 Error Messages 201 to 799: Device-Specific Errors Unknown printer In attempting to identify the printer, a valid response was received but the printer is not known to the analyzer. Use the printer menu under Custom Print to configure the printer. Setup Unsupported printer A printer which is recognized, but known to be...
  • Page 393 Error Messages 201 to 799: Device-Specific Errors 7-26 Chapter 7...
  • Page 394 Index Symbols bus configuration 5-116 continuous vs. single byte order of data 5-48 measurement mode 5-44 *CLS 2-11 5-45 5-47 5-53 5-54 5-56 *ESE 2-14 5-57 5-59 5-65 5-66 5-68 *ESR? 2-13 control measurement commands *SRE C language 5-53 *STB? addressing sessions controller 1-10...
  • Page 395 5-40 address 5-116 functions 5-122 intensity (angle) 5-38 HP-IB bus 1-10 factory preset 5-122 on/off 5-39 HP-IB command statements 1-10 file listing 5-60 reference level 5-41 5-42 files reference position 5-41 copy 5-60 scaling 5-42 5-43...
  • Page 396 Index input points 5-14 control of 5-53 threshold definition 5-22 interpolation, x-axis 5-13 single/continuous 5-44 5-45 persistent functions 5-122 interpolation, y-axis 5-11 5-12 5-47 5-53 5-54 5-56 5-57 persistent functions, preset 5-122 margin 5-17 5-59 5-65 5-66 5-68 portrait printing 5-51 margin definition 5-16...
  • Page 397 Index quit command saving traces 5-63 start measurement 5-54 scaling 5-43 state SCPI changing 5-69 5-70 5-72 5-74 version of 5-123 5-76 5-77 5-81 5-83 5-84 real number data format 5-48 SCPI remote interface error 5-86 5-90 5-93 5-94 5-97 recall, IEEE command queue get data...
  • Page 398 Index title display 5-39 on/off 5-74 trace setting 5-74 adding 5-125 video trigger 5-130 blank 5-128 level 5-130 copying files 5-124 video/resolution bandwidth ratio exchange data 5-125 5-75 max hold 5-128 view commands 5-38 mean of the amplitudes 5-126 VISA library min hold 5-128 mode...

Table of Contents