Agilent N9320ASpectrum AnalyzerProgrammer’s Guide
4 N9320A Programmer’s Guide1 Getting Started4 After a while, the PC finds your N9320A as a new hardware and prompts a message saying “Found new hardwa
94 N9320A Programmer’s Guide5 Command ReferenceSENSe SubsystemSets the instrument state parameters so that you can measure the input signal. SENSe sub
Command Reference 5N9320A Programmer’s Guide 95• EXP (Exponential Averaging mode) — When you set Avg Mode to Exp, each successive data acquisition af
96 N9320A Programmer’s Guide5 Command ReferenceWhen set to manual, the last measured value is captured and held, or may be entered by the user. Relati
Command Reference 5N9320A Programmer’s Guide 97Set the Measurement Method[:SENSe]:ACPower:METHod IBW|RBW[:SENSe]:ACPower:METHod?Enables you to set the
98 N9320A Programmer’s Guide5 Command ReferenceThis command, along with commands [:SENSe]:ACPower:OFFSet:LIST[:FREQuency] and [:SENSe]:ACPower:OFFSet:
Command Reference 5N9320A Programmer’s Guide 99command with only four paramenters(ACP:OFFS:LIST:STAT ON,ON,ON,OFF) will result in the fifth and sixth
100 N9320A Programmer’s Guide5 Command Reference[:SENSe]:CHPower SubsectionSet the Average [:SENSe]:CHPower:AVERage:COUNt <integer>[:SENSe]:CHPo
Command Reference 5N9320A Programmer’s Guide 101*RST: EXPonentialExample: CHP:AVG:TCON EXPKey access: > Channel Power > Avg ModeSet the Channel
102 N9320A Programmer’s Guide5 Command Reference[:SENSe]:CORRection SubsectionExternal Amplifier Correction[:SENSe]:CORRection:OFFSet[:MAGNitude] <
Command Reference 5N9320A Programmer’s Guide 103Set the Average Mode[:SENSe]:OBWidth:AVERage:TCONrol EXPonen-tial|REPeat[:SENSe]:OBWidth:AVERage:TCONr
Getting Started 1N9320A Programmer’s Guide 57 Windows should find USB Test and Measurement Device. Select it and press Next.8 The wizard will guide yo
104 N9320A Programmer’s Guide5 Command Referencebandwidth, and the occupied bandwidth results is displayed in the data window. If the power of the adj
Command Reference 5N9320A Programmer’s Guide 105Set the X dB value[:SENSe]:OBWidth:XDB <dB value>[:SENSe]:OBWidth:XDB?Enables you to specify the
106 N9320A Programmer’s Guide5 Command ReferenceSet the Average Mode[:SENSe]:TOI:AVERage:TCONrol EXPonential|REPeat[:SENSe]:TOI:AVERage:TCONrol?Press
Command Reference 5N9320A Programmer’s Guide 107level. For example, as the reference level changes, the input attenuator changes to ensure that a sign
108 N9320A Programmer’s Guide5 Command Reference[:SENSe]:SEMask SubsectionSet the Average[:SENSe]:SEMask:AVERage:COUNt <integer>[:SENSe]:SEMask:
Command Reference 5N9320A Programmer’s Guide 109Set the Channel Res BW[:SENSe]:SEMask:BANDwidth|BWIDth[:RESolu-tion]:AUTO OFF|ON|0|1[:SENSe]:SEMask:BA
110 N9320A Programmer’s Guide5 Command Reference<freq>,...[<freq>] (up to five values)[:SENSe]:SEMask:BANDwidth|BWIDth[:RESolution]?Specif
Command Reference 5N9320A Programmer’s Guide 111Set the Stop Freq[:SENSe]:SEMask:OFFSet:LIST:FREQuency:STOP <freq>,...[<freq>] (up to five
112 N9320A Programmer’s Guide5 Command ReferenceSet the Abs Start[:SENSe]:SEMask:OFFSet:LIST:STARt:ABSolute <ampl>,...[<ampl>] (up to five
Command Reference 5N9320A Programmer’s Guide 113Set the Abs Stop[:SENSe]:SEMask:OFFSet:LIST:STARt:ABSolute <ampl>,...[<ampl>] (up to five
6 N9320A Programmer’s Guide1 Getting StartedAbout USB InterfaceA USB connection is typically easy to setup and very cost effective. The USB specificat
114 N9320A Programmer’s Guide5 Command ReferenceCouple and Man. If set to Couple, this is coupled to Rel Start to make a flat limit line. If set to M
Command Reference 5N9320A Programmer’s Guide 115Set the Sweep Time[:SENSe]:SEMask:SWEeptime <number>[:SENSe]:SEMask:SWEeptime?[:SENSe]:SEMask:SW
116 N9320A Programmer’s Guide5 Command ReferenceTurn Averagi ng On/O ff[:SENSe]:AVERage[:STATe] OFF|ON|0|1[:SENSe]:AVERage[:STATe]?This command toggle
Command Reference 5N9320A Programmer’s Guide 117Type of Averaging for Measurements[:SENSe]:AVERage:TYPE VIDeo|RMS[:SENSe]:AVERage:TYPE?Successive meas
118 N9320A Programmer’s Guide5 Command ReferenceVideo Bandwidth[:SENSe]:BANDwidth|BWIDth:VIDeo <freq>[:SENSe]:BANDwidth|BWIDth:VIDeo?Specifies t
Command Reference 5N9320A Programmer’s Guide 119Selects auto or manual mode for video bandwidth to resolution bandwidth ratio.Refer to User’s Guide fo
120 N9320A Programmer’s Guide5 Command ReferenceTyp e of Dete c tion[:SENSe]:DETector[:FUNCtion]NEGative|POSi-tive|SAMPle|AVERage|RMS|NORMAL[:SENSe]:
Command Reference 5N9320A Programmer’s Guide 121[:SENSe]:FREQuency SubsectionCenter Frequency[:SENSe]:FREQuency:CENTer <freq>[:SENSe]:FREQuency:
122 N9320A Programmer’s Guide5 Command Reference*RST: 3.0 GHzDefault Unit: HzKey access: > Span|Zero SpanFull Frequency Span[:SENSe]:FREQuency:SPA
Command Reference 5N9320A Programmer’s Guide 123[:SENSe]:POWer SubsectionInput Attenuation[:SENSe]:POWer[:RF]:ATTenuation <rel_ampl>[:SENSe]:POW
sAgilent N9320A Spectrum AnalyzerProgrammer’s Guide72Programming FundamentalsOverview 8Command Categories 10Command Syntax 11Creating Valid Commands
124 N9320A Programmer’s Guide5 Command Reference[:SENSe]:SWEep SubsectionSweep Time[:SENSe]:SWEep:TIME <time>[:SENSe]:SWEep:TIME?Specifies the t
Command Reference 5N9320A Programmer’s Guide 125SOURce SubsystemThe SOURce subsystem controls the signal characteristics of the tracking generator. Re
126 N9320A Programmer’s Guide5 Command ReferenceAutomatic Source Attenuation:SOURce:POWer:ATTenuation:AUTO OFF|ON|0|1:SOURce:POWer:ATTenuation:AUTO?Se
Command Reference 5N9320A Programmer’s Guide 127Set the Source Sweep Power Range:SOURce:POWer:SPAN <rel_ampl>:SOURce:POWer:SPAN?Specifies the ra
128 N9320A Programmer’s Guide5 Command ReferenceRange: Integer, 0 to 4095Remarks: This command is not needed with the 1.5 GHz tracking generator.Key A
Command Reference 5N9320A Programmer’s Guide 129SYSTem SubsystemThis subsystem is used to set the controls and parameters associated with the overall
130 N9320A Programmer’s Guide5 Command ReferenceDisplay Software Information:SYSTem:CONFigure:SOFTware:STATe OFF|ON|0|1:SYSTem:CONFigure:SOFTware:STAT
Command Reference 5N9320A Programmer’s Guide 131Error Information Query:SYSTem:ERRor[:NEXT]?This command queries the earliest entry to the error queue
132 N9320A Programmer’s Guide5 Command ReferencePersistent State Reset:SYSTem:PRESet:PERSistentSets the persistent state values to their factory defau
Command Reference 5N9320A Programmer’s Guide 133TRACe SubsystemThe TRACe subsystem controls access to the internal trace memory of the analyzer.Transf
8 N9320A Programmer’s Guide2 Programming FundamentalsOverviewThis section is not intended to teach you everything about the SCPI (Standard Commands fo
134 N9320A Programmer’s Guide5 Command ReferenceTRIGger SubsystemThe TRIGger subsystem is used to set the controls and parameters associated with trig
Command Reference 5N9320A Programmer’s Guide 135display of trace data prior to the trigger event. A positive trigger offset value results in an effect
136 N9320A Programmer’s Guide5 Command ReferenceVideo Trigger Level Amplitude:TRIGger[:SEQuence]:VIDeo:LEVel <ampl>:TRIGger[:SEQuence]:VIDeo:LEV
Command Reference 5N9320A Programmer’s Guide 137UNIT SubsystemSelect Power Units of Measure:UNIT:POWer DBM|DBMV|DBUV|DBUA|V|W|A:UNIT:POWer?Specifies a
138 N9320A Programmer’s Guide5 Command Reference
Programming Fundamentals 2N9320A Programmer’s Guide 9Common Terms used in this BookThe SCPI Consortium or IEEE can provide detailed information on the
10 N9320A Programmer’s Guide2 Programming FundamentalsCommand CategoriesThe SCPI command falls into two categories: • Subsystem commands that simulate
Programming Fundamentals 2N9320A Programmer’s Guide 11Command SyntaxA command consists of mnemonics (keywords), parameters and punctuation. Before you
12 N9320A Programmer’s Guide2 Programming FundamentalsCommand Statement Rules OverviewBesides the standard notation of SCPI described above, please re
Programming Fundamentals 2N9320A Programmer’s Guide 13Creating Valid CommandsCommands are not case sensitive and there are often many different ways o
Notices© Agilent Technologies, Inc. 2006-2007No part of this manual may be reproduced in any form or by any means (including electronic storage and re
14 N9320A Programmer’s Guide2 Programming FundamentalsProgram and Response MessagesTo understand how your instrument and controller communicate using
Programming Fundamentals 2N9320A Programmer’s Guide 15Parameters in CommandsThere are four basic types of parameters: boolean, key words, variables an
16 N9320A Programmer’s Guide2 Programming FundamentalsVariable Parameters<ampl>,<rel_ampl>The <ampl> (amplitude) parameter and the &
sAgilent N9320A Spectrum AnalyzerProgrammer’s Guide173Status RegistersOverview 18How to use the Status Registers 21Status Register System 23This chap
18 N9320A Programmer’s Guide3 Status RegistersOverviewWhen you are programming the instrument you may need to monitor instrument status to check for e
Status Registers 3N9320A Programmer’s Guide 19NegativeTransit ionRegisterThis filter register controls which signals will set a bit in the event regis
20 N9320A Programmer’s Guide3 Status RegistersWhat are Status Register SCPI CommandsMost monitoring of the instrument conditions is done at the highes
Status Registers 3N9320A Programmer’s Guide 21How to use the Status RegistersA program often needs to detect and manage error conditions or changes in
22 N9320A Programmer’s Guide3 Status Registersthis condition occurred even if the condition no longer exists. The event register can only be cleared b
Status Registers 3N9320A Programmer’s Guide 23Status Register SystemThe hardware status registers are combined to form the instrument status system. S
N9320A Programmer’s Guide In This Guide…This guide contains programming information for the N9320A Spectrum Analyzer.1 Getting StartedPrepare for the
24 N9320A Programmer’s Guide3 Status RegistersThe Status Byte RegisterThe RQS bit is read and reset by a serial poll. The same bit position (MSS) is r
Status Registers 3N9320A Programmer’s Guide 25The status byte register contains the following bits:To query the status byte register, send the *STB co
26 N9320A Programmer’s Guide3 Status RegistersStandard Event Status RegisterThe standard event status register is used to determine the specific event
Status Registers 3N9320A Programmer’s Guide 27The standard event status register contains following bits:The standard event status register is used to
28 N9320A Programmer’s Guide3 Status Registers*ESE <integer> command where <integer> is the sum of the decimal values of the bits you want
sAgilent N9320A Spectrum AnalyzerProgrammer’s Guide294Programming ExampleOverview 30Programming in C using the VTL 31Checking USB Connection 37Using
30 N9320A Programmer’s Guide4 Programming ExampleOverviewThe programming examples in this section keep to the following 3 conventions:• The programmin
Programming Example 4N9320A Programmer’s Guide 31Programming in C using the VTLThis section includes some basic information about programming in the C
32 N9320A Programmer’s Guide4 Programming ExampleExample ProgramThis example program queries a USB device for an identification string and prints the
Programming Example 4N9320A Programmer’s Guide 33viStatus=viOpen(defaultRM,"USB0::2391::8472::0000000000::0::INSTR",VI_NULL,VI_NULL,&viN
N9320A Programmer’s Guide
34 N9320A Programmer’s Guide4 Programming ExampleOpening a SessionA session is a channel of communication. Sessions must first be opened on the defaul
Programming Example 4N9320A Programmer’s Guide 35Next, you open a session with a specific device with the viOpen function. This function uses the ses
36 N9320A Programmer’s Guide4 Programming ExampleAddressing a SessionAs seen in the previous section, the rsrcName parameter in the viOpen function
Programming Example 4N9320A Programmer’s Guide 37Checking USB ConnectionUsually, using “*IDN?” verifies the data transferring between the controller P
38 N9320A Programmer’s Guide4 Programming ExampleUsing C with Marker Peak Search and Peak Excursion/**************************************************
Programming Example 4N9320A Programmer’s Guide 39#include <stdio.h>#include <stdlib.h>#include <math.h>#include <ctype.h>#incl
40 N9320A Programmer’s Guide4 Programming Example/*Open a USB session.*/viStatus=viOpenDefaultRM(&defaultRM);viStatus=viOpen(defaultRM,"USB0:
Programming Example 4N9320A Programmer’s Guide 41/*Set the peak excursion*/viPrintf(viN9320A,"CALC:MARK:PEAK:EXC %1fDB \n",fPeakExcursion);/
42 N9320A Programmer’s Guide4 Programming ExampleUsing Marker Delta Mode and Marker Minimum Search/***************************************************
Programming Example 4N9320A Programmer’s Guide 43#include <stdio.h>#include <stdlib.h>#include <math.h>#include <ctype.h>#incl
N9320A Programmer’s GuideContents1 Getting Started 1Remotely Operating Your N9320A 22 Programming Fundamentals 7Overview 8Command Categories 10Command
44 N9320A Programmer’s Guide4 Programming Example/* Open an USB session*/ viStatus=viOpenDefaultRM(&defaultRM);viStatus=viO-pen(default
Programming Example 4N9320A Programmer’s Guide 45/*Set the analyzer to the values given by the user*///viPrintf(viN9320A,"SENS:FREQ:STAR %lf //MH
46 N9320A Programmer’s Guide4 Programming ExampleMeasuring Phase Noise/************************************************************//* Measuring Phase
Programming Example 4N9320A Programmer’s Guide 47ViSession defaultRM, viN9320A;ViStatus errStatus;ViChar cIdBuff[256]= {0};char cEnter = 0;int iResult
48 N9320A Programmer’s Guide4 Programming Example/*Reset the Instrument*/viPrintf(viN9320A,"*RST\n");/*Display the program heading */printf(
sAgilent N9320A Spectrum AnalyzerProgrammer’s Guide495Command ReferenceIEEE Common Commands 50CALCulate Subsystem 53CALibration Subsystem 71CONFigure
50 N9320A Programmer’s Guide5 Command ReferenceIEEE Common CommandsThe first few pages of this chapter contain common commands specified in IEEE Stand
Command Reference 5N9320A Programmer’s Guide 51Standard Event Status Register Query*ESR?Queries and clears the standard event status event register. (
52 N9320A Programmer’s Guide5 Command ReferenceReset*RSTThis command presets the instrument to a factory defined condition that is appropriate for rem
Command Reference 5N9320A Programmer’s Guide 53CALCulate SubsystemThis subsystem is used to perform post- acquisition data processing. In effect, the
N9320A Programmer’s GuideContentsCALCulate:MARKer Subsection 59CALCulate:NTData Subsection 70CALibration Subsystem 71CONFigure Subsystem 73DISPlay Sub
54 N9320A Programmer’s Guide5 Command ReferenceNdBstate:CALCulate:BWIDth|BANDwidth[:STATe] OFF|ON|0|1:CALCulate:BWIDth|BANDwidth[:STATe]?Controls the
Command Reference 5N9320A Programmer’s Guide 55CALCulate:LLINe SubsectionLimit lines can be defined for your measurement. You can then have the instru
56 N9320A Programmer’s Guide5 Command ReferenceRemarks: If two amplitude values are entered for the same frequency, a single vertical line is the resu
Command Reference 5N9320A Programmer’s Guide 57Display the Limit Line:CALCulate:LLINe[1]|2:DISPlay OFF|ON|0|1:CALCulate:LLINe[1]|2:DISPlay?Controls th
58 N9320A Programmer’s Guide5 Command ReferenceDisplay the Limit Margin:CALCulate:LLINe[1]|2:MARGin:STATe OFF|ON|0|1:CALCulate:LLINe[1]|2:MARGin:STATe
Command Reference 5N9320A Programmer’s Guide 59CALCulate:MARKer SubsectionMarkers All Off on All Traces:CALCulate:MARKer:AOFFTurns off all markers on
60 N9320A Programmer’s Guide5 Command ReferenceFrequency Counter Marker Automatic Resolution:CALCulate:MARKer:FCOunt:RESolution:AUTO OFF|ON|0|1:CALCul
Command Reference 5N9320A Programmer’s Guide 61Marker Peak (Maximum) Search:CALCulate:MARKer[n]:MAXimumPerforms a peak search based on the search mode
62 N9320A Programmer’s Guide5 Command ReferenceMarker Mode:CALCulate:MARKer[n]:MODE POSition|DELTa:CALCulate:MARKer[n]:MODE?Selects the type of marker
Command Reference 5N9320A Programmer’s Guide 63Remarks: If mode is set to MAXimum, peak search will place the marker at the maximum amplitude in the t
sAgilent N9320A Spectrum AnalyzerProgrammer’s Guide11Getting StartedPreparing equipment for Remote Operation 2Connecting the N9320A to a PC via the U
64 N9320A Programmer’s Guide5 Command ReferencePeak to Peak Delta Markers:CALCulate:MARKer[1]|2|3|4:PTPeakPositions delta markers on the highest and l
Command Reference 5N9320A Programmer’s Guide 65Optimize Phase Noise:CALCulate:MARKer:PHNoise:OPTimize ON|OFF|1|0Turns on/off the phase noise optimizat
66 N9320A Programmer’s Guide5 Command ReferenceSet Reference Level to the Marker Value:CALCulate:MARKer[n][:SET]:RLEVelSets the reference level to the
Command Reference 5N9320A Programmer’s Guide 67Marker On/Off:CALCulate:MARKer[n]:STATe OFF|ON|0|1:CALCulate:MARKer[n]:STATe?Turns the selected marker
68 N9320A Programmer’s Guide5 Command ReferenceTurns on or off marker signal tracking. It continuously puts the selected marker on the highest display
Command Reference 5N9320A Programmer’s Guide 69Set the Delta Marker :CALCulate:MARKer[n]:X:DELTa <param>:CALCulate:MARKer[n]:X:DELTa?Activates a
70 N9320A Programmer’s Guide5 Command ReferenceMarker Read Y Value:CALCulate:MARKer[n]:Y?Read the current Y value for the designated marker or delta o
Command Reference 5N9320A Programmer’s Guide 71CALibration SubsystemThese commands control the self- alignment processes.Align All Instrument Assembli
72 N9320A Programmer’s Guide5 Command ReferenceSelect the Source State for Calibration:CALibration:SOURce:STATe OFF|ON|0|1:CALibration:SOURce:STATe?Co
Command Reference 5N9320A Programmer’s Guide 73CONFigure SubsystemACP measurement State:CONFigure:ACPowerThis command places the analyzer in Adjacent
2 N9320A Programmer’s Guide1 Getting StartedRemotely Operating Your N9320AThe signal generator provides USB (Universal Serial Bus) connection and allo
74 N9320A Programmer’s Guide5 Command ReferenceSpecturm Emission Mask measurement State:CONFigure:SEMaskThis command places the analyzer in Spectrum E
Command Reference 5N9320A Programmer’s Guide 75DISPlay SubsystemThe DISPlay subsystem controls the selection and presentation of textual, graphical, a
76 N9320A Programmer’s Guide5 Command ReferenceTurn the Entire Display On/Off:DISPlay:ENABle OFF|ON|0|1:DISPlay:ENABle?Turns the display on or off. Ha
Command Reference 5N9320A Programmer’s Guide 77Display Line On/Off:DISPlay:WINDow:TRACe:Y:DLINe:STATe OFF|ON|0|1:DISPlay:WINDow:TRACe:Y:DLINe:STATe?Tu
78 N9320A Programmer’s Guide5 Command ReferenceTrace Y-Axis Amplitude Scaling:DISPlay:WINDow:TRACe:Y[:SCALe]:PDIVision <rel_ampl>:DISPlay:WINDow
Command Reference 5N9320A Programmer’s Guide 79Remarks: The sum of (reference level offset + reference level) is clipped to the range –327.6 to 327.6
80 N9320A Programmer’s Guide5 Command ReferenceFETCh SubsystemThis command puts selected data from the most recent measurement into the output buffer.
Command Reference 5N9320A Programmer’s Guide 81Channel Power measurement:FETCh:CHPower?This command returns scalar results of main channel power, and
82 N9320A Programmer’s Guide5 Command Referencefor store the lower statistical result for power(or PSD) offset.2. The emission mask offset of lower fr
Command Reference 5N9320A Programmer’s Guide 83INITiate SubsystemThe INITiate subsystem is used to control the initiation of the trigger. Refer to the
Getting Started 1N9320A Programmer’s Guide 3Connecting the N9320A to a PC via the USB PortNo extra driver is required to connect the N9320A via the US
84 N9320A Programmer’s Guide5 Command Reference• When OFF, the trigger system remains in an “idle” state until CONTinuous is ON or :INITiate[:IMMedia
Command Reference 5N9320A Programmer’s Guide 85MMEMory SubsystemThe purpose of the MMEMory subsystem is to provide access to internal or external disk
86 N9320A Programmer’s Guide5 Command ReferenceLoad a Limit Line from Memory to the Instrument:MMEMory:LOAD:LIMit LLINE1|LLINE2,<file_name>Loads
Command Reference 5N9320A Programmer’s Guide 87Load a Trace From a File to the Instrument:MMEMory:LOAD:TRACe <file_name>The contents of the file
88 N9320A Programmer’s Guide5 Command ReferenceStore a Screen Image in a Graphic File:MMEMory:STORe:SCReen <file_name>Saves the current instrume
Command Reference 5N9320A Programmer’s Guide 89OUTPut SubsystemThe OUTPut subsystem controls the characteristics of the tracking generator output port
90 N9320A Programmer’s Guide5 Command ReferenceREAD SubsystemDoes not preset the measurement to the factory default settings. For example, if you have
Command Reference 5N9320A Programmer’s Guide 91Channel Power measurement:READ:CHPower?Returns two values that correspond to the ChannelPower and Power
92 N9320A Programmer’s Guide5 Command ReferenceSEM measurement:READ:SEMask?Returns 20 scalar results, each five in a array, in the following order:1.
Command Reference 5N9320A Programmer’s Guide 9316. The upper Output Intercept Power value in dBm.17. The upper Output Intercept Power value in dBc.18.
Commentaires sur ces manuels