HP 8163A Series Operating instructions

E1299
HP 8163A/4A/6A Lightwave Series Mainframes
HP 8163A Lightwave Multimeter,
HP 8164A Lightwave Measurement
System,
& HP 8166A Lightwave
Multichannel System Programming
Guide

2HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Programming Guide, E1299
Notices
This document contains proprietary information that is protected
by copyright. All rights are reserved.
No part of this document may be photocopied, reproduced, or
translated to another language without the prior written consent
of Hewlett-Packard GmbH.
Copyright 1999 by:
Hewlett-Packard GmbH
Herrenberger Str. 130
71034 Böblingen
Germany
Subject Matter
The information in this document is subject to change without
notice.
Hewlett-Packard makes no warranty of any kind with regard to
this printed material, including, but not limited to, the implied
warranties of merchantability and fitness for a particular
purpose.
Hewlett-Packard 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.
Printing History
New editions are complete revisions of the guide reflecting
alterations in the functionality of the instrument. Updates are
occasionally made to the guide between editions. The date on the
title page changes when an updated guide is published. To find
out the current revision of the guide, or to purchase an updated
guide, contact your Hewlett-Packard representative.
Control Serial Number: First Edition applies directly to all
instruments.
Warranty
This Hewlett-Packard instrument product is warranted against
defects in material and workmanship for a period of one year
from date of shipment. During the warranty period, HP 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 HP. Buyer shall prepay shipping
charges to HP and HP shall pay shipping charges to return the
product to Buyer. However, Buyer shall pay all shipping charges,
duties, and taxes for products returned to HP from another
country.
HP warrants that its software and firmware designated by HP for
use with an instrument will execute its programming instructions
when properly installed on that instrument. HP 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. Hewlett-Packard
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. Hewlett-Packard 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 Hewlett-Packard products. For any
assistance contact your nearest Hewlett-Packard Sales and
Service Office.
Certification
Hewlett-Packard Company certifies that this product met its
published specifications at the time of shipment from the factory.
Hewlett-Packard 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.
08164-91016 E1299
First Edition:
E1299: December 1999
Second Edition
E0599: May 1999

HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Programming Guide, E1299 3
In this Manual
This manual contains information about SCPI commands which can be used to
program the following instruments:
•HP 8163A Lightwave Multimeter
•HP 8164A Lightwave Measurement System
•HP 8166A Lightwave Multichannel System
The Structure of this Manual
This manual is divided into 5 parts:
•“Introduction to Programming” on page 13 gives a general introduction to
SCPI programming with the HP 8163A Lightwave Multimeter, the HP 8164A
Lightwave Measurement System, and the HP 8166A Lightwave Multichannel
System.
•“Specific Commands”on page 33 lists all instrument specific commands.
•“Instrument Setup and Status”on page 43, “Measurement Operations &
Settings”on page 63, and “Mass Storage, Display, and Print Functions”on
page 121 give fuller explanations of all instrument specific commands.
•“Programming Examples”on page 125 gives some example programs
showing how the SCPI commands can be used with the HP 8163A Lightwave
Multimeter, the HP 8164A Lightwave Measurement System, and the
HP 8166A Lightwave Multichannel System.
•“The HP 816x VXIplug&play Instrument Driver”on page 147, “GPIB
Command Compatibility List”on page 163, and “Error Codes”on page 171
give information about the HP 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.

4HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Programming Guide, E1299
•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:
•HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
&HP 8166A Lightwave Multichannel System User’s Guide (HP Product
Number 08164-91011).
NOTE Please note that User Guides no longer contain programming information, and
must now be used in conjunction with this manual.
If you are not familiar with the General Purpose Interface Bus, GPIB, then refer
to the following books:
•ANSI/IEEE-488.1-1978, IEEE Standard Digital Interface for Programmable
Instrumentation, and ANSI/IEEE-488.2-1987, IEEE Standard Codes,
Formats, and Common Commands, published by the Institute of Electrical and
Electronic Engineers.
In addition, the commands not from the IEEE 488.2 standard are defined
according to the Standard Commands for Programmable Instruments (SCPI). For
an introduction to SCPI and SCPI programming techniques, refer to the following
documents:
•Hewlett-Packard Press (Addison-Wesley Publishing Company, Inc.): A
Beginners Guide to SCPI by Barry Eppler.
•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
Web: http://www.scpiconsortium.org

Contents
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Programming Guide, E1299 5
Contents
In this Manual 3
The Structure of this Manual 3
Conventions used in this Manual 3
Related Manuals 4
Contents 5
Figures 9
Tables 11
Introduction to Programming 13
GPIB Interface 15
Setting the GPIB Address 16
Returning the Instrument to Local Control 17
Message Queues 17
How the Input Queue Works 17
Clearing the Input Queue 18
The Output Queue 18
The Error Queue 18
Programming and Syntax Diagram Conventions 19
Short Form and Long Form 19
Command and Query Syntax 19
Units 20
Data Types 20
Slot and Channel Numbers 21
Laser Selection Numbers 22
Common Commands 22
Common Command Summary 23
Common Status Information 23
The Status Model 25
Status Registers 25
Status System for HP 8163A & HP 8164A 26
Status System for HP 8166A 27
Annotations 28
Status Byte Register 28

Contents
6HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Programming Guide, E1299
Standard Event Status Register 29
Operation/Questionable Status Summary 29
Operation/Questionable Status Summary Register 29
Operation/Questionable Slot Status 29
Operation Slot Status Register 30
Questionable Slot Status Register 30
Status Command Summary 30
Other Commands 31
Specific Commands 33
Specific Command Summary 35
Instrument Setup and Status 43
IEEE-Common Commands 45
Status Reporting –The STATus Subsystem 50
Interface/Instrument Behaviour Settings –The SYSTem Subsystem59
Measurement Operations & Settings 63
Root Layer Command 65
Measurement Functions –The SENSe Subsystem 68
HP 81635A and HP 81619A- Master and Slave Channels 68
Signal Generation –The SOURce Subsystem 86
Triggering - The TRIGger Subsystem 108
Extended Trigger Configuration 114
Extended Trigger Configuration Example 118
Mass Storage, Display, and Print Functions 121
Display Operations –The DISPlay Subsystem 123
Programming Examples 125
How to Use VISA Calls 127
How to Set up a Fixed Laser Source 129
How to Measure Power using FETCh and READ 131
How to Co-ordinate Two Modules 134
How Power Varies with Wavelength 138
How to Log Results 142
The HP 816x VXIplug&play Instrument Driver 147
Installing the HP 816x Instrument Driver 149

Contents
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Programming Guide, E1299 7
Using Visual Programming Environments 152
Getting Started with HP VEE 152
GPIB Interfacing in HP VEE 153
Getting Started with LabView 154
Getting Started with LabWindows 156
Features of the HP 816x Instrument Driver 156
Directory Structure 157
Opening an Instrument Session 157
Closing an Instrument Session 158
VISA Data Types and Selected Constant Definitions 159
Error Handling 159
Introduction to Programming 161
Example Programs 161
VISA-Specific Information 161
Instrument Addresses 161
Callbacks 161
Development Environments 161
Microsoft Visual C++ 4.0 (or higher) and Borland C++ 4.5 (or higher)161
Microsoft Visual Basic 4.0 (or higher) 161
HP VEE 5.01 (or higher) 162
LabWindows CVI/ (R) 4.0 (or higher) 162
Online Information 162
GPIB Command Compatibility List 163
Compatibility Issues 165
GPIB Bus Compatibility 165
Status Model 165
Preset Defaults 165
Removed Command 166
Obsolete Commands 166
Changed Parameter Syntax and Semantics 167
Changed Query Result Values 168
Timing Behavior 168
Error Handling 169
Command Order 169
Instrument Status Settings 169

Figures
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Programming Guide, E1299 9
Figures
Figure 1 Remote Control . . . . . . . . . . . . . . 17
Figure 2 The Event Status Bit . . . . . . . . . . . . . 24
Figure 3 The Registers and Filters for a Node . . . . . . . . . . 25
Figure 4 The Operational/Questionable Status System for HP 8163A & HP 8164A . 27
Figure 5 The Operational/Questionable Status System for HP 8166A . . . . 28
Figure 6 Extended Trigger Configuration. . . . . . . . . . . 116
Figure 7 Setup for Extended Trigger Configuration Example . . . . . . 118
Figure 8 Non-Administrator Installation Pop-Up Box . . . . . . . . 149
Figure 9 Message Screen . . . . . . . . . . . . . . 150
Figure 10 Customizing Your Setup . . . . . . . . . . . . 151
Figure 11 Program Folder Item Options . . . . . . . . . . . 151
Figure 12 Device Configuration . . . . . . . . . . . . . 153
Figure 13 Advanced Device Configuration - Plug&play Driver . . . . . . 153
Figure 14 FP Conversion Options Box. . . . . . . . . . . . 155
Figure 15 Windows 95 and Windows NT VXIPNP Directory Structure . . . . 157

Figures
10 HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Programming Guide, E1299

Tables
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Programming Guide, E1299 11
Tables
Table 1 GPIB Capabilities . . . . . . . . . . . . . . 16
Table 2 Units and allowed Mnemonics . . . . . . . . . . . 20
Table 3 Common Command Summary . . . . . . . . . . . 23
Table 4 Specific Command Summary . . . . . . . . . . . 35
Table 5 Commands that can only be configured using the master channel . . . 69
Table 6 Commands that are independent for both master and slave channels. . . 69
Table 7 Triggering and Power Measurements . . . . . . . . . 108
Table 8 Generating Output Triggers from Power Measurements . . . . . 109
Table 9 Incompatible GPIB Bus Commands . . . . . . . . . . 165
Table 10 Removed Commands . . . . . . . . . . . . . 166
Table 11 Obsolete Commands . . . . . . . . . . . . . 167
Table 12 Commands with Different Parameters or Syntax . . . . . . . 167
Table 13 Queries with Different Result Values . . . . . . . . . 168
Table 14 Timing Behavior Changes . . . . . . . . . . . . 168
Table 15 Error Handling Changes . . . . . . . . . . . . 169
Table 16 Specific Errors. . . . . . . . . . . . . . . 169
Table 17 Overview for Supported Strings . . . . . . . . . . . 173
Table 18 Overview for Unsupported Strings . . . . . . . . . . 177

Tables
12 HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Programming Guide, E1299

HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299 13
Introduction to
Programming

Introduction to Programming
14 HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299
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 HP 8163A
Lightwave Multimeter, HP 8164A Lightwave Measurement System, and
HP 8166A Lightwave Multichannel System and assumes that you are already
familiar with programming the GPIB.

GPIB Interface Introduction to Programming
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299 15
GPIB Interface
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 an introduction to SCPI, and SCPI programming techniques, please refer to
the following documents:
•Hewlett-Packard Press (Addison-Wesley Publishing Company, Inc.). A
Beginners Guide to SCPI. Barry Eppler. 1991.
•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
Web: http://www.scpiconsortium.org
The interface of the HP 8163A Lightwave Multimeter and of the HP 8164A
Lightwave Measurement 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.

Introduction to Programming GPIB Interface
16 HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299
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 62.
•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.
Mnemonic Function
SH1 Complete source handshake capability
AH1 Complete acceptor handshake capability
T6 Basic talker; serial poll; unaddressed to talk if addressed to
listen
L4 Basic listener; unaddressed to listen if addressed to talk; no
listen only
SR1 Complete service request capability
RL1 Complete remote/local capability
PP0 No parallel poll capability
DC1 Device clear capability
DT0 No device trigger capability
C0 No controller capability (Controller capability to be imple-
mented)
Table 1 GPIB Capabilities

Message Queues Introduction to Programming
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299 17
Returning the Instrument to Local
Control
If the instrument is in remote control, a screen resembling
Figure 1 will appear. Press [Local] if you wish to return the instrument to local
control.
Message Queues
The instrument exchanges messages using an input and an output queue. Error
messages are kept in a separate error queue.
How the Input Queue Works
The input queue is a FIFO queue (first-in first-out). Incoming bytes are stored in
the input queue as follows:
1Receiving a byte:
–Clears the output queue.
–Clears Bit 7 (MSB).
2No modification is made inside strings or binary blocks. Outside strings and
binary blocks, the following modifications are made:
Figure 1 Remote Control

Introduction to Programming Message Queues
18 HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299
–Lower-case characters are converted to upper-case.
–The characters 0016 to 0916 and 0B16 to 1F16 are converted to spaces (2016).
–Two or more blanks are truncated to one.
3An EOI (End Or Identify) sent with any character is put into the input queue as
the character followed by a line feed (LF, 0A16). If EOI is sent with a LF, only
one LF is put into the input queue.
4The parser starts if the LF character is received or if the input queue is full.
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
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, 0D16) and a LF (0A16),
with EOI=TRUE. If no query is received, or if the query has an error, the output
queue remains empty.
The Message Available bit (MAV, bit 4) is set in the Status Byte register whenever
there is data in the output queue.
The Error Queue
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. A new error is only put into
the queue if it is not already in it.
If more than 29 errors are put into the queue, the message:
-350 <Queue Overflow>
is placed as the last message in the queue.

Programming and Syntax Diagram Conventions Introduction to Programming
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299 19
Programming and Syntax
Diagram Conventions
A program message is a message containing commands or queries that you send
to the instruments. The following are a few points about program messages:
•You can use either upper-case or lower-case characters.
•You can send several commands in a single message. Each command must be
separated from the next one by a semicolon (;).
•A command message is ended by a line feed character (LF) or <CR><LF>.
•You can use any valid number/unit combination.
In other words, 1500NM,1.5UM and 1.5E-6M are all equivalent.
If you do not specify a unit, then the default unit is assumed. The default unit
for the commands are given with command description in the next chapter.
Short Form and Long Form
The instrument accepts messages in short or long forms.
For example, the message
:STATUS:OPERATION:ENABLE 768
is in long form.
The short form of this message is
:STAT:OPER:ENAB 768
In this manual, the messages are written in a combination of upper and lower
case. Upper case characters are used for the short form of the message.
For example, the above command would be written
:STATus:OPERation:ENABle
The first colon can be left out for the first command or query in your message.
That is, the example given above could also be sent as
STAT:OPER:ENAB 768
Command and Query Syntax
All characters not between angled brackets must be sent exactly as shown.
The characters between angled brackets (<...>) indicate the kind of data that
you should send, or that you get in a response. You do not type the angled
brackets in the actual message.

Introduction to Programming Programming and Syntax Diagram Conventions
20 HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299
Descriptions of these items follow the syntax description. The following types of
data are most commonly used:
Other kinds of data are described as required.
The characters between square brackets ([...]) show optional information that
you can include with the message.
The bar (|) shows an either-or choice of data, for example, a|bmeans either aor
b, but not both simultaneously.
Extra spaces are ignored, so spaces can be inserted to improve readability.
Units
Where units are given with a command, usually only the base units are specified.
The full sets of units are given in the table below.
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 ("...") or single quotes (‘...’).
When the instrument returns a string, it is always included in " " and
terminated by <END>.
string is ascii data. A string is contained between double
quotes ("...") or single quotes (‘...’).
value is numeric data in integer (12), decimal (34.5) or ex-
ponential format (67.8E-9).
wsp is a white space.
Unit Default Allowed Mnemonics
meters M PM, NM, UM, MM, M
decibel DB MDB, DB
second S NS, US, MS, S
decibel/1mW DBM MDBM, DBM
Hertz HZ HZ, KHZ, MHZ, GHZ, THZ
Watt Watt PW, NW, UW, MW, Watt
meters per second M/S NM/S, UM/S, MM/S, M/S
Table 2 Units and allowed Mnemonics
Other manuals for 8163A Series
2
This manual suits for next models
2
Table of contents
Other HP Measuring Instrument manuals
Popular Measuring Instrument manuals by other brands

Kestrel
Kestrel 4200 instructions

Secomam
Secomam UviLine Connect Series operating manual

Leuze electronic
Leuze electronic AMS 335i Technical description

Hanna Instruments
Hanna Instruments HI 96771C instruction manual

A.W. Sperry Instruments
A.W. Sperry Instruments DSA-1020 TRMS operating instructions

LSI LASTEM
LSI LASTEM Alpha-Log user manual