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
ThisHewlett-Packardinstrument
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,eitherrepairorreplace
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
firmwarewill 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
Productmaintenance 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 E0599
First Edition:
E0599: May 1999
Firmware Revision:
1.0
Hewlett-Packard GmbH
Herrenberger Str. 130
71034 Böblingen
Germany
HP 8163A Lightwave Multimeter &
HP 8164A Lightwave Measurement System
Programming Guide
Front Matter
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
The Structure of this Manual
This manual is divided into 5 parts:
• Chapter 1 gives a general introduction to SCPI programming
with the HP 8163A Lightwave Multimeter and the HP 8164A
Lightwave Measurement System.
• Chapter 2 lists all instrument specific commands.
• Chapters 3 to 5 givefuller explanations of all instrument specific
commands.
• Chapter 6 gives some example programs showing how the SCPI
commands can be used with the HP 8163A Lightwave
Multimeter and the HP 8164A LightwaveMeasurement System.
• The appendixes give information about the HP 816x
VXIplug&play Instrument Driver, compatibility issues, and
error codes.
4
Front Matter
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
printis written in capitals; text which ishelpful but nor necessary
is written in lower case.
So, the command INITiate[:IMMediate] can be entered
either as init[:imm],orasinitiate[:immediate].It
does not matter whether you enter text using capitals or lowercase 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 eithera command or a query is
appended with the text /?.
So, DISPlay:ENABle/? refers to both the command
DISPlay:ENABle and the query DISPlay:ENABle?.
5
Front Matter
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
MeasurementSystem 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 HP-IB, then refer to the following
books:
• HP publication 5952-0156, Tutorial Description of HP-IB.
• 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,
publishedby the Institute of Electrical and ElectronicEngineers.
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:
Table B-8 Specific Errors ........................................................................................... 194
Table C-1 Overview for Supported Strings................................................................ 197
Table C-2 Overview for Unsupported Strings............................................................ 201
13
List of Tables
14
1
1Introduction to
Programming
Introduction to
Programming
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 assumes that you are already
familiar with programming the HP-IB.
16
Introduction to Programming
HP-IB Interface
1.1 HP-IB Interface
The interface used by your instrument is the HP-IB (HewlettPackard Interface Bus).
HP-IB is the interface used for communication between a controller
and an external device, such as the tunable laser source.The HP-IB
conforms to IEEE standard 488-1978, ANSI standard MC 1.1 and
IEC recommendation 625-1.
If you are not familiar with the HP-IB, then refer to the following
books:
• Hewlett-Packard Company. Tutorial Description of Hewlett-
Packard Interface Bus, 1987.
• The International Institute of Electrical and Electronics
Engineers. IEEE Standard 488.1-1987, IEEE Standard DigitalInterface 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:
Inc.). A Beginners Guide to SCPI. Barry Eppler. 1991.
17
Introduction to Programming
HP-IB Interface
• The SCPI Consortium. Standard Commands for Programmable
Instruments. Published periodically by various publishers.
To obtain a copy of this manual, contact your Hewlett-Packard
representative.
The interface of the HP 8163A Lightwave Multimeter and of the
HP 8164A Lightwave Measurement System to the HP-IB is defined
by the IEEE Standards 488.1 and 488.2.
Table 1-1 shows the interface functional subset that the instruments
implement.
C0No controller capability (Controller capability to be
implemented)
Table 1-1HP-IB Capabilities
Setting the HP-IB Address
There are two ways to set the HP-IB address:
18
Introduction to Programming
HP-IB Interface
• You can set the HP-IB address by using the command
“:SYSTem:COMMunicate:GPIB[:SELF]:ADDRess” on
page 68.
• You can set the HP-IB address from the front panel. See your
instrument’s User’s Guide for more information.
The default HP-IB address is 20.
Returning the Instrument to Local Control
If the instrument is in remote control, a screen resembling
Figure 1-1 will appear. Press [Local] if you wish to return the
instrument to local control.
Figure 1-1Remote Control
19
Introduction to Programming
Message Queues
1.2 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 aFIFO 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:
• Lower-case characters are converted to upper-case.
• The characters 0016to 0916and 0B16to 1F16are 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.
20
Introduction to Programming
Programming and Syntax Diagram Conventions
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 firstout). 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.
1.3 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
(;).
21
Introduction to Programming
Programming and Syntax Diagram Conventions
• 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.
22
Introduction to Programming
Programming and Syntax Diagram Conventions
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.
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
exponential 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.
23
Introduction to Programming
Programming and Syntax Diagram Conventions
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
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:
M/SNM/S, UM/S, MM/S, M/S
• 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).
• 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>.
• 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
24
Introduction to Programming
Common Commands
bytes, and <Block> is the data block. For example, for a Binary
Block with 1 digit and 6 bytes this is: #16TRACES<END>.
1.4 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.
Yourinstrument implements all the necessary commands, and some
optional ones. This section describes the implemented commands.
Common Command Summary
Table 1-3 gives a summary of the common commands.
Command Parameter FunctionPage
*CLSClear Status Command47
*ESEStandard Event Status Enable Command48
*ESE?Standard Event Status Enable Query48
*ESR?Standard Event Status Register Query49
*IDN?Identification Query49
*OPCOperation Complete Command50
*OPC?Operation Complete Query50
*OPT?Options Query51
*RSTReset Command52
*STB?Read Status Byte Query53
*TST?Self Test Query54
*WAIWait Command55
Table 1-3Common Command Summary
25
Introduction to Programming
Common Commands
NOTEThese commands are described in more detail in “IEEE-Common
Commands” on page 47.
Common Status Information
There are three registers for the status information. Two of these are
status-registers 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?.
Figure 1-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 Mask
*STB? returns the Status Byte Register
OSBESBQSB
Status
Byte
Figure 1-2The Event Status Bit
001
All bits shown asare unused
Event
Status
Enable
Mask
OR
&
&
&
&
&
&
&
01234567
Event
Status
Register
*ESR? returns the Standard Event Status Register
01234567
111111
&
01234567
100000
26
Introduction to Programming
The Status Model
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 32.
The SESEM allows you to choose the eventthat may affect the ESB
of the Status Byte. If you set a bit of the SESEM to zero, the
corresponding event cannot affect 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 27
“Status Reporting – The STATus Subsystem” on page 56.
NOTEUnused bits in any of the registers change to 0 when you read them.
1.5 The Status Model
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.
27
Introduction to Programming
The Status Model
The structures of the Operational and Questionable Status Systems
are similar.Figure 1-5 and Figure 1-4 respectivelydescribe 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 register
to change from 0 → 1.
Condition Registers
Figure 1-3The Registers and Filters for a Node
28
Introduction to Programming
The Status Model
STAT:OPER:ENAB sets
the Operational Status
Enable Summary Mask
OSB
76543210
ESB
QSB
100
*STB? returns the
Status Byte Register
STAT3:OPER:ENAB sets
the Operational Slot Status
Enable Mask for Slot 3
Operational
Slot Status Enable Mask
7654321015 14 13 12 11 1098
&
&
&
&
&
&
&
&
&
&
&
&
Status
Byte
1111
&
&
Operational Status Enable Summary Mask
7654321015 14 13 12 11 1098
111
11
&
&
&
&
&
&
&
&
OR
&
&
&
&
&
&
&
&
7654321015 14 13 12 11 1098
10000
&
&
Operational Status Event
Summary Register
STAT:OPER? returns the
Operational Status
Event Summary Register
OR
All bits shown asare unused
7654321015 14 13 12 11 1098
STAT3:OPER? returns the Operational
Slot Status Event Register for Slot 3
Operational
1000
Slot Status Event Register
Figure 1-4The Operational Status System
29
Introduction to Programming
The Status Model
STAT:QUES:ENAB sets
the Questionable Status
Enable Summary Mask
OSBESBQSB
76543210
010
*STB? returns the
Status Byte Register
STAT3:QUES:ENAB sets
the Questionable Slot Status
Enable Mask for Slot 3
Questionable Slot Status Enable Mask
7654321015 14 13 12 11 1098
1
&
&
&
&
&
&
&
&
&
&
&
&
Status
Byte
1111111
&
&
Questionable Status Enable Summary Mask
7654321015 14 13 12 11 1098
111
11
&
&
&
&
&
&
&
&
OR
&
&
&
&
&
&
&
&
7654321015 14 13 12 11 1098
10000
&
&
Questionable Status Event
Summary Register
STAT:QUES? returns the
Questionable Status
Event Summary Register
OR
All bits shown asare unused
7654321015 14 13 12 11 1098
0
1000000
Questionable Slot Status Event Register
STAT3:QUES? returns the Questionable
Slot Status Event Register for Slot 3
Figure 1-5The Questionable Status System
30
Loading...
+ 174 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.