Agilent 54600-Series Oscilloscopes: Programmer's Guide
Agilent 54600-Series Oscilloscopes: Programmer's Guide
Agilent 54600-Series Oscilloscopes: Programmer's Guide
Agilent 54600-Series
Oscilloscopes
Programming the Oscilloscope
When you attach an interface module to the rear of the Agilent 54600-
Series Oscilloscopes, the oscilloscope becomes programmable. That is,
you can hook a controller (such as a PC or workstation) to the
oscilloscope, and write programs on that controller to automate
oscilloscope setup and data capture. Both GPIB (also known as
IEEE-488) and RS-232-C interfaces are available.
The following figure shows the basic structure of every program you
will write for the oscilloscope.
Initialize
To ensure consistent, repeatable performance, you need to start the
program, controller, and oscilloscope in a known state. Without
correct initialization, your program may run correctly in one instance
and not in another. This might be due to changes made in
configuration by previous program runs or from the front panel of the
oscilloscope.
· Program initialization defines and initializes variables, allocates
memory, or tests system configuration.
· Controller initialization ensures that the interface to the
oscilloscope (either GPIB or RS-232) is properly setup and ready
for data transfer.
· Oscilloscope initialization sets the channel, trigger, timebase, and
acquisition subsystems for the desired measurement.
ii
Capture
Once you initialize the oscilloscope, you can begin capturing data for
measurement. Remember that while the oscilloscope is responding to
commands from the controller, it is not performing acquisitions. Also,
when you change the oscilloscope configuration, any data already
captured is most likely invalid.
To collect data, you use the DIGITIZE command. This command
clears the waveform buffers and starts the acquisition process.
Acquisition continues until the criteria, such as number of averages,
completion criteria, and number of points is satisfied. Once the
criteria is satisfied, the acquisition process is stopped. The acquired
data is displayed by the oscilloscope, and the captured data can be
measured, stored in memory in the oscilloscope, or transferred to the
controller for further analysis. Any additional commands sent while
DIGITIZE is working are buffered until DIGITIZE is complete.
You could also start the oscilloscope running, then use a wait loop in
your program to ensure that the oscilloscope has completed at least
one acquisition before you make a measurement. This is not
recommended, because the needed length of the wait loop may vary,
causing your program to fail. DIGITIZE, on the other hand, ensures
that data capture is complete. Also, DIGITIZE, when complete, stops
the acquisition process, so that all measurements are on displayed
data, not a constantly changing data set.
Analyze
After the oscilloscope has completed an acquisition, you can find out
more about the data, either by using the oscilloscope measurements
or by transferring the data to the controller for manipulation by your
program. Built-in measurements include IEEE standard parametric
measurements (such as Vpp, frequency, pulse width) or the
positioning and reading of voltage and time markers.
Using the WAVEFORM commands, you can transfer the data to your
controller for special analysis, if desired.
iii
In This Book
iv
For information on oscilloscope 1 Introduction to Programming
operation, see the Agilent 54600-Series
Oscilloscopes User and Service Guide.
For information on interface 2 Programming Getting Started
configuration, see the documentation for
the oscilloscope and the interface card
used in your controller (for example, the 3 Programming over GPIB
82341C interface for IBM PC-compatible
computers).
4 Programming over RS-232-C
Programming and
5 Documentation Conventions
6 Status Reporting
Index
v
vi
Contents
1 Introduction to Programming
Talking to the Instrument 1–3
Program Message Syntax 1–4
Combining Commands from the Same Subsystem 1–7
Duplicate Mnemonics 1–7
Query Command 1–8
Program Header Options 1–9
Program Data Syntax Rules 1–10
Program Message Terminator 1–12
Selecting Multiple Subsystems 1–12
Contents–1
Contents
6 Status Reporting
Serial Poll 6–6
Index
Contents–2
1
Introduction to Programming
Introduction to Programming
The programming examples for individual commands in this manual are written
in Agilent BASIC, C, or SICL C.
1–2
Introduction to Programming
Talking to the Instrument
1–3
Introduction to Programming
Program Message Syntax
Output Command
The output command is entirely dependent on the programming language.
Throughout this manual, Agilent BASIC is used in most examples of
individual commands. If you are using other languages, you will need to find
the equivalents of Agilent BASIC commands like OUTPUT, ENTER, and
CLEAR in order to convert the examples. The instructions listed in this
manual are always shown between quotation marks in the example programs.
Device Address
The location where the device address must be specified is also dependent
on the programming language you are using. In some languages, this may be
specified outside the output command. In Agilent BASIC, this is always
specified after the keyword OUTPUT. The examples in this manual assume
the oscilloscope is at device address 707. When writing programs, the address
varies according to how the bus is configured.
1–4
Introduction to Programming
Program Message Syntax
Instructions
Instructions (both commands and queries) normally appear as a string
embedded in a statement of your host language, such as BASIC, Pascal, or C.
The only time a parameter is not meant to be expressed as a string is when
the instruction’s syntax definition specifies <block data>, such as learnstring.
There are only a few instructions which use block data.
Instructions are composed of two main parts:
· The header, which specifies the command or query to be sent.
· The program data, which provide additional information needed to clarify
the meaning of the instruction.
Instruction Header
The instruction header is one or more mnemonics separated by colons (:)
that represent the operation to be performed by the instrument. The
command tree in chapter 5 illustrates how all the mnemonics can be joined
together to form a complete header (see chapter 5, “Programming and
Documentation Conventions”).
The example in figure 1 is a command. Queries are indicated by adding a
question mark (?) to the end of the header. Many instructions can be used as
either commands or queries, depending on whether or not you have included
the question mark. The command and query forms of an instruction usually
have different program data. Many queries do not use any program data.
Program Data
Program data are used to clarify the meaning of the command or query. They
provide necessary information, such as whether a function should be on or
off, or which waveform is to be displayed. Each instruction’s syntax definition
shows the program data, as well as the values they accept. The section
“Program Data Syntax Rules” in this chapter has all of the general rules about
acceptable values.
When there is more than one data parameter, they are separated by
commas (,). Spaces can be added around the commas to improve readability.
1–5
Introduction to Programming
Program Message Syntax
Header Types
There are three types of headers:
· Simple Command headers.
· Compound Command headers.
· Common Command headers.
Simple Command Header Simple command headers contain a single
mnemonic. AUTOSCALE and DIGITIZE are examples of simple
command headers typically used in this instrument. The syntax is:
<program mnemonic><terminator>
Simple command headers must occur at the beginning of a program message;
if not, they must be preceded by a colon.
When program data must be included with the simple command header (for
example, :DIGITIZE CHAN1), white space is added to separate the data from
the header. The syntax is:
<program mnemonic><separator><program data><terminator>
1–6
Introduction to Programming
Combining Commands from the Same Subsystem
Duplicate Mnemonics
Identical function mnemonics can be used for more than one subsystem. For
example, the function mnemonic RANGE may be used to change the vertical
range or to change the horizontal range:
:CHANNEL1:RANGE .4
sets the vertical range of channel 1 to 0.4 volts full scale.
:TIMEBASE:RANGE 1
sets the horizontal time base to 1 second full scale.
CHANNEL1 and TIMEBASE are subsystem selectors and determine which
range is being modified.
1–7
Introduction to Programming
Query Command
Query Command
Command headers immediately followed by a question mark (?) are queries.
After receiving a query, the instrument interrogates the requested function
and places the answer in its output queue. The answer remains in the output
queue until it is read or another command is issued. When read, the answer is
transmitted across the bus to the designated listener (typically a controller).
For example, the query :TIMEBASE:RANGE? places the current time base
setting in the output queue. In Agilent BASIC, the controller input statement:
ENTER < device address > ;Range
passes the value across the bus to the controller and places it in the variable
Range.
Query commands are used to find out how the instrument is currently
configured. They are also used to get results of measurements made by the
instrument. For example, the command :MEASURE:RISETIME? instructs the
instrument to measure the rise time of your waveform and places the result
in the output queue.
The output queue must be read before the next program message is sent. For
example, when you send the query :MEASURE:RISETIME? you must follow
that query with an input statement. In Agilent BASIC, this is usually done
with an ENTER statement immediately followed by a variable name. This
statement reads the result of the query and places the result in a specified
variable.
Sending another command or query before reading the result of a query causes
the output buffer to be cleared and the current response to be lost. This also
generates a query interrupted error in the error queue.
1–8
Introduction to Programming
Program Header Options
The rules for the short form syntax are shown in chapter 5, “Programming and
Documentation Conventions.”
1–9
Introduction to Programming
Program Data Syntax Rules
1–10
Introduction to Programming
Program Data Syntax Rules
Embedded Strings
Embedded strings contain groups of alphanumeric characters which are
treated as a unit of data by the oscilloscope. For example, the line of text
written to the advisory line of the instrument with the :SYSTEM:DSP
command:
:SYSTEM:DSP"This is a message."
Embedded strings may be delimited with either single (’) or double (")
quotes. These strings are case-sensitive and spaces act as legal characters
just like any other character.
1–11
Introduction to Programming
Program Message Terminator
The NL (New Line) terminator has the same function as an EOS (End Of String)
and EOT (End Of Text) terminator.
:CHANNEL1:RANGE 0.4;:TIMEBASE:RANGE 1
1–12
2
2–2
Programming Getting Started
Initialization
Initialization
To make sure the bus and all appropriate interfaces are in a known state,
begin every program with an initialization statement. Agilent BASIC provides
a CLEAR command which clears the interface buffer:
CLEAR 707 ! initializes the interface of the instrument
When you are using GPIB, CLEAR also resets the oscilloscope’s parser. The
parser is the program which reads in the instructions which you send it.
After clearing the interface, initialize the instrument to a preset state:
OUTPUT 707;"*RST" ! initializes the instrument to a preset
state.
The actual commands and syntax for initializing the instrument are discussed in
the common commands section of the online Agilent 54600-Series
Oscilloscopes Programmer’s Reference.
2–3
Programming Getting Started
Autoscale
Autoscale
The AUTOSCALE feature performs a very useful function on unknown
waveforms by setting up the vertical channel, time base, and trigger level of
the instrument.
The syntax for the autoscale function is:
:AUTOSCALE<terminator>
2–4
Programming Getting Started
Example Program
Example Program
This program demonstrates the basic command structure used to program
the oscilloscope.
2–5
Programming Getting Started
Using the DIGitize Command
When you send the DIGitize command to the oscilloscope, the specified
channel signal is digitized with the current ACQuire parameters. To obtain
waveform data, you must specify the WAVEFORM parameters for the
waveform data prior to sending the :WAVEFORM:DATA? query.
2–6
Programming Getting Started
Using the DIGitize Command
This setup places the instrument into the averaged mode with eight averages.
This means that when the DIGitize command is received, the command will
execute until the signal has been averaged at least eight times.
After receiving the :WAVEFORM:DATA? query, the instrument will start
passing the waveform information when addressed to talk.
Digitized waveforms are passed from the instrument to the controller by
sending a numerical representation of each digitized point. The format of the
numerical representation is controlled with the :WAVEFORM:FORMAT
command and may be selected as BYTE, WORD, or ASCII.
The easiest method of transferring a digitized waveform depends on data
structures, formatting available and I/O capabilities. You must scale the
integers to determine the voltage value of each point. These integers are
passed starting with the leftmost point on the instrument’s display. For more
information, see the waveform subsystem commands and corresponding
program code examples in the online Agilent 54600-Series Oscilloscopes
Programmer’s Reference.
2–7
Programming Getting Started
Receiving Information from the Instrument
2–8
Programming Getting Started
String Variables
String Variables
The output of the instrument may be numeric or character data depending
on what is queried. Refer to the specific commands for the formats and types
of data returned from queries.
In Agilent BASIC, string variables are case sensitive and must be expressed
exactly the same each time they are used.
For the example programs in the help file, assume that the device being
programmed is at device address 707. The actual address varies according to
how you have configured the bus for your own application.
The following example shows the data being returned to a string variable:
10 DIM Rang$[30]
20 OUTPUT 707;":CHANNEL1:RANGE?"
30 ENTER 707;Rang$
40 PRINT Rang$
50 END
After running this program, the controller displays:
+8.00000E-01
2–9
Programming Getting Started
Numeric Variables
Numeric Variables
The following example shows the data being returned to a numeric variable:
10 OUTPUT 707;":CHANNEL1:RANGE?"
20 ENTER 707;Rang
30 PRINT Rang
40 END
After running this program, the controller displays:
.8
2–10
Programming Getting Started
Definite-Length Block Response Data
The “8” states the number of digits that follow, and “00004000” states the
number of bytes to be transmitted.
2–11
Programming Getting Started
Multiple Queries
Multiple Queries
You can send multiple queries to the instrument within a single program
message, but you must also read them back within a single program message.
This can be accomplished by either reading them back into a string variable
or into multiple numeric variables. For example, you could read the result of
the query :TIMEBASE:RANGE?;DELAY? into the string variable Results$
with the command:
ENTER 707;Results$
When you read the result of multiple queries into string variables, each
response is separated by a semicolon. For example, the response of the query
:TIMEBASE:RANGE?;DELAY? would be:
<range_value>; <delay_value>
Use the following program message to read the query
:TIMEBASE:RANGE?;DELAY? into multiple numeric variables:
ENTER 707;Result1,Result2
Instrument Status
Status registers track the current status of the instrument. By checking the
instrument status, you can find out whether an operation has been
completed, whether the instrument is receiving triggers, and more. Chapter
6, “Status Reporting” explains how to check the status of the instrument.
2–12
3
This section describes the GPIB interface functions and some general
concepts. In general, these functions are defined by IEEE 488.1. They
deal with general interface management issues, as well as messages
which can be sent over the interface as interface commands.
For more information on connecting the controller to the oscilloscope,
see the documentation for the GPIB interface card you are using.
3–2
Programming over GPIB
Interface Capabilities
Interface Capabilities
The interface capabilities of the oscilloscope, as defined by IEEE 488.1, are
SH1, AH1, T5, L4, SR1, RL1, PP0, DC1, DT1, C0, and E2.
3–3
Programming over GPIB
Addressing
Addressing
Set the instrument address by using the front panel controls on the
oscilloscope after the GPIB interface has been installed on the rear panel of
the oscilloscope.
1 Press Print/Utility , then press the I/O Menu softkey.
2 Press the Inst Addr softkey to select the instrument address. Increment
the address by successively pressing the Inst Addr softkey. The address
can also be incremented or decremented by turning the knob closest to
the Cursors key.
3–4
Programming over GPIB
Communicating over the bus
See the documentation for your GPIB interface card for more information on
select codes and addresses.
3–5
Programming over GPIB
Lockout
Lockout
You can use the SYSTem:LOCK ON command to disable front-panel control
while a program is running. By default, the instrument accepts and executes
bus commands, and the front panel is entirely active.
With GPIB, the instrument is placed in the lockout mode by sending the local
lockout command (LLO). The instrument can be returned to local by
sending the go-to-local command (GTL) to the instrument.
Bus Commands
The following commands are IEEE 488.1 bus commands (ATN true). IEEE
488.2 defines many of the actions which are taken when these commands are
received by the instrument.
Device Clear
The device clear (DCL) or selected device clear (SDC) commands clear the
input and output buffers, reset the parser, and clear any pending commands.
If either of these commands is sent during a digitize operation, the digitize
operation is aborted.
3–6
4
IEEE 488.2 is designed to work with IEEE 488.1 as the physical interface. When
RS-232-C is used as the physical interface, as much of IEEE 488.2 is retained as
the hardware differences will allow. No IEEE 488.1 messages such as DCL, GET,
and END are available.
4–2
Programming over RS-232-C
Interface Operation
Interface Operation
The oscilloscope can be programmed with a controller over RS-232-C using
either a minimum three-wire or extended hardwire interface. The operation
and exact connections for these interfaces are described in more detail in the
following sections. When you are programming the oscilloscope over
RS-232-C with a controller, you are normally operating directly between two
DTE (Data Terminal Equipment) devices as compared to operating between
a DTE device and a DCE (Data Communications Equipment) device.
When operating directly between two RS-232-C devices, certain
considerations must be taken into account. For three-wire operation, an
XON/XOFF software handshake must be used to handle handshaking
between the devices. For extended hardwire operation, handshaking may be
handled either with XON/XOFF or by manipulating the CTS and RTS lines of
the oscilloscope. For both three-wire and extended hardwire operation, the
DCD and DSR inputs to the oscilloscope must remain high for proper
operation.
With extended hardwire operation, a high on the CTS input allows the
oscilloscope to send data and a low on this line disables the oscilloscope data
transmission. Likewise, a high on the RTS line allows the controller to send
data and a low on this line signals a request for the controller to disable data
transmission. Since three-wire operation has no control over the CTS input,
internal pull-up resistors in the oscilloscope ensure that this line remains high
for proper three-wire operation.
Cables
Selecting a cable for the RS-232-C interface is dependent on your specific
application. The following paragraphs describe which lines of the oscilloscope
are used to control the operation of the RS-232-C bus relative to the
oscilloscope. To locate the proper cable for your application, refer to the
reference manual for your controller. This manual should address the exact
method your controller uses to operate over the RS-232-C bus.
4–3
Programming over RS-232-C
Minimum three-wire interface with software protocol
4–4
Programming over RS-232-C
Extended interface with hardware handshake
4–5
Programming over RS-232-C
Extended interface with hardware handshake
The TD (Transmit Data) line from the oscilloscope must connect to the RD
(Receive Data) line on the controller. Likewise, the RD line from the
oscilloscope must connect to the TD line on the controller.
The RTS (Request To Send) line is an output from the oscilloscope which
can be used to control incoming data flow. A high on the RTS line allows the
controller to send data, and a low on this line signals a request for the
controller to disable data transmission.
The CTS (Clear To Send), DSR (Data Set Ready), and DCD (Data Carrier
Detect) lines are inputs to the oscilloscope which control data flow from the
oscilloscope (Pin 2). Internal pull-up resistors in the oscilloscope assure the
DCD and DSR lines remain high when they are not connected.
If DCD or DSR are connected to the controller, the controller must keep
these lines and the CTS line high to enable the oscilloscope to send data to
the controller. A low on any one of these lines will disable the oscilloscope
data transmission. Dropping the CTS line low during data transmission will
stop oscilloscope data transmission immediately. Dropping either the DSR or
DCD line low during data transmission will stop oscilloscope data
transmission, but as many as two additional bytes may be transmitted from
the oscilloscope.
4–6
Programming over RS-232-C
Configuring the Interface
4–7
Programming over RS-232-C
Interface Capabilities
Interface Capabilities
The baud rate, stop bits, parity, handshake protocol, and data bits must be
configured exactly the same for both the controller and the oscilloscope to
properly communicate over the RS-232-C bus. The oscilloscope’s RS-232-C
interface capabilities are as follows:
· Baud Rate: 1200, 2400, 9600, or 19,200
· Stop Bits: 1
· Parity: None
· Protocol: DTR or XON/XOFF
· Data Bits: 8
Protocol
DTR (Data Terminal Ready) With a three-wire interface, selecting
DTR for the handshake protocol does not allow the sending or receiving
device to control data flow. No control over the data flow increases the
possibility of missing data or transferring incomplete data.
With an extended hardwire interface, selecting DTR allows a hardware
handshake to occur. With hardware handshake, hardware signals control data
flow.
XON/XOFF XON/XOFF stands for Transmit On/Transmit Off. With this
mode the receiver (controller or oscilloscope) controls data flow and can
request that the sender (oscilloscope or controller) stop data flow. By
sending XOFF (ASCII 17) over its transmit data line, the receiver
requests that the sender disables data transmission. A subsequent XON
(ASCII 19) allows the sending device to resume data transmission.
A controller sending data to the oscilloscope should send no more than 32
bytes of data after an XOFF.
The oscilloscope will not send any data after an XOFF is received until an
XON is received.
4–8
Programming over RS-232-C
Communicating over the RS-232-C bus
Data Bits
Data bits are the number of bits sent and received per character that
represent the binary code of that character.
Information is stored in bytes (8 bits at a time) in the oscilloscope. Data can
be sent and received just as it is stored, without the need to convert the data.
4–9
Programming over RS-232-C
Lockout Command
Lockout Command
To lockout the front panel controls use the system command LOCK. When
this function is on, all controls (except the power switch) are entirely locked
out. Local control can only be restored by sending the command
:SYSTEM:LOCK OFF.
Cycling the power will also restore local control, but this will also reset certain
RS-232-C states.
4–10
5
5–2
Programming and Documentation Conventions
Command Set Organization
5–3
Programming and Documentation Conventions
Command Set Organization
Table 5-1
5–4
Programming and Documentation Conventions
Command Set Organization
5–5
Programming and Documentation Conventions
The Command Tree
Command Types
The commands for this instrument can be placed into three types:
· Common commands
· Root level commands
· Subsystem commands
Common Commands The common commands are the commands
defined by IEEE 488.2. These commands control some functions that are
common to all IEEE 488.2 instruments.
Common commands are independent of the tree, and do not affect the
position of the parser within the tree. These commands differ from root level
commands in that root level commands place the parser back at the root of
the command tree.
Example:
*RST
Root Level Commands The root level commands control many of the
basic functions of the instrument. These commands reside at the root of
the command tree. Root level commands are always parsable if they
occur at the beginning of a program message, or are preceded by a colon.
Example:
:AUTOSCALE
5–6
Programming and Documentation Conventions
The Command Tree
: (root)
5–7
Programming and Documentation Conventions
The Command Tree
Subsystem Commands
Subsystem commands are grouped together under a common node of the
command tree, such as the TIMEBASE commands. Only one subsystem may
be selected at any given time. When the instrument is initially turned on, the
command parser is set to the root of the command tree, therefore, no
subsystem is selected.
5–8
Programming and Documentation Conventions
The Command Tree
Examples
The OUTPUT statements in the examples are written using Agilent BASIC
5.0. The quoted string is placed on the bus, followed by a carriage return and
linefeed (CRLF).
5–9
Programming and Documentation Conventions
Truncation Rules
Truncation Rules
The truncation rule for the mnemonics used in headers and alpha arguments
is:
The mnemonic is the first four characters of the keyword unless:
The fourth character is a vowel, then the mnemonic is the first
three characters of the keyword.
This rule is not used if the length of the keyword is exactly four
characters.
Some examples of how the truncation rule is applied to various commands
are shown in the following table.
Mnemonic Truncation
5–10
Programming and Documentation Conventions
Infinity Representation
Infinity Representation
The representation of infinity is 9.9E+37. This is also the value returned
when a measurement cannot be made.
Response Generation
As defined by IEEE 488.2, query responses may be buffered for the following
conditions:
· When the query is parsed by the instrument.
· When the controller addresses the instrument to talk so that it may read
the response.
The responses to a query are buffered when the query is parsed.
5–11
Programming and Documentation Conventions
Notation Conventions and Definitions
Conventions
< > Angle brackets enclose words or characters that symbolize a program code
parameter or an interface command.
::= “is defined as.” For example, <A> ::= <B> indicates that <A> can be
replaced by <B> in any statement containing <A>.
| “or.” Indicates a choice of one element from a list. For example, <A> | <B>
indicates <A> or <B>, but not both.
... An ellipsis (trailing dots) indicates that the preceding element may be
repeated one or more times.
[ ] Square brackets indicate that the enclosed items are optional.
{ } When several items are enclosed by braces, one, and only one of these
elements must be selected.
Definitions
d ::= A single ASCII numeric character, 0-9.
<white space> 0 through 32 (decimal) except linefeed (decimal 10). The nominal value is 32
::= (the space character).
5–12
Programming and Documentation Conventions
Program Examples
Program Examples
The program examples given for commands in the online
Agilent 54600-Series Oscilloscopes Programmer’s Reference were written
using the Agilent BASIC for Windows, C, and SICL C programming languages.
The programs always assume the oscillscope is at address 7 and the interface
is at address 7 for a program address of 707. If a printer is used, it is always
assumed to be at address 701.
In these examples, give special attention to the ways in which the command
or query can be sent. The way the instrument is set up to respond to a
command or query has no bearing on how you send the command or query.
That is, the command or query can be sent using the long form or short form,
if a short form exists for that command. You can send the command or query
using upper case (capital) letters or lower case (small) letters. Also, the data
can be sent using almost any form you wish. If you are sending a timebase
range value of 100 ms, that value could be sent using a decimal (.1), or an
exponential (1e-1 or 1.0E-1), or a suffix (100 ms or 100MS).
As an example, set the sweep speed to 100 ms by sending one of the
following:
· Commands in long form using the decimal format.
OUTPUT 707;":CHANNEL1:RANGE .1"
In these examples, the colon as the first character of the command is optional.
The space between RANGE and the argument is required.
5–13
5–14
6
Status Reporting
Status Reporting
6–2
Status Reporting
Figure 6–1
6–3
Status Reporting
Bit Definitions
MAV - message available. Indicates whether there is a response in the
output queue.
ESB - event status bit. Indicates if any of the conditions in the
Standard Event Status Register are set and enabled.
MSS - master summary status. Indicates whether the device has a
reason for requesting service. This bit is returned for the *STB? query.
RQS - request service. Indicates if the device is requesting service.
This bit is returned during a serial poll. RQS is set to 0 after it is read via
a serial poll (MSS is not reset by *STB?).
URQ - user request. Indicates whether a front-panel key has been
pressed.
CME - command error. Indicates whether the parser detected an
error.
EXE - execution error. Indicates whether a parameter was out of
range, or inconsistent with the current settings.
DDE - device specific error. Indicates whether the device was unable
to complete an operation for device dependent reasons.
QYE - query error. Indicates whether the protocol for queries has
been violated.
RQC - request control. Indicates whether the device is requesting
control. The logic analyzer never requests control.
OPC - operation complete. Indicates whether the device has
completed all pending operations.
TRG - trigger. Indicates whether a trigger has been received.
6–4
Status Reporting
Status Byte
If the device is requesting service (RQS set), and the controller serial polls
the device, the RQS bit is cleared. The MSS bit (read with *STB?) is not
cleared by reading it. The status byte is not cleared when read, except for the
RQS bit.
6–5
Status Reporting
Serial Poll
Serial Poll
This oscilloscope supports the IEEE 488.1 serial poll feature. When a serial
poll of the instrument is requested, the RQS bit is returned on bit 6 of the
status byte.
6–6
Status Reporting
Serial Poll
After the serial poll is completed, the RQS bit in the oscilloscope Status Byte
Register is reset if it was set. Once a bit in the Status Byte Register is set, it
remains set until the status is cleared with a *CLS command, or the
instrument is reset. If these bits do not get reset, they cannot generate
another SRQ.
6–7
6–8
7
7–2
Installing and Using the Programmer’s Reference
To install the help file under Microsoft Windows
7–3
Installing and Using the Programmer’s Reference
To get updated help and program files via the Internet
2 Check the README.TXT file for more information on the files in this
directory.
Using an ftp
application 1 To connect using an ftp application, a sample set of commands might
be as follows:
$ ftp ftp.cos.agilent.com
Name: anonymous
Password: <your email address>
4 Check the README.TXT file for more information on the files in this
directory.
If you have trouble making the connection, or need more information
on ftp, see your network administrator.
7–4
Installing and Using the Programmer’s Reference
To start the help file
7–5
Installing and Using the Programmer’s Reference
To navigate through the help file
7–6
8
8–2
Programmer’s Quick Reference
Conventions
Conventions
The following conventions used in this guide include:
<> Indicates that words or characters enclosed in angular
brackets symbolize a program code parameter or an
GPIB command.
::= "is defined as." <A>::= <B> indicates that <A> can be replaced by <B>
in any statement containing <A>.
| "or" Indicates a choice of one element from a list. For
example, <A> | <B> indicates <A> or <B> but not both.
... Indicates that the element preceding the ellipses may
be repeated one or more times.
[] Indicates that the bracketed items are optional.
{} Indicates that when items are enclosed by braces,
one, and only one of the elements may be selected.
{N,..,P} Indicates selection of one integer between N and P
inclusive.
Suffix Multipliers
The following suffix multipliers are available for arguments.
EX :: = 1E18 M :: = 1E-3
PE :: = 1E15 U :: = 1E-6
T :: = 1E12 N :: = 1E-9
G :: = 1E9 P :: = 1E-12
MA :: = 1E6 F :: = 1E-15
K :: = 1E3 A :: = 1E-18
8–3
Programmer’s Quick Reference
Commands and Queries
8–4
Programmer’s Quick Reference
Commands and Queries
8–5
Programmer’s Quick Reference
Commands and Queries
8–6
Programmer’s Quick Reference
Commands and Queries
8–7
Programmer’s Quick Reference
Commands and Queries
8–8
Programmer’s Quick Reference
Commands and Queries
8–9
Programmer’s Quick Reference
Commands and Queries
8–10
Programmer’s Quick Reference
Commands and Queries
8–11
Programmer’s Quick Reference
Commands and Queries
8–12
Programmer’s Quick Reference
Commands and Queries
8–13
Programmer’s Quick Reference
Commands and Queries
8–14
Programmer’s Quick Reference
Commands and Queries
8–15
Programmer’s Quick Reference
Commands and Queries
8–16
Programmer’s Quick Reference
Commands and Queries
8–17
Programmer’s Quick Reference
Commands and Queries
8–18
Index
A D I
Addressing, 3–4 to 3–5 Data bits, 4–8 to 4–9 IEEE 488.1, 4–2
alpha argument, 5–10 8-Bit mode, 4–9 IEEE 488.2, 4–2, 5–6
Arguments, 1–5 Data Carrier Detect (DCD), 4–6 Standard, 1–2
Data Communications Equipment, 4–3 Infinity Representation, 5–11
B Data Set Ready (DSR), 4–6 Initialization, 2–3
BASIC, 1–3 Data Terminal Equipment, 4–3 Instruction headers, 1–5
Baud rate, 4–7 to 4–8 Data Terminal Ready (DTR), 4–5, 4–8 Instruction syntax, 1–4
Block data, 1–5, 2–11 DCE, 4–3 Instructions, 1–4
DDE - device specific error, 6–4 Instrument address
C Definite-length block response data, 2–11 GPIB, 3–5
Cable Device address, 1–4 Interface Capabilities, 3–3
RS-232-C, 4–3 GPIB, 3–5 RS-232-C, 4–8
carriage return, 5–9 DIGitize Command, 2–6 Interface select code
Character data, 1–10 documentation conventions, 5–2 GPIB, 3–5
Character program data, 1–10 DTE, 4–3
Clear To Send (CTS), 4–6 DTR (Data Terminal Ready), 4–8 L
CME - command error, 6–4 Duplicate mnemonics, 1–7 leading colon, 5–8 to 5–9
Combining commands, 1–7 linefeed, 5–6
Command, 1–5 E linefeed (CRLF), 5–9
Common Commands, 5–6 Embedded strings, 1–3, 1–5, 1–11 lockout, 3–6
Lockout, 4–10 Enter statement, 1–3 Lockout command, 4–10
Root Level Commands, 5–6 EOI, 1–12 Long form, 1–9
Subsystem Commands, 5–8 ESB - event status bit, 6–4 Lowercase, 1–9
Command structure, 2–5 Example Program, 2–5
Command Tree, 5–6 to 5–9 EXE - execution error, 6–4 M
Command Types, 5–6 Exponents, 1–10 MAV - message available, 6–4
Common command header, 1–6 mnemonic, 5–10
common commands, 5–6 F MSS - master summary status, 6–4
Communication, 1–3 Fractional values, 1–10 Multiple numeric variables, 2–12
Compound command header, 1–6 Multiple program commands, 1–12
compound header, 5–8 G Multiple program data, 1–10
Controllers, 1–3 GPIB, 3–5 Multiple queries, 2–12
conventions, 5–2 Addressing, 3–4 to 3–5 Multiple subsystems, 1–12
H N
Handshake, 4–7 NL, 1–12, 5–6
Headers, 1–5 to 1–6, 5–10 Notation Conventions and Definitions, 5–12
Host language, 1–5 Numeric data, 1–10
Numeric program data, 1–10
Numeric variables, 2–10
Index–1
Index
O S
OPC - operation complete, 6–4 Separator, 1–5
Operation Complete, 6–5 Sequential commands, 5–11
Output command, 1–4 Serial Poll, 6–6 to 6–7
OUTPUT statement, 1–3 707, 2–9
Overlapped Commands, 5–11 Short form, 1–9
Simple command header, 1–6
P Spaces, 1–5
Parallel Poll, 6–6 Status, 2–12
Parameters, 1–5 Status Byte, 6–5
Parity, 4–8 Status registers, 2–12
Parser, 2–3 Status Reporting, 6–2
Program data, 1–5, 1–10 Stop bits, 4–8
Program example, 2–5 String variables, 2–9
program message, 5–9 Subsystem commands, 5–6
Program message syntax, 1–4
Program message terminator, 1–12, 5–8 T
program message unit separator, 5–9 Talking to the instrument, 1–3
Program syntax, 1–4 Terminator, 1–12
programming conventions, 5–2 Three-wire Interface, 4–4
Protocol, 4–8 Transmit Data (TD), 4–4, 4–6
DTR (Data Terminal Ready), 4–8 Transmit On/Transmit Off, 4–8
XON/XOFF, 4–8 TRG - trigger, 6–4
Trigger Bit, 6–5
Q Truncation Rules, 5–10
Query, 1–5, 1–8
Query command, 1–8 U
Query response, 2–8 Uppercase, 1–9
query responses, 5–11 URQ - user request, 6–4
Question mark, 1–8
QYE - query error, 6–4 W
White space, 1–5
R
Receive Data (RD), 4–4, 4–6 X
Request To Send (RTS), 4–6 XON/XOFF, 4–8
Response data, 2–11
Response Generation, 5–11
Root Level commands, 5–6
RQC - request control, 6–4
RQS - request service, 6–4
RS-232-C, 4–2
Baud rate, 4–7
Handshake, 4–7
Protocol, 4–7
Index–2
© Copyright Agilent Safety · Service instructions are for Safety Symbols
Technologies 1995-1996, 2001 This apparatus has been trained service personnel. To
All Rights Reserved. designed and tested in avoid dangerous electric
accordance with IEC shock, do not perform any
Instruction manual symbol:
Publication 1010, Safety service unless qualified to do
Microsoft is a registered the product is marked with
Requirements for Measuring so. Do not attempt internal
trademark of Microsoft this symbol when it is
Apparatus, and has been service or adjustment unless
Corporation. necessary for you to refer to
supplied in a safe condition. another person, capable of
the instruction manual in
This is a Safety Class I rendering first aid and
order to protect against
Reproduction, adaptation, or instrument (provided with resuscitation, is present.
damage to the product.
translation without prior terminal for protective · If you energize this
written permission is earthing). Before applying instrument by an auto
prohibited, except as allowed power, verify that the correct transformer (for voltage
under the copyright laws. safety precautions are taken reduction), make sure the
(see the following warnings). common terminal is Hazardous voltage symbol.
Restricted Rights Legend. In addition, note the external connected to the earth
Use, duplication or disclosure markings on the instrument terminal of the power source.
by the U.S. Government is that are described under
"Safety Symbols."
· Whenever it is likely that
subject to restrictions as set the ground protection is
forth in subparagraph (c) (1) Earth terminal symbol: Used
impaired, you must make the to indicate a circuit common
(ii) of the Rights in Technical Warning
instrument inoperative and connected to grounded
Data and Computer Software · Before turning on the secure it against any
clause at DFARS chassis.
instrument, you must connect unintended operation.
252.227-7013 for DOD the protective earth terminal
agencies, and subparagraphs of the instrument to the
· Do not operate the
WARNING
instrument in the presence of
(c) (1) and (c) (2) of the protective conductor of the
flammable gasses or fumes. The Warning sign denotes a
Commercial Computer (mains) power cord. The
Operation of any electrical hazard. It calls attention to a
Software Restricted Rights mains plug shall only be
instrument in such an procedure, practice, or the
clause at FAR 52.227-19 for inserted in a socket outlet
environment constitutes a like, which, if not correctly
other agencies. provided with a protective
definite safety hazard. performed or adhered to,
Agilent Technologies earth contact. You must not
· Do not install substitute could result in personal
negate the protective action
3000 Hanover Street Palo parts or perform any injury. Do not proceed
by using an extension cord
Alto, California 94304 U.S.A. unauthorized modification to beyond a Warning sign until
(power cable) without a
the instrument. the indicated conditions are
protective conductor
Document Warranty fully understood and met.
(grounding). Grounding one · Capacitors inside the
The information contained in conductor of a two-conductor instrument may retain a
this document is subject to outlet is not sufficient CAUTION
charge even if the instrument
change without notice. protection. is disconnected from its The Caution sign denotes a
Agilent Technologies · Only fuses with the source of supply.
makes no warranty of any hazard. It calls attention to
kind with regard to this
required rated current, · Use caution when exposing an operating procedure,
voltage, and specified type or handling the CRT. practice, or the like, which, if
material, including, but (normal blow, time delay,
not limited to, the implied Handling or replacing the not correctly performed or
etc.) should be used. Do not CRT shall be done only by adhered to, could result in
warranties of use repaired fuses or
merchantability or fitness qualified maintenance damage to or destruction of
short-circuited fuseholders. personnel. part or all of the product. Do
for a particular purpose. To do so could cause a shock not proceed beyond a
Agilent Technologies shall or fire hazard. Caution symbol until the
not be liable for errors indicated conditions are fully
contained herein or for understood or met.
damages in connection with
the furnishing, performance,
or use of this material.
Agilent Technologies
P.O. Box 2197
1900 Garden of the Gods Road
Colorado Springs, CO 80901
Product Warranty No other warranty is About this edition
This Agilent Technologies expressed or implied. This is the first edition of the
product has a warranty Agilent Technologies Agilent 54600-Series
against defects in material specifically disclaims the Oscilloscopes Programmer’s
and workmanship for a period implied warranties of Guide.
of three years from date of merchantability or fitness
shipment. During the for a particular purpose.
Publication number
warranty period, Agilent 54600-97032, April 2001
Technologies will, at its Exclusive Remedies
option, either repair or The remedies provided herein Printed in USA.
replace products that prove are the buyer’s sole and
to be defective. exclusive remedies. Agilent Print history is as follows:
For warranty service or Technologies shall not be 54600-97032, April 2001
repair, this product must be liable for any direct, indirect,
special, incidental, or 54600-97017, July 1996
returned to a service facility
designated by Agilent consequential damages, 54600-97015, October 1996
Technologies. whether based on contract, 54600-97014, April 1995
For products returned to tort, or any other legal theory.
Agilent Technologies for New editions are complete
warranty service, the Buyer Assistance revisions of the manual. Many
shall prepay shipping charges Product maintenance product updates do not
to Agilent Technologies and agreements and other require manual changes; and,
Agilent Technologies shall customer assistance conversely, manual
pay shipping charges to agreements are available for corrections may be done
return the product to the Agilent Technologies without accompanying
Buyer. However, the Buyer products. product changes. Therefore,
shall pay all shipping charges, For any assistance, contact do not expect a one-to-one
duties, and taxes for products your nearest Agilent correspondence between
returned to Agilent Technologies Sales Office. product updates and manual
Technologies from another updates.
country. Certification
Agilent Technologies Agilent Technologies certifies
warrants that its software and that this product met its
firmware designated by published specifications at
Agilent Technologies for use the time of shipment from the
with an instrument will factory. Agilent Technologies
execute its programming further certifies that its
instructions when properly calibration measurements are
installed on that instrument. traceable to the United States
Agilent Technologies does National Institute of
not warrant that the Standards and Technology, to
operation of the instrument the extent allowed by the
software, or firmware will be Institute’s calibration facility,
uninterrupted or error free. and to the calibration
facilities of other
Limitation of Warranty International Standards
The foregoing warranty shall Organization members.
not apply to defects resulting
from improper or inadequate
maintenance by the 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.