Agilent Part No. 86100-90003
Printed in USA
February 2000
Agilent Technologies
Lightwave Division
1400 Fountaingrove Parkway
Santa Rosa, CA 95403-1799,
USA
(707) 577-1400
Notice.
The information contained in
this document is subject to
change without notice. Companies, names, and data used
in examples herein are fictitious unless otherwise noted.
Agilent Technologies makes
no warranty of any kind with
regard to this material, including but not limited to, the
implied warranties of merchantability and fitness for a
particular purpose. Agilent
Technologies shall not be liable for errors contained herein
or for incidental or consequential damages in connection with the furnishing,
performance, or use of this
material.
Restricted Rights Legend.
Use, duplication, or disclosure by the U.S. Government
is subject to restrictions as set
forth in subparagraph (c) (1)
(ii) of the Rights in Technical
Data and Computer Software
clause at DFARS 252.227-7013
for DOD agencies, and subparagraphs (c) (1) and (c) (2)
of the Commercial Computer
Software Restricted Rights
clause at FAR 52.227-19 for
other agencies.
Warranty.
This Agilent Technologies
instrument product is warranted against defects in
material and workmanship for
a period of one year 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 errorfree.
Limitation of Warranty.
The foregoing warranty shall
not apply to defects resulting
from improper or inadequate
maintenance by Buyer, Buyersupplied 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 dis-
claims 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.
Safety Symbols.
CAUTION
The
hazard. It calls attention to a
procedure which, if not correctly performed or adhered
to, could result in damage to
or destruction of the product.
Do not proceed beyond a caution sign until the indicated
conditions are fully understood and met.
WARNING
The
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 sign until
the indicated conditions are
fully understood and met.
sign denotes a
caution
warning
sign denotes a
The instruction manual symbol. The product is marked with this
warning symbol when
it is necessary for the
user to refer to the
instructions in the
manual.
The laser radiation
symbol. This warning
symbol is marked on
products which have a
laser output.
The AC symbol is
used to indicate the
required nature of the
line module input
power.
The ON symbols are
|
used to mark the positions of the instrument
power line switch.
The OFF symbols
❍
are used to mark the
positions of the instrument power line
switch.
The CE mark is a registered trademark of
the European Community.
The CSA mark is a registered trademark of
the Canadian Standards Association.
ISM1-A This text denotes that
the instrument is an Industrial
Scientific and Medical Group 1
Class A product.
Typographical Conventions.
The following conventions are
used in this book:
key type
for keys or text
located on the keyboard or
instrument.
softkey type
are displayed on the instrument’s screen.
display type
characters displayed on the
computer’s screen or instrument’s display.
user type
ters that you type or enter.
emphasis
characters that emphasize
some point or that are used as
place holders for text that you
type.
for key names that
for words or
for words or charac-
type for words or
ii
General Safety Considerations
General Safety Considerations
WARNING
WARNING
CAUTION
If 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.
No operator serviceable parts inside. Refer servicing to qualified
personnel. To prevent electrical shock, do not remove covers.
Fiber-optic connectors are easily damaged when connected to dirty or
damaged cables and accessories. The digital communications analyzer’s frontpanel INPUT connector is no exception. When you use improper cleaning and
handling techniques, you risk expensive instrument repairs, damaged cables,
and compromised measurements. Before you connect any fiber-optic cable to
the digital communications analyzer, refer to “Cleaning Connectors for
Accurate Measurements” in the
instrument on-line help system.
This product has been designed and tested in accordance with IEC Publication 61010-1, Safety Requirements for Electrical Equipment for Measurement,
Control, and Laboratory Use, and has been supplied in a safe condition. The
instruction documentation contains information and warnings that must be
followed by the user to ensure safe operation and to maintain the product in a
safe condition.
Agilent 86100A Quick Start Guide
, or in the
iii
Contents
1 Introduction
Communicating with the Analyzer 1-2
Output Command 1-3
Device Address 1-3
Instructions 1-4
Instruction Header 1-4
White Space (Separator) 1-4
Program Data 1-5
Header Types 1-5
Duplicate Mnemonics 1-7
Query Headers 1-7
Program Header Options 1-8
Character Program Data 1-9
Numeric Program Data 1-9
Embedded Strings 1-10
Program Message Terminator 1-10
Common Commands within a Subsystem 1-10
Selecting Multiple Subsystems 1-11
File Names and Types 1-11
File Locations 1-13
Getting Started Programming 1-15
Initialization 1-15
Example Program 1-17
Using the DIGITIZE Command 1-18
Receiving Information from the Analyzer 1-19
String Variable Example 1-20
Numeric Variable Example 1-20
Definite-Length Block Response Data 1-21
Multiple Queries 1-21
Analyzer Status 1-22
2 Interface Functions
GPIB Interface Connector 2-2
GPIB Default Startup Conditions 2-2
Interface Capabilities 2-3
Command and Data Concepts 2-3
Communicating Over the Bus 2-4
Contents-1
Contents
Bus Commands 2-5
3 Message Communication and System Functions
Protocols 3-2
4 Status Reporting
Status Reporting Data Structures 4-5
Status Byte Register 4-8
Service Request Enable Register 4-10
Trigger Event Register (TRG) 4-10
Standard Event Status Register 4-11
Standard Event Status Enable Register 4-12
User Event Register (UER) 4-12
Local Event Register (LCL) 4-13
Operation Status Register (OPR) 4-13
Limit Test Event Register (LTER) 4-13
Mask Test Event Register (MTER) 4-14
Acquisition Event Register (AER) 4-15
Error Queue 4-15
Output Queue 4-16
Message Queue 4-16
Clearing Registers and Queues 4-16
5 Programming Conventions
Data Flow 5-2
Truncation Rule 5-3
The Command Tree 5-4
Infinity Representation 5-10
Sequential and Overlapped Commands 5-10
Response Generation 5-10
EOI 5-10
6 Sample Programs
Sample Program Structure 6-3
Sample C Programs 6-4
init.c - Initialization 6-5
init.c - Global Definitions and Main Program 6-6
Contents-2
init.c - Initializing the Analyzer 6-7
init.c - Acquiring Data 6-8
init.c - Making Automatic Measurements 6-9
init.c - Error Checking 6-11
init.c - Transferring Data to the PC 6-13
init.c - Converting Waveform Data 6-15
init.c - Storing Waveform Time and Voltage Information 6-16
gen_srq.c - Generating a Service Request 6-17
Listings of the Sample Programs 6-21
hpib_decl.h Sample Program 6-22
init.c Sample Program 6-24
gen_srq.c Sample Program 6-30
srq.c Sample Program 6-32
learnstr.c Sample Program 6-34
sicl_IO.c Sample Program 6-37
natl_IO.c Sample Program 6-40
init.bas Sample Program 6-44
srq.bas Sample Program 6-50
lrn_str.bas Sample Program 6-53
Data Acquisition 24-2
Waveform Data and Preamble 24-2
Data Conversion 24-3
Conversion from Data Value to Units 24-3
Data Format for GPIB Transfer 24-4
BANDpass? 24-5
BYTeorder 24-5
COUNt? 24-6
DATA 24-6
FORMat 24-9
POINts? 24-10
PREamble 24-11
SOURce 24-14
TYPE? 24-15
XDISplay? 24-16
XINCrement? 24-16
XORigin? 24-17
XRANge? 24-17
XREFerence? 24-18
XUNits? 24-18
YDISplay? 24-19
YINCrement? 24-19
YORigin? 24-20
YRANge? 24-20
YREFerence? 24-21
YUNits? 24-21
Agilent 83480A Commands Not Used in the Agilent 86100A 26-2
27 Error Messages
Error Queue 27-2
Error Numbers 27-3
Command Error 27-3
Execution Error 27-4
Device- or Analyzer-Specific Error 27-4
Query Error 27-5
List of Error Messages 27-6
Index
Contents-12
1
Communicating with the Analyzer 1-2
Output Command 1-3
Device Address 1-3
Instructions 1-4
Instruction Header1-4
White Space (Separator)1-4
Program Data 1-5
Header Types 1-5
Duplicate Mnemonics 1-7
Query Headers 1-7
Program Header Options 1-8
Character Program Data 1-9
Numeric Program Data 1-9
Embedded Strings1-10
Program Message Terminator 1-10
Common Commands within a Subsystem 1-10
Selecting Multiple Subsystems 1-11
File Names and Types 1-11
File Locations 1-13
Getting Started Programming 1-15
Initialization 1-15
Example Program 1-17
Using the DIGITIZE Command 1-18
Receiving Information from the Analyzer 1-19
String Variable Example 1-20
Numeric Variable Example 1-20
Definite-Length Block Response Data1-21
Multiple Queries 1-21
Analyzer Status 1-22
Introduction
Introduction
Introduction to Programming
Introduction to Programming
This chapter introduces the basics for remote programming of an analyzer.
The programming commands in this manual conform to the IEEE 488.2 Standard Digital Interface for Programmable Instrumentation. The programming
commands provide the means of remote control.
Basic operations that you can do with a computer (GPIB controller) and an
analyzer include:
• Set up the analyzer.
• Make measurements.
• Get data (waveform, measurements, configuration) from the analyzer.
• Send information, such as waveforms and configurations, to the analyzer.
Other tasks are accomplished by combining these functions.
.
Example Programs are Written in HP BASIC and C
The programming examples for individual commands in this manual are written in
HP BASIC and C.
Communicating with the Analyzer
Computers communicate with the analyzer by sending and receiving messages
over a remote interface, usually with GPIB programming. Commands for programming normally appear as ASCII character strings embedded in the output
statements of a “host” language available on your computer. The input commands of the host language are used to read in responses from the analyzer.
For example, HP BASIC uses the OUTPUT statement for sending commands
and queries. After a query is sent, the response is usually read using the
HP BASIC ENTER statement. The ENTER statement passes the value across
the bus to the computer and places it in the designated variable.
1-2
Introduction
Output Command
For the GPIB interface, messages are placed on the bus using an output command and passing the device address, program message, and a terminator.
Passing the device address ensures that the program message is sent to the
correct GPIB interface and GPIB device.
This HP BASIC OUTPUT statement sends a command that sets the channel 1
scale value to 500 mV:
The device address represents the address of the device being programmed.
Each of the other parts of the above statement are explained in the following
pages.
Use the Suffix Multiplier Instead
Using "mV" or "V" following the numeric voltage value in some commands will cause
Error 138–Suffix not allowed. Instead, use the convention for the suffix multiplier as
described in Chapter 3, “Message Communication and System Functions”.
Output Command
The output command depends entirely on the programming language.
Throughout this book, HP BASIC and ANSI C are used in the examples of individual commands. If you are using other languages, you will need to find the
equivalents of HP BASIC commands like OUTPUT, ENTER, and CLEAR, to
convert the examples.
Device Address
The location where the device address must be specified depends on the programming language you are using. In some languages, it may be specified outside the OUTPUT command. In HP BASIC, it is always specified after the
keyword OUTPUT. The examples in this manual assume that the analyzer and
interface card are at GPIB device address 707. When writing programs, the
device address varies according to how the bus is configured.
1-3
Introduction
Instructions
Instructions
Instructions, both commands and queries, normally appear as strings embedded in a statement of your host language, such as HP 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 HP BASIC’s
"learnstring" command. There are only a few instructions that 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 provides additional information to clarify the meaning
of the instruction.
Instruction Header
The instruction header is one or more command mnemonics separated by
colons (:) that represent the operation to be performed by the analyzer. See
Chapter 5, “Programming Conventions” for more information.
Queries are formed 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 include the question mark. The command and query forms
of an instruction usually have different program data. Many queries do not use
any program data.
White Space (Separator)
White space is used to separate the instruction header from the program data.
If the instruction does not require any program data parameters, you do not
need to include any white space. In this manual, white space is defined as one
or more spaces. ASCII defines a space to be character 32, in decimal.
1-4
Introduction
Program Data
Program Data
Program data is used to clarify the meaning of the command or query. It provides 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, and the values they accept. See “Numeric Program Data” on
page 1-9 for more information about general syntax rules and acceptable val-
ues.
When there is more than one data parameter, they are separated by
commas (,). You can add spaces around the commas to improve readability.
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 analyzer.
The syntax is:
<program mnemonic><terminator>
or
OUTPUT 707;”:AUTOSCALE”
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:
Compound command headers are a combination of two program mnemonics.
The first mnemonic selects the subsystem, and the second mnemonic selects
the function within that subsystem. The mnemonics within the compound
message are separated by colons. For example:
Common command headers, such as clear status, control the IEEE 488.2 functions within the analyzer. The syntax is:
*<command header><terminator>
No space or separator is allowed between the asterisk (*) and the command
header. *CLS is an example of a common command header.
1-6
Introduction
Duplicate Mnemonics
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.
To set the vertical range of channel 1 to 0.4 volts full scale:
:CHANNEL1:RANGE .4
To set the horizontal time base to 1 second full scale:
:TIMEBASE:RANGE 1
CHANNEL1 and TIMEBASE are subsystem selectors, and determine which
range is being modified.
Query Headers
Command headers immediately followed by a question mark (?) are queries.
After receiving a query, the analyzer interrogates the requested subsystem
and places the answer in its output queue. The answer remains in the output
queue until it is read or until another command is issued. When read, the
answer is transmitted across the bus to the designated listener (typically a
computer). For example, the query:
:TIMEBASE:RANGE?
places the current time base setting in the output queue.
In HP BASIC, the computer input statement:
ENTER < device address >;Range
passes the value across the bus to the computer and places it in the variable
Range.
You can use query commands to find out how the analyzer is currently configured. They are also used to get results of measurements made by the analyzer.
For example, the command:
:MEASURE:RISETIME?
tells the analyzer to measure the rise time of your waveform and place the
result in the output queue.
1-7
Introduction
Program Header Options
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 it
with an input statement. In HP 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.
Handling Queries Properly
If you send another command or query before reading the result of a query, the output
buffer is cleared and the current response is lost. This also generates a query-interrupted
error in the error queue. If you execute an input statement before you send a query, it will
cause the computer to wait indefinitely.
Program Header Options
You can send program headers using any combination of uppercase or lowercase ASCII characters. Analyzer responses, however, are always returned in
uppercase.
You may send program command and query headers in either long form (complete spelling), short form (abbreviated spelling), or any combination of long
form and short form. For example:
:TIMEBASE:DELAY 1E-6
:TIM:DEL 1E-6
is the short form.
is the long form.
Using Long Form or Short Form
Programs written in long form are easily read and are almost self-documenting.
The short form syntax conserves the amount of computer memory needed for program
storage and reduces I/O activity.
The rules for the short form syntax are described in Chapter 5, “Programming
Conventions”.
1-8
Introduction
Character Program Data
Character Program Data
Character program data is used to convey parameter information as alpha or
alphanumeric strings. For example, the :TIMEBASE:REFERENCE command
can be set to left, center, or right. The character program data in this case may
be LEFT, CENTER, or RIGHT. The command :TIMEBASE:REFERENCE
RIGHT sets the time base reference to right.
The available mnemonics for character program data are always included with
the instruction's syntax definition. Either the long form of commands, or the
short form (if one exists), may be sent. Uppercase and lowercase letters may
be mixed freely. When receiving responses, uppercase letters are used exclusively.
Numeric Program Data
Some command headers require program data to be expressed numerically.
For example, :TIMEBASE:RANGE requires the desired full scale range to be
expressed numerically.
For numeric program data, you can use exponential notation or suffix multipliers to indicate the numeric value. The following numbers are all equal:
28 = 0.28E2 = 280E-1 = 28000m = 0.028K = 28E-3K
When a syntax definition specifies that a number is an integer, it means that
the number should be whole. Any fractional part is ignored and truncated.
Numeric data parameters that accept fractional values are called real numbers. For more information see Chapter 2, “Interface Functions”.
All numbers are expected to be strings of ASCII characters.
• When sending the number 9, you would send a byte representing the ASCII
code for the character “9” (which is 57).
• A three-digit number like 102 would take up three bytes (ASCII codes 49, 48,
and 50). The number of bytes is figured automatically when you include the entire instruction in a string.
1-9
Introduction
Embedded Strings
Embedded Strings
Embedded strings contain groups of alphanumeric characters which are
treated as a unit of data by the analyzer. An example of this is the line of text
written to the advisory line of the analyzer with the :SYSTEM:DSP command:
:SYSTEM:DSP ""This is a message.""
You may delimit embedded strings with either single (') or double (") quotation marks. These strings are case-sensitive, and spaces act as legal characters
just like any other character.
Program Message Terminator
The program instructions within a data message are executed after the program message terminator is received. The terminator may be either a NL
(New Line) character, an EOI (End-Or-Identify) asserted in the GPIB interface, or a combination of the two. Asserting the EOI sets the EOI control line
low on the last byte of the data message. The NL character is an ASCII linefeed (decimal 10).
New Line Terminator Functions Like EOS and EOT
The NL (New Line) terminator has the same function as an EOS (End Of String) and EOT
(End Of Text) terminator.
Common Commands within a Subsystem
Common commands can be received and processed by the analyzer whether
they are sent over the bus as separate program messages or within other program messages. If you have selected a subsystem, and a common command is
received by the analyzer, the analyzer remains in the selected subsystem. For
example, if the program message
":ACQUIRE:AVERAGE ON;*CLS;COUNT 1024"
is received by the analyzer, the analyzer turns averaging on, then clears the
status information without leaving the selected subsystem.
1-10
Introduction
Selecting Multiple Subsystems
If some other type of command is received within a program message, you
must re-enter the original subsystem after the command. For example, the
program message
turns averaging on, completes the autoscale operation, then sets the acquire
average count. In this example, :ACQUIRE must be sent again after the
AUTOSCALE command to re-enter the ACQUIRE subsystem and set count.
Selecting Multiple Subsystems
You can send multiple program commands and program queries for different
subsystems on the same line by separating each command with a semicolon.
The colon following the semicolon lets you enter a new subsystem. For example:
Multiple commands may be any combination of compound and simple commands.
File Names and Types
When specifying a file name in a remote command, enclose the name in double quotation marks, such as "filename". If you specify a path, the path should
be included in the quotation marks.
You can use the full path name, a relative path name, or no path. For example,
you can specify:
• a full path name: "C:\User Files\waveforms\channel2.wfm"
• a relative path name: "..\myfile.set"
• a simple file name: "Memory1.txt"
All files stored using remote commands have file name extensions.The following table shows the file name extension used for each file type.
1-11
Introduction
File Names and Types
Table 1-1. File Name Extensions
File TypeFile Name Extension
Waveform - internal format.wfm
Waveform - text format (Verbose or Y values).txt
Setup.set
Color grade - Gray Scale.cgs
Screen image.bmp, .eps, .gif, .pcx, .ps
Mask.msk
If you do not specify an extension when storing a file, or specify an incorrect
extension, it will be corrected automatically according to the following rules:
• No extension specified: add the extension for the file type.
• Extension does not match file type: Retain the filename and change to the ap-
propriate extension.
You do not need to use an extension when loading a file if you use the optional
destination parameter. For example, :DISK:LOAD "STM1_OC3",MASK will
automatically add .msk to the file name.
The following table shows the rules used when loading a specified file.
Table 1-2. Rules for Loading Files
File Name ExtensionDestinationRule
No extensionNot specifiedDefault to internal waveform
format; add .wfm extension
Extension does not match
file type
Extension matches file typeNot specifiedUse file name with no
No extensionSpecifiedAdd extension for destination
1-12
Not specifiedDefault to internal waveform
format; add .wfm extension
alterations; destination is
based on extension file type
type; default for waveforms is
internal format (.wfm)
Table 1-2. Rules for Loading Files (Continued)
File Name ExtensionDestinationRule
Introduction
File Locations
Extension does not match
destination file type
Extension matches
destination file type
SpecifiedRetain file name; add extension
for destination type. Default for
waveforms is internal format
(.wfm)
SpecifiedRetain file name; destination is
as specified
Note
ASCII waveform files can be loaded only if the file name explicitly includes the .txt
extensio
n.
File Locations
If you don’t specify a directory when storing a file, the location of the file will
be based on the file type. The following table shows the default locations for
storing files.
Table 1-3. Default File Locations (Storing Files)
File TypeDefault Location
Waveform - internal formatC:\User Files\waveforms
Waveform - text format (Verbose or Y values)C:\User Files\waveforms
SetupC:\User Files\setups
Color Grade - Gray ScaleC:\User Files\colorgrade-grayscale
Screen ImageC:\User Files\screen images
MaskC:\Scope\masks (for standard masks)
When loading a file, you can specify the full path name, a relative path name,
or no path name. The following table shows the rules for locating files, based
on the path specified.
1-13
Introduction
File Locations
Table 1-4. File Locations (Loading Files)
File NameRule
Full path nameUse file name and path specified
Relative path nameFull path name is formed relative to the present
working directory (determine using :DISK:PWD?)
File name with no preceding pathAdd the file name to the default path based on
the file type.
Files may be stored to or loaded from an internal hard drive under the root
path C:\User Files only. The only exceptions are the standard masks loaded
from C:\Scope\masks. Attempting to access files outside the root path will
generate an error message.
Files may be stored to or loaded from any path on the A: drive.
1-14
Loading...
+ 374 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.