Agilent E4401B Programmer's Guide

Programmer's Guid
e
Agilent Technologies ESA Spectrum Analyzer
This guide documents firmware revision A
ESA-E Serie
E4401B (9 kHz-1 E4402B (9 kHz-3 E4404B (9 kHz-6 E4405B (9 kHz-13
E4407B (9 kHz-26
an
d
ESA-L Serie
E4411B (9 kHz-1
E4403B (9kHz-3
E4408B (9 kHz-24
s
.5 GHz .0 GHz .7 GHz
.2 GHz .5 GHz
s
.5 GHz
.0 GHz
.5 GHz
) )
)
.05.xx
)
) )
)
)
s
:
Agilent Technologie
Manufacturing Part Number
Supersedes E4401-9017
Printed in US
June 200
© Copyright 1999, 2000 Agilent Technologies, Inc
0
s
: E4401-9019
9
A
1
.
COPYRIGHT AND DISCLAIMER NOTICE
Copyright - Agilent Technologies, Inc. Reproduced with the permission of Agilent Technologies Inc. Agilent Technologies, Inc. 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, Inc. is not liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material or data.
WARNING
CAUTION
The information contained in this document is subject to chang without notice
.
Agilent Technologies makes no warranty of any kind with regard to thi
material, including but not limited to, the implied warranties o merchantability and fitness for a particular purpose
. Agilen
t Technologies shall not be liable for errors contained herein or fo incidental or consequential damages in connection with the furnishing performance, or use of this material
.
The following safety symbols are used throughout this manual Familiarize yourself with the symbols and their meaning befor
operating this instrument
Warning
denotes a hazard
.
. It calls attention to a procedur which, if not correctly performed or adhered to, could result i injury or loss of life
. Do not proceed beyond a warning note
until the indicated conditions are fully understood and met
Caution
denotes a hazard
. It calls attention to a procedure that, if no correctly performed or adhered to, could result in damage to o destruction of the instrument
until the indicated conditions are fully understood and met
. Do not proceed beyond a caution sig
.
e
s
f
r
,
. e
e
n
.
t
r
n
NOTE
Notecalls out special information for the user's attention
. It provide
operational information or additional instructions of which the use should be aware
.
s
r
ii
WARNING
WARNING
The instruction documentation symbol
0
i
U
ti
This is a Safety Class 1 Product (provided with a protective earthing ground incorporated in the power cord) plug shall only be inserted in a socket outlet provided with
protected earth contact
conductor inside or outside of the product is likely to make th
product dangerous
If this product is not used as specified, the protection provide by the equipment could be impaired in a normal condition (in which all means for protection ar intact) only
marked with this symbol when it is necessary for th user to refer to the instructions in the documentation
This symbol is used to mark the on position of th
power line switch
This symbol is used to mark the standby position of th power line switch
This symbol indicates that the input power required i
AC
.
. Any interruption of the protectiv
. Intentional interruption is prohibited
.
.
.
. This product must be use
. The product i
. The mains
s
e
.
e
e
s
a
e
e
.
d
d
e
iii
Warrant
y
This Agilent Technologies instrument product is warranted agains defects in material and workmanship for a period of three years fro date of shipment will, at its option, either repair or replace products which prove to b defective
For warranty service or repair, this product must be returned to service facility designated by Agilent Technologies shipping charges to Agilent Technologies and Agilent Technologie
shall pay shipping charges to return the product to Buyer Buyer shall pay all shipping charges, duties, and taxes for products returned to Agilent Technologies from another country
Agilent Technologies warrants that its software and firmwar
designated by Agilent Technologies for use with an instrument wil
execute its programming instructions when properly installed on tha
instrument
of the instrument, or software, or firmware will be uninterrupted o error-free
.
.
. During the warranty period, Agilent Technologie
a
. Buyer shall prepa
s
. However
.
e
. Agilent Technologies does not warrant that the operatio
t
m
s
e
y
,
l
t
n
r
LIMITATION OF WARRANT
The foregoing warranty shall not apply to defects resulting fro improper or inadequate maintenance by Buyer, Buyer-supplie
software or interfacing, unauthorized modification or misuse, operatio outside of the environmental specifications for the product, or imprope
site preparation or maintenance NO OTHER WARRANTY IS EXPRESSED OR IMPLIED
TECHNOLOGIES SPECIFICALLY DISCLAIMS THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR PARTICULAR PURPOSE
.
EXCLUSIVE REMEDIE
THE REMEDIES PROVIDED HEREIN ARE BUYER'S SOLE AN EXCLUSIVE REMEDIES. AGILENT TECHNOLOGIES SHALL NO BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL
OR CONSEQUENTIAL DAMAGES, WHETHER BASED O CONTRACT, TORT, OR ANY OTHER LEGAL THEORY
.
S
Y
m
d
. AGILEN
N
.
n
r
T
A
D
T
,
iv
Where to Find the Latest Informatio
n
Documentation is updated periodically. For the latest information abou
Agilent ESA Spectrum Analyzers, including firmware upgrades an
application information, please visit the following Internet URL http
:I/www
.agilent
.com/find/esa
t
d
:
v
Content
s
1.Programming Fundamental Creating Valid Commands Command Notation Syntax Special Characters in Commands Parameters in Commands
Putting Multiple Commands on the Same Line
SCPI Termination and Separator Syntax
Overview of GPIB
 GPIB Instrument Nomenclature GPIB Command Statements
Overview of RS-232
Settings for the Serial Interface
Handshake and Baud Rate Character Format Parameters Modem Line Handshaking Data Transfer Errors
Printer Setup and Operation
Equipment
 Interconnection and Setup Testing Printer Operation
6
.
a4il4llti
iwgI
Lel
a
s
Use Status Registers to Determine the State of Analyzer Events and Conditions
What are the Status Registers?
How Do You Access the Status Registers? Using the Service Request (SRQ) Method Generating a Service Request Setting and Querying the Status Register Details of Bits in All Registers Status Byte Register
 Service Request Enable Register Standard Event Status Register Standard Event Status Event Enable Register STATus STATus STATus STATus
STATus
STATus
STATus STATus STATus
:OPERation Register :OPERation Condition Register :OPERation Event Enable Register :QUEStionable Registers :QUEStionable :QUEStionable :QUEStionable :QUEStionable :QUEStionable
:POWer Condition Register Bits :FREQuency Condition Register Bits :CALibration Condition Register Bits :INTegrity Condition Register Bits :INTegrity:UNCalibrated Condition Register Bits
1-
3
1-
4
1-
5
1-
6
1-
8
1-
8
1-1
0
1-1
0
1-1
0
1-1
2
1-1
2
1-1
2
1-1
2
1-1
3
1-1
3
1-1
4
1-1
4
1-1
4
1-1
6
2-1
2-1
2-1 2-1 2-1 2-1 2-1 2-1 2-1 2-2 2-2 2-2 2-2 2-2 2-2
2-
2­2­2-
2-
2 3 6 8 8 0
1
1 3 4
6 7
8 9 0 2
2
3
4
6
3
. Programming Example
s
List of Programming Examples Programming Examples System Requirements
C Programming Examples using VTL
Typical Example Program Contents
3­3-
3­3-
2 3
4
4
vii
Content
s
Linking to VTL Libraries
Compiling and Linking a VTL Program Example Program Including the
Opening a Session Device Sessions Addressing a Session
Closing a Session
Using Marker
Example:
Using Marker Delta Mode and Marker Minimum Search
Performing Internal Self-alignment Reading Trace Data Reading Trace Data Using Real Format Reading Trace Data Using Reading Trace Data Using
Using Limit Lines Measuring Noise Entering Status Register-Determine When a Measurement is Done Determine if an Error has Occurred Measuring Harmonic Distortion Measuring Harmonic Distortion Making Faster Measurements (multiple measurements)
(GPIB)
Amplitude
VISA
Peak
Search and
Declarations File
Peak
using ASCII Format (GPIB)
32-bi
t
ASCII Format (RS-232) 32-bit
Correction Data
Excursion
Real Format
 (GPIB) (RS-232)
(RS-232)
3-
5
3-
5
3-
7
3-
7
3-
8
3-8
3-1
0
3-1
1
3-1
2
3-1
2
3-1 3-2 3-2
3-2 3-3 3-3
3-4 3-4 3-5 3-5 3-6 3-6 3-7 3-8
6 0 4
9 4 9
4 9
3
7
3
9
8
7
4
. Programming Command Cross-Reference
Functional
5.
Language Referenc
SCPI
IEEE CommonCommands
Calibration Clear Status
Standard Standard
IdentificationQuery 094 Instrument State
Operation Complete
Query
Recall Reset
Save
Service Request Read Status Trigger Self TestQuery Wait-to-Continue
Index to SCPI Subsection
e
Sections
and Subsections
Query
Event Status Enable Event Status Register
Query
Instrument
Options
Enable
Byte Query
Query
s
4-
2
5-
3
5-
5
5-
5
5-
5
5-
5
5-
5­5-
5-
5-
5­5-
5-
5­5-
5­5­5-
6
6 6
7
7
7 8
8
8 9
9 9 9
Content
CALCulate Subsystem
CALCulate
CALCulate
s
ABORt Subsystem
Abort
CALibration Subsystem
Align All Instrument Assemblies
Set Auto Align Mode All or Not RF Automatic Alignment Return to the Default Alignment Data Align FM Demodulation Query the Internal or External Frequency Reference
Coarse Adjust the Frequency Reference Fine Adjust the Frequency Reference
Select the Frequency Corrections Align the RF Circuitry Select the Source State for Calibration Calibrate the Tracking Generator
NdBpoints NdBresults NdBstate Test Current Trace Data Against all Limit Lines
Control Set Fixed or Relative Limit Lines Set Limit LineX-axis Units Control Limit Line Frequency Interpolation Define Limit Line Values Merge Additional Values into the Existing Limit Line Delete Limit Line Display the Limit Line
Test the Data Against the Limit Line
Set the Margin Size
Display the Limit Margin
Control Limit Line Testing Select the Type of Limit Line
Markers All Off on All Traces Continuous Peaking Marker Function Frequency Counter Marker Resolution Frequency Counter Marker Resolution Automatic Frequency Counter Marker Marker Function Marker Peak (Maximum) Search Marker Peak (Maximum) Left Search Marker Next Peak (Maximum) Search
Marker Peak (Maximum) Right Search Marker Peak (Minimum) Search
Marker Mode
Define Peak Excursion Define Peak Search
:LLINe Subsection
Li
mit
Tina
:MARKer Subsection
Amplitude Interpolation
5-1
0
5-1
0
5-1
1
5-1
1
5-1
1
5-1
1
5-1
2
5-1
2
5-1 5-1 5-1 5-1
5-1 5-1 5-1
5-1 5-1 5-1 5-1 5-1
5-1 5-1 5-1 5-1 5-2 5-2 5-2
5-2 5-2
5-2 5-2 5-2 5-2
5-2
5-2 5-2 5-2 5-2 5-2 5-2 5-2 5-2 5-2 5-2
5-2 5-2 5-2 5-2 5-2
2 2 3
3 3 4 4 6 6 6 7 7
8 8 8 9 0 0
2 2 2 3 3 3 3
4 5
5 5
5 5 6 6 7 7 7
7 8 8 9 9
ix
Content
s
Define Peak Threshold
Peak
to Peak Delta Markers
Set Center Frequency to the Marker Value Set Reference Level to the Marker Value
Set Span
Set Start Frequency to the Marker Value
Set Center Frequency Step Size Set Stop
Marker On/Off Marker Table On/Off
Marker to Trace Marker to Trace Auto
Continuous Signal Tracking Function
Marker X Value
Span Markers Center Frequency
Marker X Position
Span Markers Center Frequency
Span Markers Span X Position Band Markers Start Frequency X Position Band Markers Stop Frequency X Position Marker X-Axis Readout
Span-Markers Span X Value
Band-Markers Start Frequency X Value
Band-Markers Stop Frequency X Value
Marker Read Y Value
CALCulate
Normalize the Trace Data
CONFigure Subsystem
Configure the Adjacent Channel Power Measurements
Configure the Channel Power and Density Measurements Configure the Emission Bandwidth Measurements
Configure the Harmonic Distortion Measurements Configure the OBW and Transmit Frequency Error Measurements
COUPle Subsystem
COUPle the Function to Other Settings
DISPlay Subsystem
Display Viewing Angle Date and Time Display Format
Date and Time Display
Display Annotation Title Data
Turn the Entire Display On/Off
Window Annotation Trace Graticule Display
Trace X-Axis Scale Offset
Set the Display Line
Control the Display Line Normalized Reference Level Normalized Reference Level Position
Reference Level Auto
to the Marker Value
Frequency to the Marker Value
:NTData Subsection
Ranging
to the Marker Value
X
Value
Position
X
5-3
0
5-3
0
5-3
0
5-3
0
5-3
1
5-3
1
5-3
5-3 5-3
5-3
5-3
5-3
5-3 5-3 5-3
5-3
5-3
5-3
5-3
5-3
5-3
5-3
5-3
5-3
5-3
5-3
5-3
5-3
5-3
5-3
5-3
5-3
5-3
5-4
5-4
5-4 5-4
5-4 5-4 5-4 5-4
5-4 5-4
5-4 5-4 5-4 5-4 5-4 5-45
1 1
1 2 2 2 2 3 3
3 4 4 4 5 5
6 6 6
7 8 8 9 9 9 9 9 9 0 0
1 1
1 1 2 2 2
3 3 3
4
4 4
x
Content
s
Trace Y -Axis Amplitude Scaling
Trace Y-Axis Frequency Scaling Trace Y -Axis Reference Level Trace Y -Axis Reference Level Offset Vertical Axis Scaling
FETCh Subsystem
Return Main, Lower, and Upper Channel Power Return Main Channel Power Return Lower Channel Power Return Upper Channel Power Return Channel Power and Density Return Channel Power
Return Channel Power Density Return Emission Bandwidth Return Harmonic Amplitudes Return Harmonic N Amplitude Return % Total Harmonic Distortion Return Harmonic Frequency List Return Harmonic N Frequency Return Fundamental Frequency Return OBW and Transmit Frequency Error Return Occupied Bandwidth Return Transmit Frequency Error
FORMat Subsystem
Byte Order Numeric Data format
HCOPy Subsystem
Abort the Print Printer Type
Color Hard Copy
Print a Hard Copy Form Feed the Print Item Page Orientation Number of Items Printed on a Page
INITiate Subsystem
Continuous or Single Measurements Take New Data Acquisitions Pause the Measurement Restart the Measurement Resume the Measurement
INPut Subsystem
Input Port Coupling Select Internal or External Mixer Select Mixer Type Clear the Input Overload
INSTrument Subsystem
Select Application
MEASure Subsystem
Measure Main, Lower, and Upper Channel Power
 
5-4
5
5-4
5
5-4
6
5-4
6
5-4
7
5-4
8
5-4 5-4 5-4 5-4 5-4 5-4
5-4 5-4
5-4 5-5 5-5 5-5 5-5 5-5 5-5 5-5 5-5 5-5
5-5 5-5
5-5 5-5 5-5 5-5 5-5 5-5 5-5 5-5 5-5 5-5 5-6 5-6 5-6 5-6 5-6 5-6 5-6 5-6 5-6 5-6 5-6
5-6 5-6
8 8 8 9
9 9 9 9 9 0 0 0 1 1 1 1
2
3 3 3 6 6 6 6
7 7 7
7 9 9 0 0 1 1
2
2 2
2
3
4
4 5 5
xi
Content
s
Measure Main Channel Power
Measure Lower Channel Power
Measure Upper
Measure Channel Power Measure Channel Power Measure Channel Power Density
Measure Emission Bandwidth
Return Harmonic Amplitudes
Return Harmonic N Amplitude Return % Total Harmonic Distortion Return Harmonic Frequency List
Return Harmonic N Frequency Return Fundamental Frequency
Measure OBW Measure Occupied Bandwidth
Measure Transmit Frequency Error
MMEMory Subsystem
Catalog the Selected Memory Location Copy a File
Move DatatoFile
Delete a File
Load Load LoadanInstrument State fromaFile Load
Create a New Directory Delete a Directory Store a Corrections Table to a File Store a Limit Line in a File
StoreaScreen Image Store
Store a Trace in a File
OUTPut Subsystem
Turn Output On/Off
READ Subsystem
Measure Main, Lower, and Measure Main Measure Lower Channel Power Measure
Measure Channel Power
Measure Channel
Measure Channel Power Density
Measure Emission
Return Harmonic
Return Harmonic N
Return % Total Harmonic Distortion
Return Harmonic Frequency List
Return Harmonic N Frequency
Return Fundamental Frequency
Corrections Table fromaFile
a a Limit Line from Memory to the Instrument
a Trace From a File to the Instrument
an Instrument State in a File
Upper
Channel Power
and Transmit Frequency Error
in a
Channel
Channel Power
Power
Bandwidth
Amplitudes
Amplitude
and Density
Graphic File
UpperChannel Power
Power
 
and
Density
5-6
5
5-6 5-6 5-6 5-6 5-6 5-6 5-6 5-6 5-6 5-6
5-6
5-6
5-6 5-6 5-6
5-7 5-7 5-7
5-7
5-7
5-7
5-7
5-7
5-7
5-7 5-7 5-7 5-7 5-7 5-74
5-7
5-7 5-7 5-7
5-7 5-7 5-7 5-7
5-7 5-7 5-7
5-7 5-7 5-7 5-7 5-7
5-8 5-8
5 6 6 6 6 6
6
7 7 7
8
8 8 9 9 0 0 0
1
1
1
1
2
2
3 3 3 4 4
4
6 6
7
7
7
7
7
8 8
8
8 8 9 9
9 0 0
xii
Content
s
Measure OBW and Transmit Frequency Error Measure Occupied Bandwidth Measure Transmit Frequency Error
SENSe Subsystem
[
:SENSe]
Set Adjacent Channel Power Number of Averages Adjacent Channel Power Averaging On/Off Set Adjacent Channel Bandwidth Set Main Channel Bandwidth
Set Adjacent Channel Spacing
[
:SENSe]
Clear the Current Average Set the Average Count Turn Averaging On/Off Type of Averaging for Measurements
[
:SENSe]
Resolution Bandwidth
Resolution Bandwidth Automatic Video Bandwidth Video Bandwidth Automatic Video to Resolution Bandwidth Ratio
[
:SENSe]
Set Channel Power Number of Averages Channel Power Averaging On/Off Set Channel Power Integration Bandwidth
Set Channel Power Span
[
:SENSe]
Perform Amplitude Correction Set Amplitude Correction Data Merge Additional Values into the Existing Amplitude Correction Data Delete Amplitude Correction Set Amplitude Correction Frequency Interpolation Perform Amplitude Correction Input Impedance Correction External Amplifier Correction
[
:SENSe]
Type of Demodulation FM Deviation Demodulation Control
Demod Time
Demod View
[
:SENSe]
Type of Detection
[
:SENSe]
Set Emission BW Number of Averages Emission BW Averaging On/Off Set Emission BW Span
Emission BW Trace Max Hold On/Off Set Emission BW X dB Value
:ACPower Subsection
:AVERage Subsection
:BANDwidth Subsection
:CHPower Subsection
:CORRection Subsection
:DEMod Subsection
:DETector Subsection
:EBWidth Subsection
5-8
0
5-8
1
5-8
1
2
5-8 5-8
3
5-8
3
5-8
3
5-8
3
5-8
3
5-8
4
5-8
5
5-8
5
5-8
5
5-8
5
5-8
6
5-8
7
5-8
7
5-8
7
5-8
7
5-8
8
5-8
8
5-8
9
5-8
9
5-8
9
5-8
9
5-8
9
5-9
1
5-9
1
5-9
1
5-9 5-9 5-9
5-9 5-9
5-9 5-9 5-9 5-9 5-9 5-9 5-9 5-9 5-9 5-9 5-9 5-9
5-9 5-9 5-99
2 2 3
3 3
4 5 5 5 5 6 6 7 7 8 8
8 8 9
Content
[
:SENSe]
Center Frequency
Center Frequency Step Size Automatic
Center Frequency
Frequency Span Full Frequency Span Previous Frequency Span
Start Frequency
Stop Frequency
[
:SENSe]
Harmonic Measurement Averages Turn On or Off Harmonic Measurement Averaging
Set Number of Measured Harmonics
Set Harmonic Measurement Sweep Mode
Set Harmonic Measurement Sweep Time Turn On or Off Fundamental
[SENSe]
Select External Mixer Band
External Mixer Bias Adjust Set External Mixer Bias On/Off
Set External Mixer LO Harmonic Value
Set External MixerLOHarmonic Mode
[
:SENSe]
Set OBW Number of Averages OBW Averaging On/Off
Set OBW Span
Set OBW % Power
[
:SENSe]
Input Attenuation
Input Port Attenuator Auto
Input Port Power Gain Input Port Maximum Mixer Power
Optimize
Preselector Center
[
:SENSe]
Set Mixer Signal Set Mixer Signal Identification State
[
:SENSe]
Sweep Points
Query
Set All Segment Data
Merge Data With Segmented Sweep Data
Delete All Segmented Sweep Data
Delete Some Segmented Sweep Data
Turn On/Off Segmented Sweep
Sweep Time
Automatic Sweep Time
Sweep Time Mode
Time Gating Delay
s
:FREQuency Subsection
Step Size
:HARMonics Subsection
:MIXer Subsection
:OBWidth Subsection
:POWer Subsection
Preselector Frequency
:SlDentify Subsection
Identification Mode
:SWEep Subsection
Number of Segments
Zoom
5-10
0
5-10
0
5-10
5-10 5-10
5-10
5-10 5-10 5-10
5-10 5-10
5-10
5-10 5-10 5-10 5-10
5-10 5-10 5-10
5-10
5-10
5-10
5-11 5-11 5-11 5-11
5-11 5-11 5-11
5-11 5-11 5-11 5-11 5-11 5-11 5-11 5-11 5-11 5-11
5-11 5-11 5-11
5-12
5-12 5-12
5-12 5-12
5-12 5-123
0
1 1
2
2 2 3
4 4
4
4 5 5 6
7 7
7
8
8
9
0 0 0 0
1 2 2
2 3 3 3 4 5 5 5 7 7
7 8 9
0
1 1
2 3
3
xiv
Content
Time Gate Length Time Gate Level Time Gate Polarity Preset Time Gate
Control Time Gate
Time Gate Trigger Type
SOURce Subsystem
Sets the Output Power Offset Correction
Source Attenuation Automatic Source Attenuation Sets the Output Power Sets the Source Output Power Mode Set the Source Sweep Power Range Set the Output Power at the Start of the Sweep Set the Output Power to Step Automatically Set the Output Power Step Size Set the Source Sweep Power Range Output Power Tracking
Output Power Tracking Peak
STATus Subsystem
Operation Condition Query Operation Enable Operation Event Query Operation Negative Transition Operation Positive Transition
Preset the Status Byte
STATus
Questionable Calibration Condition Questionable Calibration Enable Questionable Calibration Event Query Questionable Calibration Negative Transition Questionable Calibration Positive Transition
Questionable Condition Questionable Enable
Questionable Event Query Questionable Frequency Condition Questionable Frequency Enable Questionable Frequency Event Query
Questionable Frequency Negative Transition Questionable Frequency Positive Transition
Questionable Integrity Condition Questionable Integrity Enable Questionable Integrity Event Query Questionable Integrity Negative Transition Questionable Integrity Positive Transition
Questionable Integrity Uncalibrated Enable
Questionable Integrity Uncalibrated Event Query
Questionable Integrity Uncalibrated Negative Transition Questionable Integrity Uncalibrated Positive Transition
s
:QUEStionable Subsection
5-12
4
5-12
4
5-12
4
5-12
5
5-12
5
5-12
5
5-12
6
5-12 5-12
5-12 5-12 5-12 5-12 5-12 5-12
5-12 5-12 5-12
5-13 5-13 5-13 5-13 5-13 5-13 5-13 5-13
5-13 5-13 5-13 5-13 5-13 5-13
5-13
5-13 5-13 5-13 5-13 5-13
5-13 5-13
5-13 5-13 5-13 5-13 5-13
5-13 5-13 5-13 5-13
6 6
7 7 7 8 8
8
9
9 9
0
1 1 1
1 2 2 2
3 3 3 3 4 4
4 5
5
5 6
6
6 6
7 7 7
8 8
8 9 9 9
xv
Content
s
Questionable Questionable Power Condition
Questionable Power Enable
Questionable Power Event Query Questionable Power Negative Transition
Questionable Power Positive Transition Questionable Positive Transition
SYSTem Subsystem
GPIB
Address
Serial Port DTR Setup Serial Port RTS Setup Serial Port Baud Rate Setup Serial Port Receive Pace Setup Serial Port Transmit Pace Setup
Hardware Configuration
Display the Hardware Configuration System Configuration Query
Display System Configuration Set Date
Error Information Query Host Identification Query
License Key - Install
DeleteaLicense Key Query
PowerOnElapsed Time
Power On Time
PowerOnType Enable IF/Video/Sweep Output Ports
Preset Persistent State Reset
Preset Type Save User Preset Speaker
Set Time
SCPI Version Query
TRACe Subsystem
Copy Trace Transfer Trace Data Exchange Traces
Trace Math Add
Mean Trace Data
Query Query NumberofPeaks Found Peak Sorting Smooth Trace Data
Number of Points Trace Math Subtract
Trace Math Subtract From Display Line
Select Trace Display Mode
Instrument Options
the Signal Peaks
Negative Transition
Control 
for Smoothing
Query
Application/Option
5-14
0
5-14
0
5-14
0
5-14
0
5-14 5-14 5-14
5-14 5-14 5-14 5-14 5-14 5-14
5-14 5-14 5-14 5-14 5-14 5-14
5-14 5-14
5-14 5-14 5-14 5-14
5-14 5-14 5-14
5-15
5-15 5-15
5-15
5-15 5-15 5-15
5-15 5-15 5-15 5-15 5-15
5-15 5-15 5-15 5-15 5-15
5-15
5-15
5-15
5-158
1 1 1
3 3 3 4 4 5
5 6 6 6 6 6
7 7
7 8 8 8
9 9 9
0
0 0
0
1
1 1
2 2 2 3 4
4 4 4 4 5
7 7
8
Content
s
TRIGger Subsystem
External Trigger, Line, and TV Trigger Delay Value External Trigger, Line, and TV Trigger Delay Enable
External Trigger Slope Trigger Offset Trigger
Trigger Source
Set TV Field Mode
Set TV Line Number for Synchronization
Set Analyzer for TV Picture Monitoring Set the Video Waveform Sync Select TV Signal Path
Select TV Standard Video Trigger Level Amplitude Video Trigger Level Frequency
UNIT Subsystem
Select Power Units of Measure
6.
Agilent 8590/ESA Spectrum Analyzers Programming Conversion Guid
7.
Error Message
Error Messages Status Messages Informational Messages
Error Queues Error Message Format Error Message Types 0
:
No Error
-499 to -400 Query Errors
-
399 to -300
Device-Specific Error Messages
Device-Specific Error Message Descriptions
-299 to -200 Execution Error Messages
Execution Error Message Descriptions
-
199 to -100
Command Errors
201 to 799 Device-Specific Errors
Greater than 1000
Personality Specific Error Messages
Offset
:
:
:
:
:
s
On/Off 
:
. Pulse Direction
 
5-15
9
5-15
9
e
5-15 5-15 5-16 5-16
5-16 5-16 5-16 5-16 5-16 5-16 5-16 5-16 5-16
5-16 5-16
7-1 7-1 7-1
7-1
7-1
7-2 7-2
7-2 7-2
7-2
7-2
7-3
7­7­7-
9 9 0 1 1
2 3 3
3 4 4 5
6
7
7
2 3
8 3
4
5
7
8
0
0
1 1
2
7
7
xvii
Contents
1
Programming Fundamental
The purpose of this chapter is to serve as a reminder of SCPI (Standar Commands for Programmable Instruments) fundamentals to those wh have previous experience in programming SCPI intended to teach you everything about the SCPI programmin
language
.
. This chapter is no
s
d
o
t
g
1-1
Programming Fundamental
s
The SCPI Consortium or IEEE can provide detailed information on th subject of SCPI programming
IEEE
Standard Digital Interface for Programmable Instrumentation
New York, NY11987, or to IEEE Standard 488
. Refer to IEEE Standard 488
.2-1992,
IEEE
Codes, Formats, Protocols and Common Commands for Use wit
ANSI/IEEE
Std 488
.1-1987.New York, NY, 1992
.
Valid ESA Spectrum Analyzer SCPI commands are used for example
in this chapter
"Creating Valid Commands
"Command Notation Syntax
"Special Characters in Commands
'Putting Multiple Commands on the Same Line "Overview of GPIB
"Overview of RS-232
'Printer Setup and Operation
. Topics included in this chapter are
"
"
"
"
"
"
:
"
.1-1987
Standar
h
e
,
.
d
s
1-2
Chapter 1
Command Syntax
[:SENSe ]
<freq>
: BANDwidth [
Programming Fundamental
Creating Valid Command
Creating Valid Command
s
Commands are not case sensitive and there are often many differen ways of writing a particular command commands for a given command syntax
Sample Valid Command
: RESolution ]
The following sample commands are al
identical . They will all cause the same result
:Sense
:BANDWIDTH
:sens
:SENS
:band 1
. These are examples of vali
:
s
:Band
:Res 170
:RESOLUTION 1 .7e :band 1 :band 1
.7kH
.7KH Z .7E3H
z
0
z
s
s
t
d
l
.
3
:
MEASure
[n?]
[
:SENSe]
NEGative POSitive SAMPle
:INfl'iate
: HARMonics
:DETector[
:CONTinuous OFFIONl0
:FUNCtion
: AMPLitude
]
l 1
:bandwidth
The last command below returns differen
results than the commands above it number 3 in the command causes this command description for more information
:MEAS
: Maas
:MEAS
DET
:FUNC NE
:sense
The sample commands below are identical
:INIT
:init
:RES 1
:HARM : Harm
:HARM
:Detector
:CONT O :continuous 1
:AMPL
: Ampl ?
:AMPL3
G
:Function Sampl
N
.7e3H
?
?
z
t
. Th
e
. See th
e
.
e
.
Chapter 1
1-
3
NOTE
Programming Fundamental
Command Notation Synta
Command Notation Synta
s
x
x
A typical command is made up of key words set off by colons words are followed by parameters that can be followed by optiona
units
.
Example::
TRIGger
: SEQuence
: VlDeo
: LEVel 2.5V
The instrument does not distinguish between upper and lower cas letters of the key word long form of the key word
Example:Trig trigger
The command
because
. In the documentation, upper case letters indicate the short for
. The upper and lower case letters, together, indicate th
. Either form may be used in the command
:Seq Vid
:sequence
TRIGG
TRIGG
is
neither the long, nor the short form of the command
:Lev 2
:video
:Sequence
:level 2
.5V
is the same a
.5V
:Video
.
:Level 2
s
.5V
is not vali
. The ke
l
d
y
e
m
e
.
.
1-4
Chapter 1
Special Characters in
Specia Character
l
Command
Meaning
A vertical stroke betwee
parameters
alternative choices effect of the command i different depending o which parameter i
selected
A vertical stroke betwee
key words indicate
identical effects exist fo several key words of these key words is used a a time
. The comman
functions the same for
.
indicate
. Th
s
. Only on
s
n
s
d
Programming Fundamental
Special Characters In Command
s
Exampl
n
e
s
n
r
Command:[:SENSe]
or[ NEGative POSitive
l
e
The choices are neg, pos, an samp..
:SENSe n SAMPl
is one possible comman choice
Command
[
:
idth~BWIDth
e
Two identical commands are
t
SENSe
:
th :ACHanne
a CRTCRal a APAnwnr a RWTi]f h
ACHanne
e
:FUNCtion
:DETector
e
.
:
SENSe ]
: ACPower
l
:DETec
]
:FUNCti
: ACPower
:ACHanne l
: BANDwi
l
I
SAM
d
: BAND
s
s
t
P
d
o
w
:
d
e
[ ]
< >
Key words in squar brackets are optiona when composing th command key words will be execute even if they are omitted
Angle brackets around word, or words, indicate
they are not to be use literally in the command
They represent the neede item
. These implie
.
e
e
Command
l
[
:SENSe]
ge [
d
The
d
.
all valid and have identica effects
:
:ACPower
: STATe] OFF ON 01
following commands ar
:
:AVER
1
l
a
e
:SENSe :ACPower :AVER a
ge
:STATe OF
:ACPower :AVERage :ST
Te OF
F
ACPower
a
s
d
Command
:SENSe g <freq
.
In this command example th
d
word replaced by an actua
frequency
:SENSe g 9
.7MHz
:
:ACPower
>
<freq>
:
:ACPower
F
:AVERage OF
:CSPaci
should b
e
l
:CSPaci
A
F
n
e
n
Chapter 1
1- 5
Programming Fundamental
Special Characters in Command
Specia
l
s
s
Meaning
Character { }
Parameters in braces ca optionally be used in th command either not at all once, or several times
Parameters in Command
s
There are four basic types of parameters
and arbitrary block program data
Exampl
n
e
.
Command
[
SENSe
,
T [1]~2~3~4 <f
eq>,<rel
A valid form of this comman
is
:
[SENSe:]CORRection Ti:DATA 740000, 3320000,1
: boolean, key words, variable
: ] CORRection
req>,
e
:
: DATA
<rel_ampl>{
ampl>
:NERG
e
.94 1250000,
.7
: ERG
}
:CS
e
, <f
:CS
.31
E
r
d
E
s
.
Boolea
The expression
The numeric value0is equivalent to than 0 used in the command instead of parameter always return a numeric value of 0 or
Hey Wor
n
OFF~ON~0
is equivalent to
ON
.
d
~ 1
is a two state boolean-type parameter
OFF
.
Any numeric value othe
The numeric values of0or 1 are commonl
OFF
or
ON,
and queries of th
1
.
The parameter key words that are allowed for a particular comman
are defined in the command description and are separated with
vertical slash
Unit
s
Numerical variables may include units depends on the variable type being used
.
. The valid units for a comman
. See the following variabl descriptions. If no units are sent, the indicated default units will b used
. Units can follow the numerical value with, or without, a space
Variabl
e
A variable can be entered in exponential format as well as standar numeric format
are defined in the command description
. The appropriate variable range and its optional unit
.
.
r
y
e
d
a
d
e
e
.
d
s
In addition to these values, the following key words may also be used i
commands where they are applicable
.
MINimum - sets the parameter to the smallest possible value MAXimum - sets the parameter to the largest possible value
1-6
.
.
Chapter
n
1
Programming Fundamental
Parameters in Command
Include the key word MINimum or MAXimum after the question mar in a query in order to return the numeric value of the key word
Example query
Variable Parameter
<freq
>
: [
:SENSE]: FREQuency
s
: CENTer? MAXimu
m
A frequency parameter is a positive rational number followed b optional units kHz, MHz, GHz
<time
>
. The default unit is Hz
.
. Acceptable units include
A time parameter is a rational number followed by optional units default units are seconds
<ampl>, <rel_ampl
>
. Acceptable units include
: S, MS, US
The <ampl> (amplitude) parameter and the <rel_ampl> (relativ amplitude) parameter consist of a rational number followed by optiona units
. Acceptable units include
W
.
: V, mV, µV, dBm, dBmV, dBµV, Watts
: Hz
.
s s
k
.
y
,
. Th
e
e
l
,
<angle
>
An angle parameter is a rational number followed by optional units
The default units are degrees <integer
>
There are no units associated with an integer parameter
<percent
>
. Acceptable units include
: DEG, RAD
.
A percent parameter is a rational number between 0 and 100, with n units
.
<string
> A string parameter includes a series of alpha numeric characters Block Program Dat
a
Definite length arbitrary block response data is defined in sectio 8
.7.9
.2 of IEEE Standard 488
.2-1992,
IEEE Standard Codes, Formats
Protocols and Common Commands for Use with ANSI/IEEE St
488
.1-1987
New York, NY11992
.
<definite length block
>
.
It allows data to be transmitted over the system interface as a series o 8 bit data bytes
. This element is particularly useful for sending larg
quantities of data, 8 bit extended ASCII codes, or other data that ar not able to be directly displayed
.
.
.
o
.
n
,
d
f e e
Chapter 1
1-7
Programming Fundamental Putting Multiple Commands on the Same Lin
s
e
Putting Multiple Commands on the Same Lin
Multiple commands can be written on the same line, reducing your cod
space requirement
Commands must be separated with a semicolon (
If the commands are in different subsystems, the key word for th new subsystem must be preceded by a colon (
If the commands are in the same subsystem, the full hierarchy of th command key words need not be included start at the same key word level as the command that was jus executed
.
SCPI Termination and Separator Synta
A terminator must be provided when an instrument is controlled usin
RS-232 proper SCPI terminator and separator when this is the case no current SCPI standard for RS-232 be interface independent, <END> is only defined for IEEE 48 operation in the process of being addressed in IEEE standard 1174
. There are several issues to be understood about choosing th
. At the time of this writing, the RS-232 terminator issue wa
. To do this
:
;)
.
:)
.
. The second command ca
x
. Although one intent of SCPI is t
.
t
. There i
8
e
e
e
e
n
g
e
s
o
s
A semicolon (
;) is not a SCPI terminator, it is a separator
. The purpos of the separator is to queue multiple commands or queries in order t obtain multiple actions and/or responses
. Make sure that you do no attempt to use the semicolon as a terminator when using RS-23 control
.
Basically all binary trace and response data is terminated wit <NL><END>, as defined in Section 8
.5 of IEEE Standard 488
IEEE Standard Codes, Formats, Protocols and Common Commands fo
Use with ANSI/IEEE Std
488
.1-1987
.
New York, NY11992
.
The following are some examples of good and bad commands examples are created from an ESA spectrum analyzer with the simpl set of commands indicated below
[
:SENSe
:TRIGge
]
:POWe
r
:RF
]
[
:ATTenuation 40d
r
[
:SEQuence
:EXTernal [1
]
:SLOPe
POSitiv
]
e
:
B
2
h .2-1992
. Th
e
e
o
t
,
r
e
[
:SENSe
1-8
]
Chapter 1
:FREQuenc
:STAR
:POWe
r
[
:RF]
:MIXer
Bad Command
PWR
:ATT 40dB
The short form of
FREQ
:STAR 30MHz
-20dBm
MIX
: RANG
Pow
to get to the
The executing the specify
Putting Multiple Commands on the Same Lin
y
t
:RANG
e
[
:UPPer
POWER is POW,
;MIX
command is in the same
FREQ
command puts you back at the
]
:RAN
MIX
not
G
: RANG
Good Comman
POW
PWR
.
FREQ 3 OMHz
SENSE
:
command
:ATT 40d
:STA
R
; POW
: MIX
subsystem as
SENSE
.
Programming Fundamental
s
e
d
B
: RANG -20dB
FREQ,but
level
. You mus
m
t
FREQ
:STAR 30MHz
-2OdBm MIX
and
RANG
:POW
:ATT 40dB ;TRIG
2
.3GHz
FREQ
: STAR
:POW
:ATT? :FREQ
Pow
and
FREQ
separate commands, so they should be separated with a semicolon, not colon
.
POW
:ATT -5dB;:FREQ
10MHz
Attenuation cannot be a negative value
;POW
:MIX RAN
require a colon to separate them
:FREQ
is in the:SENSE
:STAR?
are within the same:SENSE
:STA
G
FREQ
:STA
R
30MHz
:STA
R
2
subsystem, not the:TRIGGER
R
10MH
.
;POW .
:POW
:ATT 40dB;:FREQ
.3GH
z
:POW
:ATT?;:FREQ
subsystem, but they are tw
:POW
:ATT 5dB;:FREQ
z
:MIX
:RANG -20dB
:STA
subsystem
:STAR
?
:STA
m
R
.
o
a
R
Chapter 1
1-
9
Programming Fundamental Overview of GPI
B
Overview of GPI
GPIB Instrument Nomenclatur
An instrument that is part of an GPIB network is categorized as listener, talker, or controller, depending on its current function in th network
Listener
Talker
.
s
B
e
A listener is a device capable of receiving data o
commands from other instruments instruments in the GPIB network can be listener simultaneously
A talker is a device capable of transmitting data o
commands to other instruments GPIB system allows only one device at a time to be a active talker
.
.
. Any number o
. To avoid confusion, a
a
e
r
f
s
r
n
n
Controller
GPIB Command Statement
Command statements form the nucleus of GPIB programming are understood by all instruments in the network the programming language codes, they provide all management an data communication instructions for the system programming language manual and your computers I/O programmin manual for more information
The seven fundamental command functions are as follows
An abort function that stops all listener/talker activity on th
interface bus, and prepares all instruments to receive a ne command from the controller command used to place the bus in a known starting conditio (sometimes called
A remote function that causes an instrument to change from loca
control to remote control disabled except for the Local key and the line power switc (sometimes called
A controller is an instrument, typically a computer capable of managing the various GPIB activities one device at a time can be an active controller
s
. When combined wit
. Refer to the you
.
. Typically, this is an initializatio
: abort, abortio, reset, halt)
. In remote control, the front panel keys ar
: remote, resume)
.
.
,
. Only
.
. The
y
h
d
r
g
:
e
w
n
n
l
e
h
A local lockout function, that can be used with the remote function
to disable the front panel Local key only the controller (or a hard reset by the line power switch) ca restore local control (sometimes called
1-10
. With the Local key disabled
: local)
.
,
,
n
Chapter 1
Programming Fundamental
A local function that is the complement to the remote command
causing an instrument to return to local control with a fully enable
front panel (sometimes called
A clear function that causes all GPIB instruments, or addresse instruments, to assume a cleared condition
unique for each instrument (sometimes called
send)
.
An output function that is used to send function commands and dat commands from the controller to the addressed instrumen (sometimes called: output, control, convert, image, iobuffer transfer)
An enter function that is the complement of the output function an
is used to transfer data from the addressed instrument to th controller (sometimes called timeout, set timeout, transfer)
.
: local, resume)
: enter, convert, image, iobuffer, o
.
.
. The definition of clear i
: clear, reset, control
s
Overview of GPI
t
,
e
n
B
,
d
d
s
,
a
d
Chapter 1
1-11
Programming Fundamental Overview of RS-23
Overview of RS-23
Serial interface programming techniques are similar to most genera I/O applications
Due to the asynchronous nature of serial I/O operations, special car must be exercised to ensure that data is not lost by sending to anothe
device before the device is ready to receive can he used to help solve this problem. These and other topics ar discussed in greater detail in your programming languag documentation
Settings for the Serial Interfac
Please refer to the documentation on your computer and I/O t configure the serial bus
settings are
:
s
2
2
.
. Modem line handshakin
e
.
e
. Some common serial interface configuratio
l
e
r
g
e
o
n
Baud Rate to Bits per character to
Parity to
Stop bits to
Handshake and Baud Rat
To determine hardware operating parameters, you need to know th
answer for each of the following questions about the peripheral device
Which of the following signal and control lines are actively use during communication with the peripheral
-
Data Set Ready (DSR
-
Clear to Send (CTS
What baud rate is expected by the peripheral
)
)
Character Format Parameter
To define the character format, you must know the requirements of th peripheral device for the following parameters
e
s
0
960 8
Odd or disable
1
?
?
:
d
e
:
d
e
Character Length
excluding start, stop, and parity bits
Parity Enable
Stop Bits
1-12
: One stop bit is included with each character
: Eight data bits are used for each character
: Parity is disabled (absent) for each character
,
.
.
.
Chapter 1
Loading...
+ 349 hidden pages