This document contains proprietary
information that is protected by
copyright. All rights are reserved.
No part of this document may reproduced in (including electronic storage
and retrieval or translation into a foreign language) without prior agreement and written consent from Agilent
Technologies GmbH as governed by
United States and international
copyright laws.
Agilent Technologies Deutschland
GmbH
Herrenberger Str. 130
71034 Böblingen
Germany
Manual Part Number
08164-90B64
Edition
Fifth edition, January 2005
Fourth edition, April 2003
Third edition, February 2002
Second edition, Oktober 2001
First edition, July 2001
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
will, at its option, either repair or
replace products that prove to be
defective.
For warranty service or repair, this
product must be returned to a service
facility designated by Agilent. Buyer
shall prepay shipping charges to
Agilent and Agilent 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 from another
country.
Agilent warrants that its software and
firmware designated by Agilent for use
with an instrument will execute its
programming instructions when
properly installed on that instrument.
Agilent does not warrant that the
operation of the instrument, 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.
Assistance
Product maintenance agreements and
other customer assistance agreements
are available for Agilent Technologies
products. For any assistance contact
your nearest Agilent Technologies
Sales and Service Office.
Certification
Agilent Technologies Inc. certifies that
this product met its published
specifications at the time of shipment
from the factory.
Agilent Technologies further certifies
that its calibration measurements are
traceable to the United States National
Institute of Standards and Technology,
NIST (formerly the United States
National Bureau of Standards, NBS) to
the extent allowed by the Institutes’s
calibration facility, and to the
calibration facilities of other
International Standards Organization
members.
ISO 9001 Certification
Produced to ISO 9001 international
quality system standard as part of our
objective of continually increasing
customer satisfaction through
improved process control.
Safety Notices
CAUTION
A CAUTION notice denotes a
hazard. It calls attention to an
operating procedure, practice, or
the like that, if not correctly per
formed or adhered to, could result
in damage to the product or loss of
important data. Do not proceed
beyond a CAUTION notice until the
indicated conditions are fully
understood and met.
WARNING
A WARNING notice denotes a
hazard. It calls attention to an
operating procedure, practice, or
the like that, if not correctly per
formed or adhered to, could result
in personal injury or death. Do not
proceed beyond a WARNING
notice until the indicated
conditions are fully understood
and met.
Warnings and Notices
WARNING
To avoid the possibility of injury or death, you must observe the following
precautions before switching on the instrument.
Insert the power cable plug only into a socket outlet provided with a
protective earth contact. Do not negate this protective action by the
using an extension cord without a protective conductor.
WARNING
Never look directly into the end of a fiber or a connector, unless you are
absolutely certain that there is no signal in the fiber.
Agilent Technologies Sales and Service Offices
For more information about Agilent Technologies test and measurement
products, applications, services, and for a current sales office listing, viesit
our web site:
http://www.agilent.com/comms/lightwave
You can also contact one of the following centers and ask for a test and
measurement sales representative.
United States:1 800 829 4444
1 800 829 4433(FAX)
Canada:1 877 894 4414
(1888 900 8921(FAX)
Europe:(31 20) 547 2111
(31 20) 547 2190 (FAX)
Japan:0120 421 345
0120 421 678 (FAX)
Mexico(52 55) 5081 9469
(52 55) 5081 9467 (FAX)
Australia:1 800 629 485
1 800 142 134 (FAX)
Asia-Pacific:800 930 871
800 908 476 (FAX)
Brazil(55 11) 4197 3600
(55 11) 4197 3800 (FAX)
In this Manual
This manual contains information about SCPI commands which can be
used to program the following instruments:
• Agilent 8163A/B Lightwave Multimeter
• Agilent 8164A/B Lightwave Measurement System
• Agilent 8166A/B Lightwave Multichannel System
The Structure of this Manual
This manual is divided into 5 parts:
• “Introduction to Programming” on page 15 gives a general introduction
to SCPI programming with the Agilent 8163A/B Lightwave Multimeter,
the Agilent 8164A/B Lightwave Measurement System, and the
Agilent 8166A/B Lightwave Multichannel System.
• “Specific Commands” on page 43 lists all instrument specific
commands.
• “Instrument Setup and Status” on page 55, “Measurement Operations
& Settings” on page 79, and “Mass Storage, Display, and Print
Functions” on page 185 give fuller explanations of all instrument
specific commands.
• “VISA Programming Examples” on page 189 gives some example
programs showing how the SCPI commands can be used with the
Agilent 8163A/B Lightwave Multimeter, the Agilent 8164A/B
Lightwave Measurement System, and the Agilent 8166A/B Lightwave
Multichannel System.
• “The Agilent 816x VXIplug&play Instrument Driver” on page 213, “GPIB
Command Compatibility List” on page 245, and “Error Codes” on
page 257 give information about the Agilent 816x VXIplug&play
Instrument Driver, compatibility issues, and error codes.
Conventions used in this Manual
• All commands and typed text is written in Courier font, for example
INIT[:IMM].
• SCPI commands are written in mixed case: text that you MUST print is
written in capitals; text which is helpful but nor necessary is written in
lower case.
So, the command INITiate[:IMMediate] can be entered either as init[:imm], or as initiate[:immediate]. It does not matter whether you
enter text using capitals or lower-case letters.
• SCPI commands often contain extra arguments in square brackets.
These arguments may be helpful, but they need not be entered.
So, the command INITiate[:IMMediate] can be entered as init or initiate:imm.
• A SCPI command which can be either a command or a query is
appended with the text /?.
So, DISPlay:ENABle/? refers to both the command DISPlay:ENABle and
the query DISPlay:ENABle?.
Related Manuals
You can find more information about the instruments covered by this
manual in the following manuals:
Please note that User Guides no longer contain programming information,
and must now be used in conjunction with this manual.
Refer to the books listed on page 16 for additional information about the
General Purpose Interface Bus, GPIB.
Table o f Co ntents
The Structure of this Manual5
Conventions used in this Manual5
Related Manuals6
Introduction to Programming15
GPIB Interface16
Returning the Instrument to Local Control18
Message Queues19
How the Input Queue Works20
Clearing the Input Queue20
The Output Queue21
The Error Queue22
Programming and Syntax Diagram Conventions23
Short Form and Long Form24
Command and Query Syntax25
Units25
Data Types26
Slot and Channel Numbers26
Laser Selection Numbers27
Common Commands29
Common Command Summary30
Common Status Information31
The Status Model33
Status Registers33
Status System for 8163A/B & 8164A/B35
Status System for 8166A/B36
Annotations37
Status Byte Register37
Standard Event Status Register37
Operation/Questionable Status Summary37
Operation/Questionable Status Summary Register38
Operation/Questionable Slot Status38
Operation Slot Status Register38
Questionable Slot Status Register38
How to Use VISA Calls190
How to Set up a Fixed Laser Source192
How to Measure Power using FETCh and READ195
How to Co-ordinate Two Modules199
How Power Varies with Wavelength203
How to Log Results207
The Agilent 816x VXIplug&play Instrument Driver213
Installing the Agilent 816x Instrument Driver214
Using Visual Programming Environments218
Getting Started with Agilent VEE218
GPIB Interfacing in Agilent VEE218
Getting Started with LabView221
Getting Started with LabWindows224
Features of the Agilent 816x Instrument Driver225
Directory Structure226
Opening an Instrument Session227
Closing an Instrument Session228
VISA Data Types and Selected Constant Definitions229
Error Handling230
Introduction to Programming232
Example Programs232
VISA-Specific Information232
Instrument Addresses232
Callbacks232
Development Environments232
Microsoft Visual C++ 4.0 (or higher) and Borland C++ 4.5
(or higher)232
Microsoft Visual Basic 4.0 (or higher)233
Agilent VEE 5.01 (or higher)233
LabWindows CVI/ (R) 4.0 (or higher)233
The Prepare Lambda Scan Function237
The Get Lambda Scan Parameters Function238
The Execute Lambda Scan Function238
How to Perform a Multi-Frame Lambda Scan Application239
The Equally Spaced Datapoints Function240
The Register Mainframe Function240
The Unregister Mainframe Function240
The Prepare Multi Frame Lambda Scan Function241
The Get MF Lambda Scan Parameters Function242
The Execute Multi Frame Lambda Scan Function242
The Get Lambda Scan Result Function242
The Get Number of PWM Channels Function243
The Get Channel Location Function243
GPIB Command Compatibility List245
Compatibility Issues246
GPIB Bus Compatibility246
Status Model247
Preset Defaults248
Removed Command249
Obsolete Commands250
Changed Parameter Syntax and Semantics251
Changed Query Result Values252
Timing Behavior253
Error Handling254
Command Order255
Instrument Status Settings256
This chapter gives general information on how to control your instrument
remotely.
Descriptions for the actual commands for the instruments are given in the
following chapters. The information in these chapters is specific to the
Agilent 8163A/B Lightwave Multimeter, Agilent 8164A/B Lightwave
Measurement System, and Agilent 8166A/B Lightwave Multichannel
System and assumes that you are already familiar with programming the
GPIB.
The interface used by your instrument is the GPIB (General Purpose
Interface Bus).
GPIB is the interface used for communication between a controller and an
external device, such as the tunable laser source. The GPIB conforms to
IEEE standard 488-1978, ANSI standard MC 1.1 and IEC recommendation
625-1.
If you are not familiar with the GPIB, then refer to the following books:
• The International Institute of Electrical and Electronics Engineers. IEEE
Standard 488.1-1987, IEEE Standard Digital Interface for Programmable
Instrumentation. New York, NY, 1987
• The International Institute of Electrical and Electronics Engineers. IEEE
Standard 488.2-1987, IEEE Standard Codes, Formats, Protocols and
Common Commands For Use with ANSI/IEEE Std 488.1-1987. New York,
NY, 1987
To obtain a copy of either of these last two documents, write to:
The Institute of Electrical and Electronics Engineers, Inc.
345 East 47th Street
New York, NY 10017
USA.
In addition, the commands not from the IEEE-488.2 standard, are defined
according to the Standard Commands for Programmable Instruments
(SCPI).
For information about SCPI, and SCPI programming techniques, please
refer to:
• The SCPI Consortium: Standard Commands for Programmable Instruments. To obtain a copy of this manual, contact the following
address:
SCPI Consortium Office
Bode Enterprise
2515 Camino del Rio South, Suite 340
San Diego, CA, 92108
USA
The interface of the Agilent 8163A/B Lightwave Multimeter,
Agilent 8164A/B Lightwave Measurement System, and Agilent 8166A/B
Lightwave Multichannel System to the GPIB is defined by the IEEE
Standards 488.1 and 488.2.
Table 1 shows the interface functional subset that the instruments
implement.
Table 1 GPIB Capabilities
MnemonicFunction
SH1Complete source handshake capability
AH1Complete acceptor handshake capability
T6Basic talker; serial poll; no talk only mode; unaddressed to talk
if addressed to listen
L4Basic listener; no listen only mode; unaddressed to listen if ad
dressed to talk
NOTE
SR0No service request capability
RL1Complete remote/local capability
PP0No parallel poll capability
DC1Complete device clear capability
DT0No device trigger capability
C0No controller capability.
Setting the GPIB Address
There are two ways to set the GPIB address:
• You can set the GPIB address by using the command
“:SYSTem:COMMunicate:GPIB[:SELF]:ADDRess” on page 78.
• You can set the GPIB address from the front panel. See your
instrument’s User’s Guide for more information.
The default GPIB address is 20.
GPIB address 21 is often applied to the GPIB controller. If so, 21 cannot be
used as an instrument address.
The input queue is a FIFO queue (first-in first-out). Incoming bytes are
stored in the input queue as follows:
1 Receiving a byte:
• Clears the output queue.
• Clears Bit 7 (MSB).
2 No modification is made inside strings or binary blocks. Outside strings
and binary blocks, the following modifications are made:
• Lower-case characters are converted to upper-case.
• The characters 00
(2016).
• Two or more blanks are truncated to one.
3 An EOI (End Or Identify) sent with any character is put into the input
queue as the character followed by a line feed (LF, 0A
with a LF, only one LF is put into the input queue.
4 The parser starts if the LF character is received or if the input queue is
full.
to 0916 and 0B16 to 1F16 are converted to spaces
16
). If EOI is sent
16
Clearing the Input Queue
Switching the power off, or sending a Device Interface Clear signal, causes
commands that are in the input queue, but have not been executed to be
lost.
The output queue contains responses to query messages. The instrument
transmits any data from the output queue when a controller addresses the
instrument as a talker.
Each response message ends with a carriage return (CR, 0D
), with EOI=TRUE. If no query is received, or if the query has an error,
(0A
16
the output queue remains empty.
The Message Available bit (MAV, bit 4) is set in the Status Byte register
The error queue is 30 errors long. It is a FIFO queue (first-in first-out). That
is, the first error read is the oldest error to have occurred. For example:
1If no error has occurred, the error queue contains:
+ 0, "No error"
2
After a command such as wav:pow, the error queue now contains:
+ 0, "No error"
-113, "Undefined header"
3
If the command is immediately repeated, the error queue now contains:
+ 0, "No error"
-113, "Undefined header"
-113, "Undefined header"
If more than 29 errors are put into the queue, the message:
Introduction to ProgrammingProgramming and Syntax Diagram Conventions
Data Types
With the commands you give parameters to the instrument and receive
response values from the instrument. Unless explicitly specified these
data are given in ASCII format. The following types of data are used:
• Boolean data may only have the values 0 or 1.
• Integer range is given for each individual command.
• Float variables may be given in decimal or exponential writing (0.123 or
123E-3).
All Float values conform to the 32 bit IEEE Standard, that is, all Float
values are returned as 32-bit real values.
•A string is contained between double quotes (
(‘...’). When the instrument returns a string, it is always included in " "
and terminated by
•When a register value is given or returned (for example *ESE), the decimal values for the single bits are added. For example, a value of
nine means that bit 0 and bit 3 are set.
• Larger blocks of data are given as Binary Blocks, preceded by
“#<H><Len><Block>”, terminated by <END>; <H> represents the
number of digits, <Len> represents the number of bytes, and <Block> is
the data block. For example, for a Binary Block with 1 digit and 6 bytes
this is: #16TRACES<END>.
<END>.
"...") or single quotes
Slot and Channel Numbers
Each module is identified by a slot number and a channel number. For
commands that require you to specify a channel, the slot number is
represented by [n] in a command and the channel number is represented
by [m].
The slot number represents the module’s position in the mainframe. These
are:
• from one to two for the Agilent 8163A/B,
• from zero to four for the Agilent 8164A/B, and
• from one to seventeen for the Agilent 8166A/B.
These numbers are displayed on the front panel beside each module slot.
Programming and Syntax Diagram ConventionsIntroduction to Programming
NOTE
NOTE
NOTE
The Agilent 8164A/B slot for a back-loadable tunable laser module is
numbered zero.
Channel numbers apply to modules that have two inputs/outputs, for
example, the Agilent 81635A Dual Power Sensor.
Modules with two channels, for example, the Agilent 81635A Dual Power
Sensor, use the channel number to distinguish between these channels.
The channel number of single channel modules is always one.
For example, if you want to query slot 1, channel 2 with the command,
“:SENSe[n]:[CHANnel[m]]:POWer:WAVelength?” on page 109, you should
send the command:
•:sens1:chan2:pow:wav?
If you do not specify a slot or channel number, the lowest possible number
is used as the default value. This means:
• Slot 1 for the Agilent 8163A/B and Agilent 8166A/B mainframes.
• Slot 0 for the Agilent 8164A/B mainframe.
• Channel 1 for all channels.
Laser Selection Numbers
The laser selection number, [l], identifies the upper or lower wavelength
laser source for dual wavelength Laser Source modules and Return Loss
modules with two internal laser sources. The lower wavelength source is
denoted by 1. The upper wavelength source is denoted by 2.
The IEEE 488.2 standard has a list of reserved commands, called common
commands. Some of these commands must be implemented by any
instrument using the standard, others are optional.
Your instrument implements all the necessary commands, and some
optional ones. This section describes the implemented commands.