Programmer’s Guide Agilent Technologies EMC Series Spectrum Analyzers This guide documents firmware revision A.08.xx This manual provides documentation for the following instruments: E7401A (9 kHz - 1.5 GHz) E7402A (9 kHz - 3.0 GHz) E7403A (9 kHz - 6.7 GHz) E7404A (9 kHz - 13.2 GHz) E7405A (9 kHz - 26.5 GHz) Manufacturing Part Number: E7401-90053 Supersedes: E7401-90028 Printed in USA December 2001 © Copyright 1999 - 2001 Agilent Technologies, Inc.
Notice The information contained in this document is subject to change without notice. Agilent Technologies 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. Agilent Technologies 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.
WARNING This is a Safety Class 1 Product (provided with a protective earth ground incorporated in the power cord). The mains plug shall be inserted only in a socket outlet provided with a protected earth contact. Any interruption of the protective conductor inside or outside of the product is likely to make the product dangerous. Intentional interruption is prohibited. WARNING No operator serviceable parts inside. Refer servicing to qualified personnel. To prevent electrical shock do not remove covers.
LIMITATION OF WARRANTY The foregoing warranty shall not apply to defects resulting from improper or inadequate maintenance by Buyer, Buyer-supplied software or interfacing, unauthorized modification or misuse, operation outside of the environmental specifications for the product, or improper site preparation or maintenance. NO OTHER WARRANTY IS EXPRESSED OR IMPLIED. AGILENT TECHNOLOGIES SPECIFICALLY DISCLAIMS THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Contents 1. Programming Fundamentals Creating Valid Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Command Notation Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Special Characters in Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Parameters in Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Standard Event Status Event Enable Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70 STATus:OPERation Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70 STATus:OPERation Condition and Event Enable Registers . . . . . . . . . . . . . . . . . . . . . .73 STATus:QUEStionable Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .73 STATus:QUEStionable:POWer Register . . . . . . . .
Contents Determine if an Error has Occurred . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Measuring Harmonic Distortion (GPIB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Measuring Harmonic Distortion (RS-232) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 Making Faster Measurements (multiple measurements) . . . . . . . . . . . . . . . . . . . . . . . . . . 177 4.
Contents Set Comment for Marked Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205 Delete Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205 Turn Signal List On or Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206 Retrieve Signal as a String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Set Center Frequency to the Marker Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 Set Reference Level to the Marker Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 Set Span to the Marker Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 Set Start Frequency to the Marker Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Date and Time Display Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .235 Date and Time Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .235 Display Annotation Title Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236 Turn the Entire Display On/Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents INPut Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 Input Port Coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 Clear the Input Overload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 MEASure Group of Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Turn Automatic Averaging On/Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270 Type of Averaging for Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271 [:SENSe]:BANDwidth Subsection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272 Resolution Bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Preselector Centering On or Off (E7403A, E7404A, E7405A only) . . . . . . . . . . . . . . . 288 Setting the Dwell Time for Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 Auto Measure Margin On or Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 [:SENSe]:FREQuency Subsection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 Center Frequency . . . . . . . . . . . . . . . .
Contents Set the Output Power at the Start of the Sweep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .306 Set the Output Power to Step Automatically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .306 Set the Output Power Step Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .306 Set the Source Sweep Power Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307 Output Power Tracking . . . . . . .
Contents Questionable Positive Transition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 SYSTem Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 GPIB Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 Serial Port DTR Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Trace Math Subtract From Display Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .333 Select Trace Display Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .333 TRIGger Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334 External Trigger, Line Trigger Delay Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Commands Alphabetical Listing :SOURce:POWer:ATTenuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 *CAL? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 *CLS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Commands Alphabetical Listing :CALCulate:EMI:SLISt:ADD:MARKer [1]|2|3|4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 :CALCulate:EMI:SLISt:ADD:MEASured . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 :CALCulate:EMI:SLISt:CLEar ALL|CURRent| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 :CALCulate:EMI:SLISt:COMMent:ALL . . . . . .
Commands Alphabetical Listing :CALCulate:LLINe[1]|2:DISPlay OFF|ON|0|1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 :CALCulate:LLINe[1]|2:DISPlay?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 :CALCulate:LLINe[1]|2:FAIL? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Commands Alphabetical Listing :CALCulate:MARKer[1]|2|3|4:FUNCtion BPOWer|NOISe|OFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 :CALCulate:MARKer[1]|2|3|4:FUNCtion? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 :CALCulate:MARKer[1]|2|3|4:MAXimum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 :CALCulate:MARKer[1]|2|3|4:MAXimum:LEFT. . . . . . . .
Commands Alphabetical Listing :CALCulate:MARKer[1]|2|3|4:X:READout FREQuency|TIME|ITIMe|PERiod . . . . . . . . . . . . . . . . . . . . . . . . . 226 :CALCulate:MARKer[1]|2|3|4:X:READout? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 :CALCulate:MARKer[1]|2|3|4:X:SPAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 :CALCulate:MARKer[1]|2|3|4:X:SPAN? . . . . . . . . . . . . . . . . . . .
Commands Alphabetical Listing :CALibration:FREQuency[:STATe] OFF|ON|0|1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 :CALibration:FREQuency[:STATe]?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 :CALibration:RF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Commands Alphabetical Listing :DISPlay:WINDow:TRACe:GRATicule:GRID[:STATe]?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 :DISPlay:WINDow:TRACe:X[:SCALe]:OFFSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 :DISPlay:WINDow:TRACe:X[:SCALe]:OFFSet? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 :DISPlay:WINDow:TRACe:Y:DLINe . . . . . . . . . . . . . . . . .
Commands Alphabetical Listing :HCOPy:EMI:ITEM:REPort:SCReem|SLISt|ISETups[:State]? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 :HCOPy:EMI:ITEM:REPort:SCReen|SLISt|ISETups[:State] |ON|OFF|1|0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 :HCOPy:EMI:ITEM:SLISt:DELTa1|DELTa2:PPEak|QPEak|AVERage :STATe ON|OFF|1|0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Commands Alphabetical Listing :MEASure:EMI:MARKer[1|2|3|4]? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 :MEASure:EMI:MARKer[1|2|3|4]ADD?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 :MEASure:EMI:MMIN:STATe OFF|ON|0|1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 :MEASure:EMI:MMIN:STATe? . . . . .
Commands Alphabetical Listing :SOURce:POWer:ATTenuation:AUTO OFF|ON|0|1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 :SOURce:POWer:ATTenuation:AUTO? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 :SOURce:POWer:ATTenuation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 :SOURce:POWer:MODE FIXed|SWEep . . . .
Commands Alphabetical Listing :STATus:QUEStionable:CALibration:ENABle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 :STATus:QUEStionable:CALibration:ENABle? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 :STATus:QUEStionable:CALibration:NTRansition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 :STATus:QUEStionable:CALibration:NTRansition?. . . . . . . .
Commands Alphabetical Listing :STATus:QUEStionable:POWer:NTRansition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 :STATus:QUEStionable:POWer:NTRansition? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 :STATus:QUEStionable:POWer:PTRansition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 :STATus:QUEStionable:POWer:PTRansition? . . . . . . . .
Commands Alphabetical Listing :SYSTem:HID?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 :SYSTem:LKEY <“option”>, <“license key”> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 :SYSTem:LKEY:DELete <“option”> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Commands Alphabetical Listing :TRACe:MATH:SUBTract ,, . . . . . . . . . . . . . . . . . . . . . . 332 :TRACe:MATH:SUBTract:DLINe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 :TRACe[:DATA] |RAWTRACE,| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Commands Alphabetical Listing [:SENSe]:AVERage:TYPE?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 [:SENSe]:AVERage[:STATe] OFF|ON|0|1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 [:SENSe]:AVERage[:STATe]? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Commands Alphabetical Listing [:SENSe]:CORRection:OFFSet[:MAGNitude] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 [:SENSe]:CORRection:OFFSet[:MAGNitude]? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 [:SENSe]:DEMod AM|FM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 [:SENSe]:DEMod:FMDeviation .
Commands Alphabetical Listing [:SENSe]:EMI:MEASure:DETector:QPEak:DWELl? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 [:SENSe]:EMI:MEASure:DETector:QPEak? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 [:SENSe]:EMI:MEASure:DETector:QPEak[STATe]OFF|ON|0|1| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 [:SENSe]:EMI:MEASure:PCENter[:STATe] OFF|ON|0|1 . . . . . . . . . . .
Commands Alphabetical Listing [:SENSe]:POWer[:RF]:ATTenuation:AUTO OFF|ON|0|1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 [:SENSe]:POWer[:RF]:ATTenuation:AUTO? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 [:SENSe]:POWer[:RF]:ATTenuation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 [:SENSe]:POWer[:RF]:GAIN[:STATe] OFF|ON|0|1. .
Commands Alphabetical Listing [:SENSe]:SWEep:TIME:GATE[:STATe] OFF|ON|0|1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 [:SENSe]:SWEep:TIME:GATE[:STATe]? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 [:SENSe]:SWEep:TIME?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Commands Alphabetical Listing 36
1 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.
Programming Fundamentals The SCPI Consortium or IEEE can provide detailed information on the subject of SCPI programming. Refer to IEEE Standard 488.1-1987, IEEE Standard Digital Interface for Programmable Instrumentation. New York, NY, 1987, or to IEEE Standard 488.2-1992, IEEE Standard Codes, Formats, Protocols and Common Commands for Use with ANSI/IEEE Std 488.1-1987. New York, NY, 1992. Valid EMC Analyzer SCPI commands are used for examples in this chapter.
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 [:SENSe]:BANDwidth[:RESolution] The following sample commands are all identical. They will all cause the same result. :CALCulate:MARKer[1]|2|3|4:Y? • :Sense:Band:Res 1700 • :BANDWIDTH:RESOLUTION 1.
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. In the documentation, upper case letters indicate the short form of the key word. The upper and lower case letters, together, indicate the long form of the key word.
Programming Fundamentals Special Characters in Commands Special Characters in Commands Special Character Meaning Example | A vertical stroke between parameters indicates alternative choices. The effect of the command is different depending on which parameter is selected. Command: [:SENSe]:DETector[:FUNCtion] NEGative|POSitive|SAMPle A vertical stroke between key words indicates identical effects exist for several key words. Only one of these key words is used at a time.
Programming Fundamentals Parameters in Commands Parameters in Commands There are four basic types of parameters: boolean, key words, variables and arbitrary block program data. Boolean The expression OFF|ON|0|1 is a two state boolean-type parameter. The numeric value 0 is equivalent to OFF. Any numeric value other than 0 is equivalent to ON. The numeric values of 0 or 1 are commonly used in the command instead of OFF or ON, and queries of the parameter always return a numeric value of 0 or 1.
Programming Fundamentals Parameters in Commands An angle parameter is a rational number followed by optional units. The default units are degrees. Acceptable units include: DEG, RAD. A file name parameter is the name of your file including the full path. The back slash that follows the drive colon (C:\), usually used in computer paths, is not used in the SCPI command string. A frequency parameter is a positive rational number followed by optional units.
Programming Fundamentals Parameters in Commands 44 • The numbers 12320 indicates 12 thousand, 3 hundred, 20 data bytes follow the header. • To determine how may points in the block, divide 12320 by your selected data format bytes/point. Divide by 8 for real 64, or 4 for real 32. In this example there are 1540 points in the block if your selected data format is real 64.
Programming Fundamentals Improving Measurement Speed Improving Measurement Speed There are a number of things you can do in your programs to make them run faster: “Turn off the display updates” on page 45. “Use binary data format instead of ASCII” on page 46. “Minimize the number of GPIB transactions.” on page 46. “Avoid unnecessary use of *RST.” on page 47. “Minimize DUT/instrument setup changes.” on page 47. Turn off the display updates :DISPlay:ENABle OFF turns off the display.
Programming Fundamentals Improving Measurement Speed Select phase noise performance [:SENSe]:FREQuency:SYNThesis can be used to optimize either phase noise performance or tuning speed. In some settings optimizing for tuning speed reduces sweep time and the “re-tune” time between sweeps. In other settings only the re-tune time is improved. Use binary data format instead of ASCII The ASCII data format is the instrument default since it is easier for people to understand and is required by SCPI for *RST.
Programming Fundamentals Improving Measurement Speed Avoid unnecessary use of *RST. Remember that *RST presets all the measurements and settings to their factory defaults and my also change the mode. This forces you to reset the measurement settings of the analyzer even if they use similar mode setup or measurement settings. See Minimize DUT/instrument setup changes. below. Minimize DUT/instrument setup changes. • Some instrument setup parameters are common to multiple measurements.
Programming Fundamentals Putting Multiple Commands on the Same Line Putting Multiple Commands on the Same Line Multiple commands can be written on the same line, reducing your code space requirement. To do this: • Commands must be separated with a semicolon (;). • If the commands are in different subsystems, the key word for the new subsystem must be preceded by a colon (:). • If the commands are in the same subsystem, the full hierarchy of the command key words need not be included.
Programming Fundamentals Putting Multiple Commands on the Same Line :TRIGger [:SEQuence] :EXTernal [1] :SLOPe POSitive Bad Command Good Command PWR:ATT 40dB POW:ATT 40dB The short form of POWER is POW, not PWR. FREQ:STAR 30MHz;MIX:RANG –20dBm FREQ:STAR 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. You must specify :POW to get to the :MIX:RANG command.
Programming Fundamentals Overview of GPIB (Option A4H) Overview of GPIB (Option A4H) GPIB Instrument Nomenclature An instrument that is part of a GPIB 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. Any number of instruments in the GPIB network can be listeners simultaneously.
Programming Fundamentals Overview of GPIB (Option A4H) • A local function that is the complement to the remote command, causing an instrument to return to local control with a fully enabled front panel (sometimes called: local, resume). • A clear function that causes all GPIB instruments, or addressed instruments, to assume a cleared condition. The definition of clear is unique for each instrument (sometimes called: clear, reset, control, send). In the Agilent EMC Analyzer, clear does the following: 1.
Programming Fundamentals Overview of RS-232 (Option 1AX) Overview of RS-232 (Option 1AX) 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. Modem line handshaking can he used to help solve this problem.
Programming Fundamentals Overview of RS-232 (Option 1AX) 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. 3. Send information to the interface and thence to the peripheral. 4. After data transfer is complete, clear Data Terminal Ready and Request-to-Send signals. For ENTER operations: 1.
Programming Fundamentals Printer Setup and Operation Printer Setup and Operation Equipment • Agilent EMC Analyzer equipped with standard I/O Option A4H (GPIB) and (Parallel Interface) or Option 1AX (RS-232 and Parallel Interface). • IEEE 1284 compliant printer cable (such as HP C2950A). • Supported printer equipped with a parallel interface. (A supported printer is one that accepts Printer Control Language Level 3 or 5). — PCL3 printers include most HP DeskJet printers.
Programming Fundamentals Printer Setup and Operation 6. Press Printer Type to access the Printer Type menu keys. Press Auto to make the analyzer attempt to identify the connected printer. When you press Auto, the analyzer will respond in one of the three following ways: • The Print Setup menu will be displayed with the Auto key selected and no new message will be displayed in the display status line.
Programming Fundamentals Printer Setup and Operation Testing Printer Operation When you have completed the printer setup for the analyzer, press Print Setup, Print (Screen), and then press Print on the front panel. If the printer is ready and the printer setup was successful, a printout of the analyzer display will be printed. If the printer is not ready, the message Printer Timeout will appear on the analyzer display.
2 Status Registers This chapter contains a comprehensive description of status registers explaining what status registers are and how to use them. Information pertaining to all bits of the registers in Agilent EMC analyzers is also provided.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Use Status Registers to Determine the State of Analyzer Events and Conditions Programs often need to detect and manage error conditions or changes in analyzer status. Agilent EMC products allow this function to be performed using status registers. You can determine the state of certain analyzer hardware and firmware events and conditions by programming the status register system. Refer to Figure 2-1.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions What are the Status Registers? Refer toFigure 2-2, which shows the overall status register system in detail. Most status registers are composed of the five individual registers described below. One such status register in the figure is entitled “STATus: QUEStionable,” which is both the name of the register, and the SCPI command form used to access the register.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Figure 2-2 Overall Status Register System Diagram 60 Chapter 2
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Status registers (except for the status byte register and the standard event status register) consist of the registers whose contents can be used 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.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions NOTE If you are using the status bits and the analyzer mode is changed, the status bits should be read, and any error conditions resolved, prior to switching modes. Error conditions that exist prior to switching modes cannot be detected using the condition registers after the mode change.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Use the SRQ method when either: — you need time-critical notification of changes — you are monitoring more than one device which supports SRQs — you need to have the controller do something else while the analyzer is making a measurement — you can’t afford the performance penalty inherent to polling Using the Service Request (SRQ) Method Your language, bus, and programming environment must be able to support SRQ
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions If your program enables the controller to detect and respond to service requests, it should instruct the controller to perform a serial poll when the GPIB SRQ line is set true. Each device on the bus returns the contents of its status byte register in response to this poll. The device, whose RQS bit is set to 1, is the device that requested service.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Setting and Querying the Status Register See Figure 2-3. Each bit in a register is represented by a numerical value based on its location. This number is sent with the command to enable a particular bit. To enable more than one bit, send the sum of all of the bits involved. For example, to enable bit 0 and bit 6 of the standard event status register, you would send the command *ESE 65 (1 + 64).
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Status Byte Register Figure 2-4 Status Byte Register Diagram Status Byte Register 0 1 Unused 2 Error/Event Queue Summary Bit 3 4 Questionable Status Summary Bit 5 6 7 Unused Message Available (MAV) Standard Event Summary Bit Request Service Summary (RQS) Operation Status Summary Bit & & & + & & & & 0 1 2 3 4 5 6 7 Service Request Enable Register ck763a The status byte register contains the followi
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Bit Decimal Value Description 5 32 Standard Event Status Summary Bit: A 1 in this bit position indicates that the standard event status summary bit has been set. The standard event status register can then be read to determine the specific event that caused this bit to be set.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Figure 2-5 Service Request Enable Register NOTE The service request enable register presets to zeros (0). Standard Event Status Register The standard event status register is used to determine the specific event that sets bit 5 in the status byte register. The standard event status register does not have negative and positive transition registers, nor a condition register.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Figure 2-6 Standard Event Status Register Diagram Operation Complete Request Bus Control Query Error Device Dependent Error Execution Error Command Error User Request Power On Event Register 7 & + Event Enable Register 7 6 & 6 To Status Byte Register Bit #5 5 & 5 4 & 4 3 & 3 2 1 & & 2 1 0 & 0 ck723a The standard event status register contains the following bits: Bit Decimal Value 0 1
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Bit Decimal Value Description 5 32 Command Error: A 1 in this bit position indicates that a command error has occurred. Command errors have SCPI error numbers from –199 to –100. 6 64 User Request Key (Local: A 1 in this bit position indicates that the LOCAL key has been pressed. This is true even if the analyzer is in local lockout mode.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions • • Figure 2-8 sweeping waiting for a trigger Status Operation Register Diagram Chapter 2 71
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions The STATus:OPERation condition register contains the following bits: Bit Decimal Value Description 0 0 Calibrating: A 1 in this bit position indicates that the analyzer is performing a self-calibration. 1 2 Reserved: This bit is not used by the analyzer, but is for future use with other Agilent products.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions STATus:OPERation Condition and Event Enable Registers The STATus:OPERation condition register continuously monitors the hardware and firmware status of the analyzer, and is read-only. To query the register, send the :STATus:OPERation:CONDition? command. The response will be the decimal sum of the bits that are set to 1.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions NOTE All bits are summary bits from lower-level event registers. (For a general diagram of the STATus:QUEStionable register, see Figure 2-9.) A Questionable Status condition register query response will be the decimal sum of the bits which are set to 1. For example, if bit number 9 and bit number 3 are set to 1, the decimal sum of the 2 bits is 512 plus 8. So the decimal value 520 is returned.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Figure 2-9 Status Questionable Register Diagram Reserved Reserved Reserved POWer Summary Reserved FREQuency Summary Reserved Reserved CALibration Summary INTregrity Sum Reserved Reserved Reserved Reserved Reserved Always Zero (0) QUEStionable Status Condition Register 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 QUEStionable Status Positive 15 Transition Filter 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 QUEStionable Status
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions STATus:QUEStionable:POWer Register Figure 2-10 Questionable Status Power Register Diagram 76 Chapter 2
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Bit descriptions in the Questionable Status Power Condition Register are given in the following table. Bit Decimal Value Description 0 0 R.P.P Tripped: A 1 in this bit position indicates that the reverse power protection is tripped (Agilent model E7401A only). Reverse power protection is “overload” protection for the tracking generator.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions For example, to enable bit 9 and bit 3 so that whenever either of those bits is set to 1, the Questionable Status Summary bit of the Status Byte Register will be 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 command.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Bit Decimal Value Description 7 128 Reserved: This bit is not used by the analyzer, but are for future use with other Agilent products. 8 256 CALibration Summary: This is the summary bit for the Questionable Calibration Status Register. 9 512 INTegrity Sum: This is the summary bit for the Questionable Integrity Status Register.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions STATus:QUEStionable:FREQuency Register Figure 2-12 Questionable Status Frequency Register Diagram Bit descriptions in the Questionable Status Frequency Condition Register are given in the following table.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Bit Decimal Value 0 0 Source Synth Unlocked: A 1 in this bit position indicates that the synthesizer in the source (tracking generator) is unlocked. 1 2 Freq Ref Unlocked: A 1 in this bit position indicates that the analyzer frequency reference is unlocked. 2 4 Reserved: This bit is not used by the analyzer, but are for future use with other Agilent products.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Questionable Status Frequency Condition and Event Enable Registers The Questionable Status Frequency condition register continuously monitors output frequency status of the analyzer. Condition registers are read-only. To query the condition register, send the command :STATus:QUEStionable:FREQuency:CONDition? The response will be the decimal sum of the bits which are set to 1.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions STATus:QUEStionable:CALibration Register Figure 2-13 Questionable Status Calibration Register Diagram Chapter 2 83
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Bit descriptions in the Questionable Status Calibration Condition Register are given in the following table. 84 Bit Decimal Value Description 0 0 Reserved: This bit is not used by the analyzer, but are for future use with other Agilent products. 1 2 Reserved: This bit is not used by the analyzer, but are for future use with other Agilent products.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Bit Decimal Value 14 16384 Align Needed: 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. 15 32768 Always Zero (0): This bit is always set to 0.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions STATus:QUEStionable:INTegrity:UNCalibrated Register Figure 2-14 Questionable Status Integrity Uncalibrated Register Diagram Bit descriptions in the Questionable Status Integrity Uncalibrated Condition Register are given in the following table.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Bit Decimal Value Description 0 0 Oversweep (Meas Uncal): A 1 in this position indicates that the analyzer is in a state that could lead to uncalibrated measurements. This is typically caused by sweeping too fast for the current combination of span, resolution bandwidth, and video bandwidth. Auto coupling may resolve this problem.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions :STATus:QUEStionable:CALibration:NTRansition (negative transition) or :STATus:QUEStionable:CALibration:PTRansition (positive transition) where is the sum of the decimal values of the bits you want to enable. The Questionable Status Calibration Event register latches transition events from the condition register as specified by the transition filters. Event registers are destructive read-only.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions STATus:QUEStionable:INTegrity Register Figure 2-15 Questionable Status Integrity Register Diagram Bit descriptions in the Questionable Status Integrity Condition Register are given in the following table.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions 90 Bit Decimal Value Description 0 1 Reserved: This bit is not used by the analyzer, but is for future use with other Agilent products. 1 2 Reserved: This bit is not used by the analyzer, but is for future use with other Agilent products. 2 4 Reserved: This bit is not used by the analyzer, but is for future use with other Agilent products.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions Questionable Status Integrity Event Condition and Enable Registers The Questionable Status Integrity Condition Register continuously monitors the calibration status of the analyzer. Condition registers are read-only. To query the condition register, send the command :STATus:QUEStionable:INTegrity:CONDition? The response will be the decimal sum of the bits which are set to 1.
Status Registers Use Status Registers to Determine the State of Analyzer Events and Conditions 92 Chapter 2
3 Programming Examples This chapter includes examples of how to program the analyzer using the analyzer SCPI programming commands. Twelve examples are written for an analyzer with an GPIB interface (Option A4H). Three examples are written for an analyzer with an RS-232 interface (Option 1AX).
Programming Examples List of Programming Examples List of Programming Examples The programming examples included in this chapter are: “Using Marker Peak Search and Peak Excursion” “Using Marker Delta Mode and Marker Minimum Search” “Performing Internal Self-alignment” “Reading Trace Data using ASCII Format (GPIB)” “Reading Trace Data Using 32-bit Real Format (GPIB)” “Reading Trace Data Using ASCII Format (RS-232)” “Reading Trace Data Using 32-bit Real Format (RS-232)” “Using Limit Lines” “Measuring Noise”
Programming Examples Programming Examples System Requirements Programming Examples System Requirements These examples were written for use on an IBM compatible PC configured as follows: • Pentium processor • Windows 951 or Windows NT 4.
Programming Examples C Programming Examples using VTL C Programming Examples using VTL The programming examples that are provided in this guide are written using the C programming language and the VTL (VISA transition library). 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.
Programming Examples C Programming Examples using VTL viPrintf viScanf viClose These are the VTL formatted I/O functions that are patterned after those used in the C programming language. The viPrintf call sends the SCPI commands to the analyzer. The viPrintf call can also be used to query the analyzer. The viScanf call is then used to read the results. This function must be used to close each session.
Programming Examples C Programming Examples using VTL • Select Project | Settings from the menu. Click on the Link button and add visa32.lib to the Object / Library Modules list box. Optionally, you may add the library directly to your project file. Click on OK to close the dialog boxes. • 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.
Programming Examples C Programming Examples using VTL Example Program This example program queries a GPIB device for an identification string and prints the results. Note that you must change the address if something other than the EMC default value of 18 is required. /*idn.c - program filename */ #include "visa.h" #include
Programming Examples C Programming Examples using VTL The visatype.h header file defines most of the VISA types. The VISA types are used throughout VTL to specify data types used in the functions. For example, the viOpenDefaultRM function requires a pointer to a parameter of type ViSession. If you find ViSession in the visatype.h header file, you will find that ViSession is eventually typed as an unsigned long. Opening a Session A session is a channel of communication.
Programming Examples C Programming Examples using VTL The session returned from viOpenDefaultRM must be used in the sesn parameter of the viOpen function. The viOpen function then uses that session and the device address specified in the (resource name) parameter to open a device session. The vi parameter in viOpen returns a session identifier that can be used with other VTL functions.
Programming Examples C Programming Examples using VTL 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 GPIB device at address 22. That session will now be identified as dmm when using other VTL functions.
Programming Examples C Programming Examples using VTL VXI2::128 Device at VXI logical address 128, in the third VXI system (VXI2). GPIB-VXI0::24 A VXI device at logical address 24. This VXI device is connected via an GPIB/VXI command module. GPIB0::7::0 An GPIB device at primary address 7 and secondary address 0 on the GPIB interface. The following is an example of opening a device session with the GPIB device at primary address 23. ViSession defaultRM, vi; . .
Programming Examples Using Marker Peak Search and Peak Excursion Using Marker Peak Search and Peak Excursion Example: /************************************************************/ /* Using Marker Peak Search and Peak Excursion */ /* */ /* This example is for the E44xxB ESA Spectrum Analyzers */ /* and E740xA EMC Analyzers. */ /* */ /* This C programming example does the following. */ /* The SCPI instrument commands used are given as */ /* reference.
Programming Examples Using Marker Peak Search and Peak Excursion #include #include #include #include #include #include "visa.
Programming Examples Using Marker Peak Search and Peak Excursion /*Program Variables*/ ViStatus viStatus = 0; double dMarkerFreq = 0; double dMarkerAmpl = 0; float fPeakExcursion =0; long lOpc = 0L; /*Open a GPIB session at address 18.
Programming Examples Using Marker Peak Search and Peak Excursion /*Set the peak thresold */ viPrintf(viESA,"CALC:MARK:PEAK:THR -90 \n"); /*Trigger a sweep and wait for completion*/ viPrintf(viESA,"INIT:IMM;*WAI\n"); /*Set the marker to the maximum peak*/ viPrintf(viESA,"CALC:MARK:MAX \n"); /*Query and read the marker frequency*/ viQueryf(viESA,"CALC:MARK:X? \n","%lf",&dMarkerFreq); printf("\n\t RESULT: Marker Frequency is: %lf MHZ \n\n",dMarkerFreq/10e5); /*Query and read the marker amplitude*/ viQueryf(viE
Programming Examples Using Marker Delta Mode and Marker Minimum Search Using Marker Delta Mode and Marker Minimum Search /************************************************************/ /* Using Marker Delta Mode and Marker Minimum Search */ /* */ /* This example is for the E44xxB ESA Spectrum Analyzers */ /* and E740xA EMC Analyzers. */ /* */ /* This C programming example does the following. */ /* The SCPI instrument commands used are given as */ /* reference.
Programming Examples Using Marker Delta Mode and Marker Minimum Search #include #include #include "visa.
Programming Examples Using Marker Delta Mode and Marker Minimum Search double dMarkerAmplitude = 0.
Programming Examples Using Marker Delta Mode and Marker Minimum Search viPrintf(viESA,"CALC:MARK:MAX\n"); /*Set the analyzer to activate delta marker mode*/ viPrintf(viESA,"CALC:MARK:MODE DELT\n"); /*Trigger a sweep, wait for completion*/ viPrintf(viESA,"INIT:IMM;*WAI\n"); /*Set the marker to minimum amplitude*/ viPrintf(viESA,"CALC:MARK:MIN\n"); /*Query and read the marker amplitude*/ viQueryf(viESA,"CALC:MARK:Y?\n","%lf",&dMarkerAmplitude); /*print the marker amplitude*/ printf("\n\n\tRESULT: Marker Ampli
Programming Examples Performing Internal Self-alignment Performing Internal Self-alignment /************************************************************/ /* Performing Internal Self-alignment */ /* */ /* This example is for the E44xxB ESA Spectrum Analyzers */ /* and E740xA EMC Analyzers. */ /* */ /* This example shows two ways of executing an internal */ /* self-alignment. The first demonstrates using the *OPC? */ /* query to determine when the alignment has completed.
Programming Examples Performing Internal Self-alignment #define hpESA_IDN_E4411B "Hewlett-Packard, E4411B" #definehpEMC_IDN_E7401A "Hewlett-Packard, E7401A" ViSession defaultRM, viESA; ViStatus errStatus; ViChar cIdBuff[256]= {0}; char cEnter = 0; int iResult = 0; /*Set the input port to 50MHz 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_
Programming Examples Performing Internal Self-alignment if(viStatus) { printf("Could not open a session to GPIB device at address 18!\n"); exit(0); } /*Clear the instrument*/ viClear(viESA); /*Reset the instrument*/ viPrintf(viESA,"*RST\n"); /*Display the program heading */ printf("\n\t\t Internal Self-Alignment Program \n\n" ); /*Check for the instrument model number and route the 50MHz-signal accordingly*/ Route50MHzSignal(); /*VISA function sets the time out to infinite for this specified session*/ viSe
Programming Examples Performing Internal Self-alignment { printf("Program Abort! error ocurred: last command was not completed!\n"); exit(0); } /*Close the session*/ viClose(viESA); viClose(defaultRM); } Chapter 3 115
Programming Examples Reading Trace Data using ASCII Format (GPIB) Reading Trace Data using ASCII Format (GPIB) /************************************************************/ /* Reading Trace Data using ASCII Format (GPIB) */ /* */ /* This example is for the E44xxB ESA Spectrum Analyzers */ /* and E740xA EMC Analyzers. */ /* */ /* This C programming example does the following. */ /* The required SCPI instrument commands are given as */ /* reference.
Programming Examples Reading Trace Data using ASCII Format (GPIB) /************************************************************/ #include #include #include #include #include #include #include "visa.
Programming Examples Reading Trace Data using ASCII Format (GPIB) void main() { /*Program Variable*/ ViStatus viStatus = 0; /*Dimension cResult to 13 bytes per sweep point, 8192 sweep points maximum*/ ViChar _VI_FAR cResult[106496] = {0}; FILE *fTraceFile; static ViChar *cToken ; int iNum =0; int iSwpPnts = 401; long lCount=0L; long lOpc=0; /*iNum set to 13 times number of sweep points, 8192 sweep points maximum*/ iNum =106496; lCount =0; /* Open a GPIB session at address 18*/ viStatus=viOpenDefaultRM(&def
Programming Examples Reading Trace Data using ASCII Format (GPIB) viPrintf(viESA,"SENS:FREQ:SPAN 50 MHz\n"); /*Set the analyzer to single sweep mode */ viPrintf(viESA,"INIT:CONT 0 \n"); /*Trigger a sweep and wait for sweep to complete */ viPrintf(viESA,"INIT:IMM;*WAI\n"); /* Specify units in dBm*/ viPrintf(viESA,"UNIT:POW DBM \n"); /*Set analyzer trace data format to ASCII Format*/ viPrintf(viESA,"FORM:DATA ASC \n"); /*Trigger a sweep and wait for sweep to complete */ viPrintf(viESA,"INIT:IMM;*WAI\n"); /*Qu
Programming Examples Reading Trace Data Using 32-bit Real Format (GPIB) Reading Trace Data Using 32-bit Real Format (GPIB) /************************************************************/ /* Reading Trace Data using 32-bit Real Format (GPIB) */ /* */ /* This example is for the E44xxB ESA Spectrum Analyzers */ /* and E740xA EMC Analyzers. */ /* */ /* This C programming example does the following. */ /* The SCPI instrument commands used are given as */ /* reference.
Programming Examples Reading Trace Data Using 32-bit Real Format (GPIB) /************************************************************/ #include #include #include #include #include #include #include "visa.
Programming Examples Reading Trace Data Using 32-bit Real Format (GPIB) /*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; /*BytesPerPoint is 4 for Real32 or Int32 formats, 8 for Real64, and 2 for Uint16*/ int iBytesPerPnt = 4; int iSwpPnts = 401; int iDataBytes=1604; int iHeaderBytes=6; FILE *fTraceFile; /* Open a GPIB session at address
Programming Examples Reading Trace Data Using 32-bit Real Format (GPIB) iDataBytes = (iSwpPnts*iBytesPerPnt); lNumberBytes = iDataBytes; while ((iDataBytes = (iDataBytes / 10 )) > 0 ) { iHeaderBytes++; } /*Set analyzer to single sweep mode */ viPrintf(viESA,"INIT:CONT 0 \n"); /*Set the analyzer to 50MHz-center frequency */ viPrintf(viESA,"SENS:FREQ:CENT 50 MHZ\n"); /*Set the analyzer to 50MHz Span */ viPrintf(viESA,"SENS:FREQ:SPAN 50 MHZ\n"); /* Specify dB per division of each vertical division and viPrintf
Programming Examples Reading Trace Data Using 32-bit Real Format (GPIB) fprintf(fTraceFile,"\tAmplitude of point[%d] = %.
Programming Examples Reading Trace Data Using ASCII Format (RS-232) Reading Trace Data Using ASCII Format (RS-232) /************************************************************/ /* Reading Trace Data using ASCII Format (RS-232) */ /* */ /* This example is for the E44xxB ESA Spectrum Analyzers */ /* and E740xA EMC Analyzers. */ /* */ /* This C programming example does the following. */ /* The SCPI instrument commands used are given as */ /* reference.
Programming Examples Reading Trace Data Using ASCII Format (RS-232) #include #include #include #include #include #include #include "visa.
Programming Examples Reading Trace Data Using ASCII Format (RS-232) { /*Program Variable*/ ViStatus viStatus = 0; /*Dimension cResult to 13 bytes per sweep point, 8192 sweep points maximum*/ ViChar _VI_FAR cResult[106496] = {0}; FILE *fTraceFile; static ViChar *cToken; int iNum =0; int iSwpPnts = 401; long lCount=0L; long lOpc=0L; /*iNum set to 13 times number of sweep points, 8192 sweep points maximum*/ iNum =106496; lCount =0; /* Open a serial session at COM1 */ viStatus=viOpenDefaultRM(&defaultRM); if (v
Programming Examples Reading Trace Data Using ASCII Format (RS-232) /*set the analyzer to single sweep mode*/ viPrintf(viESA,"INIT:CONT 0 \n"); /*Trigger a spectrum measurement*/ 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); } /*Specify units in dBm*/ viPrintf(viESA,"UNIT:POW DBM \n"); /*Set analyzer trace data format to ASCII Format*/ viPrintf(viE
Programming Examples Reading Trace Data Using ASCII Format (RS-232) dBm\n",lCount+1,cToken); } fprintf(fTraceFile,"\nThe Total trace data points of the spectrum are :[%d] \n\n",lCount); fclose(fTraceFile); /*Close the session*/ viClose(viESA); viClose(defaultRM); } Chapter 3 129
Programming Examples Reading Trace Data Using 32-bit Real Format (RS-232) Reading Trace Data Using 32-bit Real Format (RS-232) /************************************************************/ /* Reading Trace Data using 32-bit Real Format (RS-232) */ /* */ /* This example is for the E44xxB ESA Spectrum Analyzers */ /* and E740xA EMC Analyzers. */ /* */ /* This C programming example does the following. */ /* The SCPI instrument commands used are given as */ /* reference.
Programming Examples Reading Trace Data Using 32-bit Real Format (RS-232) /* - Query the trace data */ /* TRAC:DATA? TRACE1 */ /* - Reset VISA timeout to 3 seconds */ /* - Remove the "," from the ACSII data */ /* - Save the trace data to an ASCII file */ /* - Close the session */ /************************************************************/ #include #include #include #include #include #include #include "visa.
Programming Examples Reading Trace Data Using 32-bit Real Format (RS-232) scanf( "%c",&cEnter); /*Externally route the 50MHz Signal*/ viPrintf(viESA,"CAL:SOUR:STAT ON \n"); } } void main() { /*Program Variables*/ ViStatus viStatus= 0; ViChar _VI_FAR cResult[1024000] = {0}; ViReal32 dTraceArray[1024] = {0}; char cBufferInfo[7]= {0}; long lNumberBytes =0L; long lOpc =0L; unsigned long lRetCount = 0L; int iSize = 0; /*BytesPerPnt is 4 for Real32 or Int32 formats, 8 for Real64, and 2 for Uint16*/ int iBytesPer
Programming Examples Reading Trace Data Using 32-bit Real Format (RS-232) /*Query number of sweep points per trace (firmware revision A.04.00 or later)*/ /*For firmware revisions prior to A.04.00, the number of sweep points is 401 */ iSwpPnts = 401; viQueryf(viESA,"SENSE:SWEEP:POINTS?\n","%d",&iSwpPnts); /*Calculate number of bytes in the header. The header consists of the "#" sign*/ /*followed by a digit representing the number of digits to follow.
Programming Examples Reading Trace Data Using 32-bit Real Format (RS-232) /*Calculate size of trace record.
Programming Examples Using Limit Lines Using Limit Lines /************************************************************/ /* Using Limit Lines */ /* */ /* This example is for the E44xxB ESA Spectrum Analyzers */ /* and E740xA EMC Analyzers. */ /* */ /* This C programming example does the following. */ /* The SCPI instrument commands used are given as */ /* reference. */ /* */ /* */ /* - Open a GPIB session at address 18. */ /* - Clear the analyzer. */ /* *CLR */ /* - Reset the analyzer.
Programming Examples Using Limit Lines /* - Check to see if limit line passes or fails. It should */ /* pass. */ /* CALC:LLINE:FAIL? */ /* - Pause for 5 seconds. */ /* - Deactivate the 50 MHz alignment signal. */ /* CAL:SOUR:STAT OFF */ /* - The limit line test should fail. */ /* - Close the session. */ /************************************************************/ #include #include #include #include #include #include #include #include #define
Programming Examples Using Limit Lines /* For the analyzers having frequency limits >= 3GHz, prompt the user*/ /* to connect the amplitude reference output to the input*/ printf ("Connect AMPTD REF OUT to the INPUT \n"); printf ("......Press Return to continue \n"); scanf( "%c",&cEnter); /*Externally route the 50MHz Signal*/ viPrintf(viESA,"CAL:SOUR:STAT ON \n"); } } void printResult() { viQueryf(viESA, "CALC:CLIM:FAIL?\n", "%ld", &lLimitTest); if (lLimitTest!=0) { printf ("\n\t..Limit Line Failed.....
Programming Examples Using Limit Lines /*Clear the instrument*/ viClear(viESA); /*Reset the instrument*/ viPrintf(viESA,"*RST\n"); /* Check for the instrument model number and route the 50MHz signal accordingly*/ /*Route50MHzSignal(); /*Display the program heading */ printf("\n\t\t Limit Lines Program \n\n" ); /*Set the Y-Axis Units to dBm */ viPrintf(viESA, "UNIT:POW DBM\n"); /*Set to Frequency Domain Mode*/ viPrintf(viESA,"CALC:LLINE1:CONT:DOM FREQ\n"); /*Delete any current limit line and define the uppe
Programming Examples Using Limit Lines /*Set the analyzer to a center frequency of 50 MHz, span to 20 MHz, and resolution bandwidth to 1 MHz.
Programming Examples Using Limit Lines /*Print the limits line result*/ printResult(); /*Close the session*/ viClose(viESA); viClose(defaultRM); } 140 Chapter 3
Programming Examples Measuring Noise Measuring Noise /************************************************************/ /* Measuring Noise */ /* */ /* This example is for the E44xxB ESA Spectrum Analyzers */ /* and E740xA EMC Analyzers. */ /* */ /* This C programming example does the following. */ /* The SCPI instrument commands used are given as */ /* reference.
Programming Examples Measuring Noise #include #include #include #include #include "visa.
Programming Examples Measuring Noise /*Program Variables*/ ViStatus viStatus = 0; double dMarkAmp =0.
Programming Examples Measuring Noise } /*Set the analyzer in a single sweep mode*/ viPrintf(viESA,"INIT:CONT 0 \n"); /*Trigger a spectrum measurement*/ viPrintf(viESA,"INIT:IMM \n"); /*Set the analyzer in active delta marker mode*/ viPrintf(viESA,"CALC:MARK:MODE DELT \n"); /*Set the marker delta frequency to 2 MHz. This places the active marker two divisions to the right of the input signal.*/ viPrintf(viESA,"CALC:MARK:X 2E+6 \n"); /*Activate the noise marker function.
Programming Examples Entering Amplitude Correction Data Entering Amplitude Correction Data /************************************************************/ /* Entering Amplitude Correction Data */ /* */ /* This example is for the E44xxB ESA Spectrum Analyzers */ /* and E740xA EMC Analyzers. */ /* */ /* This C programming example does the following. */ /* The SCPI instrument commands used are given as */ /* reference.
Programming Examples Entering Amplitude Correction Data ViSession defaultRM, viESA; ViStatus errStatus; ViChar cIdBuff[256]= {0}; char cEnter = 0; int iResult = 0; /*Set the input port to 50MHz 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)) && strncmp( cIdBuff, hpEMC_IDN_E7401A, strlen(hpEMC_IDN_E7401A))); if( iResult == 0 ) {
Programming Examples Entering Amplitude Correction Data /*No of amplitude corrections points */ iNoOfPoints = 4; /* Open a GPIB 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 GPIB device at address 18!\n"); exit(0); } /*Clear the instrument*/ viClear(viESA); /*Reset the instrument*/ viPrintf(viESA,"*RST\n"); /*Display the program heading */ printf("\n\t\t Amplitude Correction Pro
Programming Examples Entering Amplitude Correction Data /*Remove the "," 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 "," from the amplitude correction for analyzing data*/ cToken =strtok(NULL,","); /*Store the array(amplitude) value into a two-dimensional real array*/ aRealArray[lAmpltd=1][lCount] = atof(cToken); while (cToken != NULL) { lC
Programming Examples Status Register–Determine When a Measurement is Done Status Register–Determine When a Measurement is Done /************************************************************/ /* Status Register - Determine when a measurement is done */ /* */ /* This example is for the E44xxB ESA Spectrum Analyzers */ /* and E740xA EMC Analyzers. */ /* */ /* This C programming example does the following. */ /* The SCPI instrument commands used are given as */ /* reference.
Programming Examples Status Register–Determine When a Measurement is Done /* SENS:AVER:STAT ON */ /* - Trigger a measurement, and set OPC bit when done */ /* INIT:IMM */ /* *OPC */ /* - Wait for the SRQ */ /* - When an interrupt occurs, poll all instruments */ /* - Report the nature of the interrupt on the ESA analyzer */ /* - Clear the status register enable */ /* *SRE 0 */ /* - Clear the status byte of the ESA */ /* *CLS */ /* - Close the session */ /******************************************************
Programming Examples Status Register–Determine When a Measurement is Done printf ("\t\nWaiting for an SRQ to be generated ..."); for (lCount =0;(lCount<10) && (iSrqOccurred ==0); lCount++) { long lCount2 =0; printf(".
Programming Examples Status Register–Determine When a Measurement is Done /* Make sure it is an SRQ event, ignore if stray event*/ if (eventType!=VI_EVENT_SERVICE_REQ) { printf ("\n Stray event type0x%1x\n",eventType); /*Return successfully*/ return VI_SUCCESS; } /* When an interrupt occurs,determine which device generated the interrupt (if an instrument other than the ESA generates the interrupt, simply report "Instrument at GPIB Address xxx Has Generated an Interrupt").
Programming Examples Status Register–Determine When a Measurement is Done printf("Could not open a session to GPIB device at address 18!\n"); exit(0); } /*Clear the instrument*/ viClear(viESA); /*Reset the instrument*/ viPrintf(viESA,"*RST\n"); /*Clear the status byte of the instrument*/ viPrintf(viESA,"*CLS\n"); /*Display the program heading */ printf("\n\t Status Register - Determine When a Measurement is Done \n\n" ); /*Put the analyzer in a single sweep*/ viPrintf(viESA,"INIT:CONT 0 \n"); /* Check for t
Programming Examples Status Register–Determine When a Measurement is Done /*install the handler and enable it */ viInstallHandler(viESA, VI_EVENT_SERVICE_REQ, mySrqHdlr,iAddress); viEnableEvent(viESA, VI_EVENT_SERVICE_REQ,VI_HNDLR,VI_NULL); /*Send an undefined command to the device*/ viPrintf(viESA,"IDN\n"); /*Wait for SRQ */ WaitForSRQ(); /* Pause 5 seconds to observe error message displayed on ESA*/ Sleep(5000); /*Averaging the successive measurements, Set video averaging to 80 sweeps, /*Turn the avarage
Programming Examples Determine if an Error has Occurred Determine if an Error has Occurred /************************************************************/ /* Determine if an error has occurred */ /* */ /* This example is for the E44xxB ESA Spectrum Analyzers */ /* and E740xA EMC Analyzers. */ /* */ /* This C programming example does the following. */ /* The SCPI instrument commands used are given as */ /* reference.
Programming Examples Determine if an Error has Occurred /* STAT:QUES:INT:ENAB 0 */ /* *CLS */ /* - Continue monitoring for an interrupt */ /* - Close the session */ /************************************************************/ #include #include #include #include #include #include #include #include "visa.
Programming Examples Determine if an Error has Occurred } printf("\n"); } /*Set the input port to 50MHz 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)) && strncmp( cIdBuff, hpEMC_IDN_E7401A, strlen(hpEMC_IDN_E7401A))); if( iResult == 0 ) { /*Set the input port to the 50MHz amplitude reference for the models*/ /*E4401B, E4411B an
Programming Examples Determine if an Error has Occurred /* When an interrupt occurs, determine which device generated the interrupt (if an instrument other than the ESA generates the interrupt, simply report "Instrument at GPIB Address xxx Has Generated an Interrupt").*/ printf ("\n SRQ Event Occurred!\n"); printf ("\n ...
Programming Examples Determine if an Error has Occurred } /*Clear the instrument*/ viClear(viESA); /*Reset the instrument*/ viPrintf(viESA,"*RST\n"); /*Clear the status byte of the instrument*/ viPrintf(viESA,"*CLS\n"); /*Display the program heading */ printf("\n\t\t Status register - Determine if an Error has Occurred\n\n" ); /* Check for the instrument model number and route the 50MHz-signal accordingly*/ Route50MHzSignal(); /*Put the analyzer in single sweep*/ viPrintf(viESA,"INIT:CONT 0 \n"); /*Set the
Programming Examples Determine if an Error has Occurred viPrintf(viESA,"INIT:CONT 1 \n"); /*Manually couple sweeptime to 5ms. reduce resolution BW to 30 KHz. "Meas Uncal" should be displayed on the screen, and an interrupt should be generated.
Programming Examples Measuring Harmonic Distortion (GPIB) Measuring Harmonic Distortion (GPIB) /************************************************************/ /* Measuring Harmonic Distortion (GPIB) */ /* */ /* This example is for the E44xxB ESA Spectrum Analyzers */ /* and E740xA EMC Analyzers. */ /* */ /* This C programming example does the following. */ /* The SCPI instrument commands used are given as */ /* reference.
Programming Examples Measuring Harmonic Distortion (GPIB) /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* - Reset VISA timeout to 3 seconds */ - Set units to dBm */ UNIT:POW DBM */ - Take a sweep and wait for sweep completion */ INIT:IMM; */ *OPC? */ - Perform the peak search */ CALC:MARK:MAX */ - Read the marker amplitude,this is the fundamental Level*/ CALC:MARK:Y? */ - Change the amplitude units to volts */ UNIT:P
Programming Examples Measuring Harmonic Distortion (GPIB) /* Query, read the marker amplitude in volts */ /* CALC:MARK:Y? */ /* Change the amplitude units to dBm and read the */ /* marker amplitude.
Programming Examples Measuring Harmonic Distortion (GPIB) } else { /* For the analyzers having frequency limits >= 3GHz, prompt the user*/ /* to connect the amplitude reference output to the input*/ printf ("Connect AMPTD REF OUT to the INPUT \n"); printf ("......
Programming Examples Measuring Harmonic Distortion (GPIB) /* Open a GPIB 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 GPIB device at address 18!\n"); exit(0); } /*Clear the instrument*/ viClear(viESA); /*Reset the instrument*/ viPrintf(viESA,"*RST\n"); /*Display the program heading */ printf("\n\t\t Harmonic Distortion Program \n\n" ); /* Check for the instrument model number an
Programming Examples Measuring Harmonic Distortion (GPIB) viPrintf(viESA,"INIT:IMM;*WAI\n"); /*Perform a peak search */ viPrintf(viESA,"CALC:MARK:MAX \n"); /*increase timeout to 60 sec*/ viSetAttribute(viESA,VI_ATTR_TMO_VALUE,60000); /*Perform activate signal track */ viPrintf(viESA,"CALC:MARK:TRCK:STAT ON \n"); /*Take a sweep and wait for the sweep completion*/ TakeSweep(); /*Perform narrow span and wait */ viPrintf(viESA,"SENS:FREQ:SPAN 10e4 \n"); /*Take a sweep and wait for the sweep completion*/ TakeSw
Programming Examples Measuring Harmonic Distortion (GPIB) /*Measure each harmonic amplitude as follows: */ for ( lNum=2;lNum<=lMaxHarmonic;lNum++) { /*Measuring the Harmonic No#[%d] message */ printf("\n\t Measuring the Harmonic No [%d] \n",lNum ); /*Set the span to 20 MHz*/ viPrintf(viESA,"SENS:FREQ:SPAN 20 MHZ \n"); /*Set the center frequency to the nominal harmonic frequency*/ dHarmFreq = lNum*dFundamental; viPrintf(viESA,"SENS:FREQ:CENT %lf HZ \n;",dHarmFreq); /*Take a sweep and wait for the sweep comp
Programming Examples Measuring Harmonic Distortion (GPIB) viQueryf(viESA,"CALC:MARK:Y?\n","%1f", &fHarmV[lNum]); /*Change the amplitude units to DBM viPrintf(viESA,"UNIT:POW DBM\n"); */ /* Read the marker amplitude */ viQueryf(viESA,"CALC:MARK:Y?\n","%1f", &fHarmDbm[lNum]); } /*Sum the square of each element in the fHarmV array.
Programming Examples Measuring Harmonic Distortion (RS-232) Measuring Harmonic Distortion (RS-232) /************************************************************/ /* Measuring Harmonic Distortion (RS-232) */ /* */ /* This example is for the E44xxB ESA Spectrum Analyzers */ /* and E740xA EMC Analyzers. */ /* */ /* This C programming example does the following. */ /* The SCPI instrument commands used are given as */ /* reference.
Programming Examples Measuring Harmonic Distortion (RS-232) /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* /* - Reset VISA timeout to 3 seconds */ - Set units to dBm */ UNIT:POW DBM */ - Take a sweep and wait for sweep completion */ INIT:IMM; */ *OPC? */ - Perform the peak search */ CALC:MARK:MAX */ - Read the marker amplitude,this is the fundamental Level*/ CALC:MARK:Y? */ - Change the amplitude units to volts */ UNIT
Programming Examples Measuring Harmonic Distortion (RS-232) /* Query, read the marker amplitude in volts */ /* CALC:MARK:Y? */ /* Change the amplitude units to dBm and read the */ /* marker amplitude.
Programming Examples Measuring Harmonic Distortion (RS-232) } else { /* For the analyzers having frequency limits >= 3GHz, prompt the user*/ /* to connect the amplitude reference output to the input*/ printf ("Connect AMPTD REF OUT to the INPUT \n"); printf ("......
Programming Examples Measuring Harmonic Distortion (RS-232) dFundamental =50.
Programming Examples Measuring Harmonic Distortion (RS-232) viPrintf(viESA,"CALC:MARK:SET:RLEV\n"); /*Trigger a sweep, wait for sweep completion*/ viPrintf(viESA,"INIT:IMM;*WAI\n"); /*Perform a peak search */ viPrintf(viESA,"CALC:MARK:MAX\n"); /*Increase timeout to 60 sec*/ viSetAttribute(viESA,VI_ATTR_TMO_VALUE,60000); /*Perform activate signal track */ viPrintf(viESA,"CALC:MARK:TRCK:STAT ON\n"); /*Take a sweep and wait for the sweep completion*/ TakeSweep(); /*Perform narrow span and wait */ viPrintf(viE
Programming Examples Measuring Harmonic Distortion (RS-232) /*Read the marker frequency.
Programming Examples Measuring Harmonic Distortion (RS-232) /*Query and read the marker amplitude in Volts*/ /*Store the result in the fHarmV array.
Programming Examples Making Faster Measurements (multiple measurements) Making Faster Measurements (multiple measurements) /************************************************************/ /* Average.c Agilent Technologies 1999 */ /* */ /* This C programming example does the following: */ /* Performs Power Averaging of Multiple ESA Measurements */ /* and Writes the Result back to a Trace for display */ /* */ /* The required SCPI instrument commands are given as */ /* reference.
Programming Examples Making Faster Measurements (multiple measurements) /* FORM:DAT INT,32 */ /* - Select appropriate byte order (Intel) */ /* FORM:BORD SWAP */ /* - Repeat the following the requested number of times: */ /* - Trigger a measurement and wait for completion */ /* INIT:*OPC? */ /* - Read the resulting measurement trace */ /* TRAC:DATA? TRACE1 */ /* - Compute running averaged power at all trace points */ /* - Display measurement statistics */ /* - Write averaged data to second trace display */
Programming Examples Making Faster Measurements (multiple measurements) */ int iNumTraces = NUM_TRACES,/* number of traces to average */ iRbw = RBW, /* resolution bandwidth iNumPoints = NUM_POINTS,/* actual number of trace points per sweep */ iSpan = SPAN, /* Analyzer Frequency Span in MHz iCenter = CENTER; /* Analyzer Center frequency in MHz */ */ */ int iResult =0; unsigned long lRetCount; */ /* the number of bytes transferred in one trace record double dDelta, dTimePer, dPower; struct timeb start_ti
Programming Examples Making Faster Measurements (multiple measurements) iHeaderLength = 3; /* iArrayLength >0 plus increment for "#" and "n" */ while ( (iArrayLength = (iArrayLength / 10)) > 0 ) iHeaderLength++; } { return(iHeaderLength); } /******************* prepare ESA for measurement ************************/ void setup() { viPrintf(viESA, ":SENS:FREQ:CENT %i MHz\n", iCenter); viPrintf(viESA,":SENS:FREQ:SPAN %i MHZ\n", iSpan); viPrintf(viESA, ":SENS:BAND %i KHZ\n", iRbw); /* use the sampling dete
Programming Examples Making Faster Measurements (multiple measurements) viPrintf(viESA,":DISP:WIND:TRAC:Y:RLEV -25 DBM\n"); viPrintf(viESA,"CAL:SOUR:STAT ON \n"); } else { /* For the analyzers having frequency limits >= 3GHz, prompt the user*/ /* to connect the amplitude reference output to the input*/ printf ("Connect AMPTD REF OUT to the INPUT \n"); printf ("......
Programming Examples Making Faster Measurements (multiple measurements) /* trace data must point to an integer array of size NUM_POINTS memcpy(&cOutBuffer[strlen(cScpiCommand)], ipTraceData, iArrayLength); memcpy(&cOutBuffer, cScpiCommand, strlen(cScpiCommand)); /* Add a to the end of the data, This isn’t necessary /* if the GPIB card has been configured to assert EOI when the last /* character is sent, but it ensures a valid iTermLength is provided.
Programming Examples Making Faster Measurements (multiple measurements) dPower = exp( dLogTen * (iArray[iLoop]/10000.0)); if(i > 0) { dPwrAvgArray[iLoop] += ((dPower - dPwrAvgArray[iLoop])/(i+1)); } else { dPwrAvgArray[iLoop] = dPower; } } } /* end of event loop */ /* stop the timer ftime( &stop_time ); */ /* Calculate elapsed time if (start_time.millitm > stop_time.millitm) { stop_time.millitm += 1000; stop_time.time--; } elapsed_time.millitm = stop_time.millitm - start_time.millitm; elapsed_time.
Programming Examples Making Faster Measurements (multiple measurements) printf("Could not open a session to GPIB device at address 18!\n"); exit(0); } /*Clear the Instrument viClear(viESA); */ /* go to known instrument state with cleared status byte viPrintf(viESA, ":SYST:PRES:TYPE FACT;*RST\n"); */ /* measure, transfer and calculate power average of multiple traces average(); */ /* convert average power array back to integer array for (iLoop = 0; iLoop < iNumPoints; iLoop++) { dPower = 10.
4 Programming Command Cross-References 185
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. These commands, and the SCPI commands in the subsection or subsystem, are documented in Chapter 5, “Language Reference,” on page 189.
Programming Command Cross-References Functional Index to SCPI Subsection Function Category SCPI Subsection or Subsystem INPUT and OUTPUT :INPut :OUTPut [:SENSe]:AVERage [:SENSe]:BANDwidth [:SENSe]:CORRection [:SENSe]:DEMod [:SENSe]:DETector [:SENSe]:POWer [:SENSe]:SWEep :STATus:QUEStionable :UNIT INTERNAL ATTENUATION and SOURCE :OUTPut [:SENSe]:POWer :SOURce LIMIT LINES :CALCulate:LLINe :MMEMory :TRACe MARKER :CALCulate:MARKer MEASURE :EMI :INITiate :MEASure [:SENSe]:AVERage [:SENSe]:POWer [:SEN
Programming Command Cross-References Functional Index to SCPI Subsection Function Category SCPI Subsection or Subsystem SYSTEM INFORMATION *CLS *ESE *IDN? *ESR? *LRN? :STATus :STATus:QUEStionable :SYSTem TRACE :DISPlay :FORMat [:SENSe]:EBWidth :TRACe TRACE MATH :CALCulate:NTData :DISPlay :TRACe TRIGGER *TRG :ABORt :INITiate :TRIGger 188 Chapter 4
5 Language Reference This chapter contains SCPI (Standard Commands for Programmable Instruments) programming commands for the Agilent EMC analyzers.
Language Reference The first few pages of this chapter contain common commands specified in IEEE Standard 488.2-1992, IEEE Standard Codes, Formats, Protocols and Common Commands for Use with ANSI/IEEE Std 488.1-1987. New York, NY, 1992. Following these commands, the Agilent EMC analyzers SCPI commands are listed. NOTE Refer to Chapter 2 , “Status Registers” which supplements the information presented in this chapter.
Language Reference SCPI Sections and Subsections SCPI Sections and Subsections SCPI commands related to major functional areas (such as calculate or) are grouped into blocks, or subsystems. Some of these subsystems are further divided into subsections (such as calculate/marker, or sense/harmonics). An instrument model is then created to represent the way in which instrument functionality is viewed and categorized by SCPI.
Language Reference SCPI Sections and Subsections SCPI Subsystem/Subsection Page :READ (see :MEASure) page 254 [:SENSe]: page 268 [:SENSe]:AVERage page 269 [:SENSe]:BANDwidth page 272 [:SENSe]:CORRection page 276 [:SENSe]:DEMod page 280 [:SENSe]:DETector page 282 [:SENSe]:EMI page 287 [:SENSe]:FREQuency page 290 [:SENSe]:POWer page 295 [:SENSe]:SWEep page 298 :SOURce page 303 :STATus page 308 :STATus:QUEStionable page 310 :SYSTem page 319 :TRACe page 328 :TRIGger page 334
Language Reference IEEE Common Commands IEEE Common Commands These commands are specified in IEEE Standard 488.2-1992, IEEE Standard Codes, Formats, Protocols and Common Commands for Use with ANSI/IEEE Std 488.1-1987. New York, NY, 1992. Calibration Query *CAL? Performs a full alignment and returns a number indicating the success of the alignment. A zero is returned if the alignment is successful.
Language Reference IEEE Common Commands Query returns the state of the standard event status enable register. Range: Integer, 0 to 255 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.
Language Reference IEEE Common Commands The number 4 (P in the preceding query response format) means there are 4 numbers that make up the size of the data that follows. In this example, 2031 bytes will follow the number 4 (42031). 2031 and 2016 (QQQ and MMM in the preceding query response format) represent data size in bytes.
Language Reference IEEE Common Commands Front Panel Access: File, Recall State Reset *RST This command presets the instrument to a factory defined condition that is appropriate for remote programming operation. *RST is equivalent to performing the two commands :SYSTem:PRESet and *CLS. This command always performs a factory preset. NOTE The preset performed by *RST is always a factory preset. That is, the same preset performed by :SYSTem:PRESet when :SYSTem:PRESet:TYPE is set to FACTory.
Language Reference IEEE Common Commands Trigger *TRG This command triggers the instrument. Use the :TRIGger:SEQuence:SOURce command to select the trigger source. Remarks: See also the :INITiate:IMMediate command Self Test Query *TST? This query is used by some instruments for a self test. For Agilent ESA analyzers, *TST? always returns 0; no tests are performed.
Language Reference ABORt Subsystem ABORt Subsystem Abort :ABORt Restarts any sweep or measurement in progress and resets the sweep or trigger system. A measurement refers to any of the measurements found in the MEASURE menu. If :INITiate:CONTinuous is off (single measure), then :INITiate:IMMediate will start a new single measurement. If :INITiate:CONTinuous is on (continuous measure), a new continuous measurement begins immediately. The INITiate and TRIGger subsystems contain additional related commands.
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 :CALCulate:BWIDth|BANDwidth:NDB? Selects the power level, below the peak of the signal, at which the signal bandwidth will be measured by the markers.
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: Front Panel Access: Off When this command is turned on, the bandwidth measurement function (N dB Points) is associated with the active marker.
Language Reference CALCulate:EMI:SLISt Subsection CALCulate:EMI:SLISt Subsection Add Measure to List :CALCulate:EMI:SLISt:ADD:MEASured Adds results of most recent measure to marker list. Factory Preset and *RST: Not affected by preset Front Panel Access: MEASURE, Meas to List Add Marker to List :CALCulate:EMI:SLISt:ADD:MARKer [1]|2|3|4 Adds marker frequency and amplitude to signal list.
Language Reference CALCulate:EMI:SLISt Subsection The ADD command always appends signals to the end of the signal list.
Language Reference CALCulate:EMI:SLISt Subsection If a mark were desired in the above example, the command would be: CALCulate:EMI:SLISt:ADD “1e6,,,,,,1,,,,This is my comment” The Mark and detector fields allow human readable input forms: CALCulate:EMI:SLISt:ADD “1e6,,,,,,On,,,,This is my comment” NOTE If an amplitude value is provided in the format string, the associated detector flag is automatically turned on unless explicitly turned off in the same data format string.
Language Reference CALCulate:EMI:SLISt Subsection Uncertainty ADD – The uncertainty for a signal may be entered for a signal. If not provided the default value for the instrument is applied to the signal. The uncertainty may be entered in Hz or engineering notation. FETCH – The uncertainly is returned in Hz. Total Correction ADD – The total correction factor may be entered in integer or engineering format. The units are mdB. FETCH – The total correction factor is returned in mdB.
Language Reference CALCulate:EMI:SLISt Subsection Set Comment for Signals :CALCulate:EMI:SLISt:COMMent:ALL Set comment for all signals. Factory Preset and *RST: Remarks: Not affected by preset The comment is a string consisting of a single line of text with a maximum length of text characters of 31. Characters in excess of 31 are truncated. Set Comment for Current Signal :CALCulate:EMI:SLISt:COMMent:CURRent Set comment for current signal.
Language Reference CALCulate:EMI:SLISt Subsection Turn Signal List On or Off :CALCulate:EMI:SLISt:DISPlay[:STATe] OFF|ON|0|1 :CALCulate:EMI:SLISt:DISPlay:STATe? Sets the state of the signal list, On or Off. Factory Preset and *RST: Remarks: Front Panel Access: Not affected by preset Once the state function is selected, the selected state is persistent. Persistent means that it retains the setting previously selected, even through a power cycle.
Language Reference CALCulate:EMI:SLISt Subsection CURRent - current signal. TOEnd - from the current signal to the end of the list. DUPLicates - all duplicate signals. LOWer- all lower amplitude duplicates. COMPlement - complement signals. Factory Preset and *RST: Not affected by preset Front Panel Access: MEASURE, More, Signal List, Signal Marking, Mark Signal Position Cursor to Signal List :CALCulate:EMI:SLISt:SELect FIRSt|LAST|NEXT|PREVious| Position cursor to signal in list.
Language Reference CALCulate:EMI:SLISt Subsection Specify Signal List Display Parameters :CALCulate:EMI:SLISt:View COMMent|PEAK|QPEak|AVERage :CALCulate:EMI:SLISt:View? Specifies the signal display parameters given by the following: COMM - Displays the comment for each of the signals in the list. PEAK - Displays the difference values, in dB, from the measured peak value and the limit lines. QPEak - Displays the difference values, in dB, from the measured quasi-peak value and the limit lines.
Language Reference CALCulate:LLINe Subsection CALCulate:LLINe Subsection Limit lines can be defined for your measurement. You can then have the instrument compare the data to your defined limits and indicate a pass/fail condition. NOTE Refer also to :MMEMory and :TRACe subsystems for more trace and limit line commands. Delete All Correction Sets in Memory :CALCulate:LLINe:ALL:DELete Deletes all correction sets in volatile memory. History: Added with firmware revision A.08.00.
Language Reference CALCulate:LLINe Subsection Factory Preset and *RST: Not affected by preset Remarks: For Amplitude Parameters: Regardless of whether the limit line is based on frequency or sweep time, amplitude parameters in a limit line table represent absolute values or relative values. In fixed, the limit line amplitude values are specified in absolute amplitude and do not depend on the reference level. In relative, the limit line amplitude values are relative to the current reference level.
Language Reference CALCulate:LLINe Subsection Remarks: For TIME, the limit line segments are placed on the spectrum analyzer display with respect to the sweep time setting of the analyzer, with 0 at the left edge of the display. For FREQuency, segments are placed according to the frequency that is specified for each segment.
Language Reference CALCulate:LLINe Subsection –30 GHz to +350 GHz for frequency limits –120 dBm to +100 dBm 0 or 1 Remarks: If two amplitude values are entered for the same frequency, a single vertical line is the result. In this case, if an upper line is chosen, the amplitude of lesser frequency (amplitude 1) is tested. If a lower line is chosen, the amplitude of greater frequency (amplitude 2) is tested.
Language Reference CALCulate:LLINe Subsection Merge Additional Values into the Existing Limit Line :CALCulate:LLINe[1]|2:DATA:MERGe ,,{,,,} Adds the points with the specified values to the current limit line, allowing you to merge limit line data. Up to two amplitude values are allowed for each x value. If too much data is merged, as many points as possible are merged into the existing limit and then an error is reported.
Language Reference CALCulate:LLINe Subsection Test the Data Against the Limit Line :CALCulate:LLINe[1]|2:FAIL? Queries the status of the limit line testing. Returns a 0 if the data passes, and returns a 1 if there is a failure. This query value is valid only if margin or limit test is On. Use the command :CALCulate:LLINe[1]|2:STATe OFF|ON|0|1 to activate limit line testing.
Language Reference CALCulate:LLINe Subsection Control Limit Line Testing :CALCulate:LLINe[1]|2:STATe OFF|ON|0|1 :CALCulate:LLINe[1]|2:STATe? Turns limit line testing on/off. The limit and margin will only be tested if they are displayed. Use :CALCulate:LLINe[1]|2:DISPlay to turn on the display of limit lines, and :CALCulate:LLINe[1]|2:MARGin:STATe to turn on the display of margins. If margin and limit display are both turned off, limit test is automatically turned off.
Language Reference CALCulate:MARKer Subsection 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.
Language Reference CALCulate:MARKer Subsection Frequency Counter Marker Automatic Resolution :CALCulate:MARKer:FCOunt:RESolution:AUTO OFF|ON|0|1 :CALCulate:MARKer:FCOunt:RESolution:AUTO? Sets the resolution of the marker frequency counter so it is automatically coupled to the frequency span, generating the fastest accurate count.
Language Reference CALCulate:MARKer Subsection BPOWer is the power integrated within the bandwidth NOISe is a noise measurement OFF turns off all functions Remarks: Front Panel Access: When a measurement under the front panel MEASURE key is started, this command is turned off. If this command is turned on when any of the MEASURE key measurements are in progress, that measurement will be stopped.
Language Reference CALCulate:MARKer Subsection Front Panel Access: Peak Search (or Search), Next Peak Marker Peak (Maximum) Right Search :CALCulate:MARKer[1]|2|3|4:MAXimum:RIGHt Places the selected marker on the next highest signal peak to the right of the current marked peak. Remarks: Front Panel Access: The marker will be placed at the highest peak that rises and falls by at least the peak excursion above the peak threshold.
Language Reference CALCulate:MARKer Subsection Front Panel Access: Marker, Normal Marker, Delta Marker, Delta Pair Ref Delta Marker, Span Pair Span Center Define Peak Excursion :CALCulate:MARKer:PEAK:EXCursion :CALCulate:MARKer:PEAK:EXCursion? Specifies the minimum signal excursion above the threshold for the internal peak identification routine to recognize a signal as a peak. This applies to all traces and all windows.
Language Reference CALCulate:MARKer Subsection Access: Peak Search (or Search), Search Criteria, Peak Search Type, Max Value|Excursion & Threshold Define Peak Threshold :CALCulate:MARKer:PEAK:THReshold :CALCulate:MARKer:PEAK:THReshold? Specifies the minimum signal level for the analyzers internal peak identification routine to recognize a signal as a peak. This applies to all traces and all windows.
Language Reference CALCulate:MARKer Subsection Set Span to the Marker Value :CALCulate:MARKer[1]|2|3|4[:SET]:SPAN Sets the span to the value of the specified marker frequency. The specified marker must be in delta mode. Select the delta marker mode with CALCulate:MARKer[1]|2|3|4:MODE DELTa. This command is not available in zero span.
Language Reference CALCulate:MARKer Subsection Turns the selected marker on or off. Front Panel Access: Marker, Off Marker Table On/Off :CALCulate:MARKer:TABLe:STATe OFF|ON|0|1 :CALCulate:MARKer:TABLe:STATe? Turns the marker table on or off Front Panel Access: Marker, Marker Table On Off Marker to Trace :CALCulate:MARKer[1]|2|3|4:TRACe :CALCulate:MARKer[1]|2|3|4:TRACe? Assigns the specified marker to the designated trace 1, 2, or 3.
Language Reference CALCulate:MARKer Subsection Factory Preset and *RST: Remarks: Front Panel Access: Off When a measurement under the front panel MEASURE key is started, this command is turned off. If this command is turned on when any of the MEASURE key measurements are in progress, that measurement will be stopped.
Language Reference CALCulate:MARKer Subsection Front Panel Access: Marker Span Markers Center Frequency X Position :CALCulate:MARKer[1]|2|3|4:X:POSition:CENTer :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. Use :CALCulate:MARKer:MODE SPAN to select span markers. The query returns the current X position center frequency of the designated markers.
Language Reference CALCulate:MARKer Subsection Delta Pair Markers Stop Frequency X Position :CALCulate:MARKer[1]|2|3|4:X:POSition:STOP :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. Use :CALCulate:MARKer:MODE BAND to select band markers. The query returns the current X position stop frequency of the designated marker. Range: Refer to the [:SENSe]:SWEep:POINts command.
Language Reference CALCulate:MARKer Subsection Default Unit: Front Panel Access: Matches the units of the trace on which the markers are positioned. Marker, , Span Pair Delta Pair Markers Start Frequency X Value :CALCulate:MARKer[1]|2|3|4:X:STARt :CALCulate:MARKer[1]|2|3|4:X:STARt? Position the start (reference) frequency of the designated band-type marker pair, at the specified trace X value. The value is in the X-axis units (which is often frequency or time).
Language Reference CALCulate:NTData Subsection CALCulate:NTData Subsection Normalize the Trace Data :CALCulate:NTData[:STATe] OFF|ON|0|1 :CALCulate:NTData[:STATe]? One sweep of trace data is copied to trace 3 (firmware version greater then A.03.03, NRML in firmware version less than or equal to A.03.03), which is used as the reference trace. Then for all subsequent trace sweeps, display trace 1 = data collected into trace 1 – data in trace 3 (firmware version greater than A.03.
Language Reference CALibration Subsystem CALibration Subsystem These commands control the self-alignment and self-diagnostic processes. Align All Instrument Assemblies :CALibration[:ALL] :CALibration[:ALL]? Performs an alignment of all the assemblies within the instrument, except for the tracking generator (Option 1DN), if installed (except Agilent model E7401A).
Language Reference CALibration Subsystem Automatic Alignment :CALibration:AUTO OFF|ON|0|1 :CALibration:AUTO? Turns the automatic alignment on and off. This is run continuously, at the completion of each sweep. Factory Preset and *RST: On at power-up Front Panel Access: System, Alignments, Auto Align, All System, Alignments, Auto Align, All but RF System, Alignments, Auto Align, Off Return to the Default Alignment Data :CALibration:DATA:DEFault Initializes the alignment data to the factory defaults.
Language Reference CALibration Subsystem Coarse Adjust the Frequency Reference :CALibration:FREQuency:REFerence:COARse :CALibration:FREQuency:REFerence:COARse? Allows coarse adjustment of the internal 10 MHz reference oscillator timebase of the analyzer. NOTE :CALibration:ALL is required after COARse is set.
Language Reference CALibration Subsystem Before executing this command, connect a cable between front panel connector AMPTD REF OUT and the INPUT connector for all Agilent EMC analyzers except Agilent model E7401A. If the cable is not connected, the alignment will fail. Front Panel Access: System, Alignments, Align Now, RF Select the Source State for Calibration :CALibration:SOURce:STATe OFF|ON|0|1 :CALibration:SOURce:STATe? Controls the state of the 50 MHz alignment signal.
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 :COUPle? 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.
Language Reference COUPle Subsystem Sweep points Phase noise optimization Phase Noise Optimization Span NOTE (Firmware revision A.08.00 or greater) Although marker count, gate time, and marker trace have auto settings, they are not affected by Couple.
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 :DISPlay:ANGLe? Changes the viewing angle for better viewing in different environments. Factory Preset and *RST: The factory default is 4.
Language Reference DISPlay Subsystem Factory Preset and *RST: Front Panel Access: The factory default is On. This parameter is persistent, which means that it retains the setting previously selected, even through a power cycle. System, Time/Date, Time/Date On Off Display Annotation Title Data :DISPlay:ANNotation:TITLe:DATA :DISPlay:ANNotation:TITLe:DATA? Enters the text that will be displayed in the user title area of the display.
Language Reference DISPlay Subsystem Window Annotation :DISPlay:WINDow:ANNotation[:ALL] OFF|ON|0|1 :DISPlay:WINDow:ANNotation[:ALL]? Turns the screen annotation on or off for all windows. Factory Preset and *RST: On Front Panel Access: Display, Preferences, Annotation On Off 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.
Language Reference DISPlay Subsystem Display Line Amplitude :DISPlay:WINDow:TRACe:Y:DLINe :DISPlay:WINDow:TRACe:Y:DLINe? Defines the level of the display line, in the active amplitude units if no units are specified. Factory Preset and *RST: 2.
Language Reference DISPlay Subsystem is not set above the reference level and the reference is set so that the signal is within the display range. When in fixed mode the measurement has approximately 70 dB of display range. Front Panel Access: AMPLITUDE/Y Scale, IF Gain Auto Fixed (front panel access is available with firmware revision A.06.00 and later).
Language Reference DISPlay Subsystem Trace Y-Axis Amplitude Scaling :DISPlay:WINDow:TRACe:Y[:SCALe]:PDIVision :DISPlay:WINDow:TRACe:Y[:SCALe]:PDIVision? Sets the per-division display scaling for the y-axis when y-axis units are set to amplitude units. Factory Preset and *RST: 10 dB Range: 0.1 to 20.
Language Reference DISPlay Subsystem –42.9 to 162 dBµV with zero reference level offset and max mixer level = 97 dBµV. Default Unit: Current active units Remarks: The input attenuator setting may be affected. The minimum displayed value of reference level is –327.6 dBm, and the maximum displayed value is 327.6 dBm.
Language Reference DISPlay Subsystem 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? Specifies the vertical graticule divisions as log or linear units.
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.
Language Reference FORMat Subsystem Table 5-2 Corrected Trace Data Types :TRACe:DATA? Data Type Result ASCII Amplitude Units INT,32 (fastest) Internal Units REAL,32 Amplitude Units REAL,64 Amplitude Units Table 5-3 Uncorrected Trace Data Types :TRACe:DATA? RAWTRACE Data Type Result INT,32 Uncorrected ADC Values UINT,16 (fastest) Uncorrected ADC Values ASCii - Amplitude values are in ASCII, in amplitude units, separated by commas.
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: ESC (with print in progress) Printer Type :HCOPy:DEVice:TYPE AUTO|CUSTom|NONE :HCOPy:DEVice:TYPE? Sets up the printer by selecting printer type.
Language Reference HCOPy Subsystem Remarks: This parameter retains the setting previously selected, even through a power cycle. Key Access: Print Select a Signal List to Include in a Report :HCOPy:EMI:ITEM:SLISt:PPEak|QPEak|AVERage|LLINe1|LLINe2| CORRection|UNCertainty|COMMent:STATe ON|OFF|1|0 :HCOPy:EMI:ITEM:SLISt:PPEak|QPEak|AVERage|LLINe1|LLINe2| CORRection|UNCertainty|COMMent:STATe? Selection of signal list columns to include in the report.
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 Orientation :HCOPy:PAGE:ORIentation LANDscape|PORTrait :HCOPy:PAGE:ORIentation? Specifies the orientation of the print.
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 Printed Page Size :HCOPy:PAGE:SIZE A|B|A3|A4|LETTer|LEGal|EXECutive|LEDGer :HCOPy:PAGE:SIZE? Formats the print image for the selected page size. Page size “A” is letter, and page size “B” is ledger.
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.
Language Reference INITiate Subsystem 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 measurement. A “measurement” refers to any function under the MEASURE key. Remarks: See also the *TRG command Use the :TRIGer[:SEQuence]:SOURce EXTernal command to select the external trigger. The instrument must be in the single measurement mode.
Language Reference INITiate Subsystem Front Panel Access: Meas Control, Pause Restart the Measurement :INITiate:RESTart This command applies to measurements found in the MEASURE menu. Use this command to restart the present measurement from the “idle” state, regardless of its operating state. It is equivalent to :INITiate[:IMMediate] for single measurement mode, or :ABORt for continuous measurement mode.
Language Reference INPut Subsystem INPut Subsystem The INPut subsystem controls the characteristics of analyzer input ports. Input Port Coupling :INPut:COUPling AC|DC :INPut:COUPling? Selects ac or dc coupling for the front panel INPUT port. A blocking capacitor is switched in for the ac mode. CAUTION Instrument damage can occur if there is a dc voltage present at the INPUT and dc coupling is selected.
Language Reference INPut Subsystem Clear the Input Overload :INPut:PROTection:CLEar Resets the overload protection circuitry for the input connector. There is no query form of this command. NOTE This command is valid only for Agilent EMC model E7401A. 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.
Language Reference MEASure Group of Commands MEASure Group of Commands This group includes commands used to make measurements and return results. The different commands can be used to provide fine control of the overall measurement process. Most measurements should be done in single measurement mode, rather than doing the measurement continuously. If you need to change some of the measurement parameters from the factory default settings, set up the measurement with the CONFigure command.
Language Reference MEASure Group of Commands Fetch Commands :FETCh:[n]? This command puts valid data into the output buffer, but does not initiate data acquisition. Use the INITiate[:IMMediate] command to acquire data before you use the FETCh command. You can only fetch results from the measurement that is currently selected.
Language Reference MEASure Group of Commands Figure 5-1 Measurement Group of Commands If you need to repeatedly make a given measurement with settings other than the factory defaults, you can use the commands in the SENSe: and CALCulate: subsystems to set up the measurement. Then use the READ? command or INITiate and FETCh? commands, to initiate the measurement and query results.
Language Reference MEASure Group of Commands Measurement settings persist if you initiate a different measurement and then return to a previous one. Use READ:? if you want to use those persistent settings. If you want to go back to the default settings, use MEASure:?. Get Measurement Results :FETCH? Returns the results of the last measurement. Factory Preset and *RST: Remarks: Not affected by *RST or Preset Only returns data if a measurement has been made.
Language Reference MEASure Group of Commands Measure at Marker :CONFigure:EMI:MARKer[1|2|3|4]? :MEASure:EMI:MARKer[1|2|3|4]? :MEASure:MARKer? Measures at selected marker. Loads the internal buffer. Factory Preset and *RST: Not affected by *RST or Preset. Key Access: MEASURE, Meas at Marker Measure at Marker and Add to List :MEASure:EMI:MARKer[1|2|3|4]ADD? Measures at selected marker and adds to signal list.
Language Reference MEASure Group of Commands Measure Peaks :CONFigure:EMI:PEAKs :MEASure:EMI:PEAKs? Measures all peaks on screen and adds them to the signal list. Factory Preset and *RST: Start Key Access: MEASURE, More, Auto-measure, Start/Abort Remeasure Current Signal :CONFigure:EMI:SLISt[CURRent]|MARKed|ALL :MEASure:EMI:SLISt?[CURRent]MARKed|ALL Remeasures current, marked, or all signals in the signal list.
Language Reference MMEMory Subsystem MMEMory Subsystem The purpose of the MMEMory subsystem is to provide access to mass storage devices such as internal or external disk drives. NOTE Refer also to :CALCulate and :TRACe subsystems for more trace and limit line commands. Agilent EMC analyzers use two types of mass storage devices: • 3.5 inch disk drive (high density, 1.
Language Reference MMEMory Subsystem Front Panel Access: File, Copy Move Data to File :MMEMory:DATA , :MMEMory:DATA? Loads into the memory location . The query returns the contents of the in the format of a definite length block. This command can be used for copying files out of the analyzer over the remote bus. Refer to chapter 3, Programming Examples, for more information. Example: Load “abcd” into C:source.
Language Reference MMEMory Subsystem Load an Instrument State from a File :MMEMory:LOAD:STATe 1, The contents of the state file are loaded into the current instrument state. Example: :MMEM:LOAD:STAT 1,“C:mystate.sta” Remarks: See also commands :MMEMory:LOAD:STATe and :MMEMory:STORe:STATe If the revision of the state being loaded is newer than the revision of the instrument, no state is recalled and an error is reported.
Language Reference MMEMory Subsystem Make a Directory :MMEMory:MDIRectory where “path” is “A:\” or “C:\” Makes a directory or subdirectory in the specified path.
Language Reference MMEMory Subsystem Columna Contents 7 Comment (enclosed in double quotes) 8 Marked/unmarked state (0=unmarked, 1=marked) 9 Uncertainty (MHz) 10 Status word (used internally) 11 Peak delta from limit line 1 12 Peak delta from limit line 2 13 Quasi-peak delta from limit line 1 14 Quasi-peak delta from limit line 2 15 Average delta from limit line 1 16 Average delta from limit line 2 a.
Language Reference MMEMory Subsystem Store a Limit Line in a File :MMEMory:STORe:LIMit LLINE1|LLINE2, Stores the specified limit line to the specified file in memory. Example: :MMEM:STOR:LIM LLINE2,“C:mylimit.lim” Remarks: This command will fail if the already exists. There is no SCPI short form for parameters LLINE1|LLINE2.
Language Reference MMEMory Subsystem Store a Trace in a File :MMEMory:STORe:TRACe
Language Reference OUTPut Subsystem OUTPut Subsystem The OUTPut subsystem controls the characteristics of the tracking generator output port. Refer to the “SOURce Subsystem”, which also contains commands that control the characteristics of the tracking generator. Turn Output On/Off :OUTPut[:STATe] OFF|ON|0|1 :OUTPut[:STATe]? Controls the tracking generator output.
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 and Meas Setup menus may only be used to set parameters of a specific measurement when the measurement is active. Otherwise, an error will occur. You must first select the appropriate measurement using the :CONFigure: command.
Language Reference [:SENSe]:AVERage Subsection [:SENSe]:AVERage Subsection Clear the Current Average [:SENSe]:AVERage:CLEar Re-start the trace averaging function. NOTE Re-start the trace at the beginning of a sweep to obtain valid average data. To do this, remotely abort the sweep and initiate a single sweep. Set the Average Count [:SENSe]:AVERage:COUNt [:SENSe]:AVERage:COUNt? Specifies the number of measurements that are combined.
Language Reference [:SENSe]:AVERage Subsection Turn Automatic Averaging On/Off [:SENSe]:AVERage:TYPE:AUTO OFF|ON|0|1 [:SENSe]:AVERage:TYPE:AUTO? Sets the averaging to be automatically set to the appropriate type for the current measurement setup. Or allows you to manually choose the type of averaging with [:SENSe]:AVERage:TYPE. When AUTO is On: If the Y Axis Scale is not Linear or Log, then average type is Video (Y Axis Scale) Averaging.
Language Reference [:SENSe]:AVERage Subsection Factory Preset and *RST: On History: Added with firmware revision A.08.00. Front Panel Access: BW/Avg, Avg Type, Auto Man Type of Averaging for Measurements [:SENSe]:AVERage:TYPE VIDeo|RMS [:SENSe]:AVERage:TYPE? Successive measurements of data can be combined to average out measurement variations. Detector is set to average and Avg type is set to power (RMS) to measure RMS voltage (avg power).
Language Reference [:SENSe]:BANDwidth Subsection [:SENSe]:BANDwidth Subsection Resolution Bandwidth [:SENSe]:BANDwidth|BWIDth[:RESolution] [:SENSe]:BANDwidth|BWIDth[:RESolution]? Specifies the resolution bandwidth.
Language Reference [:SENSe]:BANDwidth Subsection Video Bandwidth [:SENSe]:BANDwidth|BWIDth:VIDeo [:SENSe]:BANDwidth|BWIDth:VIDeo? Specifies the video bandwidth. Factory Preset and *RST: 300 kHz Range: 1 Hz to 3 MHz. This range is dependent upon the setting of [:SENSe]:BANDwidth|BWIDth[:RESolution] and installed options.
Language Reference [:SENSe]:BANDwidth Subsection Refer to Figure 5-3, which is a flowchart that illustrates VBW and RBW Ratio auto rules. Figure 5-3 Factory Preset and *RST: On History: Added with firmware revision A.08.00.
Language Reference [:SENSe]:BANDwidth Subsection Resolution Bandwidth Type [:SENSe]:BANDwidth:TYPE IMPulse|DB6|DB3 [:SENSe]:BANDwidth:TYPE? Selects the type of 1 MHz resolution bandwidth (RBW) used. FCC regulations specify a 6 dB, 1 MHz resolution bandwidth for measurements greater than 1 GHz. CISPR regulations (1999) specify a 1 MHz impulse resolution bandwidth. Spectrum analyzers use a 3 dB resolution bandwidth.
Language Reference [:SENSe]:CORRection Subsection [:SENSe]:CORRection Subsection Delete All Corrections [:SENSe]:CORRection:CSET:ALL:DELete This command deletes all existing corrections. History: Added with firmware revision A.08.00. Front Panel Access: Amplitude/Y Scale, Corrections, Delete All Corrections Perform Amplitude Correction [:SENSe]:CORRection:CSET:ALL[:STATe] OFF|ON|0|1 [:SENSe]:CORRection:CSET:ALL[:STATe]? Turns On or Off the amplitude corrections.
Language Reference [:SENSe]:CORRection Subsection Default Unit: There are no units on the frequency and amplitude pairs. They must be entered in hertz (Hz) and decibels (dB).
Language Reference [:SENSe]:CORRection Subsection Delete Amplitude Correction [:SENSe]:CORRection:CSET[1]|2|3|4:DELete Deletes the specified correction set. If the set was On, it is turned Off. Front Panel Access: AMPLITUDE/Y Scale, Corrections, Antenna|Cable|Other|User, Delete Correction Set Amplitude Correction Frequency Interpolation [:SENSe]:CORRection:CSET[1]|2|3|4:X:SPACing LINear|LOGarithmic Sets the frequency interpolation to linear or logarithmic for the specified correction set.
Language Reference [:SENSe]:CORRection Subsection Input Impedance Correction [:SENSe]:CORRection:IMPedance[:INPut][:MAGNitude] [:SENSe]:CORRection:IMPedance[:INPut][:MAGNitude]? 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. Factory Preset and *RST: The factory default is the input impedance of the analyzer.
Language Reference [:SENSe]:DEMod Subsection [:SENSe]:DEMod Subsection Type of Demodulation [:SENSe]:DEMod AM|FM [:SENSe]:DEMod? Sets the type of demodulation. Factory Preset and *RST: AM Front Panel Access: Det/Demod, Demod, AM Det/Demod, Demod, FM FM Deviation [:SENSe]:DEMod:FMDeviation [:SENSe]:DEMod:FMDeviation? Sets the total FM frequency deviation for full screen demodulation. Factory Preset and *RST: 100 kHz Range: 5 kHz to 1.
Language Reference [:SENSe]:DEMod Subsection Demodulation Control [:SENSe]:DEMod:STATe OFF|ON|0|1 [:SENSe]:DEMod:STATe? Turns demodulation on or off. Factory Preset and *RST: Off Front Panel Access: Det/Demod, Demod, Off Demod Time [:SENSe]:DEMod:TIME
Language Reference [:SENSe]:DETector Subsection [:SENSe]:DETector Subsection Automatic Detection Type Selected [:SENSe]:DETector:AUTO OFF|ON|0|1 [:SENSe]:DETector:AUTO? Switches automatically to the optimum detection type for typical measurements using the current instrument settings. The detector type is average if any of these are on: Noise marker Band power markers Trace averaging when the Average Type is Power (RMS).
Language Reference [:SENSe]:DETector Subsection Figure 5-4 Auto Rules of Detector Selection Chapter 5 283
Language Reference [:SENSe]:DETector Subsection Factory Preset and *RST: On History: Added with firmware revision A.08.00. Front Panel Access: Det/Demod, Detector Type of Detection [:SENSe]:DETector[:FUNCtion] NEGative|POSitive|SAMPle|AVERage|RMS [:SENSe]:DETector[:FUNCtion]? Specifies the detection mode. For each trace interval (bucket), average detection displays the average of all the samples within the interval.
Language Reference [:SENSe]:DETector Subsection Det/Demod, Detector, Negative Peak Det/Demod, Detector, Average Type of EMI Detector [:SENSe]:DETector[:FUNCtion]: EMI QPEak|AVERage|OFF [:SENSe]:DETector[:FUNCtion]:EMI? Specifies the type of EMI detection mode. Quasi-peak detection displays a weighted, sample-detected amplitude using specific, charge, discharge, and meter time constants as described in CISPR Publication 16. Average detection displays the average value of a sample-detected amplitude.
Language Reference [:SENSe]:DETector Subsection EMI View [:SENSe]:DETector[:FUNCtion]EMI:VIEW POSitive|EMI [:SENSe]:DETector[:FUNCtion]EMI:VIEW? Selects between Quasi-Peak/Average EMI detector mode or Peak detector mode without reranging. When POSitive is selected only the peak detector is used. When EMI is selected, the previously selected EMI detector is used. Factory Preset and *RST: EMI Remarks: This command is not available when the EMI detector is Off.
Language Reference [:SENSe]:EMI Subsection [:SENSe]:EMI Subsection Auto Measure Average On or Off [:SENSe]:EMI:MEASure:DETector:AVERage[STATe] OFF|ON|0|1 [:SENSe]:EMI:MEASure:DETector:AVERage? Sets auto measure On or Off. Factory Preset and *RST: Off Remarks: Determines if the average detector is measured (by auto measure, measure at marker, measure frequency, or remeasure).
Language Reference [:SENSe]:EMI Subsection Setting the Dwell Time for Peak [:SENSe]:EMI:MEASure:DETector:PPEak:DWELl
Language Reference [:SENSe]:EMI Subsection Setting the Dwell Time for Range [:SENSe]:EMI:MEASure:RANGe:DWELl
Language Reference [:SENSe]:FREQuency Subsection [:SENSe]:FREQuency Subsection Center Frequency [:SENSe]:FREQuency:CENTer [:SENSe]:FREQuency:CENTer UP|DOWN [:SENSe]:FREQuency:CENTer? Set the center frequency. NOTE In log sweep mode, the minimum start frequency is 10 Hz. Factory Preset and *RST: 600 MHz Range: EMC E7401A: –80 MHz1 to 1.58 GHz EMC E7402A: –80 MHz1 to 3.10 GHz EMC E7403A: –80 MHz1 to 6.78 GHz EMC E7404A: –80 MHz1 to 13.3 GHz EMC E7405A: –80 MHz1 to 27.
Language Reference [:SENSe]:FREQuency Subsection Center Frequency Step Size [:SENSe]:FREQuency:CENTer:STEP[:INCRement] [:SENSe]:FREQuency:CENTer:STEP[:INCRement]? Specifies the center frequency step size. Factory Preset and *RST: Range: Span/10 Maximum negative frequency to the maximum positive frequency listed below: EMC E7401A: –1.58 to 1.58 GHz EMC E7402A: –3.10 to 3.10 GHz EMC E7403A: –6.78 to 6.78 GHz EMC E7404A: –13.3 to 13.3 GHz EMC E7405A: –27.0 to 27.
Language Reference [:SENSe]:FREQuency Subsection Full Frequency Span [:SENSe]:FREQuency:SPAN:FULL Set the frequency span to full scale. Factory Preset and *RST: 800 MHz Front Panel Access: SPAN/X Scale, Full Span Last Frequency Span [:SENSe]:FREQuency:SPAN:PREVious Set the frequency span to the previous span setting. Front Panel Access: SPAN/X Scale, Last Span Start Frequency [:SENSe]:FREQuency:STARt [:SENSe]:FREQuency:STARt? Set the start frequency.
Language Reference [:SENSe]:FREQuency Subsection Stop Frequency [:SENSe]:FREQuency:STOP [:SENSe]:FREQuency:STOP? Set the stop frequency. Factory Preset and *RST: 1.06 GHz Range: EMC E7401A: –80 MHz1 to 1.58 GHz EMC E7402A: –80 MHz1 to 3.10 GHz EMC E7403A: –80 MHz1 to 6.78 GHz EMC E7404A: –80 MHz1 to 13.3 GHz EMC E7405A: –80 MHz1 to 27.
Language Reference [:SENSe]:FREQuency Subsection Frequency Synthesis State [:SENSe]:FREQuency:SYNThesis:AUTO OFF|ON|0|1 [:SENSe]:FREQuency:SYNThesis:AUTO? This command switches between auto and manual phase noise selection. When in auto mode, the phase noise optimization is set as follows: • • For spans ≤ 10 MHz, the analyzer is optimized for phase noise. For spans > 10 MHz, the analyzer is optimized for fast tuning.
Language Reference [:SENSe]:POWer Subsection [:SENSe]:POWer Subsection Enable/Disable QPD X10 Gain [:SENSe]:POWer:QPGain[:STATe]ON|OFF|1|0 [:SENSe]:POWer:QPGain[:STATe]? Sets the quasi peak (QP) gain state On or Off in the quasi peak detector (QPD) board. Factory Preset and *RST: Off Key Access: Det/Demod, EMI Detector, AV/QP Gain X1 X10 Input Attenuation [:SENSe]:POWer[:RF]:ATTenuation [:SENSe]:POWer[:RF]:ATTenuation? Set the input attenuator.
Language Reference [:SENSe]:POWer Subsection Factory Preset and *RST: On Front Panel Access: AMPLITUDE Y Scale, Attenuation Input Port Power Gain [:SENSe]:POWer[:RF]:GAIN[:STATe] OFF|ON|0|1 [:SENSe]:POWer[:RF]:GAIN[:STATe]? Turns the internal preamp on or off.
Language Reference [:SENSe]:POWer Subsection Remarks: Front Panel Access: This command is available only on Agilent EMC models E7403A, E7404A, and E7405A. 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. AMPLITUDE/Y Scale, Presel Adjust Preselector Center [:SENSe]:POWer[:RF]:PCENter This command centers the preselector filter at the signal of interest.
Language Reference [:SENSe]:SWEep Subsection [:SENSe]:SWEep Subsection Sweep Points [:SENSe]:SWEep:POINts [:SENSe]:SWEep:POINts? This command sets the number of sweep points. Factory Preset and *RST: 401 Example: :SWEep:POIN 401 History: This command is available only on analyzers with firmware revision A.04.00 and later. Analyzers with firmware revisions prior to A.04.00 have the number of sweep points fixed at 401.
Language Reference [:SENSe]:SWEep Subsection Factory Preset and *RST: Linear Remarks: Refer to the User’s Guide for detailed information on the interactions of this command with other functions. History: Added with firmware revision A.08.00. Front Panel Access: FREQUENCY, Scale Type Sweep Time [:SENSe]:SWEep:TIME
Language Reference [:SENSe]:SWEep Subsection Sweep Time Mode [:SENSe]:SWEep:TIME:AUTO:MODE SRESponse|SANalyzer [:SENSe]:SWEep:TIME:AUTO:MODE? Specifies the type of automatic coupling for the fastest sweep time at the current settings.
Language Reference [:SENSe]:SWEep Subsection Time Gate Level (Option 1D6 Only) [:SENSe]:SWEep:TIME:GATE:LEVel HIGH|LOW [:SENSe]:SWEep:TIME:GATE:LEVel? Selects the level of the gate signal; this command is for LEVel triggering only.
Language Reference [:SENSe]:SWEep Subsection Factory Preset and *RST: Off Front Panel Access: Sweep, Gate, Gate On Off Time Gate Trigger Type (Option 1D6 Only) [:SENSe]:SWEep:TIME:GATE:TYPE LEVel|EDGE [:SENSe]:SWEep:TIME:GATE:TYPE? Selects between edge and level mode for time-gated spectrum analysis. Level triggers the gate when the signal surpasses a specific level, set to either low or high.
Language Reference SOURce Subsystem SOURce Subsystem ¶The SOURce subsystem controls the signal characteristics of the tracking generator. Refer also to the “OUTPut Subsystem” on page 267 which contains a command that controls the tracking generator output. Sets the Output Power Offset Correction :SOURce:CORRection:OFFSet :SOURce:CORRection:OFFSet? Specifies an offset for the displayed output power level.
Language Reference SOURce Subsystem EMC E7405A: 8 dB Range: EMC E7401A: 0 dB to 60 dB in 10 dB steps EMC E7402A: 0 dB to 56 dB in 8 dB steps EMC E7403A: 0 dB to 56 dB in 8 dB steps EMC E7404A: 0 dB to 56 dB in 8 dB steps EMC E7405A: 0 dB to 56 dB in 8 dB steps Default Unit: dB Front Panel Access: Source, Attenuation Auto Man Automatic Source Attenuation :SOURce:POWer:ATTenuation:AUTO OFF|ON|0|1 :SOURce:POWer:ATTenuation:AUTO? Selects if the source output level attenuator will be set automatically, or
Language Reference SOURce Subsystem CAUTION Power-level sensitive devices connected to the tracking generator output may be accidentally damaged. This is because the actual source amplitude may be greater than the amplitude indicated on the analyzer when the source attenuation is set manually. When source attenuation is set to manual (:SOURce:POWer:ATTenuation:AUTO OFF), source amplitude may be set to values beyond actual output levels to accommodate the full range of analyzer capabilities.
Language Reference SOURce Subsystem Factory Preset and *RST: 0 dB Range: 0 dB to 20 dB Default Unit: dB Set the Output Power at the Start of the Sweep :SOURce:POWer:STARt :SOURce:POWer:STARt? Specifies the source output power level at the start of the power sweep. Use :SOURce:POWer:SPAN to set the change in power level across the sweep. This command is equivalent to :SOURce:POWer[:LEVel][:IMMediate][:AMPLitude].
Language Reference SOURce Subsystem Front Panel Access: Source, Amptd Step Auto Man Set the Source Sweep Power Range :SOURce:POWer:SWEep :SOURce:POWer:SWEep? 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. See also :SOURce:POWer:SPAN.
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. NOTE The data in this register is continuously updated and reflects the current conditions.
Language Reference STATus Subsystem Operation Negative Transition :STATus:OPERation:NTRansition :STATus:OPERation:NTRansition? This command determines which 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 is the sum of the decimal values of the bits that you want to enable.
Language Reference STATus:QUEStionable Subsection 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. NOTE The data in this register is continuously updated and reflects the current conditions.
Language Reference STATus:QUEStionable Subsection Questionable Calibration Negative Transition :STATus:QUEStionable:CALibration:NTRansition :STATus:QUEStionable:CALibration:NTRansition? This command determines which 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). The variable is the sum of the decimal values of the bits that you want to enable.
Language Reference STATus:QUEStionable Subsection Questionable Enable :STATus:QUEStionable:ENABle :STATus:QUEStionable:ENABle? This command determines which bits in the Questionable Condition Register will set bits in the Questionable Event register, which also sets the Questionable Status Summary bit (bit3) in the Status Byte Register. The variable is the sum of the decimal values of the bits you want to enable.
Language Reference STATus:QUEStionable Subsection Questionable Frequency Enable :STATus:QUEStionable:FREQuency:ENABle :STATus:QUEStionable:FREQuency:ENABle? This command determines which bits in the Questionable Frequency Condition Register will set bits in the Questionable Frequency Event register, which also sets the Frequency Summary bit (bit 5) in the Questionable Register. The variable is the sum of the decimal values of the bits you want to enable.
Language Reference STATus:QUEStionable Subsection Questionable Frequency Positive Transition :STATus:QUEStionable:FREQuency:PTRansition :STATus:QUEStionable:FREQuency:PTRansition? This command determines which bits in the Questionable Frequency Condition register will set the corresponding bit in the Questionable Frequency Event register when that bit has a positive transition (0 to 1). The variable is the sum of the decimal values of the bits that you want to enable.
Language Reference STATus:QUEStionable Subsection Questionable Integrity Negative Transition :STATus:QUEStionable:INTegrity:NTRansition :STATus:QUEStionable:INTegrity:NTRansition? This command determines which bits in the Questionable Integrity Condition register will set the corresponding bit in the Questionable Integrity Event register when that bit has a negative transition (1 to 0). The variable is the sum of the decimal values of the bits that you want to enable.
Language Reference STATus:QUEStionable Subsection Questionable Integrity Uncalibrated Event Query :STATus:QUEStionable:INTegrity:UNCalibrated[:EVENt]? This query returns the decimal value of the sum of the bits in the Questionable Integrity Uncalibrated Event register. NOTE The register requires that the equivalent PTR or NTR filters be set 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.
Language Reference STATus:QUEStionable Subsection Questionable Negative Transition :STATus:QUEStionable:NTRansition :STATus:QUEStionable:NTRansition? This command determines which 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). The variable is the sum of the decimal values of the bits that you want to enable.
Language Reference STATus:QUEStionable Subsection Questionable Power Negative Transition :STATus:QUEStionable:POWer:NTRansition :STATus:QUEStionable:POWer:NTRansition? This command determines which bits in the Questionable Power Condition register will set the corresponding bit in the Questionable Power Event register when that bit has a negative transition (1 to 0). The variable is the sum of the decimal values of the bits that you want to enable.
Language Reference SYSTem Subsystem SYSTem Subsystem This subsystem is used to set the controls and parameters associated with the overall system communication. These functions are not related to instrument performance. GPIB Address :SYSTem:COMMunicate:GPIB[1][:SELF]:ADDRess :SYSTem:COMMunicate:GPIB[1][:SELF]:ADDRess? Sets and queries the GPIB address. NOTE This command applies to analyzers having the standard GPIB I/O interface Option A4H.
Language Reference SYSTem Subsystem (no *RST): The factory default is On. This parameter is persistent, which means that it retains the setting previously selected, even through a power cycle. Serial Port RTS Setup :SYSTem:COMMunicate:SERial[1]:CONTrol:RTS OFF|ON|IBFull :SYSTem:COMMunicate:SERial[1]:CONTrol:RTS? Sets the hardware pacing (hand-shaking) scheme. Many high speed asynchronous modems use this line (paired with CTS) as receive/transmit pacing.
Language Reference SYSTem Subsystem Serial Port Receive Pace Setup :SYSTem:COMMunicate:SERial[1][:RECeive]:PACE XON|NONE :SYSTem:COMMunicate:SERial[1][:RECeive]:PACE? Set the receive pace to on or none for an instrument, with the RS-232 interface installed. Only one Option 1AX can be installed in an instrument. If no optional serial port number is specified, port 1 is assumed. Factory Preset (no *RST): The factory default is none.
Language Reference SYSTem Subsystem System Configuration Query :SYSTem:CONFigure[:SYSTem]? Returns string of information about the configurations of the instrument. Front Panel Access: System, Show System Display System Configuration :SYSTem:CONFigure[:SYSTem]:STATe OFF|ON|0|1 :SYSTem:CONFigure[:SYSTem]:STATe? Shows the current system configuration of the instrument on the display.
Language Reference SYSTem Subsystem Locate SCPI Command Errors :SYSTem:ERRor:VERBose OFF|ON|0|1 :SYSTem:ERRor:VERBose? Adds additional information to the error messages returned by the :SYSTem:ERRor? command. It indicates which SCPI command was executing when the error occurred and what about that command was unacceptable. ,”;” The maximum length of the is 80 characters.
Language Reference SYSTem Subsystem License Key – Install Application/Option :SYSTem:LKEY <“option”>, <“license key”> :SYSTem:LKEY? <“option”> This command enters the license key required for installing the specified new application or option. The query returns a string that contains the license key for a specified application or option that is already installed in the instrument.
Language Reference SYSTem Subsystem Power On Elapsed Time :SYSTem:PON:ETIMe? Returns the number of seconds that have elapsed since the analyzer was turned on for the very first time. Front Panel Access: System, Show System Power On Time :SYSTem:PON:TIME? Returns the number of milliseconds that have elapsed since the analyzer was last turned on. Power On Type :SYSTem:PON:TYPE PRESet|LAST :SYSTem:PON:TYPE? Sets the defined instrument conditions after a power-on or Preset.
Language Reference SYSTem Subsystem History: Added with firmware revision A.04.00. Remarks: Disable the output ports for faster measurement times. Preset :SYSTem:PRESet Returns the instrument to a set of defined conditions. The particular set is selected by :SYSTem:PRESet:TYPE. This command does not change any persistent parameters. The term persistent means that the command retains the setting previously selected, even through a power cycle.
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 Type Preset Speaker Control :SYSTem:SPEaker[:STATe] OFF|ON|0|1 :SYSTem:SPEaker[:STATe]? Turns the internal speaker on or off.
Language Reference TRACe Subsystem TRACe Subsystem The TRACe subsystem controls access to the internal trace memory of the analyzer. NOTE Refer also to :CALCulate and :MMEMory subsystems for more trace and limit line commands. Copy Trace :TRACe:COPY , Transfers the source trace to the destination trace and leaves the destination trace in VIEW mode.
Language Reference TRACe Subsystem NOTE This command does not allow setting all trace points to the same amplitude value by sending just a single value. If you need to set all trace points to the same value, you must send the same value to each trace point. Rawtrace data is available with UINT,16 or INT,32 formatting. It is unitless, returns uncorrected ADC values, and is the fastest method of obtaining measurement data.
Language Reference TRACe Subsystem Example: :TRAC:MATH:ADD TRACE2,TRACE1,TRACE3 is equivalent to : (trace 2 = trace 1 + trace 3) Mean Trace Data :TRACe:MATH:MEAN? Returns the mean of the amplitudes of the trace amplitude elements in measurement units. Traces are: TRACE1|2|3 Query the Signal Peaks :TRACe:MATH:PEAK[:DATA]? Outputs the signal peaks by frequency or by amplitude. This command uses only trace1 data. The sort mode is determined by the command :TRACe:MATH:PEAK:SORT.
Language Reference TRACe Subsystem The purpose of this function is to perform a spatial video averaging as compared to the temporal version supplied by the video-average command [:SENSe]:AVERage:TYPE VIDeo. The functions of :TRACe:MATH:SMOoth and [:SENSe]:AVERage:TYPE VIDeo|POWer are not interchangeable. Each point value is replaced with the average of the values of the selected number of points, with half of those points located on each side of any particular point (when possible).
Language Reference TRACe Subsystem + 1), at which time the full number of smoothing points is utilized. The same characteristic occurs at the completion of the trace, beginning at point 386, when the number of averaging buckets begins to decrease until point 401 is reached. By replacing the value of each point in a trace with the average of the values of a number of points centered about that point, any rapid variations in noise or signals are smoothed into more gradual variations.
Language Reference TRACe Subsystem Trace Math Subtract From Display Line :TRACe:MATH:SUBTract:DLINe Subtracts the magnitude of the display line from the selected trace and places the result back in the selected trace.
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. External Trigger, Line Trigger Delay Value :TRIGger[:SEQuence]:DELay :TRIGger[:SEQuence]:DELay? This command sets the amount of trigger delay when using the rear panel external trigger input or the line trigger.
Language Reference TRIGger Subsystem Factory Preset and *RST: Positive Front Panel Access: Trig, External Pos Neg Trigger Offset :TRIGger[:SEQuence]:OFFSet <64 bit floating point value> :TRIGger[:SEQuence]:OFFSet? This command sets the trigger offset. Factory Preset and *RST: 0 seconds Example: :TRIG:SEQ:OFFS 1.0s Range: Hardware specific; dependent upon the ADC being used, current state, and the number of sweep points.
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.
Language Reference TRIGger Subsystem Front Panel Access:. Trig, Video Video Trigger Level Frequency :TRIGger[:SEQuence]:VIDeo:LEVel:FREQuency :TRIGger[:SEQuence]:VIDeo:LEVel:FREQuency? This command is used to adjust the Video Trigger level when in FM Demod, and Demod View is on. NOTE Default Unit: Hz Remarks: Video is adjusted using this command, but must also be selected using the command :TRIGger[:SEQuence]:SOURce VIDeo.
Language Reference UNIT Subsystem UNIT Subsystem Select Power Units of Measure :UNIT:POWer DBM|DBMV|DBUV|DBUA|V|W|A :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 History: Front Panel Access: Ampere and decibel microampere units are available only with instruments having firmware revision A.06.00 and later.
6 Agilent 8590/EMC Analyzers Programming Conversion Guide 339
Agilent 8590/EMC Analyzers Programming Conversion Guide NOTE Please remove this page and insert the wire-O bound Programming Conversion Guide here, Agilent Part Number E7401-90035.
Index Symbols *CLS command, 59 *ESE command, 70 *SRE command, 67 *STB? command, 67 *TST? query, 197 Numerics 3 dB bandwidth command, 199 A abort command, 198, 250 ac input coupling command, 252 Agilent Technologies URL, 4 alignment all assemblies, 197, 229 commands, 229 FM demodulation assembly, 230 AM demodulation, 280 on/off, 281 amplitude correction data, merging, 277 data, setting, 276 deleting, 276 external amplifier, 279 set, deleting, 278 set, turning on/off, 278 setting interpolation, 278 turning o
Index corrections on/off, 231 defaults, 230 frequency reference adjustment, 231 frequency reference query, 230 IEEE command, 193 reference on/off, 232 RF, 231 tracking generator, 232 catalog memory/disk, 260 center frequency setting, 290 step size, 290, 291 clear status, IEEE command, 193 CLS command, description, 61 color printing, 246 command parameters, 42 commands See command list following Contents See Also specific command comment set all signals, 205 current signal, 205 marked signals, 205 compiling
Index number printed per page, 247 on/off, 236 reference level, 240 reference level offset, 241 reference level, normalized, 239 reference level, position, 239 scaling, 240 scaling, vertical axis, 242 signal list parameters, 208 system configuration, 322 time format, 235 time on/off, 235 title, 236 trace, 237 units, 338 display line, subtraction from trace, 333 DTR for serial bus, 319 dwell time average, 288 range, 289 setting, 288 E EMI detection modes, 285 EMI view, 286 errors data transfer, R-S232, 53 l
Index H handshake, RS-232 bus, 52 hardcopy output, 245 hardware configuration query, 321 hardware configuration, display, 321 host identification query, 323 I identification of host, 323 identification query, 194 IEEE commands *ESR?, 194 *IDN?, 194 *SAV, 196 common commands, 193 IEEE common commands, 48 IF sweep output on/off, 325 impedance mismatch correction, 279 initiate measurement, 197 input attenuation, 295 configuration, 319 coupling command, 252 power, maximizing, 297 signal, measuring, 268 input a
Index peak-to-peak, 221 reference level, 221 span pair, 224, 225 span-type, set values, 226 trace assignment, 223 trace assignment, auto, 223 tracking signal, 223 type, 219 x-axis location, 224 x-axis readout, 226 y-axis query, 227 marks, clear all, 204 max hold trace, 333 max/min view on/off, 258 select max, 258 maximum power to mixer, 296 mean of trace data, 330 measurement abort, 250 at marker and add to list, 258 bandwidth command, 200 commands, 254, 255 control of, 249 frequency, 257 increasing speed,
Index units, 338 power sweep tracking generator on/off, 305 range, 305, 307 start amplitude, 306 step auto on/off, 306 step size, 306 power-on conditions, preset/last, 325 time (milliseconds), 325 time (seconds), 325 preamplifier on/off, 296 preselector centering on/off, 288 preselector peaking, 297 preset, 196, 326 customized, 327 to factory defaults, 326 type at power-on, 325 type, factory/user, 325, 326 printer type, 245 printing abort, 245 color, 246 commands, 245 equipment, 54 form feed, 247 interconn
Index ratio to video BW, 273 type on/off, 275 value, 272 RF alignment on/off, 229 calibration, 231 overload reset, 253 RS-232 bus baud rate, 52 character format parameters, 52 data transfer errors, 53 handshake, 52 modem handshaking, 53 overview, 52 serial interface settings, 52 RTS for serial bus, 320 S sample detection, 284 save command, 196 scale type, linear/logarithmic, 298 scaling, 242 SCPI command subsystems, locating, 191 errors during execution, 323 errors, locating, 323 version query, 327 screen
Index averaging on/off, 269 loading from file, 262 max/min view, 258 query, 194 recall, 195 resolution BW automatic, 272 resolution BW type, 275 save, 196 tracking generator output, 267 status byte clearing, 193 IEEE command, 196 register, 66 status command, using, 64 status registers commands, 61 descriptions, 57, 59 operation condition register, description, 73 operation condition register, description of bits, 72 operation register, description, 70 operation register, diagram, 71 querying, 65 questionab
Index step size, 306 trigger commands, 334 external delay on/off, 334 delay value, 334 slope, 334 IEEE command, 197 level, gate, 296 measurement, 250 offset, 335 source, video, 336 video, level amplitude, 336 video, level frequency, 337 U units, setting power, 338 URL (Agilent Technologies), 4 user preset, 326 user preset, saving, 327 V video bandwidth Index auto on/off, 273 couple to resolution bandwidth, 273 ratio, auto/manual, 273 ration to resolution bandwidth, 273 values, setting, 273 video output o