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.
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
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 charge s to return the
product to Buyer. However, B uyer 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.
2HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Program mi ng Gui de, E1299
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
argument s may be helpful, but they need not be ente red.
So, the command INITiate[:IMMediate] can be entered as init or
initiate:imm.
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Programming Guide, E12993
• 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).
NOTEPlease 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 Comm on Co mmands , 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 Pro grammable I ns trumen ts ( 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 Programmabl e 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
4HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Program mi ng Gui de, E1299
Contents
Contents
In this Manual3
The Structure of this Manual3
Conventions used in this Manual3
Related Manuals4
Contents5
Figures9
Tables11
Introduction to Programming13
GPIB Interface15
Setting the GPIB Address16
Returning the Instrument to Local Control17
Message Queues17
How the Input Queue Works17
Clearing the Input Queue18
The Output Queue18
The Error Queue18
Programming and Syntax Diagram Conventions19
Short Form and Long Form19
Command and Query Syntax19
Units20
Data Types20
Slot and Channel Numbers21
Laser Selection Numbers22
Common Commands22
Common Command Summary23
Common Status Information23
The Status Model25
Status Registers25
Status System for HP 8163A & HP 8164A26
Status System for HP 8166A27
Annotations28
Status Byte Reg i ster28
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Programming Guide, E12995
Contents
Standard Event Status Register29
Operation/Questionable Status Summary29
Operation/Questionable Status Summary Register29
Operation/Questionable Slot Status29
Operation Slot Status Register30
Questionable Slot Status Register30
Status Command Summary30
Other Commands31
Specific Commands33
Specific Command Summary35
Instrument Setup and Status43
IEEE-Common Commands45
Status Reporting – The STATus Subsystem50
Interface/Instrument Behaviour Settings – The SYSTem Subsystem59
Measurement Operations & Setti ngs63
Root Layer Command65
Measurement Functions – The SENSe Subsystem68
HP 81635A and HP 81619A- Master and Slave Channels68
Signal Generation – The SOURce Subsystem86
Triggering - The TRIGger Subsystem108
Extended Trigger Configuration114
Extended Trigger Configuration Example118
Mass Storage, Display, and Print Functions121
Display Operations – The DISPlay Subsystem123
Programming Examples125
How to Use VISA Calls127
How to Set up a Fixed Laser Source129
How to Measure Power using FETCh and READ131
How to Co-ordinate Two Modules134
How Power Varies with Wavelength138
How to Log Results142
The HP 816x VXIplug&play Instrument Driver147
Installing the HP 816x Instrument Driver149
6HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Program mi ng Gui de, E1299
Using Visual Programming Environments152
Getting Started with HP VEE152
GPIB Interfacing in HP VEE153
Getting Started with LabView154
Getting Started with LabWindows156
Features of the HP 816x Instrument Driver156
Directory Structure157
Opening an Instrument Session157
Closing an Instrument Session158
VISA Data Types and Selected Constant Definitions159
Error Handling159
Introduction to Programming161
Example Programs161
VISA-Specific Information161
Instrument Addresses161
Callbacks161
Development Environments161
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 Information162
Contents
GPIB Command Compatibility List163
Compatibility Issues165
GPIB Bus Compatibility165
Status Model165
Preset Defaults165
Removed Command166
Obsolete Commands166
Changed Parameter Syntax and Semantics167
Changed Query Result Values168
Timing Behavior168
Error Handling169
Command Order169
Instrument Status Settings169
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Programming Guide, E12997
Contents
Error Codes171
GPIB Error Strings173
Index179
8HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Program mi ng Gui de, E1299
Table 5Commands that can only be configured using the master channel . . . 69
Table 6Commands that are independent for both master and slave channels. . . 69
Table 7Triggering and Power Measurements . . . . . . . . . 108
Table 8Generating Output Triggers from Power Measurements . . . . . 109
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Programming Guide, E129911
Tables
12HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System Program mi ng Gui de, E1299
Introduction to
Programming
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E129913
Introduction to Pr ogramming
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.
14HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299
GPIB InterfaceIntroduction to Programming
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 an d 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 t o
the following documents:
• Hewlett-Packard Press (Addison-Wesley Publishing Company, Inc.). A
Beginners Guide to SCPI. Barry Eppler. 1991.
• The SCPI Consort i um: 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.
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E129915
Introduction to Pr ogrammingG PIB Interface
Mnemonic Function
SH1Complete source handshake capability
AH1Complete acceptor handshake capability
T6Basic talker; serial poll; unaddressed to talk if addressed to
listen
L4Basic listener; unaddressed to listen if addressed to talk; no
listen only
SR1Complete service request capability
RL1Complete remote/local capability
PP0No parallel poll capability
DC1Device clear capability
DT0No device trigger capability
C0No controller capability (Controller capability to be imple-
mented)
Table 1GPIB Capabilities
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.
16HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299
Message QueuesIntroduction to Programming
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.
Figure 1Remote 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:
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:
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E129917
Introduction to Pr ogrammingMessage Queues
– Lower-case characters are converted to upper-case.
– The characters 00
– Two or more blanks are truncated to one.
3 An EOI (End Or Identify) sent with any character is put into the input queu e as
the character followed by a line feed ( LF, 0A
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 (2016).
16
). If EOI is sent with a LF, only
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
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, the output
queue remains empty.
) and a LF (0A16),
16
The Message A vailable 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 on ly 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.
18HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299
Programming and Syntax Diagram ConventionsIntroduction to Programming
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.
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E129919
Introduction to Pr ogrammingProgramming and Syntax Diagram Conventions
Descriptions of these items follow the syntax description. The following types of
data are most commonly used:
stringis 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).
wspis a white space.
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|b means either a or
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.
UnitDefaultAllowed Mnemonics
metersMPM, NM, UM, MM, M
decibelDBMDB, DB
secondSNS, US, MS, S
decibel/1mWDBMMDBM, DBM
HertzHZHZ, KHZ, MHZ, GHZ, THZ
WattWattPW, NW, UW, MW, Watt
meters per second M/SNM/S, UM/S, MM/S, M/S
Table 2Units and allowed Mnemonics
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>.
20HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299
Programming and Syntax Diagram ConventionsIntroduction to Programming
• 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>.
Slot and Channel Numbers
Each module is identified by a slot number and a channel numbe r. 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 HP 8163A,
• from zero to four for the HP 8164A, and
• from one to seventeen for the HP 8166A.
These numbers are displayed on the front panel beside each module slot.
NOTEThe HP 8164A slot for back-loadable tunable laser modules is numbered zero.
Channel numbers apply to modules that have two inputs/outputs, for example, the
HP 81635A Dual Power Sensor.
Modules with two channels, for example, th e HP 81635A Dual Power Sensor, use
the channel number to distinguish between these channels.
NOTEThe 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 83, you should
send the command:
• :sens1:chan2:pow:wav?
NOTEIf you do not specify a slot or channel number , the lowest po ssible number is used
as the default value. This means:
•Slot 1 for the HP 8163A and HP 8166A mainframes.
•Slot 0 for the HP 8164A mainframe.
•Channel 1 for all channels.
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E129921
Introduction to Pr ogrammingCommon Commands
Laser Selec t io n Num b er s
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.
NOTEFor Return Loss modules, 0 denotes the use of an external laser source as the
input to your Return Loss module for the following commands:
• “:SENSe[n]:[CHANnel[m]]:RETurnloss:CORRection:FPDelta[l]” on
page 85,
• “:SENSe[n]:[CHANnel[m]]:RETurnloss:CORRection:FPDelta[l]?” on
page 85,
• “:SENSe[n]:[CHANnel[m]]:RETurnloss:CORRection:REFLectance[l]” on
page 85, and
• “:SENSe[n]:[CHANnel[m]]:RETurnloss:CORRection:REFLectance[l]?” on
page 86.
Common Commands
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.
22HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299
Common CommandsIntroduction to Programming
Common Command Summary
Table 3 gives a summary of the common commands.
Command Parameter FunctionPage
*CLS Clear Status Commandpage 45
*ESE Standard Event Status Enable Commandpage 45
*ESE? Standard Event Status Enable Querypage 46
*ESR? Standard Event Status Register Querypage 46
*IDN? Identification Querypage 46
*OPCOperation Complete Commandpage 4 7
*OPC? Operation Complete Querypage 47
*OPT? Options Querypage 47
*RST Reset Commandpage 48
*STB? Read Status Byte Querypage 48
*TST? Self Test Querypage 49
*WAI Wait Commandpage 49
Table 3Common Command Summary
NOTEThese commands are described in more detail in “IEEE-Common Commands” on page 45.
Common Status Information
There are three registers for the status information. Two of these are statusregisters and one is an enable-registers. These registers conform to the IEEE
Standard 488.2-1987. You can find further descriptions of these registers under
*ESE, *ESR?, and *STB?.
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E129923
Introduction to Pr ogrammingCommon Commands
Figure 2 shows how the Standard Event Status Enable Mask (SESEM) and the
Standard Event Status Register (SESR) determine the Event Status Bit (ESB) of
the Status Byte.
*ESE
sets the Standard Event Status Enable M ask
*STB?
returns the Status Byte Register
OSBESBQSB
Status
Byte
001
All bits shown as are unused
Figure 2The Event Status Bit
The SESR contains the information about events that are not slot specific. For
details of the function of each bit of the SESR, see “Standard Event Status Register” on page 29.
01234567
*ESR?
Event
Status
Enable
Mask
&
&
&
&
OR
Event
Status
Register
returns the Sta ndard Event Status Register
&
&
01234567
111111
&
&
01234567
100000
The SESEM allows you to choose the event that may affect the ESB of the Status
Byte. If you set a bit of the SESEM to zero, the corresponding event cannot af fect
the ESB. The default is for all the bits of the SESEM to be set to 0.
The questionable and operation status systems set the Operational Status Bit
(OSB) and the Questionable Status Bit (QSB). These status systems are described
in “The Status Model” on page 25 and “Status Reporting – The STATus Subsystem” on page 50.
NOTEUnused bits in any of the registers change to 0 when you read them.
24HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299
The Status ModelIntroduction to Programming
The Status Model
Status Registers
Each node of the status circuitry has three registers:
• A condition register (CONDition), which contains the current status. This
register is updated continuously. It is not changed by having its contents read.
• The event register (EVENt), which contains details of any positive transitions
in the corresponding condition register, that is, when a bit changes from 0 → 1.
The contents of this register are cleared when it is read. The contents of any
higher-level registers are affected with regard to the appropriate bit.
• The enable register (ENABle), which enables changes in the event register to
affect the next stage of registers.
NOTEThe event register is the only kind of register that can affect the next stage of
registers.
The structures of the Operational and Questionable Status Systems are similar.
Figure 4 describe how the Questionable Status Bit (QSB) and the Operational
Status Bit (OSB) of the Status Byte Register are determined.
Enable Registers
To the
Condition Register
of the Next Node
11111
OR
Event Registers
A positive transition in the condition
register, when a bit changes from 0 → 1,
causes the corresponding bit of the
corresponding event r egister
to change from 0 → 1.
Condition Registers
Figure 3The Registers and Filters for a Node
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E129925
Introduction to Pr ogrammingThe Status Model
The Operational/Questionable Slot Status Event Register (OSSER/QSSER)
contains the status of a particular module slot. A bit changes from 0 → 1 when an
event occurs, for example, when a laser is switched on. For details of th e function
of each bit of these registers, see “Operation/Questionable Status Summary
Register” on page 29 and “Operation/Question able Status Summary Register”
on page 29.
The Operational/Questionable Slot Enable Status Mask (OSESM/QSESM)
allows you to choose the events for each module slot that may affect the
Operational/Questionable Status Event Register (see below). If you set a bit of the
OSESM/QSESM to zero, the occurence of the corresponding event for this
particular module slot cannot affect the Operational/Questionable Status Event
Register. The default is for all the bits of the OSESM/QSESM to be set to 0.
The Operational/Questionable Status Event Summary Register (OSESR/QSESR)
summarizes the status of every module slot of your instrument. If, for any slot,
any bit of the QSSER goes from 0 → 1 AND the corresponding bit of the
QSSEM is 1at the same time, the QSESR bit representing that slot is set to 1.
The Operational/Questionable Status Enable Summary Mask (OSESM/QSESM)
allows you to choose the module slots that may affect the OSB/QSB of the Status
Byte. If any bit of the QSESR goes from 0 → 1 AND the corresponding bit of the
QSESM is 1at the same time, the QSB of the Status Byte is set to 1. If you set a
bit of the OSESM/QSESM to zero, the corresponding module slot cannot affect
the OSB/QSB. The default is for all the bits of the OSESM/QSESM to be set to 0.
The Operational/Questionable Status Enable Summary Mask for the HP 8163A
Lightwave Multimeter and the HP 8164A Lightwave Measurement System
consists of one level. These are described in “The Operational/Questionable Status System for HP 8163A & HP 8164A” on page 27.
As the HP 8166A Lightwave Multichannel System has 17 module slots, the
Operational/Questionable Status Enable Summary Mask consists of two levels.
This is described in “Status System for HP 8166A” on page 27.
Status System for HP 8163A & HP 8164A
The status system for the HP 8163A Lightwave Multimeter and the HP 8164A
Lightwave Measurement System returns the status of 2 and 5 module slots
respectively. The Operational/Questionable Status Summary Registers consist of
26HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299
The Status ModelIntroduction to Programming
one level and are described by Figure 4. Any commands that require LEVel1 do
not apply to these mainframes.
Status Byte Register
Status Summary
Slot 1
Operational/Questionable Status
Enable Summary Mask
Register
Operational/Questionable Status
Event Summary Register
Operational/Questionable Status
Condition Summary Register
Operational/Questionable
Slot Status E na ble Mask
Register
Operational/Questionable
Slot Status E vent
Register
Operational/Questionable
Slot Status Condition
Register
Status Byte
to next
&
&
&
&
&
&
OR
for a positive
transition
&
&
for a positive
to next
level
OR
transition
level
Figure 4The Operational/Questionable Status Syst em for HP 8163A & HP 8164A
Status System for HP 8166A
The status system for the HP 8166A Lightwave Multichannel System returns the
status of 17 module slots. The Operational/Questionable Status Summary
Registers consists of two levels, as described by Figure 5.
Module slots 1 to 14 affect the Lev el 0 sum mary register as described in Figure 4.
Bit 0 of the Level 0 summary registers represents the summary of the status of
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E129927
Introduction to Pr ogrammingThe Status Model
module slots 15, 16, and 17 . The Level 1 summar y registers contain an indiv idual
summary for each of these module slots.
Status Byte Register
Status
Summary
for Level 0
Status
Summary
for Level 1
Slot 15
Operational/Questionable Status
Enable Summary Mask
Register (Level 1)
Operational/Questionable Status
Event Summary Register (Level 1)
Operational/Questionable Status
Condition Summary Register (Level 1)
Operational/Questionable
Slot Status Enable Mask
Register
Operational/Questionable
Slot Status Event
Register
Operational/Questionable
Slot Status Condition
Register
Status Byte
Operational/Questionable Status
Enable Summary Mask
Register (Level 0)
Operational/Questionable Status
Event Summary Register (Level 0)
Operational/Questionable Status
Condition Summary Register (Level 0)
&
&
&
&
to next
&
&
&
&
OR
for a positive
transition
&
&
&
OR
for a positive
transition
level
to next
level
OR
&
for a positive
transition
to next
level
Figure 5The Operational/Questionable Sta tus System for HP 8166A
Annotations
Status Byte Register
• Bit 3, the QSB, is built from the questionable event status register and its
enable mask.
• Bit 5, the ESB, is built from the SESR and its SESEM.
• Bit 7, the OSB, is built from the operation event status register and its enable
mask.
• All other bits are unused, and therefore set to 0.
28HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299
The Status ModelIntroduction to Programming
Standard Event Status Register
• Bit 0 is set if an operation complete event has been received since the last call
to *ESR?.
• Bit 1 is always 0 (no service request).
• Bit 2 is set if a query error has been detected.
• Bit 3 is set if a device dependent error has been detected.
• Bit 4 is set if an execution error has been detected.
• Bit 5 is set if a command error has been detected.
• Bit 6 is always 0 (no service request).
• Bit 7 is set for the first call of *ESR? after Power On.
Operation/Questionable Status Summary
• The Operation/Questionable Status Summary consist of a condition and an
event register.
• A "rising" bit in the condition register is copied to the event register.
• A "falling" bit in the condition register has no effect on the event register.
• Reading the condition register is non-destructive.
• Reading the event register is destructive.
• A summary of the event register and its enable mask is set in the status byte.
Operation/Questionable Status Summary Register
• Bits 0 to 4 are built from the OSSER/QSSER and the OSSEM/QSSEM.
• A summary of the event register, the condition register and the enable mask is
set in the status byte.
Operation/Questionable Slot Status
• The Operation/Questionable Slot Status consist of a condition and an event
register.
• A "rising" bit in the condition register is copied to the event register.
• A "falling" bit in the condition register has no effect on the event register.
• Reading the condition register is non-destructive.
• Reading the event register is destructive.
• A summary of the event register, the condition register and the enable mask is
set in the status byte.
HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E129929
Introduction to Pr ogrammingThe Status Model
Operation Slot Status Register
• Bit 0 is set if the laser is switched on.
• Bit 1 is set if the Coherence Control is switched on.
• Bit 3 is set if Power Meter zeroing or Tunable Laser module lambda zeroing is
ongoing.
• All other bits are unused, and therefore set to 0.
Questionable Slot Status Register
• Bit 0 is set if excessive power is set by the user for any source module or if
excessive averaging time is set for any Power Meter.
• Bit 1 is set if the last Power Meter zeroing or Tunable Laser module lambda
zeroing failed.
• Bit 2 is set if temperature is out of range.
• Bit 3 is set if laser protection is switched on.
• Bit 4 is set if the module has not settled.
• Bit 5 is set if the module is out of specifications.
• Bit 6 is set if ARA is recommended.
• Bit 7 is set if the duty cycle is out of range.
• All other bits are unused, and therefore set to 0.
Status Command Summary
*STB? returns status byte, value 0 .. +255
*ESEsets the standard event status enable mask, parameter 0 .. +255
*ESE? returns SESE, value 0 .. +255
*ESR? returns the standard event status register, value 0 .. +255
*OPCparses all program message units in the message queue.
*OPC? returns 1 if all operations (scan trace printout, measurement) are com-
pleted. Otherwise it returns 0.
*CLSclears the status byte and SESR, and removes any entries from the error
queue.
*RSTclears the error queue, loads the default setting, and restarts communi-
cation.
NOTE: *RST does NOT touch the STB or SESR. A running measurement is stopped.
*TST? initiates an instrument selftest and returns the results as a 32 bit LONG.
30HP 8163A Lightwave Multimeter, HP 8164A Lightwave Measurement System,
& HP 8166A Lightwave Multichannel System User’s Guide, E1299
Loading...
+ 150 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.