The information contained in this document is subject to change
without notice.
Agilent Technologiesmakesnowarrantyofanykindwithregard 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.
The following safety symbols are used throughout this manual.
Familiarize yourself with the symbols and their meaning before
operating this instrument.
WARNINGWarning denotes a hazard. It calls attention to a procedure
which, if not correctly performed or adhered to, could result in
injury or loss of life. Do not proceed beyond a warning note
until the indicated conditions are fully understood and met.
CAUTIONCaution denotes a hazard. It calls attention to a procedure that, if not
correctly performed or adhered to, could result in damage to or
destruction of the instrument. Do not proceed beyond a caution sign
until the indicated conditions are fully understood and met.
NOTENote calls out special information for the user’s attention. It provides
operational information or additional instructions of which the user
should be aware.
ii
The instruction documentation symbol. The product is
marked with this symbol when it is necessary for the
user to refer to the instructions in the documentation.
This symbol is used to mark the on position of the
power line switch.
This symbol is used to mark the standby position of the
power line switch.
This symbol indicates that the input power required is
AC.
WARNINGThis is a Safety Class 1 Product (provided with a protective
earthing ground incorporated in the power cord). The mains
plug shall only be inserted 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.
WARNINGIf this product is not used as specified, the protection provided
by the equipment could be impaired. This product must be used
in a normal condition (in which all means for protection are
intact) only.
iii
Warranty
This Agilent Technologies instrument product is warranted against
defects in material and workmanship for a period of three years from
date of shipment. During the warranty period, Agilent Technologies
will, at its option, either repair or replace products which prove to be
defective.
For warranty service or repair, this product must be returned to a
service facility designated by Agilent Technologies. Buyer shall prepay
shipping charges to Agilent Technologies and Agilent Technologies
shall pay shipping charges to return the product to Buyer. However,
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 firmware
designated by Agilent Technologies for use with an instrument will
execute its programming instructions when properly installed on that
instrument. Agilent Technologies does not warrant that the operation
of the instrument, or software, or firmware will be uninterrupted or
error-free.
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.
EXCLUSIVE REMEDIES
THE REMEDIES PROVIDED HEREIN ARE BUYER’S SOLE AND
EXCLUSIVE REMEDIES. AGILENT TECHNOLOGIES SHALL NOT
BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES, WHETHER BASED ON
CONTRACT, TORT, OR ANY OTHER LEGAL THEORY.
iv
Where to Find the Latest Information
Documentation is updated periodically.For the latest information about
Agilent ESA Spectrum Analyzers, including firmware upgrades and
application information, please visit the following Internet URL:
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.
1-1
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 ESA Spectrum Analyzer SCPI commands are used for examples
in this chapter. Topics included in this chapter are:
• “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”
1-2Chapter1
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:
The following sample commands are all
identical. They will all cause the same result.
• :Sense:Band:Res 1700
• :BANDWIDTH:RESOLUTION 1.7e3
• :sens:band 1.7KHZ
• :SENS:band 1.7E3Hz
• :band 1.7kHz
• :bandwidth:RES 1.7e3Hz
The last command below returns different
results than the commands above it. The
number 3 in the command causes this. See the
command description for more information.
• :MEAS:HARM:AMPL?
• :Meas:Harm:Ampl?
• :MEAS:HARM:AMPL3?
• DET:FUNC NEG
• :Sense:Detector:Function Sample
:INITiate:CONTinuous OFF|ON|0|1The sample commands below are identical.
• :INIT:CONT ON
• :init:continuous 1
Chapter 11-3
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. Either form may be used in the command.
Example: Trig:Seq:Vid:Lev 2.5V is the same as
trigger:sequence:video:level 2.5V.
NOTEThe command TRIGG:Sequence:Video:Level 2.5V is not valid
because TRIGG is neither the long, nor the short form of the command.
1-4Chapter1
Special Characters in Commands
Special Characters in Commands
Programming Fundamentals
Special
Character
|A vertical stroke between
[ ]Key words in square
MeaningExample
parameters indicates
alternative choices. The
effect of the command is
different depending on
which parameter is
selected.
A vertical stroke between
key words indicates
identical effects exist for
several key words. Only one
of these key wordsis used at
a time. The command
functions the same for
either key word.
brackets are optional
when composing the
command. These implied
key words will be executed
even if they are omitted.
The following commands are
all valid and have identical
effects:
:SENSe:ACPower:AVERa
ge:STATe OFF
:ACPower:AVERage:STA
Te OFF
ACPower:AVERage OFF
< >Angle brackets around a
word, or words, indicates
they are not to be used
literally in the command.
They represent the needed
item.
Chapter 11-5
Command:
:SENSe:ACPower:CSPacin
g <freq>
In this command example the
word <freq> should be
replaced by an actual
frequency:
:SENSe:ACPower:CSPacin
g 9.7MHz
Programming Fundamentals
Special Characters in Commands
Special
Character
{ }Parameters in braces can
MeaningExample
Command:
optionally be used in the
command either not at all,
once, or several times.
[SENSe:]CORRection:CSE
T[1]|2|3|4:DATA:MERGe
<freq>,<rel_ampl>{,<fr
eq>,<rel_ampl>}
A valid form of this command
is:
[SENSe:]CORRection:CSE
T1:DATA:MERGe
740000,.94 1250000,.31
3320000,1.7
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.
Key Word
The parameter key words that are allowed for a particular command
are defined in the command description and are separated with a
vertical slash.
Units
Numerical variables may include units. The valid units for a command
depends on the variable type being used. See the following variable
descriptions. If no units are sent, the indicated default units will be
used. Units can follow the numerical value with, or without, a space.
Variable
A variable can be entered in exponential format as well as standard
numeric format. The appropriate variable range and its optional units
are defined in the command description.
In addition to these values, the following key words may also be used in
commands where they are applicable.
MINimum - sets the parameter to the smallest possible value.
MAXimum - sets the parameter to the largest possible value.
1-6Chapter1
Programming Fundamentals
Parameters in Commands
Include the key word MINimum or MAXimum after the question mark
in a query in order to return the numeric value of the key word.
Example query: [:SENSE]:FREQuency:CENTer? MAXimum
Variable Parameters
<freq>
A frequency parameter is a positive rational number followed by
optional units. The default unit is Hz. Acceptable units include: Hz,
kHz, MHz, GHz.
<time>
A time parameter is a rational number followed by optional units. The
default units are seconds. Acceptable units include: S, MS, US.
<ampl>, <rel_ampl>
The <ampl> (amplitude) parameter and the <rel_ampl> (relative
amplitude) parameter consist of a rational number followed by optional
units. Acceptable units include: V, mV, µV, dBm, dBmV, dBµV, Watts,
W.
<angle>
An angle parameter is a rational number followed by optional units.
The default units are degrees. Acceptable units include: DEG, RAD.
<integer>
There are no units associated with an integer parameter.
<percent>
A percent parameter is a rational number between 0 and 100, with no
units.
<string>
A string parameter includes a series of alpha numeric characters.
Block Program Data
Definite length arbitrary block response data is defined in section
8.7.9.2 of 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.
<definite_length_block>
It allows data to be transmitted over the system interface as a series of
8 bit data bytes. This element is particularly useful for sending large
quantities of data, 8 bit extended ASCII codes, or other data that are
not able to be directly displayed.
Chapter 11-7
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. The second command can
start at the same key word level as the command that was just
executed.
SCPI Termination and Separator Syntax
A terminator must be provided when an instrument is controlled using
RS-232. There are several issues to be understood about choosing the
proper SCPI terminator and separator when this is the case. There is
no current SCPI standard for RS-232. Although one intent of SCPI is to
be interface independent, <END> is only defined for IEEE 488
operation. At the time of this writing, the RS-232 terminator issue was
in the process of being addressed in IEEE standard 1174 .
A semicolon (;) is not a SCPI terminator, it is a separator. The purpose
of the separator is to queue multiple commands or queries in order to
obtain multiple actions and/or responses. Make sure that you do not
attempt to use the semicolon as a terminator when using RS-232
control.
Basically all binary trace and response data is terminated with
<NL><END>, as defined in Section 8.5 of 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.
The following are some examples of good and bad commands. The
examples are created from an ESA spectrum analyzer with the simple
set of commands indicated below:
[:SENSe]
:POWer
[:RF]
:ATTenuation 40dB
:TRIGger
[:SEQuence]
:EXTernal [1]
:SLOPe
POSitive
[:SENSe]
1-8Chapter1
Programming Fundamentals
Putting Multiple Commands on the Same Line
:FREQuency
:STARt
:POWer
[:RF]
:MIXer
:RANGe
[:UPPer]
Bad CommandGood Command
PWR:ATT 40dBPOW:ATT 40dB
The short form of POWER is POW, not PWR.
FREQ:STAR 30MHz;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.
FREQ:STAR 30MHz;POW:MIX RANG
–20dBm
MIX and RANG require a colon to separate them.
:POW:ATT 40dB;TRIG:FREQ:STAR
2.3GHz
:FREQ:STAR is in the :SENSE subsystem, not the :TRIGGER subsystem.
:POW:ATT?:FREQ:STAR?:POW:ATT?;:FREQ:STAR?
:POW and FREQ are within the same :SENSE subsystem, but they are two
separate commands, so they should be separated with a semicolon, not a
colon.
:POW:ATT -5dB;:FREQ:STAR
10MHz
Attenuation cannot be a negative value.
FREQ:STAR
30MHz;POW:MIX:RANG –20dBm
FREQ:STAR
30MHz;POW:MIX:RANG –20dBm
:POW:ATT 40dB;:FREQ:STAR
2.3GHz
:POW:ATT 5dB;:FREQ:STAR
10MHz
Chapter 11-9
Programming Fundamentals
Overview of GPIB
Overview of GPIB
GPIB Instrument Nomenclature
An instrument that is part of an GPIB network is categorized as a
listener, talker, or controller, depending on its current function in the
network.
ListenerA 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.
TalkerA talker is a device capable of transmitting data or
commands to other instruments. To avoid confusion, an
GPIB system allows only one device at a time to be an
active talker.
ControllerA controller is an instrument, typically a computer,
capable of managing the various GPIB activities. Only
one device at a time can be an active controller.
GPIB Command Statements
Command statements form the nucleus of GPIB programming. They
are understood by all instruments in the network. When combined with
the programming language codes, they provide all management and
data communication instructions for the system. Refer to the your
programming language manual and your computers I/O programming
manual for more information.
The seven fundamental command functions are as follows:
• An abort function that stops all listener/talker activity on the
interface bus, and prepares all instruments to receive a new
command from the controller. Typically, this is an initialization
command used to place the bus in a known starting condition
(sometimes called: abort, abortio, reset, halt).
• A remote function that causes an instrument to change from local
control to remote control. In remote control, the front panel keys are
disabled except for the Local key and the line power switch
(sometimes called: remote, resume).
• A local lockout function, that can be used with the remote function,
to disable the front panel Local key. With the Local key disabled,
only the controller (or a hard reset by the line power switch) can
restore local control (sometimes called: local).
1-10Chapter1
Programming Fundamentals
Overview of GPIB
• 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).
• An output function that is used to send function commands and data
commands from the controller to the addressed instrument
(sometimes called: output, control, convert, image, iobuffer,
transfer).
• An enter function that is the complement of the output function and
is used to transfer data from the addressed instrument to the
controller (sometimes called: enter, convert, image, iobuffer, on
timeout, set timeout, transfer).
Chapter 11-11
Programming Fundamentals
Overview of RS-232
Overview of RS-232
Serial interface programming techniques are similar to most general
I/O applications.
Due to the asynchronous nature of serial I/O operations, special care
must be exercised to ensure that data is not lost by sending to another
device before the device is ready to receive. Modem line handshaking
can he used to help solve this problem. These and other topics are
discussed in greater detail in your programming language
documentation.
Settings for the Serial Interface
Please refer to the documentation on your computer and I/O to
configure the serial bus. Some common serial interface configuration
settings are:
Baud Rate to9600
Bits per character to8
Parity toOdd or disabled
Stop bits to1
Handshake and Baud Rate
To determine hardware operating parameters, you need to know the
answer for each of the following questions about the peripheral device:
• Which of the following signal and control lines are actively used
during communication with the peripheral?
— Data Set Ready (DSR)
— Clear to Send (CTS)
• What baud rate is expected by the peripheral?
Character Format Parameters
To define the character format, you must know the requirements of the
peripheral device for the following parameters:
• Character Length: Eight data bits are used for each character,
excluding start, stop, and parity bits.
• Parity Enable: Parity is disabled (absent) for each character.
• Stop Bits: One stop bit is included with each character.
1-12Chapter1
Programming Fundamentals
Overview of RS-232
Modem Line Handshaking
To use modem line handshaking for data transfer you would consider
the following tasks:
1. Set Data Terminal Ready and Request-to-Send modem lines to
active state.
2. Check Data Set Ready and Clear-to-Send modem lines to be sure
they are active.
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. Set Data Terminal Ready line to active state. Leave Request-to-Send
inactive.
2. Check Data Set Ready and Data Carrier Detect modem lines to be
sure they are active.
3. Input information from the interface as it is received from the
peripheral.
4. After the input operation is complete, clear the Data Terminal Ready
signal.
Data Transfer Errors
The serial interface can generate several types of errors when certain
conditions are encountered while receiving data from the peripheral
device. Errors can be generated by any of the following conditions:
• Parity error. The parity bit on an incoming character does not match
the parity expected by the receiver.This condition is most commonly
caused by line noise.
• Framing error. Start and stop bits do not match the timing
expectations of the receiver. This can occur when line noise causes
the receiver to miss the start bit or obscures the stop bits.
• Overrun error. Incoming data buffer overrun caused a loss of one or
more data characters. This is usually caused when data is received
by the interface, but no ENTER statement has been activated to
input the information.
• Break received. A BREAK was sent to the interface by the
peripheral device. The desktop computer program must be able to
properly interpret the meaning of a break and take appropriate
action.
Chapter 11-13
Programming Fundamentals
Printer Setup and Operation
Printer Setup and Operation
Equipment
• ESA Spectrum Analyzer equipped with Options A4H and Parallel
Interface) or 1AX (RS-232 and Parallel Interface).
• IEEE 1284 compliant printer cable (such as C2950A).
• Supported printer equipped with a parallel interface. (A supported
printer is one that accepts Printer Control Language Level 3 or 5).
— PCL3 printers include most HP DeskJet printers.
— PCL5 printers include most HP LaserJet printers and the 1600C
DeskJet printer.
Interconnection and Setup
1. Turn off the printer and the analyzer.
2. Connect the printer to the analyzer parallel I/O interface connector
using an IEEE 1284 compliant parallel printer cable.
3. If appropriate, configure your printer using configuration menus or
switches. Refer to your printer’s documentation for more specific
information on configuring your printer.
4. Turn on the analyzer and printer.
5. Press
Print Setup on the front panel and then press the Printer Type
menu key. Printer Type accesses the following keys:
NoneNone disables the analyzer from attempting to print
to a printer. This is the appropriate setting if no
printer is connected to the analyzer.
CustomCustom allows you to access the Define Custom menu
keys. The
Define Custom menu keys allow you to
specify printer characteristics such as PCL Level
and printer color capability.
AutoAuto enables the analyzer to automatically attempt
to identify the connected printer when the
is pressed or when
Printer Type is set to Auto.
Print key
1-14Chapter1
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.
This indicates that the analyzer has successfully identified the
connected printer and no further setup is required. As long as
Auto remains selected in the Printer Type menu, the analyzer will
attempt to identify the printer when the front panel
Print key is
pressed.
• The
Print Setup menu will be displayed with the Custom key
selected and one of the following diagnostic messages will be
displayed in the display status line:
Unknown printer, Define Custom to set up printer
No printer response, Define Custom to set up
printer
Invalid printer response, Define Custom to set up
printer
This indicates that the analyzer was unable to automatically
identify the connected printer, and
the
Printer Type menu. Press Print Setup, Define Custom to select
Custom has been selected in
specific printer characteristics such as the printer language
(PCL3 or PCL5) and color printing capability. Once you have set
these characteristics to match those of your connected printer, the
printer setup process is complete. As long as
selected in the
Printer Type menu, the analyzer will not attempt to
Custom remains
automatically identify the connected printer when the front panel
Print key is pressed.
• The
Print Setup menu will be displayed with the None key selected
and the following message will appear in the display status line:
Unsupported printer, Printer Type set to None
This indicates that the analyzer has successfully identified the
connected printer, but the printer is not supported by the
analyzer. As long as
None is selected in the Printer Type menu, the
analyzer will respond to any print command by displaying the
message Printer Type is None in the display status line.
Chapter 11-15
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. Printer
Timeout will remain on the display until the printer is ready or until
you press
ESC to cancel the printout request.
1-16Chapter1
2Status 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 ESA analyzers is also
provided.
2-1
Loading...
+ 328 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.