Agilent 8164A Specifications Sheet

Agilent 8163A/B Lightwave Multimeter,
Agilent 8164A/B Lightwave Measurement System, &
Agilent 8166A/B Lightwave Multichannel System
Programming Guide
Notices
This document contains proprietary information that is protected by copyright. All rights are reserved.
Copyright 1999 - 2001 by: Agilent Technologies Deutschland GmbH Herrenberger Str. 130
71034 Böblingen Germany
Subject Matter
The material in this document is subject to change without notice.
Agilent Technologies 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.
Agilent Technologies shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material.
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 Agilent Technologies representative.
Control Serial Number: First Edition applies directly to all instruments.
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.
Second Edition
08164-90B62
First Edition: 08164-90B61: July 2001
Second Edition: 08164-90B62 October 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.
2 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
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 13 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 35 lists all instrument specific commands.
“Instrument Setup and Status” on page 47, “Measurement Operations & Settings” on page 71, and “Mass Storage, Display, and Print Functions” on page 163 give fuller explanations of all
instrument specific commands.
“VISA Programming Examples” on page 167 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 191, “GPIB Command Compatibility List” on page 223, and “Error Codes” on page 237 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].
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 3
• 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:
Agilent 8163A/B Lightwave Multimeter, Agilent 8164A/B
Lightwave Measurement System, & Agilent 8166A/B Lightwave Multichannel System User’s Guide (Agilent Product Number 08164-
90B13).
NOTE 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 15 for additional information about the General Purpose Interface Bus, GPIB.
4 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Table of Contents
Introduction to Programming 13
Table of Contents
In this Manual 3 The Structure of this Manual 3 Conventions used in this Manual 3 Related Manuals 4
GPIB Interface 15
Setting the GPIB Address 16 Returning the Instrument to Local Control 17
Message Queues 18
How the Input Queue Works 18
Clearing the Input Queue 18
The Output Queue 18 The Error Queue 19
Programming and Syntax Diagram Conventions 20
Short Form and Long Form 20 Command and Query Syntax 21
Units 21 Data Types 22 Slot and Channel Numbers 22 Laser Selection Numbers 23
Common Commands 24
Common Command Summary 24 Common Status Information 24
The Status Model 26
Status Registers 26 Status System for 8163A/B & 8164A/B 29 Status System for 8166A/B 29 Annotations 31
Status Byte Register 31 Standard Event Status Register 31 Operation/Questionable Status Summary 31 Operation/Questionable Status Summary Register 32 Operation/Questionable Slot Status 32 Operation Slot Status Register 32 Questionable Slot Status Register 32
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 5
Table of Contents
Specific Commands 35
Instrument Setup and Status 47
Status Command Summary 33 Other Commands 33
Specific Command Summary 37
IEEE-Common Commands 49
Status Reporting – The STATus Subsystem 57 Interface/Instrument Behaviour Settings – The SYSTem
Subsystem
67
Measurement Operations & Settings 71
Root Layer Command 73 Measurement Functions – The SENSe Subsystem 77
Agilent 81635A and Agilent 81619A- Master and Slave Channels
77
Signal Generation – The SOURce Subsystem 103 Signal Conditioning 131
The INPut and OUTput commands 131 The table of wavelength-dependent offsets 141 Compatibility of the 81560A/1A/6A/7A modular attenuator
family to the 8156A attenuator 146
Slot Numbers 146 Command Semantic 147 Display and System Commands 148 IEEE Commands 148 Status Commands 148 User Calibration Data 149
Triggering - The TRIGger Subsystem 150
Extended Trigger Configuration 157
Extended Trigger Configuration Example 161
Mass Storage, Display, and Print Functions 163
Display Operations – The DISPlay Subsystem 165
6 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Table of Contents
VISA Programming Examples 167
How to Use VISA Calls 169 How to Set up a Fixed Laser Source 172 How to Measure Power using FETCh and READ 175 How to Co-ordinate Two Modules 179 How Power Varies with Wavelength 183 How to Log Results 187
The Agilent 816x VXIplug&play Instrument Driver 191
Installing the Agilent 816x Instrument Driver 193 Using Visual Programming Environments 197
Getting Started with HP VEE 197
GPIB Interfacing in HP VEE 197
Getting Started with LabView 199 Getting Started with LabWindows 202
Features of the Agilent 816x Instrument Driver 203 Directory Structure 204 Opening an Instrument Session 205 Closing an Instrument Session 206 VISA Data Types and Selected Constant Definitions 207 Error Handling 208 Introduction to Programming 210
Example Programs 210 VISA-Specific Information 210
Instrument Addresses 210 Callbacks 210
Development Environments 210
Microsoft Visual C++ 4.0 (or higher) and Borland C++ 4.5 (or higher)
210
Microsoft Visual Basic 4.0 (or higher) 210 HP VEE 5.01 (or higher) 211 LabWindows CVI/ (R) 4.0 (or higher) 211
Online Information 212 Lambda Scan Applications 213
Equally Spaced Datapoints 214
How to Perform a Lambda Scan Application 215
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 7
Table of Contents
GPIB Command Compatibility List 223
The Prepare Lambda Scan Function 215 The Get Lambda Scan Parameters Function 216 The Execute Lambda Scan Function 216
How to Perform a Multi-Frame Lambda Scan Application 217
The Equally Spaced Datapoints Function 218 The Register Mainframe Function 218 The Unregister Mainframe Function 218 The Prepare Multi Frame Lambda Scan Function 219 The Get MF Lambda Scan Parameters Function 220 The Execute Multi Frame Lambda Scan Function 220 The Get Lambda Scan Result Function 220 The Get Number of PWM Channels Function 221 The Get Channel Location Function 221
Compatibility Issues 225
GPIB Bus Compatibility 225
Status Model 226 Preset Defaults 227 Removed Command 228 Obsolete Commands 229 Changed Parameter Syntax and Semantics 230 Changed Query Result Values 231 Timing Behavior 232 Error Handling 233 Command Order 234 Instrument Status Settings 235
Error Codes 237
GPIB Error Strings 239
8 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
List of Figures
Figure 1 Remote Control . . . . . . . . . . . . . . . . 17
Figure 2 The Event Status Bit . . . . . . . . . . . . . . . 25
Figure 3 The Registers and Filters for a Node . . . . . . . . . . . 27
Figure 4 The Operational/Questionable Status System for 8163A/B & 8164A/B. . . 29
Figure 5 The Operational/Questionable Status System for 8166A/B . . . . . 30
Figure 6 Extrapolation and interpolation of attenuator module λ offset table . . 142
Figure 7 Extended Trigger Configuration . . . . . . . . . . . 159
Figure 8 Setup for Extended Trigger Configuration Example . . . . . . 161
Figure 9 Non-Administrator Installation Pop-Up Box . . . . . . . . 193
Figure 10 Message Screen . . . . . . . . . . . . . . . 194
Figure 11 Customizing Your Setup . . . . . . . . . . . . . 195
Figure 12 Program Folder Item Options . . . . . . . . . . . . 196
Figure 13 Device Configuration . . . . . . . . . . . . . . 198
Figure 14 Advanced Device Configuration - Plug&play Driver . . . . . . 198
Figure 15 Search for GPIB Instruments . . . . . . . . . . . . 200
Figure 16 FP Conversion Options Box . . . . . . . . . . . . 201
Figure 17 Windows 95 and Windows NT VXIPNP Directory Structure . . . . 204
Figure 18 Equally Spaced Datapoints . . . . . . . . . . . . 214
Figure 19 Lambda Scan Operation Setup . . . . . . . . . . . 215
Figure 20 Multi Frame Lambda Scan Operation Setup . . . . . . . . 217
List of Figures
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 9
List of Figures
10 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
List of Tables
Table 1 GPIB Capabilities . . . . . . . . . . . . . . . 16
Table 2 Units and allowed Mnemonics . . . . . . . . . . . . 21
Table 3 Common Command Summary . . . . . . . . . . . . 24
Table 4 Specific Command Summary. . . . . . . . . . . . . 37
Table 5 Commands that can only be configured using the master channel . . . 77 Table 6 Commands that are independent for both master and slave channels . . 78 Table 7 Comparison of command semantics beween 8156A attenuator and
8156xA modular attenuator family.147
Table 8 Triggering and Power Measurements . . . . . . . . . 150
Table 9 Generating Output Triggers from Power Measurements . . . . . 150
Table 10 Incompatible GPIB Bus Commands . . . . . . . . . . 225
Table 11 Removed Commands . . . . . . . . . . . . . . 228
Table 12 Obsolete Commands . . . . . . . . . . . . . . 229
Table 13 Commands with Different Parameters or Syntax . . . . . . . 230
Table 14 Queries with Different Result Values . . . . . . . . . . 231
Table 15 Timing Behavior Changes . . . . . . . . . . . . 232
Table 16 Error Handling Changes . . . . . . . . . . . . . 233
Table 17 Specific Errors . . . . . . . . . . . . . . . 233
Table 18 Overview for Supported Strings . . . . . . . . . . . 239
Table 19 Overview for Unsupported Strings . . . . . . . . . . 250
List of Tables
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 11
List of Tables
12 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition

Introduction to Programming

Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 13
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 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.
14 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
GPIB Interface Introduction 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 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
Web: http://www.scpiconsortium.org
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 15
Introduction to Programming GPIB Interface
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
Mnemonic Function
SH1 Complete source handshake capability AH1 Complete acceptor handshake capability T6 Basic talker; serial poll; no talk only mode; unaddressed to talk
if addressed to listen
L4 Basic listener; no listen only mode; unaddressed to listen if ad-
dressed to talk SR0 No service request capability RL1 Complete remote/local capability PP0 No parallel poll capability DC1 Complete device clear capability DT0 No device trigger capability C0 No 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 69.
• 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.
NOTE GPIB address 21 is often applied to the GPIB controller. If so, 21
cannot be used as an instrument address.
16 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
GPIB Interface Introduction 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 1 Remote Control
NOTE If your Agilent 8163A/B, 8164A/B or 8166A/B is in local lockout mode
(refer to DISPlay:LOCKout on page 142) the Local softkey is not available.
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 17
Introduction to Programming Message Queues

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:
– Lower-case characters are converted to upper-case.
– The characters 00
).
(20
16
– 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

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.
18 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Message Queues Introduction to Programming
Each response message ends with a carriage return (CR, 0D16) and a LF (0A 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.
), with EOI=TRUE. If no query is received, or if the query has
16

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. For example:
1 If 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:
-350, "Queue overflow"
is placed as the last message in the queue.
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 19
Introduction to Programming Programming and Syntax Diagram Conventions

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
20 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Programming and Syntax Diagram Conventions Introduction to Programming

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.
Descriptions of these items follow the syntax description. The following types of data are most commonly used:
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.
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.
Table 2 Units and allowed Mnemonics
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
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 21
Introduction to Programming Programming 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 ("...") 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 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 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.
NOTE The Agilent 8164A/B slot for a back-loadable tunable laser module is
numbered zero.
22 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Programming and Syntax Diagram Conventions Introduction to Programming
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.
NOTE 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 99, you should send the command:
• :sens1:chan2:pow:wav?
NOTE 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.
NOTE For 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 101,
“:SENSe[n]:[CHANnel[m]]:RETurnloss:CORRection:FPDelta[l]?” on page 101,
“:SENSe[n]:[CHANnel[m]]:RETurnloss:CORRection:REFLectance[l]” on page 101, and
“:SENSe[n]:[CHANnel[m]]:RETurnloss:CORRection:REFLectance[l]? ” on page 102.
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 23
Introduction to Programming Common Commands

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.

Common Command Summary

Table 3 gives a summary of the common commands.
Table 3 Common Command Summary
Command Parameter Function Page
*CLS Clear Status Command page 49 *ESE Standard Event Status Enable Command page 50 *ESE? Standard Event Status Enable Query page 50 *ESR? Standard Event Status Register Query page 51 *IDN? Identification Query page 51 *OPC Operation Complete Command page 52 *OPC? Operation Complete Query page 52 *OPT? Options Query page 53 *RST Reset Command page 53 *STB? Read Status Byte Query page 54 *TST? Self Test Query page 55 *WAI Wait Command page 56
NOTE These commands are described in more detail in “IEEE-Common
Commands” on page 49.

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?.
24 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Common Commands Introduction to Programming
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 Ev ent Status Enable Mask
*STB?
retu rn s th e S tatu s Byte R e g iste r
OSB ESB QSB
Status
Byte
001
All bits shown as are unused
Figure 2 The Event Status Bit
MAV
0
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 31.
01234567
*ESR?
Event Status
Enable
Mask
&
&
&
&
OR
Event Status
Register
returns the Stan d ard E v en t Statu s R eg ister
&
&
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 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 26 and “Status Reporting – The STATus Subsystem” on page 57.
NOTE Unused bits in any of the registers change to 0 when you read them.
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 25
Introduction to Programming The Status Model

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.
NOTE The event register is the only kind of register that can affect the next
stage of registers.
26 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
The Status Model Introduction to Programming
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
OR
Event R egisters
Condition Reg ist e r of the Next Node
A positive transition in the condition
11111
Figure 3 The Registers and Filters for a Node
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 the function of each bit of these registers, see “Operation/Questionable Status Summary Register” on page 32 and “Operation/Questionable Status Summary Register” on page 32.
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.
register, when a bit changes from 0 →1, causes the corresponding bit of the correspon ding event register to change from 0 →1.
Condition Reg ist e rs
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 27
Introduction to Programming The Status Model
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 Agilent 8163A/B Lightwave Multimeter and the Agilent 8164A/B Lightwave Measurement System consists of one level. These are described in “Status System for 8163A/B & 8164A/B” on page 29.
As the Agilent 8166A/B 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 8166A/B” on page 29.
28 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
The Status Model Introduction to Programming

Status System for 8163A/B & 8164A/B

The status system for the Agilent 8163A/B Lightwave Multimeter and the Agilent 8164A/B Lightwave Measurement System returns the status of 2 and 5 module slots respectively. The Operational/Questionable Status Summary Registers consist of 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 Enable Mask Register
Operational/Questionable Slot Status Event 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 4 The Operational/Questionable Status System for 8163A/B & 8164A/B

Status System for 8166A/B

The status system for the Agilent 8166A/B 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.
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 29
Introduction to Programming The Status Model
Module slots 1 to 14 affect the Level 0 summary register as described in Figure 4. Bit 0 of the Level 0 summary registers represents the summary of the status of module slots 15, 16, and 17. The Level 1 summary registers contain an individual 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 5 The Operational/Questionable Status System for 8166A/B
30 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
The Status Model Introduction to Programming

Annotations

Status Byte Register
• Bit 3, the QSB, is built from the questionable event status register and its enable mask.
• Bit 4, the MAV, is set if the message output queue is not empty.
• 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.
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.
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 31
Introduction to Programming The Status Model
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.
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.
• Bit 4 is set if the attenuator output is enabled (shutter open).
• Bits 5 - 7 are set if the wavelength offset table is enabled (see page 61).
• 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.
32 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
The Status Model Introduction to Programming
• 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.
• Bit 8 is set if coherence control is uncalibrated
• Bit 9 is set if attenuator beam path protection is enabled (shutter is closed)
• All other bits are unused, and therefore set to 0.

Status Command Summary

*STB? returns status byte, value 0 .. +255 *ESE sets 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 *OPC parses all program message units in the message queue, and prevents
the instrument from executing any further commands until all pending commands are completed.
*OPC? returns 1 if all operations (scan trace printout, measurement) are com-
pleted. Otherwise it returns 0.
*CLS clears the status byte and SESR, and removes any entries from the error
queue.
*RST clears the error queue, loads the default setting, and restarts communica-
tion. 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.

Other Commands

*OPT? returns the installed modules and the slots these modules are installed
in: For example, *OPT? 81682A, 81533B, 81532A, , Modules 81682A, 81533B, and 81532A are installed in slots 0 to 2 respec­tively. Slots 3 and 4 are empty.
*WAI prevents the instrument from executing any further commands until the
current command has finished executing. All pending operations are completed during the wait period.
*IDN? identifies the instrument; returns the manufacturer, instrument model
number, serial number, and firmware revision level.
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 33
Introduction to Programming The Status Model
34 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition

Specific Commands

Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 35
Specific Commands
This chapter lists all the instrument specific commands relating to the Agilent 8163A/B Lightwave Multimeter, the Agilent 8164A/B Lightwave Measurement System, and the Agilent 8166A/B Lightwave Multichannel System with a single-line description.
Each of these summaries contains a page reference for more detailed information about the particular command later in this manual.
36 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Specific Command Summary Specific Commands

Specific Command Summary

The commands are ordered in a command tree. Every command belongs to a node in this tree.
The root nodes are also called the subsystems. A subsystem contains all commands belonging to a specific topic. In a subsystem there may be further subnodes.
All the nodes have to be given with a command. For example in the command disp:brig
DISPlay is the subsystem containing all commands for controlling the display,
BRIGhtness is the command selecting brightness.
NOTE If a command and a query are both available, the command ends /?.
So, disp:brig/? means that disp:brig and disp:brig? are both available.
Table 4 gives an overview of the command tree. You see the nodes, the subnodes, and the included commands.
Table 4 Specific Command Summary
Command Description Page
:CONFigure[n][:CHANnel[m]]:OFFSet
:WAVelength:REFerence Specifies the slot and channel of the external powermeter. page 143 :WAVelength:STATe Switches or queries attenuator Offset Table on or off/? page 142 :WAVelength:TABle? Queries the complete offset table. page 145 :WAVelength:TABle:SIZE? Queries the size of the offset table. page 145 :WAVelength:VALue Adds a value pair (wavelength, offset) to the offset table. page 143 :WAVelength:VALue:DELete Deletes an offset value pair. page 144 :WAVelength:VALue:DELete:ALL Deletes all value pairs from the offset table. page 145 :WAVelength:VALue:OFFSet? Queries an offset value according to wavelength index. page 144 :WAVelength:VALue:PAIR? Queries an offset value pair. page 144 :WAVelength:VALue:WAVelength? Queries a wavelength value from its index in the offset table page 143
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 37
Specific Commands Specific Command Summary
Table 4 Specific Command Summary (continued)
Command Description Page
:DISPlay
:BRIGhtness/? Controls or queries the current display brightness. page 165
:CONTrast/? Controls or queries the current display contrast. page 165
:ENABle/? Switches the display on or off, or queries whether the display is
on or off.
:LOCKout Enables or Disables local lockout mode. page 166
:FETCh[n][:CHANnel[m]][:SCALar]
:POWer[:DC]? Returns a power value from a sensor. page 78
:RETurnloss? Returns the current return loss value. page 79
:MONitor? Returns the current power value from the monitor diode within a
return loss module.
:INITiate[n]:[CHANnel[m]]
[:IMMediate] Starts a measurement. page 79
:CONTinuous/? Starts or Queries a single/continuous measurement. page 80
:LOCK/?
:INPUT[n][:CHANnel[m]]
:ATTenuation/? Sets or returns the attenuation factor for the instrument. page 131 :OFFset/? Sets or returns the offset factor for the instrument. page 147 :OFFset:DISPlay Sets the offset factor so that attenuation factor is zero. page 132
Switches the lock on/off or returns the current state of the lock. page 73
page 166
page 79
:OFFset:POWermeter Sets the offset factor to the difference between the power mea-
sured with a powermeter and with the monitor diode.
:ATTenuation:SPEed/? Sets or queries the filter transition speed page 133 :WAVelength Sets the modules attenuation wavelength page 134
:OUTPut[n][:CHANnel[m]]
:APMode/? Queries whether power setting or attenuation value has been
changed. Command has no effect on operation.
:APOWeron/? Sets or queries the shutter status at power on. page 139
:ATIMe/? Sets or queries the powermeter averaging time. page 140
:CONNection/? Selects or returns Analog Output parameter. page 103
:CORRection:COLLection:ZERO Zeros the offsets of attenuators powermeter page 140
:CORRection:COLLection:ZERO:ALL Zeros all available powermeter channels in mainframe page 141
38 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
page 133
page 134
Specific Command Summary Specific Commands
Table 4 Specific Command Summary (continued)
Command Description Page
:CORRection:COLLection:ZERO? Queries the status of the last zero operation page 141
:PATH/? Sets or returns the regulated path. page 103
:POWer/? Sets or queries the output power value. page 135
:POWer:CONTRol/? Sets or queries power control mode status page 138
:POWer:OFFSet/? Sets or queries the power offset value. page 137
:POWer:OFFSet:POWermeter Calculates power offset from measured power values page 137
:POWer:REFerence/? Sets or queries the reference power value. page 136
:POWer:REFerence:POWermeter Copies power value from power meter to attenuator module ref.
page 136
power parameter
:POWer:UNit/? Sets or queries power unit used (dBm or W) page 138
[:STATe]/? Sets a source’s or attenuators output terminals to open or closed
page 104 or returns the current status of a source’s or attenuators output terminals.
:READ[n][:CHANnel[m]]
[:SCALar]:POWer[:DC]? Reads the current power value from a sensor. page 81
POWer[:DC]:ALL? Reads all available power meter channels. page 80
POWer[:DC]:ALL:CONFig? Return all the slot and channel number of every available power
page 81 meter channel.
[:SCALar]:RETurnloss? Reads the current return loss value. page 82
[:SCALar]:MONitor? Returns the current power value from the monitor diode within a
page 82 return loss module.
:SENSe[n][:CHANnel[m]]:CORRection
[:LOSS][:INPut][:MAGNitude]/? Sets or returns the value of correction data for a sensor. page 82
:COLLECT:ZERO Executes a zero calibration of a sensor module. page 83
:COLLECT:ZERO? Returns the current zero state of a sensor module. page 83
:COLLECT:ZERO:ALL Executes a zero calibration of all sensor modules. page 83
:SENSe[n][:CHANnel[m]]:FUNCtion
:PARameter:LOGGing/? Sets or returns the number of samples and the averaging time,
, for logging.
t
avg
page 84
:PARameter:MINMax/? Sets or returns the minmax mode and the window size. page 85
:PARameter:STABility/? Sets or returns the total time, delay time and the averaging time,
, for stability.
t
avg
page 87
:RESult? Returns the data array of the last function. page 88
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 39
Specific Commands Specific Command Summary
Table 4 Specific Command Summary (continued)
Command Description Page
:RESult:BLOCk? Returns a specified binary block from the data array for the last
power meter data acquisition function.
:RESult:MAXBlocksize? Returns the maximum block size for power meter data acquisition
functions.
:RESult:MONitor? For return loss module, returns monitor diode data array of last
function.
:STATe/? Enables/disables the function mode or returns whether the func-
tion mode is enabled.
:THReshold/? Sets or returns the threshold value and the start mode. page 92
:SENSe[n][:CHANnel[m]]:POWer
:ATIMe/? Sets or returns the average time of a sensor. page 92
:RANGe[:UPPer]/? Sets or returns the most positive signal entry expected for a sen-
sor.
:RANGe:MONitor[:UPPer]/? Sets or returns the range of the monitor diode within a return loss
module.
:RANGe:AUTO/? Sets or returns the range of a sensor to produce the most dynam-
ic range without overloading.
:REFerence/? Sets or returns the reference level of a sensor. page 96
UNIT/? Sets or returns the units used for absolute readings on a sensor. page 98
page 89
page 90
page 90
page 91
page 93
page 94
page 95
:WAVelength/? Sets or returns the wavelength for a sensor. page 99
:SENSe[n][:CHANnel[m]]:POWer:Reference
:DISPlay Sets the reference level for a sensor from the input power level. page 96
:STATe/? Sets or returns whether sensor results are in relative or absolute
units.
:STATe:RATio/? Sets or returns whether sensor results are displayed relative to a
channel or to an absolute reference.
:SENSe[n][:CHANnel[m]]:RETurnloss:CALibration
:FACTory Sets the calibration value to factory settings. page 99
:COLLect:REFLectance Sets the reference reflectance calibration values to the values
currently measured by the chosen return loss module. (When, for example, a gold reflector is used.)
:COLLect:TERMination Sets the termination calibration values to the values currently
measured by the chosen return loss module.
:COLLect:VALues? Returns current calibration values. page 100
:SENSe[n][:CHANnel[m]]:RETurnloss:CORRection
:FPDelta[l]/? Sets or returns front panel delta, that is, the loss correction value
due, for example, to the front panel connector.
page 97
page 97
page 100
page 100
page 101
40 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Specific Command Summary Specific Commands
Table 4 Specific Command Summary (continued)
Command Description Page
:REFLectance[l]/? Sets or returns the return loss reference, the return loss value of
page 101 your reference reflector.
:SLOT[n]
:EMPTy? Returns whether the module slot is empty. page 73
:IDN? Returns information about the module. page 74
:OPTions? Returns the module’s options. page 74
:TST? Returns the latest selftest results for a module. page 74
:SLOT[n][:HEAD[m]]
:EMPTy? Returns whether an optical head is connected. page 75
:IDN? Returns information about the optical head. page 75
:OPTions? Returns the optical head’s options. page 75
:TST? Returns the latest selftest results for an optical head. page 76
[:SOURce[n]][:CHANnel[m]]
:MODout/? Returns the mode of the modulation output mode of the BNC
page 108 connector on the front panel of Agilent 81640A/80A/82A Tun­able Laser modules.
[:SOURce[n]][:CHANnel[m]:]AM
[:INTernal]:FREQuency[l]/? Sets or returns the frequency of an internal signal source. page 105
:SOURce[l]/? Sets or returns a source for the modulating system. page 106
:STATe[l]/? Turns Amplitude Modulation of a source on or off or returns
page 107 whether Amplitude Modulation is on or off.
COHCtrl:COHLevel[l]/? Sets or returns the coherence level. page 108
[:SOURce[n]][:CHANnel[m]:]POWer
:LEVel][:IMMediate][:AMPLitude[l]] Sets the laser output power of a source. page 112
[
:LEVel][:IMMediate][:AMPLitude[l]]? Returns the laser output power of a source. page 113
[
[:LEVel]:RISetime[l]/? Sets or returns the laser rise time of a source. page 114
:ATTenuation[l]/? Sets or returns the attenuation level for a source. page 109
:STATe/? Sets or returns the state of the source output signal. page 114
:UNIT/? Sets or returns the power units. page 115
:WAVelength/? Sets or returns the wavelength source of a dual-wavelength
page 118 source.
[:SOURce[n]][:CHANnel[m]:]POWer:ATTenuation[l]
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 41
Specific Commands Specific Command Summary
Table 4 Specific Command Summary (continued)
Command Description Page
:AUTO/? Selects Automatic or Manual Attenuation Mode for a source or
returns the selected mode.
:DARK/? Enables/disables ‘dark’ position on a source or returns whether
‘dark’ position is active for a source.
[:SOURce[n]][:CHANnel[m]:]READout
:DATA? Returns number of datapoints returned by the
[:SOURce[n]][:CHANnel[m]]:READout:POINts? command.
:DATA:BLOCk? Returns a specified binary block from either a lambda logging op-
eration, or maximum power at wavelength characteristic.
:DATA:MAXBlocksize? Returns the maximum blocksize that a lambda logging, or maxi-
mum power at wavelength characteristic will return.
:POINts? Returns the data as a binary stream from either a lambda logging
operation or the maximum power the laser can produce at each wavelength.
[:SOURce[n]][:CHANnel[m]:]WAVelength
[:CW[l]:FIXED] Sets the absolute wavelength of a source. page 118
[:CW[l]:FIXED[l]]? Returns the absolute wavelength of a source. page 119
:FREQuency[l]/? Sets the frequency difference used to calculate a relative wave-
length for a source.
:REFerence[l]? Returns the reference wavelength of a source. page 121
page 110
page 111
page 116
page 117
page 117
page 117
page 121
[:SOURce[n]][:CHANnel[m]:]WAVelength:CORRection
:ARA Realigns the laser cavity. page 119
:ZERO Executes a wavelength zero. page 119
:ZERO:TEMPerature:ACTual? Reports the current lambda zero temperature page 120
:ZERO:TEMPerature:DIFFerence? Reports the temperature difference required to trigger an auto
lamda zero.
:ZERO:TEMPerature:LASTzero? Reports the temperature at which the last auto lamda zero took
place.
:ZERO:AUTO Forces an auto lamda zero. This is quicker than the equilavent
manual process.
[:SOURce[n]][:CHANnel[m]:]WAVelength:REFerence
:DISPlay Sets the reference wavelength of a source to the value of the out-
put wavelength.
[:SOURce[n]][:CHANnel[m]:]WAVelength:SWEep
:CYCLes/? Sets or returns the number of cycles. page 122
:DWELl/? Sets or returns the dwell time. page 123
42 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
page 120
page 120
page 120
page 122
Specific Command Summary Specific Commands
Table 4 Specific Command Summary (continued)
Command Description Page
:LLOGging/? Switches lambda logging on or off or queries the state of lambda
logging.
:MODE/? Sets or returns the sweep mode. page 125
:PMAX? Returns the highest permissible power for a wavelength sweep. page 125
:REPeat/? Sets or returns the repeat mode. page 126
:SPEed/? Sets or returns the speed for continuous sweeping. page 126
:STARt/? Sets or returns the start point of the sweep. page 127
:STOP/? Sets or returns the end point of the sweep. page 128
[:STATe]/? Stops, starts, pauses or continues a wavelength sweep or returns
the the state of a sweep.
[:SOURce[n]][:CHANnel[m]:]WAVelength:SWEep:STEP
:NEXT Performs the next sweep step. page 129
:PREVious Performs the previous sweep step again. page 129
[:WIDTh]/? Sets or returns the width of the sweep step. page 130
:SPECial
:REBoot Reboots the mainframe and all modules. page 76
page 124
page 128
:STATus[n]
:PRESet Presets all Enable Registers. page 62
:STATus:OPERation
[:EVENt]? Returns the Operational Status Event Summary Register (OESR). page 57
[:EVENt]:LEVel1? Returns the Operational Status Event Summary Register for slots
15 - 17 of the Agilent 8166A/B Lightwave Multichannel System.
:CONDition? Returns the Operational Status Condition Summary Register. page 58
:CONDition:LEVel1? Returns the Operational Status Condition Summary Register for
slots 15 - 17 of the Agilent 8166A/B Lightwave Multichannel Sys­tem.
:ENABle/? Sets or queries the Operational Status Enable Summary Mask. page 58
:ENABle:LEVel1/? Sets or queries the Operational Status Enable Summary Mask for
slots 15 - 17 of the Agilent 8166A/B Lightwave Multichannel Sys­tem.
:STATusn:OPERation
[:EVENt]? Returns the Operational Slot Status Event Register for slot n. page 60
:CONDition? Returns the Operational Slot Status Condition Register for slot n.page61
page 59
page 59
page 60
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 43
Specific Commands Specific Command Summary
Table 4 Specific Command Summary (continued)
Command Description Page
:ENABle/? Sets or queries the Operation Slot Status Enable Mask for slot n.page61
:STATus:QUEStionable
[:EVENt]? Returns the Questionable Status Event Summary Register. page 62
[:EVENt]:LEVel1? Returns the Questionable Status Event Summary Register for
slots 15 - 17 of the Agilent 8166A/B Lightwave Multichannel Sys­tem.
:CONDition? Returns the Questionable Status Condition Summary Register. page 63
:CONDition:LEVel1? Returns the Questionable Status Condition Summary Register for
slots 15 - 17 of the Agilent 8166A/B Lightwave Multichannel Sys­tem.
:ENABle/? Sets or queries the Questionable Status Enable Summary Mask. page 63
:ENABle:LEVel1/? Sets or queries the Questionable Status Enable Summary Mask
for slots 15 - 17 of the Agilent 8166A/B Lightwave Multichannel System.
:STATusn:QUEStionable
[:EVENt]? Returns the Questionable Slot Status Event Register for slot n. page 65
:CONDition? Returns the Questionable Slot Status Condition Register for slot n.page 66
:ENABle/? Sets or queries the
.
slot n
:SYSTem
:DATE/? Sets or returns the instrument’s internal date. page 67
Questionable Slot Status Enable Mask for
page 64
page 64
page 65
page 66
:ERRor? Returns the contents of the instrument’s error queue. page 67
:HELP:HEADers? Returns a list of GPIB commands. page 68
:PRESet Sets all parameters to their default values. page 68
:TIME/? Sets or returns the instrument’s internal time. page 68
:VERSion? Returns the instrument’s SCPI version. page 69
:SYSTem:COMMunicate:GPIB
[:SELF]:ADDress/? Sets or returns the GPIB address. page 69
:TRIGger
:CONFiguration/? Sets or returns trigger configuration. page 156
:TRIGger:CONFiguration
Generates a hardware trigger. page 151,
44 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
page 157
Specific Command Summary Specific Commands
Table 4 Specific Command Summary (continued)
Command Description Page
:EXTended/? Sets or returns extended trigger configuration. page 158
:FPEDal/? Enables/disables the Input Trigger connector to be triggered us-
ing a Foot Pedal or returns whether the Input Trigger connector can be triggered using a Foot Pedal.
:TRIGger[n][CHANnel[m]]
:INPut/? Sets or returns the incoming trigger response . page 152
:OFFset/? Sets or returns the number of incoming triggers received before
data logging begins
:INPut:REARm/? Re-arms input trigger page 153
:OUTPut/? Sets or returns the outgoing trigger response. page 154
:OUTPut:REARm/? Re-arms output trigger page 155
page 157
page 154
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 45
Specific Commands Specific Command Summary
46 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition

Instrument Setup and Status

Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 47
Instrument Setup and Status
This chapter gives descriptions of commands that you can use when setting up your instrument. The commands are split into the following separate subsytems:
• IEEE specific commands that were introduced in “Common Commands” on page 24.
STATus subsystem commands that relate to the status model.
SYSTem subsystem commands that control the serial interface and internal data.
48 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
IEEE-Common Commands Instrument Setup and Status

IEEE-Common Commands

“Common Commands” on page 24 gave a brief introduction to the IEEE-common commands which can be used with the instruments. This section gives fuller descriptions of each of these commands.
command: syntax: *CLS
description: The CLear Status command *CLS clears the following:
parameters: none response: none example: *CLS
*CLS
• Error queue
• Standard event status register (SESR)
• Status byte register (STB)
After the *CLS command the instrument is left waiting for the next command. The instru­ment setting is unaltered by the command, although *OPC/*OPC? actions are cancelled.
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 49
Instrument Setup and Status IEEE-Common Commands
command: syntax: *ESE<wsp><value>
description: The standard Event Status Enable command (*ESE) sets bits in the Standard Event Status
parameters: The bit value for the register (a 16-bit signed integer value):
*ESE
0 ≤ value ≤ 255
Enable Mask (SESEM) that enable the corresponding bits in the standard event status regis­ter (SESR).
The register is cleared:
• at power-on,
• by sending a value of zero.
The register is not changed by the *RST and *CLS commands.
Bit Mnemonic Decimal Value
7 (MSB) Power On 128 6Not Used 0 5 Command Error 32 4 Execution Error 16 3 Device Dependent Error 8 2 Query Error 4 1Not Used 0 0 (LSB) Operation Complete 1
response: none example: *ESE 21
command: syntax: *ESE?
description: The standard Event Status Enable query *ESE? returns the contents of the Standard Event
parameters: none response: The bit value for the register (a 16-bit signed integer value). example: *ESE? → 21<END>
*ESE?
Status Enable Mask (see *ESE for information on this register).
50 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
IEEE-Common Commands Instrument Setup and Status
command: syntax: *ESR?
description: The standard Event Status Register query *ESR? returns the contents of the Standard
parameters none response The bit value for the register (a 16-bit signed integer value):
example: *ESR? → 21<END>
command: syntax: *IDN?
description: The IDeNtification query *IDN? gets the instrument identification over the interface. parameters: none response: The identification terminated by <END>:
*ESR?
Event Status Register. The register is cleared after being read.
Bit Mnemonic Decimal Value
7 (MSB) Power On 128 6 Not used 0 5 Command Error 32
4 Execution Error 16 3 Device Dependent Error 8
2 Query Error 4 1 Not used 0
0 (LSB) Operation Complete 1
*IDN?
For example.
Agilent Technologies
mmmm ssssssss rrrrrrrrrr
example: *IDN? → Agilent Techologies,
NOTE The Agilent 8163A, Agilent 8164A, and Agilent8166A will always return HEWLETT-
PACKARD as the manufacturer. This will not be affected by the transition of these instruments to Agilent Technologies. This will allow programs that use this string to continue functioning. See “:SLOT[n]:HEAD[n]:IDN?” on page 75 for informatio n on module identity strings.
manufacturer instrument model number (for example 8164B) serial number firmware revision level
mmmm,ssssssss,rrrrrrrrrr
<END>
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 51
Instrument Setup and Status IEEE-Common Commands
command: syntax: *OPC
description: The instrument parses and executes all program message units in the input queue and sets
parameters: none response: none example: *OPC
command: syntax: *OPC?
description: The OPeration Complete query *OPC? parses all program message units in the input queue,
*OPC
the operation complete bit in the standard event status register (SESR). This command can be used to avoid filling the input queue before the previous commands have finished execut­ing.
Some module firmware includes commands that set a "StatNOPC" flag during execution to indicate that the module is busy. *OPC blocks the GPIB bus to all commands until every mod­ule hosted by the instrument is no longer busy.
The following actions cancel the *OPC command (and put the instrument into Operation Complete, Command Idle State):
Power-on
the Device Clear Active State is asserted on the interface.
*CLS
*RST
*OPC?
sets the operation complete bit in the Standard Event Status register, and places an ASCII ’1’ in the output queue, when the contents of the input queue have been processed.
Some module firmware includes commands that set a "StatNOPC" flag during execution to indicate that the module is busy. If a module is executing a command which generates a "StatNOPC" flag, the GPIB bus is not blocked to a command to another module. A second command to a busy module is blocked until the module flag "StatOK" is set. Taking advan­tage of this feature, and using *OPC? in a loop to query until the instrument returns 1, can lead to useful gains in program execution efficiency.
The following actions cancel the *OPC? query (and put the instrument into Operation Com­plete, Command Idle State):
Power-on
the Device Clear Active State is asserted on the interface.
*CLS
*RST
parameters: none response: 1<END> is returned if all modules are ready to execute a new operation.
0<END> is returned if any module is busy.
example: *OPC? 1<END>
52 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
IEEE-Common Commands Instrument Setup and Status
command: syntax: *OPT?
description: The OPTions query *OPT? returns the modules installed in your instrument. parameters: none response: Returns the part number of all installed modules, separated by commas.
example: *OPT? → 81682A , , 81533B, 81532A, <END>
command: syntax: *RST
description: The ReSeT command *RST sets the mainframe and all modules to the reset setting (standard
*OPT?
Slots are listed starting with the lowest slot number, that is, slot 0 for the Agilent 8164A/B and Slot 1 for the Agilent 8163A/B and Agilent 8166A/B.
If any slot is empty or not recognised, two spaces are inserted instead of the module’s part number. See the example below, where slots 1 and 4 are empty.
*RST
setting) stored internally.
Pending *OPC? actions are cancelled.
The instrument is placed in the idle state awaiting a command. The *RST command clears the error queue.
The *RST command is equivalent to the *CLS command AND the syst:preset com­mand.
The following are not changed:
• GPIB (interface) state
• Instrument interface address
• Output queue
• Service request enable register (SRE)
• Standard Event Status Enable Mask (SESEM)
parameters: none response: none example: *RST
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 53
Instrument Setup and Status IEEE-Common Commands
command: syntax: *STB?
description: The STatus Byte query *STB? returns the contents of the Status Byte register. parameters: none response: The bit value for the register (a 16-bit signed integer value):
example: *STB? → 128<END>
*STB?
Bit Mnemonic Decimal Value
7 (MSB) Operation Status (OSB) 128 6 Not used 0 5 Event Status Bit (ESB) 32 4 Message Available (MAV) 16 3 Questionable Status (QSB) 8 2 Not used 0 1 Not used 0 0 Not used 0
54 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
IEEE-Common Commands Instrument Setup and Status
command: syntax: *TST?
description: The self-TeST query *TST? makes the instrument perform a self-test and place the results of
parameters: none response: The sum of the results for the individual tests (a 32-bit signed integer value, where 0 value
example: *TST? → 0<END>
*TST?
the test in the output queue. If the self-test fails, the results are also put in the error queue. We recommend that you read self-test results from the error queue. No further commands are allowed while the test is running. After the self-test the instrument is returned to the set­ting that was active at the time the self-test query was processed. The self-test does not re­quire operator interaction beyond sending the *TST? query.
4294967296):
Bits Mnemonic Decimal Value
31 Selftest failed on Mainframe A negative value 18 - 30 Not used 0 17 Selftest failed on Slot 17 131072 16 Selftest failed on Slot 16 65536 15 Selftest failed on Slot 15 32768 14 Selftest failed on Slot 14 16384 13 Selftest failed on Slot 13 8192 12 Selftest failed on Slot 12 4096 11 Selftest failed on Slot 11 2048 10 Selftest failed on Slot 10 1024 9 Selftest failed on Slot 9 512 8 Selftest failed on Slot 8 256 7 Selftest failed on Slot 7 128 6 Selftest failed on Slot 6 64 5 Selftest failed on Slot 5 32 4 Selftest failed on Slot 4 16 3 Selftest failed on Slot 3 8 2 Selftest failed on Slot 2 4 1 Selftest failed on Slot 1 2 0 Selftest failed on Slot 0 1 If 16 is returned, the module in slot 4 has failed. If 18 is returned, the modules in slots 1 and 4 have failed. A value of zero indicates no errors.
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 55
Instrument Setup and Status IEEE-Common Commands
command: syntax: *WAI
description: The WAIt command prevents the instrument from executing any further commands until the
parameters: none response: none example: *WAI
*WAI
current command has finished executing. Some module firmware includes commands that set a "StatNOPC" flag during execution to indicate that the module is busy. *WAI blocks the GPIB bus to all commands until every module hosted by the instrument is no longer busy. All pending operations, are completed during the wait period.
56 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Status Reporting – The STATus Subsystem Instrument Setup and Status

Status Reporting – The STATus Subsystem

The Status subsystem allows you to return and set details from the Status Model. For more details, see “The Status Model” on page 26.
command: syntax: :STATus:OPERation[:EVENt][:LEVel0]?
description: Returns the Operational Status Event Summary Register (OSESR). parameters: none response: The sum of the results for the slots (a 16-bit signed integer value, where 0 ≤ value ≤ 32767):
example: stat:oper? → +0<END>
:STATus:OPERation[:EVENt][:LEVel
Bits Mnemonics Decimal Value
Agilent 8163A/B Agilent 8164A/B Agilent 8166A/B
15 Not used Not used Not used 0 14 Not used Not used Slot 14 Summary 16384 13 Not used Not used Slot 13 Summary 8192 12 Not used Not used Slot 12 Summary 4096 11 Not used Not used Slot 11 Summary 2048 10 Not used Not used Slot 10 Summary 1024 9 Not used Not used Slot 9 Summary 512 8 Not used Not used Slot 8 Summary 256 7 Not used Not used Slot 7 Summary 128 6 Not used Not used Slot 6 Summary 64 5 Not used Not used Slot 5 Summary 32 4 Not used Slot 4 Summary Slot 4 Summary 16 3 Not used Slot 3 Summary Slot 3 Summary 8 2 Slot 2 Summary Slot 2 Summary Slot 2 Summary 4 1 Slot 1 Summary Slot 1 Summary Slot 1 Summary 2 0 Not used Slot 0 Summary Level 1 Summary 1
0
]?
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 57
Instrument Setup and Status Status Reporting – The STATus Subsystem
command: syntax: :STATus:OPERation:CONDition[:LEVel0]?
description: Reads the Operational Status Condition Summary Register. parameters: none response: The sum of the results for the individual slots (a 16-bit signed integer value, where 0 value
example: stat:oper:cond? → +0<END>
:STATus:OPERation:CONDition[:LEVel
32767):
Bits Mnemonics Decimal Value
Agilent 8163A/B Agilent 8164A/B Agilent 8166A/B
15 Not used Not used Not used 0 14 Not used Not used Slot 14 Summary 16384 13 Not used Not used Slot 13 Summary 8192 12 Not used Not used Slot 12 Summary 4096 11 Not used Not used Slot 11 Summary 2048 10 Not used Not used Slot 10 Summary 1024 9 Not used Not used Slot 9 Summary 512 8 Not used Not used Slot 8 Summary 256 7 Not used Not used Slot 7 Summary 128 6 Not used Not used Slot 6 Summary 64 5 Not used Not used Slot 5 Summary 32 4 Not used Slot 4 Summary Slot 4 Summary 16 3 Not used Slot 3 Summary Slot 3 Summary 8 2 Slot 2 Summary Slot 2 Summary Slot 2 Summary 4 1 Slot 1 Summary Slot 1 Summary Slot 1 Summary 2 0 Not used Slot 0 Summary Level 1 Summary 1
0
]?
command: syntax: :STATus:OPERation:ENABle[:LEVel0]<wsp><value>
description: Sets the bits in the Operational Status Enable Summary Mask (OSESM) that enable the con-
parameters: The bit value for the OSESM as a 16-bit signed integer value (0 .. +32767)
response: none example: stat:oper:enab 128
:STATus:OPERation:ENABle[:LEVel
tents of the OSESR to affect the Status Byte (STB).
Setting a bit in this register to 1 enables the corresponding bit in the OSESR to affect bit 7 of the Status Byte.
The default value is 0.
0
]
58 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Status Reporting – The STATus Subsystem Instrument Setup and Status
command: syntax: :STATus:OPERation:ENABle[:LEVel0]?
description: Returns the OSESM for the OSESR parameters: none response: The bit value for the operation enable mask as a 16-bit signed integer value (0 .. +32767) example: stat:oper:enab? → +128<END>
command: syntax: :STATus:OPERation[:EVENt]:LEVel1?
description: Returns the Operational Status Event Summary Register (OSESR) for slots 15 to 17 of the
parameters: none response: The sum of the results for the slots (a 16-bit signed integer value, where 0 ≤ value ≤ 32767):
example: stat:oper:level1? → +0<END>
:STATus:OPERation:ENABle[:LEVel
:STATus:OPERation[:EVENt]:LEVel
Agilent 8166A/B Lightwave Multichannel System.
Bits Mnemonics Decimal Value
Agilent 8166A/B
15-4 Not used 0 3 Slot 17 Summary 8 2 Slot 16 Summary 4 1 Slot 15 Summary 2 0 Not used 0
0
]?
1
?
command: syntax: :STATus:OPERation:CONDition:LEVel1?
description: Returns the Operational Status Condition Summary Register for slots 15 to 17 of the
parameters: none response: The sum of the results for slots 15 to 17 (a 16-bit signed integer value, where 0value
example: stat:oper:cond:level1? +0<END>
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 59
:STATus:OPERation:CONDition:LEVel
Agilent 8166B Lightwave Multichannel System.
32767):
Bits Mnemonics Decimal Value
Agilent 8166A/B
15-4 Not used 0 3 Slot 17 Summary 8 2 Slot 16 Summary 4 1 Slot 15 Summary 2 0 Not used 0
1
?
Instrument Setup and Status Status Reporting – The STATus Subsystem
command: syntax: :STATus:OPERation:ENABle:LEVel1<wsp><value>
description: Sets the bits in the Operational Status Enable Summary Mask (OSESM) that enable the con-
parameters: The bit value for the OSESM as a 16-bit signed integer value (0 .. +32767)
response: none example: stat:oper:enab:level1 128
command: syntax: :STATus:OPERation:ENABle:LEVel1?
description: Returns the OSESM for the OSESR for slots 15 - 17 of the Agilent 8166A/B Lightwave Mea-
parameters: none response: The bit value for the operation enable mask as a 16-bit signed integer value (0 .. +32767) example: stat:oper:enab:level1? → +128<END>
:STATus:OPERation:ENABle:LEVel
tents of the OSESR for slots 15 - 17 of the Agilent 8166A/B Lightwave Measurement System to affect the Status Byte (STB).
Setting a bit in this register to 1 enables the corresponding bit in the OSESR for slots 15 - 17 of the Agilent 8166A/B Lightwave Measurement System to affect bit 7 of the Status Byte.
The default value is 0.
:STATus:OPERation:ENABle:LEVel
surement System
1
1
?
command: syntax: :STATusn:OPERation[:EVENt]?
description: Returns the Operational Slot Status Event Register (OSSER) of slot n. parameters: none response: The results for the individual slot events (a 16-bit signed integer value, where 0 value
example: stat1:oper? +0<END>
:STATus
32767):
Bit
8-15
7 6 5 4 3 2 1 0
n
:OPERation[:EVENt]?
Mnemonic
Not used
Slot n: offset (O) type bit 2 Slot n: offset (O) type bit 1 Slot n: offset (O) has been enabled Slot n: shutter has been opened Slot n: Zeroing ongoing Not used Slot n: Coherence Control has been switched on Slot n: Laser has been switched on
Decimal Value
0
128 64 32 16 8 0 2 1
60 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Status Reporting – The STATus Subsystem Instrument Setup and Status
command: syntax: :STATusn:OPERation:CONDition?
description: Returns the Operational Slot Status Condition Register of slot n. parameters: none response: The results for the individual slot events (a 16-bit signed integer value, where 0 ≤ value
example: stat1:oper:cond? → +0<END>
:STATus
32767):
Bit
8-15
7 6 5 4 3 2 1 0
NOTE:
n
:OPERation:CONDition?
Mnemonic
Not used
Slot n: offset (O) type bit 2 Slot n: offset (O) type bit 1 Slot n: offset (O) enabled Slot n: shutter open Slot n: Zeroing ongoing Not used Slot n: Coherence Control is switched on Slot n: Laser is switched on
Decimal Value
0
128 64 32 16 8 0 2 1
Only attenuator bits 5 to 7 are used to show whether the offset feature is used and which algorithm is used to calculate the wavelength dependent offset.
Bit 5 states if the feature is enabled or disabled. Bits 6 and 7 are decoded as shown below to say whether the attenuator uses saved, interpolated, or extrapolated values.
Type Bit 5 Bit 6 Bi t 7 Decimal Value
none 0 0 0 0 exact value 1 0 0 32 extrapolate below 1 1 0 96 extrapolate above 1 0 1 160 interpolated 1 1 1 224
command: syntax: :STATusn:OPERation:ENABle<wsp><value>
description: Sets the bits in the Operation Slot Status Enable Mask (OSSEM) for slot n that enable the
parameters: The bit value for the OSSEM as a 16-bit signed integer value (0 .. +32767) response: none example: stat:oper:enab 128
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 61
:STATus
contents of the Operation Slot Status Event Register (OSSER) for slot n to affect the OSESR.
Setting a bit in this register to 1 enables the corresponding bit in the OSSER for slot n to af­fect bit n of the OSESR.
n
:OPERation:ENABle
Instrument Setup and Status Status Reporting – The STATus Subsystem
command: syntax: :STATusn:OPERation:ENABle?
description: Returns the OSSEM of slot n parameters: none response: The bit value for the OSSEM as a 16-bit signed integer value (0 .. +32767) example: stat:oper:enab? → +128<END>
command: syntax: :STATus:PRESet
description: Presets all bits in all the enable masks for both the OPERation and QUEStionable status sys-
parameters: none response: none example: stat:pres
command: syntax: :STATus:QUEStionable[:EVENt][:LEVel0]?
description: Returns the Questionable Status Event Summary Register (QSESR). parameters: none response: The sum of the results for the QSESR as a 16-bit signed integer value (0 .. +32767)
example: stat:ques? +0<END>
:STATus
:STATus:PRESet
tems to 0, that is, OSSEM, QSSEM, OSESM, and QSESM.
:STATus:QUEStionable[:EVENt][:LEVel
Bits Mnemonics Decimal Value
15 Not used Not used Not used 0 14 Not used Not used Slot 14 Summary 16384 13 Not used Not used Slot 13 Summary 8192 12 Not used Not used Slot 12 Summary 4096 11 Not used Not used Slot 11 Summary 2048 10 Not used Not used Slot 10 Summary 1024 9 Not used Not used Slot 9 Summary 512 8 Not used Not used Slot 8 Summary 256 7 Not used Not used Slot 7 Summary 128 6 Not used Not used Slot 6 Summary 64 5 Not used Not used Slot 5 Summary 32 4 Not used Slot 4 Summary Slot 4 Summary 16 3 Not used Slot 3 Summary Slot 3 Summary 8 2 Slot 2 Summary Slot 2 Summary Slot 2 Summary 4 1 Slot 1 Summary Slot 1 Summary Slot 1 Summary 2 0 Not used Slot 0 Summary Level 1 Summary 1
n
:OPERation:ENABle?
0
]?
Agilent 8163A/B Agilent 8164A/B Agilent 8166A/B
62 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Status Reporting – The STATus Subsystem Instrument Setup and Status
command: syntax: :STATus:QUEStionable:CONDition[:LEVel0]?
description: Returns the Questionable Status Condition Summary Register. parameters: none response: The sum of the results for the Questionable Status Condition Summary Register as a 16-bit
example: stat:ques:cond? → +0<END>
:STATus:QUEStionable:CONDition[:LEVel
signed integer value (0 .. +32767)
Bits Mnemonics Decimal Value
Agilent 8163A/B Agilent 8164A/B Agilent 8166A/B
15 Not used Not used Not used 0 14 Not used Not used Slot 14 Summary 16384 13 Not used Not used Slot 13 Summary 8192 12 Not used Not used Slot 12 Summary 4096 11 Not used Not used Slot 11 Summary 2048 10 Not used Not used Slot 10 Summary 1024 9 Not used Not used Slot 9 Summary 512 8 Not used Not used Slot 8 Summary 256 7 Not used Not used Slot 7 Summary 128 6 Not used Not used Slot 6 Summary 64 5 Not used Not used Slot 5 Summary 32 4 Not used Slot 4 Summary Slot 4 Summary 16 3 Not used Slot 3 Summary Slot 3 Summary 8 2 Slot 2 Summary Slot 2 Summary Slot 2 Summary 4 1 Slot 1 Summary Slot 1 Summary Slot 1 Summary 2 0 Not used Slot 0 Summary Level 1 Summary 1
0
]?
command: syntax: :STATus:QUEStionable:ENABle[:LEVel0]<wsp><value>
description: Sets the bits in the Questionable Status Enable Summary Mask (QSESM) that enable the
parameters: The bit value for the questionable enable mask as a 16-bit signed integer value (0 .. +32767)
response: none example: stat:ques:enab 128
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 63
:STATus:QUEStionable:ENABle[:LEVel
contents of the QSESR to affect the Status Byte (STB).
Setting a bit in this register to 1 enables the corresponding bit in the QSESR to affect bit 3 of the Status Byte.
The default value is 0.
0
]
Instrument Setup and Status Status Reporting – The STATus Subsystem
command: syntax: :STATus:QUEStionable:ENABle[:LEVel0]?
description: Returns the QSESM for the event register parameters: none response: The bit value for the QSEM as a 16-bit signed integer value (0 .. +32767) example: stat:ques:enab? → +128<END>
command: syntax: :STATus:QUEStionable[:EVENt]:LEVel1?
description: Returns the Questionable Status Event Summary Register (QSESR) for slots 15 to 17 of the
parameters: none response: The sum of the results for the slots (a 16-bit signed integer value, where 0 ≤ value ≤ 32767):
example: stat:ques:level1? → +0<END>
:STATus:QUEStionable:ENABle[:LEVel
:STATus:QUEStionable[:EVENt]:LEVel
Agilent 8166A/B Lightwave Multichannel System.
Bits Mnemonics Decimal Value
Agilent 8166A/B
15-4 Not used 0 3Slot 17 Summary 8 2Slot 16 Summary 4 1Slot 15 Summary 2 0 Not used 0
0
]?
1
?
command: syntax: :STATus:QUEStionable:CONDition:LEVel1?
description: Returns the Questionable Status Condition Summary Register for slots 15 to 17 of the
parameters: none response: The sum of the results for the slots (a 16-bit signed integer value, where 0 ≤ value ≤ 32767):
example: stat:ques:cond:level1? +0<END>
:STATus:QUEStionable:CONDition:LEVel
Agilent 8166A/B Lightwave Multichannel System.
Bits Mnemonics Decimal Value
Agilent 8166A/B
15-4 Not used 0 3Slot 17 Summary 8 2Slot 16 Summary 4 1Slot 15 Summary 2 0 Not used 0
1
?
64 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Status Reporting – The STATus Subsystem Instrument Setup and Status
command: syntax: :STATus:QUEStionable:ENABle:LEVel1<wsp><value>
description: Sets the bits in the Questionable Status Enable Summary Mask (QSESM) that enable the
parameters: The bit value for the QSESM as a 16-bit signed integer value (0 .. +32767)
response: none example: stat:oper:enab:level1 128
command: syntax: :STATus:QUEStionable:ENABle:LEVel1?
description: Returns the QSESM for the QSESR for slots 15 - 17 of the Agilent 8166A/B Lightwave Mea-
parameters: none response: The bit value for the QSESM as a 16-bit signed integer value (0 .. +32767) example: stat:oper:enab:level1? → +128<END>
:STATus:QUEStionable:ENABle:LEVel
contents of the QSESR for slots 15 - 17 of the Agilent 8166A/B Lightwave Measurement Sys­tem to affect the Status Byte (STB).
Setting a bit in this register to 1 enables the corresponding bit in the OSESR for slots 15 - 17 of the Agilent 8166A/B Lightwave Measurement System to affect bit 7 of the Status Byte.
The default value is 0.
:STATus:QUEStionable:ENABle:LEVel
surement System
1
1
?
command: syntax: :STATusn:QUEStionable[:EVENt]?
description: Returns the questionable status of slot n - the Questionable Slot Status Event Register (QSS-
parameters: none response: The results for the individual slot events (a 16-bit signed integer value, where 0 value
example: stat1:oper? +0<END>
:STATus
ER).
32767):
Bit
10-15 9 8 7 6 5 4 3 2 1 0 Every nth bit is the summary of slot n.
n
:QUEStionable[:EVENt]?
Mnemonic
Not Used Slot n: Beam Path Protection on (shutter off) Slot n: Coherence control is uncalibrated Slot n: Duty cycle has been out of range Slot n: ARA has been recommended Slot n: Module has been out of specification Slot n: Module has settled unsuccessfully Slot n: Laser protection has been on Slot n: Temperature has been out of range Slot n: A Zeroing operation has failed Slot n: Excessive Value has occurred
Decimal Value
0 512 256 128 64 32 16 8 4 2 1
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 65
Instrument Setup and Status Status Reporting – The STATus Subsystem
command: syntax: :STATusn:QUEStionable:CONDition?
description: Returns the Questionable Slot Status Condition Register for slot n. parameters: none response: The results for the individual slot events (a 16-bit signed integer value, where 0 value
example: stat1:ques:cond? → +0<END>
command: syntax: :STATusn:QUEStionable:ENABle<wsp><value>
description: Sets the bits in the Questionable Slot Status Enable Mask (QSSEM) for slot n that enable the
:S TATus
32767):
Bit
10 - 15 9 8 7 6 5 4 3 2 1 0
Every nth bit is the summary of slot n.
n
:QUEStionable:CONDition?
Mnemonic
Not Used Slot n: Beam Path Protection on (shutter off) Slot n: Coherence control is uncalibrated Slot n: Duty cycle is out of range Slot n: ARA recommended Slot n: Module is out of specification Slot n: Module has not settled Slot n: Laser protection on Slot n: Temperature out of range Slot n: Zeroing failed Slot n: Excessive Value
n
:STATus
contents of the Questionable Slot Status Register (QSSR) for slot n to affect the QSESR.
:QUEStionable:ENABle
Decimal Value
6 512 256 128 64 32 16 8 4 2 1
Setting a bit in this register to 1 enables the corresponding bit in the QSSER for slot n to af-
fect bit n of the QSESR. parameters: The bit value for the QSSEM as a 16-bit signed integer value (0 .. +32767) response: none example: stat:ques:enab 128
command: syntax: :STATusn:QUEStionable:ENABle?
description: Returns the QSSEM for slot n parameters: none response: The bit value for the QSSEM as a 16-bit signed integer value (0 .. +32767) example: stat:ques:enab? +128<END>
:STATus
n
:QUEStionable:ENABle?
66 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition

Interface/Instrument Behaviour Settings – The SYSTem Subsystem Instrument Setup and Status

Interface/Instrument Behaviour
Settings – The SYSTem Subsystem
The SYSTem subsystem lets you control the instrument’s serial interface. You can also control some internal data (like date, time, and so on).
command: syntax: :SYSTem:DATE<wsp><year>,<month>,<day>
description: Sets the instrument’s internal date.
parameters: • the first value is the year (four digits),
response: none example: syst:date 1999, 1, 12
command: syntax: :SYSTem:DATE?
description: Returns the instrument’s internal date.
parameters: none response: The date in the format year, month, day (16-bit signed integer values) example: syst:date? → +1999,+1,+12<END>
command: syntax: :SYSTem:ERRor?
description: Returns the next error from the error queue (see “The Error Queue” on page 19).
:SYSTem:DATE
• the second value is the month, and
• the third value is the day.
:SYSTem:DATE?
:SYSTem:ERRor?
Each error has the error code and a short description of the error, separated by a comma, for example 0, "No error".
Error codes are numbers in the range -32768 and +32767.
Negative error numbers are defined by the SCPI standard. Positive error numbers are device
dependent. parameters: none response: The number of the latest error, and its meaning. example: syst:err? -113,"Undefined header"<END>
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 67
Instrument Setup and Status Interface/Instrument Behaviour Settings – The SYSTem Subsystem
command: syntax: :SYSTem:HELP:HEADers?
description: Returns a list of GPIB commands. parameters: none response: Returns a list of GPIB commands example: syst:help:head?
command: syntax: :SYSTem:PRESet
description: Sets the mainframe and all installed modules to their standard settings. This command has
:SYSTem:HELP:HEADers?
Returns a list of all GPIB commands
:SYSTem:PRESet
the same function as the Preset hardkey.
The following are not affected by this command:
• the GPIB (interface) state,
• the backlight and contrast of the display,
• the interface address,
• the output and error queues,
• the Service Request Enable register (SRE),
• the Status Byte (STB),
• the Standard Event Status Enable Mask (SESEM), and
• the Standard Event Status Register (SESR).
parameters: none response: none example: SYST:PRES
command: syntax: :SYSTem:TIME<wsp><hour>,<minute>,<second>
description: Sets the instrument’s internal time.
parameters: • the first value is the hour (0 .. 23),
response: none example: syst:time 20,15,30
:SYSTem:TIME
• the second value is the minute, and
• the third value is the seconds.
68 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Interface/Instrument Behaviour Settings – The SYSTem Subsystem Instrument Setup and Status
command: syntax: :SYSTem:TIME?
description: Returns the instrument’s internal time.
parameters: none response: The time in the format hour, minute, second. Hours are counted 0...23 (16-bit signed integer
example: syst:time? → +20,+15,+30<END>
command: syntax: :SYSTem:VERSion?
description: Returns the SCPI revision to which the instrument complies. parameters: none response: The revision year and number. example: syst:vers? → 1995.0<END>
command: syntax: :SYSTem:COMMunicate:GPIB[:SELF]:ADDRess<wsp><GPIB Address>
description: Sets the GPIB address. parameters: The GPIB Address Values allowed 0-30
response: none example: SYST:COMM:GPIB:ADDR 20
:SYSTem:TIME?
values).
:SYSTem:VERSion?
:SYSTem:COMMunicate:GPIB[:SELF]:ADDRess
21 is often reseverved by the GPIB Controller.
command: syntax: :SYSTem:COMMunicate:GPIB[:SELF]:ADDRess?
description: Returns the GPIB address. parameters: none response: The GPIB Address example: SYST:COMM:GPIB:ADDR?
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 69
:SYSTem:COMMunicate:GPIB[:SELF]:ADDRess?
+20<END>
Instrument Setup and Status Interface/Instrument Behaviour Settings – The SYSTem Subsystem
70 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition

Measurement Operations & Settings

Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 71
Measurement Operations & Settings
This chapter gives descriptions of commands that you can use when you are setting up or performing measurements. The commands are split up into the following subsystems:
• Root layer commands that take power measurements, configures triggering, and return information about the mainframe and it’s slots
SENSe subsystem commands that control Power Sensors, Optical Head Interface Modules, and Return Loss Modules.
SOURce subsystem commands that control Laser Source modules, DFB source modules, Tunable Laser modules, and Return Loss Modules with internal laser sources.
• Signal Conditioing commands that control Attenuator modules.
TRIGger subsystem commands that control triggering.
72 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Root Layer Command Measurement Operations & Settings

Root Layer Command

command: syntax: :LOCK<wsp><boolean>, <value>
description: Switches the lock off and on.
parameters: A boolean value: 0 or OFF: switch lock off
response: none example: lock 1,1234 - 1234 is the default password
command: syntax: :LOCK?
description: Returns the current state of the lock. parameters: none response: A boolean value: 0: lock is switched off
example: lock? → 1<END>
:LOCK
High power lasers cannot be switched on, if you switch the lock on. High power lasers are switched off immediately when you switch the lock on.
1 or ON: switch lock on
<value> is the four-figure lock password.
:LOCK?
1: lock is switched on
The commands in the Slot subsystem allow you to query the following:
• a particular slot, for example, using slot1:empt?,
• or, an Optical Head attached to an Optical Head Interface Module, for example, an Optical Head Interface Module in slot1 with an Optical Head attached to channel 2, using slot1:head2:empt?.
command: syntax: :SLOT[n]:EMPTy?
description: Returns whether the module slot is empty. parameters: none response: A boolean value: 0: there is a module in the slot
examples: slot1:empt? affects: Independent of module type
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 73
:SLOT[
n
]:EMPTy?
1: the module slot is empty
0<END> There is a module in slot1
Measurement Operations & Settings Root Layer Command
command: syntax: :SLOT[n]:IDN?
description: Returns information about the module. parameters: none response: HEWLETT-PACKARD:
example: slot1:idn?
NOTE • The Agilent 81640A/80A/82A/89A Tunable Laser modules will always return
affects: Independent of module type
command: syntax: :SLOT[n]:OPTions?
description: Returns information about a module’s options. parameters: none response: A string. example: slot1:opt? affects: Independent of module type
:SLOT[
n
]:IDN?
manufacturer
mmmm: ssssssss: rrrrrrrrrr:
instrument model number (for example 81533B) serial number date of firmware revision
HEWLETT-PACKARD, 81533B,3411G06054,07-Aug-98<END>
HEWLETT-PACKARD as the manufacturer.
• All other Agilent 8163A Series modules return Agilent Technologies as
the manufacturer.
• The HP 8153A Series modules will always return HEWLETT-PACKARD as the
manufacturer.
See “*IDN?” on page 51 for information o n m a inframe identity strings.
n
:SLOT[
]:OPTions?
NO CONNECTOR OPTION, NO INSTRUMENT OPTIONS<END>
command: syntax: :SLOT[n]:TST?
description: Returns the latest selftest results for a module.
NOTE This command does not perform a selftest. Use selfTeST command, *TST? on
parameters: none response: Returns an error code and a short description of the error. example: slot:tst? affects: Independent of module type
n
:SLOT[
page 59, to perform a selftest.
]:TST?
+0,"self test OK"<END>
74 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Root Layer Command Measurement Operations & Settings
command: syntax: :SLOT[n]:HEAD[n]:EMPTy?
description: Returns whether an optical head is connected. parameters: none response: A boolean value: 0: there is a module in the slot
examples: slot1:head:empt?
NOTE • The HP 8153A Series Optical Heads will always return HEWLETT-PACKARD
affects: Optical heads
command: syntax: :SLOT[n]:HEAD[n]:IDN?
description: Returns information about the optical head. parameters: none response: HEWLETT-PACKARD:
example: slot1:head:idn?
affects: Optical heads
n
:SLOT[
]:HEAD[n]:EMPTy?
1: the module slot is empty
0<END> An optical head is connected to the optical
head interface module in slot 1
as the manufacturer.
• All other Agilent 8163A Series Optical Heads return Agilent Technologies as the manufacturer.
See “*IDN?” on page 51 for information on mainframe identity strings.
n
:SLOT[
mmmm: ssssssss: rrrrrrrrrr:
]:HEAD[n]:IDN?
manufacturer instrument model number (for example 81520A) serial number date of firmware revision
HEWLETT-PACKARD, 81520A,3411G06054,07-Aug-98<END>
command: syntax: :SLOT[n]:HEAD[m]:OPTions?
description: Returns information about an optical head’s options. parameters: none response: A string. example: slot1:head:opt?
affects: Optical heads
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 75
n
:SLOT[
OPTIONS<END>
]:HEAD[m]:OPTions?
NO CONNECTOR OPTION, NO INSTRUMENT
Measurement Operations & Settings Root Layer Command
command: syntax: :SLOT[n]:HEAD[m]:TST?
description: Returns the latest selftest results for an optical head.
NOTE This command does not perform a selftest. Use selfTeST command, “*TST?” on
parameters: none response: Returns an error code and a short description of the error. example: slot:head:tst? affects: Optical heads
command: syntax: :SPECial:REBoot
description: Reboots the mainframe and all modules. parameters: none response: none example: spec:reb
:SLOT[
n
]:HEAD[m]:TST?
page 55, to perform a selftest.
+0,"self test OK"<END>
:SPECial:REBoot
76 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Measurement Functions – The SENSe Subsystem Measurement Operations & Settings

Measurement Functions – The SENSe Subsystem

The SENSe subsystem lets you control measurement parameters for a Power Sensor, an Optical Head Interface module, or a return loss module.
Agilent 81635A and Agilent 81619A- Master and Slave Channels
For the Agilent 81635A Dual Power Sensor and Agilent 81619A Dual Optical Head Interface module, channel 1 is the master channel and channel 2 is the slave channel. The master and slave channels share the same software and hardware triggering system. For some commands, setting parameters for the master channel sets the parameters for the slave channel. In these cases, you may only set parameters for the slave channel by setting master channel parameters.
The commands listed in Table Table 5 can only be configured using the master channel.
Table 5 Commands that can only be configured using the master channel
Command Page
:INITiate[n]:[CHANnel[m]][:IMMediate] page 79 :INITiate[n]:[CHANnel[m]]:CONTinuous/? page 80 :READ[n][:CHANnel[m]][:SCALar]:POWer[:DC]? page 81 :SENSe[n]:[CHANnel[m]]:CORRection:COLLect:ZERO page 83 :SENSe[n][:CHANnel[m]]:FUNCtion:PARameter:LOGGing/? page 84 :SENSe[n][:CHANnel[m]]:FUNCtion:PARameter:MINMax/? page 85 :SENSe[n][:CHANnel[m]]:FUNCtion:PARameter:STABility/? page 87 :SENSe[n][:CHANnel[m]]:FUNCtion:STATe/? page 91 :SENSe[n]:[CHANnel[m]]:POWer:ATIME/? page 92 :SENSe[n]:[CHANnel[m]]:POWer:RANGe:AUTO/? page 95 :TRIGger[n][:CHANnel[m]]:INPut/? page 152 :TRIGger[n][:CHANnel[m]]:INPut:REARm/? page 153 :TRIGger[n][:CHANnel[m]]:OUTPut/? page 154 :TRIGger[n][:CHANnel[m]]:OUTPut:REARm/? page 155
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 77
Measurement Operations & Settings Measurement Functions – The SENSe Subsystem
The commands listed in Table Table 6 are independent for both master and slave channels.
Table 6 Commands that are independent for both master and slave channels
Command Page
:FETCh[n][:CHANnel[m]][:SCAlar]:POWer[:DC]? page 78 :SENSe[n]:[CHANnel[m]]:CORRection[:LOSS][:INPut] [:MAGNitude]/? page 83 :SENSe[n]:[CHANnel[m]]:CORRection:COLLect:ZERO? page 83 :SENSe[n]:[CHANnel[m]]:CORRection:COLLect:ZERO:ALL page 83 :SENSe[n][:CHANnel[m]]:FUNCtion:RESult? page 88 :SENSe[n]:[CHANnel[m]]:POWer:RANGe[:UPPer]/? page 93 :SENSe[n]:[CHANnel[m]]:POWer:REFerence/? page 96 :SENSe[n]:[CHANnel[m]]:POWer:REFerence:DISPlay page 96 :SENSe[n]:[CHANnel[m]]:POWer:REFerence:STATe/? page 97 :SENSe[n]:[CHANnel[m]]:POWer:REFerence:STATe:RATio/? page 97 :SENSe[n]:[CHANnel[m]]:POWer:UNIT/? page 98 :SENSe[n]:[CHANnel[m]]:POWer:WAVelength/? page 99
command: syntax: :FETCh[n]:[CHANnel[m]][:SCAlar]:POWer[:DC]?
description: Reads the current power meter value, or for a return loss module returns current power value
parameters: none response: The current value as a float value in dBm,W or dB.
NOTE If the reference state is absolute, units are dBm or W.
example: fetc1:pow? → +6.73370400E-04<END> affects: All power meters, return loss modules, and attenuators with power sensors dual sensors: Master and slave channels are independent.
:FETCh[
n
][:CHANnel[m]][:SCAlar]:POWer[:DC]?
at return loss diode (back reflection path). It does not provide its own triggering and so must be used with either continuous software triggering (see “:INITiate[n]:[CHANnel[m]]:CONTin-
uous?” on page 80) or a directly preceding immediate software trigger (see “:INI- Tiate[n]:[CHANnel[m]][:IMMediate]” on page 79).
It returns the value the previous software trigger measured. Any subsequent FETCh com­mand will return the same value, if there is no subsequent software trigger.
If the reference state is relative, units are dB.
78 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Measurement Functions – The SENSe Subsystem Measurement Operations & Settings
command: syntax: :FETCh[n]:[CHANnel[m]][:SCAlar]:RETurnloss?
description: Reads the current return loss value. It does not provide its own triggering and so must be
parameters: none response: The current value as a float value in dB. example: fetc1:ret? → +6.73370400E-00<END> affects: All return loss modules
command: syntax: :FETCh[n]:[CHANnel[m]][:SCAlar]:MONitor?
description: Reads current power value at a return loss module’s monitor diode (forward path). It does
parameters: none response: The current value as a float value in W or dBm. example: fetc1:mon? → +6.73370400E-00<END> affects: All return loss modules
:FETCh[
n
][:CHANnel[m]][:SCAlar]:RETurnloss?
used with either continuous software triggering (see “:INITiate[n]:[CHANnel[m]]:CONTinu­ous?” on page 80) or a directly preceding immediate software trigger (see “:INI­Tiate[n]:[CHANnel[m]][:IMMediate]” on page 79).
It returns the return loss value the previous software trigger measured. Any subsequent FETCh command will return the same value, if there is no subsequent software trigger.
n
:FETCh[
not provide its own triggering and so must be used with either continuous software trigger­ing (see “:INITiate[n]:[CHANnel[m]]:CONTinuous?” on page 80) or a directly preceding im-
mediate software trigger (see “:INITiate[n]:[CHANnel[m]][:IMMediate]” on page 79).
It returns the monitor value the previous software trigger measured. Any subsequent FETCh command will return the same value, if there is no subsequent software trigger.
][:CHANnel[m]][:SCAlar]:MONitor?
command: syntax: :INITiate[n]:[CHANnel[m]][:IMMediate]
description: Initiates the software trigger system and completes one full trigger cycle, that is, one mea-
parameters: none response: none example: init affects: All power meters, return loss modules. dual sensors: Can only be sent to master channel, slave channel is also affected.
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 79
:INITiate[
surement is made.
n
]:[CHANnel[m]][:IMMediate]
Measurement Operations & Settings Measurement Functions – The SENSe Subsystem
command: syntax: :INITiate[n]:[CHANnel[m]]:CONTinuous<wsp><boolean>
description: Sets the software trigger system to continuous measurement mode. parameters: A boolean value: 0 or OFF: do not measure continuously
response: none example: init2:cont 1 affects: All power meters, return loss modules. dual sensors: Can only be sent to master channel, slave channel is also affected.
command: syntax: :INITiate[n]:[CHANnel[m]]:CONTinuous?
description: Queries whether the software trigger system operates continuously or not parameters: none response: A boolean value: 0 or OFF: measurement is not continuous
example: init2:cont? → 1<END> affects: All power meters, return loss modules. dual sensors: Can only be sent to master channel, slave channel parameters are identical.
:INITiate[
:INITiate[
n
]:[CHANnel[m]]:CONTinuous
1 or ON: measure continuously
n
]:[CHANnel[m]]:CONTinuous?
1 or ON: measurement is continuous
command: syntax: :READ[n]:[CHANnel[m]]:POWer:[:DC]:ALL?
description: Reads all available power meter channels. It provides its own software triggering and does
NOTE The power meters must be running for this command to be effective.
parameters: none response: 4-byte Intel float values in a binary block in Intel byte order. The values are ordered by slot
NOTE Data values are always in Watt.
example: read1:pow:all? → interpreted as
affects: All power meters (v3.0x firmware or later). dual sensors: Master channels receive a read command, see:
n
:READ[
not need a triggering command.
and channel order.
See “Data Types” on page 22 for more information on Binary Blocks.
+1.33555600E-006|+1.34789100E-006|+1.37456900E-006<END>
“:READ[n][:CHANnel[m]][:SCALar]:POWer[:DC]?” on page 81
Slave channels receive a fetch command, see: “:FETCh[n][:CHANnel[m]][:SCAlar]:POWer[:DC]?” on page 78.
][:CHANnel[m]][SCALar:]:POWer:ALL?
80 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Measurement Functions – The SENSe Subsystem Measurement Operations & Settings
command: syntax: :READ[n]:[CHANnel[m]]:POWer[:DC]:ALL:CONFig?
description: Returns the slot and channel numbers for all available power meter channels.
parameters: none response: A binary block (Intel byte order) consisting of 2-byte unsigned integer value pairs (so each
example: read1:pow:all:conf? → interpreted as
affects: All power meters (v3.0x firmware or later). dual sensors:
command: syntax: :READ[n]:[CHANnel[m]][:SCALar]:POWer[:DC]?
description: Reads the current power meter value, or for a return loss module the power value at the re-
:READ[
n
][:CHANnel[m]]:POWer:ALL:CONFig?
Use this command to match returned power values to the appropriate slot and channel num­ber.
pair has 4 bytes). The first member of the pair represents the the slot number, the second member of the pair represents the channel number.
1|1|1|2|12|1<END>
This 12-byte block means that there are three powermeters present: Slot 1, Channel 1 Slot 1, Channel 2 Slot 12, Channel 1
n
:READ[
turn loss diode (back reflection path). It provides its own software triggering and does not need a triggering command.
][:CHANnel[m]][:SCALar]:POWer[:DC]?
If the software trigger system operates continuously (see “:INITiate[n]:[CHANnel[m]]:CON­Tinuous?” on page 80), this command is identical to “:FETCh[n][:CHANnel[m]][:SCA- lar]:POWer[:DC]?” on page 78.
If the software trigger system does not operate continuously, this command is identical to generating a software trigger (“:INITiate[n]:[CHANnel[m]][:IMMediate]” on page 79) and then reading the power meter value.
NOTE The power meter must be running for this command to be effective.
parameters: none response: The current power meter reading as a float value in dBm, W or dB.
NOTE If the reference state is absolute, units are dBm or W.
If the reference state is relative, units are dB.
example: read1:pow? +1.33555600E-006<END> affects: All power meters and return loss modules and attenuator with power control dual sensors: Can only be sent to master channel, slave channel is also triggered.
To read a simultaneous result from the slave channel, send “:FETCh[n][:CHANnel[m]][:SCA- lar]:POWer[:DC]?” on page 78 directly after this command.
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 81
Measurement Operations & Settings Measurement Functions – The SENSe Subsystem
command: syntax: :READ[n]:[CHANnel[m]][:SCALar]:RETurnloss?
description: Reads the current return loss value. It provides its own software triggering and does not
NOTE The return loss module must be running for this command to be effective.
parameters: none response: The current power meter reading as a float value in dB. example: read1:ret? → +1.33555600E-000<END> affects: All return loss modules
command: syntax: :READ[n]:[CHANnel[m]][:SCALar]:MONitor?
description: Reads the power value at the monitor diode (forward path). It provides its own software trig-
:READ[
n
][:CHANnel[m]][:SCALar]:RETurnloss?
need a triggering command.
If the software trigger system operates continuously (see “:INITiate[n]:[CHANnel[m]]:CON-
Tinuous?” on page 80), this command is identical to “:FETCh[n][:CHANnel[m]][:SCAlar]:RE- Turnloss?” on page 79.
If the software trigger system does not operate continuously, this command is identical to generating a software trigger (“:INITiate[n]:[CHANnel[m]][:IMMediate]” on page 79) and then reading the power meter value.
n
:READ[
gering and does not need a triggering command.
][:CHANnel[m]][:SCALar]:MONitor?
If the software trigger system operates continuously (see “:INITiate[n]:[CHANnel[m]]:CON­Tinuous?” on page 80), this command is identical to “:FETCh[n][:CHANnel[m]][:SCA- lar]:MONitor?” on page 79.
If the software trigger system does not operate continuously, this command is identical to generating a software trigger (“:INITiate[n]:[CHANnel[m]][:IMMediate]” on page 79) and then reading the power meter value.
NOTE The return loss module must be running for this command to be effective.
parameters: none response: The current power meter reading as a float value in W or dBm example: read1:mon? → +1.33555600E-000<END> affects: All return loss modules
command: syntax: :SENSe[n]:[CHANnel[m]]:CORRection[:LOSS][:INPUT][:MAGNitude]<wsp>
description: Enters a calibration value for a module. parameters: The calibration factor as a float value
response: none example: sens1:corr 10DB affects: All power meters dual sensors: Master and slave channels are independent.
:SENSe[
<value>[DB|MDB]
If no unit type is specified, decibels (dB) is implied.
n
]:[CHANnel[m]]:CORRection[:LOSS][:INPut][:MAGNitude]
82 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Measurement Functions – The SENSe Subsystem Measurement Operations & Settings
command: syntax: :SENSe[n]:[CHANnel[m]]:CORRection[:LOSS][:INPUT][:MAGNitude]?
description: Returns the calibration factor for a module. parameters: none response: The calibration factor as a float value. Units are in dB, although no units are returned in the
example: sens1:corr? affects: All power meters dual sensors: Master and slave channels are independent.
command: syntax: :SENSe[n]:[CHANnel[m]]:CORRection:COLLect:ZERO
description: Zeros the electrical offsets for a power meter or return loss module. parameters: none response: none example: sens1:corr:coll:zero affects: All power meters and return loss modules dual sensors: Can only be sent to master channel, slave channel is also zeroed.
command: syntax: :SENSe[n]:[CHANnel[m]]:CORREction:COLLect:ZERO?
description: Returns the status of the most recent zero command. parameters: none response: 0:
:SENSe[
response message.
:SENSe[
:SENSe[
n
]:[CHANnel[m]]:CORRection[:LOSS][:INPut][:MAGNitude]?
n
]:[CHANnel[m]]:CORRection:COLLect:ZERO
n
]:[CHANnel[m]]:CORRection:COLLect:ZERO?
+1.00000000E+000<END>
zero succeeded without errors.
any other number:
example: sens1:corr:coll:zero? → 0<END> affects: All power meters and return loss modules dual sensors: Master and slave channels are independent.
command: syntax: SENSe[n]:[CHANnel[m]]:CORRection:COLLect:ZERO:ALL
description: Zeros the electrical offsets for all installed power meter and return loss modules. parameters: none response: none example: sens:chan:corr:coll:zero:all affects: All power meters and return loss modules dual sensors: Command is independent of channel.
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 83
:SENSe[
n
]:[CHANnel[m]]:CORRection:COLLect:ZERO:ALL
remote zeroing failed (the number is the error code returned from the operation).
Measurement Operations & Settings Measurement Functions – The SENSe Subsystem
NOTE Setting parameters for the logging function sets some parameters,
including hidden parameters, for the stability and MinMax functions and vice versa. You must use the :SENSe[n][:CHANnel[m]]:FUNCtion:PARameter:LOGGing command to set parameters before you start a logging function using the :SENSe[n][:CHANnel[m]]:FUNCtion:STATe command.
command:
:SENSe[
n
][:CHANnel[m]]:FUNCtion:PARameter:LOGGing
syntax: :SENSe[n][:CHANnel[m]]:FUNCtion:PARameter:LOGGing<wsp><data points>,
<averaging time>[NS|US|MS|S]
description: Sets the number of data points and the averaging time for the logging data acquisition func-
tion.
parameters: Data Points:
Data Points is the number of samples that are recorded before the log­ging mode is completed. Data Points is an integer value.
Averaging time:
Averaging time is a time value in seconds.
There is no time delay between averaging time periods. Use
“:SENSe[n][:CHANnel[m]]:FUNCtion:PARameter:STABility?” on page 87 if you want to use delayed measurement.
Averaging Time
Measurement Running Measurement Stopped
1352 4 687 9
t
If you specify no units for the averaging time value in your command, seconds are used as the default.
NOTE See “:SENSe[n][:CHANnel[m]]:FUNCtion:STATe” on page 91 for information on start-
ing/stopping a data acquisition function.
NOTE See “:SENSe[n][:CHANnel[m]]:FUNCtion:RESult?” on page 88 for information on accessing
the results of a data acquisition function.
NOTE See “Triggering and Power Measurements” on page 150 for information on how triggering
affects data acquisition functions.
response: none example: sens1:func:par:logg 64,1ms affects: All power meters and return loss modules dual sensors: Can only be sent to master channel, slave channel is also affected.
84 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Measurement Functions – The SENSe Subsystem Measurement Operations & Settings
command:
:SENSe[
n
][:CHANnel[m]]:FUNCtion:PARameter:LOGGing?
syntax: :SENSe[n][:CHANnel[m]]:FUNCtion:PARameter:LOGGing? description: Returns the number of data points and the averaging time for the logging data acquisition
function. parameters: none response: Returns the number of data points as an integer value and the averaging time, t
, as a float
avg
value in seconds. example: sens1:func:par:logg?
+64,+1.00000000E-001<END>
affects: All power meters and return loss modules dual sensors: Can only be sent to master channel, slave channel parameters are identical.
NOTE Setting parameters for the MinMax function sets some parameters,
including hidden parameters, for the stability and logging functions and vice versa. You must use the :SENSe[n][:CHANnel[m]]:FUNCtion:PARameter:MINMax command to set parameters before you start a MinMax function using the :SENSe[n][:CHANnel[m]]:FUNCtion:STATe command.
command:
:SENSe[
n
][:CHANnel[m]]:FUNCtion:PARameter:MINMax
syntax: :SENSe[n][:CHANnel[m]]:FUNCtion:PARameter:MINMax<wsp>
CONTinous|WINDow|REFResh,<data points> description: Sets the MinMax mode and the number of data points for the
MinMax data acquisition function. parameters: CONTinous:
WINDow:
REFResh:
continuous MinMax mode window MinMax mode refresh MinMax mode
Data Points is the number of samples that are recorded in the memory buffer used by the
WINDow and REFResh modes. Data Points is an integer value.
See Chapter 3 of the Agilent 8163A/B Lightwave Multimeter, Agilent 8164A/B Lightwave
Measurement System, & Agilent 8166A/B Lightwave Multichannel System User’s Guide, for
more information on MinMax mode.
NOTE See “:SENSe[n][:CHANnel[m]]:FUNCtion:STATe” on page 91 for information on start-
ing/stopping a data acquisition function.
NOTE See “:SENSe[n][:CHANnel[m]]:FUNCtion:RESult?” on page 88 for information on accessing
the results of a data acquisition function.
NOTE See “Triggering and Power Measurements” on page 150 for information on how triggering
affects data acquisition functions. response: none example: sens1:func:par:minm WIND,10 affects: All power meters and return loss modules dual sensors: Can only be sent to master channel, slave channel is also affected.
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 85
Measurement Operations & Settings Measurement Functions – The SENSe Subsystem
command: syntax: :SENSe[n][:CHANnel[m]]:FUNCtion:PARameter:MINMax?
description: Returns the MinMax mode and the number of data points for the MinMax data acquisition
parameters: none response: CONT:
example: sens1:func:par:minm? affects: All power meters and return loss modules dual sensors: Can only be sent to master channel, slave channel parameters are identical.
:SENSe[
function.
WIND: REFR: The number of data points is returned as an integer value.
n
][:CHANnel[m]]:FUNCtion:PARameter:MINMax?
continuous MinMax mode window MinMax mode refresh MinMax mode
WIND,+10<END>
NOTE Setting parameters for the stability function sets some parameters,
including hidden parameters, for the logging and MinMax functions and vice versa. You must use the :SENSe[n][:CHANnel[m]]:FUNCtion:PARameter:STABility command to set parameters before you start a stability function using the :SENSe[n][:CHANnel[m]]:FUNCtion:STATe command.
86 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Measurement Functions – The SENSe Subsystem Measurement Operations & Settings
command:
:SENSe[
n
][:CHANnel[m]]:FUNCtion:PARameter:STABility
syntax: :SENSe[n][:CHANnel[m]]:FUNCtion:PARameter:STABility<wsp>
<total time>[NS|US|MS|S],<period time>[NS|US|MS|S],<averaging time>[NS|US|MS|S] description: Sets the total time, period time, and averaging time for the stability data acquisition function. parameters: Total time:
Period time:
Averaging time:
The total time from the start of stability mode until it is completed. A new measurement is started after the completion of every period time. A measurement is averaged over the averaging time.
Averaging Time
Period Time
Measurement Running Measurement Stopped
12345
t
NOTE The total time should be longer than the period time.
The period time should be longer than the averaging time.
The number of data points is equal to the total time divided by the period time.
Total time, period time, and averaging time are time values in seconds.
If you specify no units in your command, seconds are used as the default.
NOTE See “:SENSe[n][:CHANnel[m]]:FUNCtion:STATe” on page 91 for information on starting/stop-
ping a data acquisition function.
NOTE See “:SENSe[n][:CHANnel[m]]:FUNCtion:RESult?” on page 88 for information on accessing the
results of a data acquisition function.
NOTE See “Triggering and Power Measurements” on page 150 for information on how triggering af-
fects data acquisition functions. response: none example: sens1:func:par:stab 1s,0.1s,0.1s affects: All power meters and return loss modules dual sensors: Can only be sent to master channel, slave channel is also affected.
command:
:SENSe[
n
][:CHANnel[m]]:FUNCtion:PARameter:STABility?
syntax: :SENSe[n][:CHANnel[m]]:FUNCtion:PARameter:STABility? description: Returns the total time, period time, and averaging time for the stability data acquisition func-
tion. parameters: none response: Total time, delay time, and averaging time are float values in seconds. example: sens1:func:par:stab?
+1.00000000E+000,
+1.00000000E-001,+1.00000000E-001<END>
affects: All power meters and return loss modules dual sensors: Can only be sent to master channel, slave channel parameters are identical.
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 87
Measurement Operations & Settings Measurement Functions – The SENSe Subsystem
command: syntax: :SENSe[n][:CHANnel[m]]:FUNCtion:RESult?
description: Returns the data array of the last data acquisition function. parameters: none response: The last data acquisition function’s data array as a binary block.
NOTE See “How to Log Results” on page 187 for information on logging using VISA calls. There are
NOTE If you use LabView or HP VEE, we recommend using the Agilent 816x VXIplug&play Instru-
example: sens1:func:res?
:SENSe[
For Logging and Stability Data Acquisition functions, one measurement value is a 4-byte­long float in Intel byte order.
For the MinMax Data Acquisition function, the query returns the minimum, maximum and current power values.
See “Data Types” on page 22 for more information on Binary Blocks.
some tips about how to use float format specifiers to convert the binary blocks into float val­ues.
ment Driver to perform the Logging and Stability Data Acquisition functions.
n
][:CHANnel[m]]:FUNCtion:RESult?
→ ρετυρνσ α δατα αρραψ φορ Λογγινγ ανδ Σταβιλιτψ ∆ατα Αχθυισιτιον φυνχτιονσ
sens1:func:res? #255 Min: 7.24079E-04, Max: 7.24252E-04,
Αχτ: 7.24155Ε−04 ρετυρνσ τηε µινιµυµ, µαξιµυµ ανδ χυρρεντ ποωερ ϖαλυεσ φορ τηε ΜινΜαξ ∆ατα Αχθυισιτιον φυνχτιον
affects: All power meters and return loss modules dual sensors: Master and slave channels are independent.
NOTE Return Loss modules:
For Logging and Stability Data Acquisition functions, the data array contains power values.
For the MinMax Data Acquisition function, the data array contains return loss values.
88 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Measurement Functions – The SENSe Subsystem Measurement Operations & Settings
command: syntax: :SENSe[n][:CHANnel[m]]:FUNCtion:RESult:BLOCk?<wsp><offset>,<# of data points>
description: Returns a specific binary block (Intel byte order) from the data array for the last data acquisi-
parameters: <offset> A zero based offset; the number of data points to ignore.
response: The last stablility or logging data acquisition function’s data array as a binary block.
example: sens1:func:res:bloc? #5, 2
affects: All power meters and return loss modules . dual sensors: Master and slave channels are independent.
NOTE Return Loss modules:
command: syntax: :SENSe[n][:CHANnel[m]]:FUNCtion:RESult:MAXBlocksize?<wsp><offset><# of data
description: Returns the maximum block size for power meter data acquisition functions. parameters: none response: An integer value, number of data points.
example: affects: All power meters and return loss modules. dual sensors: Master and slave channels are independent.
:SENSe[
tion function.
# data points The number of data points (not bytes!) to return.
This function is not available for min-max measurements.
One measurement value is a 4-byte-long float in Intel byte order.
See “Data Types” on page 22 for more information on Binary Blocks.
n
][:CHANnel[m]]:FUNCtion:RESult:BLOCk?
interpreted as
7.24079E-04,7.24252E-04<end>
For Logging and Stability Data Acquisition functions, the data array contains power values.
n
:SENSe[
points>
See “Data Types” on page 22 for more information on Binary Blocks.
][:CHANnel[m]]:FUNCtion:RESult:MAXBlocksize?
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 89
Measurement Operations & Settings Measurement Functions – The SENSe Subsystem
command: syntax: :SENSe[n][:CHANnel[m]]:FUNCtion:RESult:MONitor?
description: Returns the monitor diode data array for the last data acquisition function. parameters: none response: The last data acquisition function’s data array as a binary block.
NOTE See “How to Log Results” on page 187 for information on logging using VISA calls. There are
NOTE If you use LabView or HP VEE, we recommend using the Agilent 816x VXIplug&play Instru-
example: sens1:func:res:mon?
affects: All return loss modules dual sensors: Master and slave channels are independent.
NOTE Return Loss modules:
:SENSe[
For Logging and Stability Data Acquisition functions, one measurement value is a 4-byte­long float in Intel byte order.
For the MinMax Data Acquisition function, the query returns the minimum, maximum and current power values.
See “Data Types” on page 22 for more information on Binary Blocks.
some tips about how to use float format specifiers to convert the binary blocks into float val­ues.
ment Driver to perform the Logging and Stability Data Acquisition functions.
returns a data array for Logging and Stability Data Acquisition functions
sens1:func:res? Min: 7.24079E-04, Max: 7.24252E-04, Act: 7.24155E-04
returns the minimum, maximum and current power values for the MinMax Data Acquisition function
n
][:CHANnel[m]]:FUNCtion:RESult:MONitor?
#255
For Logging and Stability Data Acquisition functions, the data array contains power values for the monitor diode.
For the MinMax Data Acquisition function, the data array contains return loss values for the monitor diode.
90 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Measurement Functions – The SENSe Subsystem Measurement Operations & Settings
command: syntax: :SENSe[n][:CHANnel[m]]:FUNCtion:STATe<wsp>
description: Enables/Disables the logging, MinMax, or stability data acquisition function mode. parameters: LOGGing:
NOTE When you enable a logging data acquisition function for a Agilent 8163A/B Series Power
NOTE Stop any function before you try to set up a new function. Some parameters cannot be set
response: none example: sens1:func:stat logg,star affects: All power meters and return loss modules dual sensors: Can only be sent to master channel, slave channel is also affected.
:SENSe[
LOGGing|STABility|MINMax,STOP|STARt
STABility: MINMax:
STOP: STARt:
Meter with averaging time of less than 100 ms with input hardware triggering disabled, all GPIB commands will be ignored for the duration of the function.
See “:SENSe[n][:CHANnel[m]]:FUNCtion:PARameter:LOGGing” on page 84 for more informa­tion on the logging data acquisition function.
until you stop the function.
n
][:CHANnel[m]]:FUNCtion:STATe
Logging data acquisition function Stability data acquisition function MinMax data acquisition function
Stop data acquisition function Start data acquisition function
command: syntax: :SENSe[n][:CHANnel[m]]:FUNCtion:STATe?
description: Returns the function mode and the status of the data acquisition function. parameters: none response: NONE
example: sens1:func:stat? affects: All power meters and return loss modules dual sensors: Can only be sent to master channel, slave channel parameters are identical.
:SENSe[
LOGGING_STABILITY MINMAX
PROGRESS COMPLETE
n
][:CHANnel[m]]:FUNCtion:STATe?
No function mode selected Logging or stability data acquisition function MinMax data acquisition function
Data acquisition function is in progress Data acquisition function is complete
LOGGING_STABILITY,COMPLETE<END>
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 91
Measurement Operations & Settings Measurement Functions – The SENSe Subsystem
command: syntax: :SENSe[n][:CHANnel[m]]:FUNCtion:THReshold<wsp><mode>,
description: Sets the start mode and the threshold value. parameters: ABOVe:
response: none example: sens1:func:thr IMM,20nw<END> affects: All HP 8153A Lightwave Multimeter series power meters and the HP 81534A Return Loss
NOTE Does NOT affect Agilent 8161x series return loss modules
command: syntax: :SENSe[n][:CHANnel[m]]:FUNCtion:THReshold?
description: Returns the start mode and the threshold value. parameters: none response: ABOV:
example: sens1:func:thr? affects: All HP 8153A Lightwave Multimeter series power meters and the HP 81534A Return Loss
NOTE Does NOT affect Agilent 8161x series return loss modules
:SENSe[
<threshold value>[PW|NW|UW|MW|Watt|DBM]
BELow: IMMediately: Threshold Value:
module
:SENSe[
BEL: IMM: Threshold Value:
n
][:CHANnel[m]]:FUNCtion:THReshold
Function starts when power is above the threshold value. Function starts when power is below the threshold value. Function starts immediately. A float value in Watts or dBm.
n
][:CHANnel[m]]:FUNCtion:THReshold?
Function starts when power is above the threshold value. Function starts when power is below the threshold value. Function starts immediately. A float value in Watts or dBm.
IMM,+2.00000000E-008<END>
module
command: syntax: :SENSe[n]:[CHANnel[m]]:POWer:ATIMe<wsp><averaging time>[NS|US|MS|S]
description: Sets the averaging time for the module. parameters: The averaging time as a float value in seconds.
response: none example: sens1:pow:atim 1s affects: All power meters and return loss modules dual sensors: Can only be sent to master channel, slave channel is also affected.
:SENSe[
If you specify no units in your command, seconds are used as the default.
n
]:[CHANnel[m]]:POWer:ATIMe
92 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Measurement Functions – The SENSe Subsystem Measurement Operations & Settings
command: syntax: :SENSe[n]:[CHANnel[m]]:POWer:ATIMe?
description: Returns the averaging time for the module. parameters: none response: The averaging time as a float value in seconds. example: sens1:pow:atim? affects: All power meters and return loss modules dual sensors: Can only be sent to master channel, slave channel parameters are identical.
command: syntax: :SENSe[n]:[CHANnel[m]]:POWer:RANGe[:UPPer]<wsp><value>[DBM]
description: Sets the power range for the module. For a return loss module, sets the power range of the
parameters: The range as a float value in dBm. The number is rounded to the closest multiple of 10, be-
response: none example: sens1:pow:rang -20DBM affects: All power meters and return loss modules. dual sensors: Master and slave channels are independent.
:SENSe[
n
]:[CHANnel[m]]:POWer:ATIMe?
+1.00000000E+000<END>
n
:SENSe[
return loss diode.
The range changes at 10 dBm intervals. The corresponding ranges for linear measurements (measurements in Watts) is given below:
Range
+30 dBm +20 dBm +10 dBm 0dBm
10 dBm
20 dBm
30 dBm
40 dBm
cause the range changes at 10 dBm intervals. Units are in dBm.
]:[CHANnel[m]]:POWer:RANGe[:UPPer]
Upper Linear Power Limit
1999.9 mW
199.99 mW
19.999 mW
1999.9µW
199.99µW
19.999µW
1999.9 nW
199.99 nW
Range
50 dBm
60 dBm
70 dBm
80 dBm
90 dBm
100 dBm
110 dBm
Upper Linear Power Limit
19.999 nW
1999.9 pW
199.99 pW
19.999 pW
1.999 pW
0.199 pW
0.019 pW
command: syntax: :SENSe[n]:[CHANnel[m]]:POWer:RANGe[:UPPer]?
description: Returns the range setting for the module. For a return loss module, returns the power range
parameters: none response: The range setting as a float value in dBm
example: sens1:pow:rang? affects: All power meters and return loss modules. dual sensors: Master and slave channels are independent.
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 93
:SENSe[
of the return loss diode.
(−110 Š≤ value +30).
n
]:[CHANnel[m]]:POWer:RANGe[:UPPer]?
-2.00000000E+001<END>
Measurement Operations & Settings Measurement Functions – The SENSe Subsystem
command: syntax: :SENSe[n]:[CHANnel[m]]:POWer:RANGe:MONitor[:UPPer]<wsp><value>[DBM]
description: Sets the power range for a retun loss module’s monitor diode.
parameters: The range as a float value in dBm. The number is rounded to the closest multiple of 10, be-
response: none example: sens1:pow:rang:mon -20DBM affects: All return loss modules. dual sensors: Master and slave channels are independent.
:SENSe[
The range changes at 10 dBm intervals. The corresponding ranges for linear measurements (measurements in Watts) is given below:
Range
+30 dBm +20 dBm +10 dBm 0dBm
cause the range changes at 10 dBm intervals. Units are in dBm.
10 dBm 20 dBm 30 dBm 40 dBm
n
]:[CHANnel[m]]:POWer:RANGe:MONitor[:UPPer]
Upper Linear Power Limit
1999.9 mW
199.99 mW
19.999 mW
1999.9µW
199.99µW
19.999µW
1999.9 nW
199.99 nW
Range
50 dBm
60 dBm
70 dBm
80 dBm
90 dBm
100 dBm
110 dBm
Upper Linear Power Limit
19.999 nW
1999.9 pW
199.99 pW
19.999 pW
1.999 pW
0.199 pW
0.019 pW
command: syntax: :SENSe[n]:[CHANnel[m]]:POWer:RANGe[:UPPer]?
description: Sets the power range for a retun loss module’s monitor diode. parameters: none response: The range setting as a float value in dBm
example: sens1:pow:rang? affects: All return loss modules. dual sensors: Master and slave channels are independent.
:SENSe[
(−110 Š≤ value ≤ +30).
n
]:[CHANnel[m]]:POWer:RANGe:MONitor[:UPPer]?
-2.00000000E+001<END>
94 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Measurement Functions – The SENSe Subsystem Measurement Operations & Settings
command: syntax: SENSe[n]:[CHANnel[m]]:POWer:RANGe:AUTO <wsp><boolean>
description: Enables or disables automatic power ranging for the module.
parameters: A boolean value: 0 or OFF: automatic ranging disabled
response: none example: sens1:pow:rang:auto 1 affects: All power meters and return loss modules
NOTE For return loss modules, affects return loss diode and monitor diode simultaneously.
dual sensors: Can only be sent to master channel, slave channel is also affected.
command: syntax: :SENSe[n]:[CHANnel[m]]:POWer:RANGe:AUTO?
description: Returns whether automatic power ranging is being used by the module. parameters: none response: A boolean value: 0: automatic ranging is not being used.
example: sens1:pow:rang:auto? affects: All power meters and return loss modules dual sensors: Can only be sent to master channel, slave channel parameters are identical.
:SENSe[
If automatic power ranging is enabled, ranging is automatically determined by the instru­ment. Otherwise, it must be set by the sensn:pow:rang command.
:SENSe[
n
]:[CHANnel[m]]:POWer:RANGe:AUTO
1 or ON: automatic ranging enabled
n
]:[CHANnel[m]]:POWer:RANGe:AUTO?
1: automatic ranging is being used.
1<END>
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 95
Measurement Operations & Settings Measurement Functions – The SENSe Subsystem
command: syntax: :SENSe[n]:[CHANnel[m]]:POWer:REFerence<wsp>
description: Sets the sensor reference value. parameters: TOMODule:
NOTE You must append a unit type
NOTE The two reference values are completely independent. When you change the
response: none example: sens1:pow:ref tomod,-40DB affects: All power meters dual sensors: Master and slave channels are independent.
:SENSe[
TOMODule|TOREF,<value>PW|NW|UW|MW|Watt|DBM|DB|MDB
TOREF:
The reference as a float value.
• dB if you use TOMODule or
• Watts or dBm if you use TOREF.
reference mode using the command
“:SENSe[n]:[CHANnel[m]]:POWer:REFerence:STATe:RATio” on page 97, the instrument uses the last reference value entered for the selected reference mode.
n
]:[CHANnel[m]]:POWer:REFerence
Sets the reference value in dB used if you choose measurement relative to another channel
Sets the reference value in Watts or dBm if you choose measurement relative to a constant reference value
command: syntax: :SENSe[n]:[CHANnel[m]]:POWer:REFerence?<wsp>TOMODule|TOREF
description: Returns the sensor reference value. parameters: TOMODule:
response: The reference as a float value. example: sens1:pow:ref? toref affects: All power meters dual sensors: Master and slave channels are independent.
command: syntax: :SENSe[n]:[CHANnel[m]]:POWer:REFerence:DISPlay
description: Takes the input power level value as the reference value. parameters: none response: none example: sens1:pow:ref:disp affects: All power meters dual sensors: Master and slave channels are independent.
:SENSe[
TOREF:
:SENSe[
n
]:[CHANnel[m]]:POWer:REFerence?
Returns the reference value in dB used if you choose measurement rel­ative to another channel
Returns the reference value in Watts or dBm if you choose measure­ment relative to a constant reference value
+1.00000000E-006<END>
n
]:[CHANnel[m]]:POWer:REFerence:DISPlay
96 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Measurement Functions – The SENSe Subsystem Measurement Operations & Settings
command: syntax: :SENSe[n]:[CHANnel[m]]POWer:REFerence:STATe<wsp><boolean>
description: Sets the measurement units to relative or absolute units. parameters: A boolean value: 0 or OFF: absolute
response: none example: sens1:pow:ref:stat 1 affects: All power meters dual sensors: Master and slave channels are independent.
command: syntax: :SENSe[n]:[CHANnel[m]]POWer:REFerence:STATe?
description: Inquires whether the current measurement units are relative (dB) or absolute (Watts or
parameters: none response: A boolean value: 0: absolute
example: sens1:pow:ref:stat? → 1<END> affects: All power meters dual sensors: Master and slave channels are independent.
:SENSe[
:SENSe[
dBm).
n
]:[CHANnel[m]]:POWer:REFerence:STATe
1 or ON: relative
n
]:[CHANnel[m]]:POWer:REFerence:STATe?
1: relative
command: syntax: :SENSe[n]:[CHANnel[m]]POWer:REFerence:STATe:RATio<wsp>
description: Selects the reference for the module. parameters: slot number:
NOTE If you want to reference another power sensor channel, use an integer value
response: none examples: sens1:pow:ref:stat:rat 2,1
affects: All power meters dual sensors: Master and slave channels are independent.
:SENSe[
<slot number>|255|TOREF,<channel number>
255 or TOREF:
channel number:
corresponding to the slot for the first parameter and an integer value corresponding to the channel for the second value. If you want to use an absolute reference, use TOREF as the first parameter and any integer value as the second parameter.
sens1:pow:ref:stat:rat TOREF,1
n
]:[CHANnel[m]]:POWer:REFerence:STATe:RATio
an integer value representing the slot number you want to reference
results are displayed relative to an absolute reference
an integer value representing the channel number you want to refer­ence
References channel 2.1
References an absolute reference
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 97
Measurement Operations & Settings Measurement Functions – The SENSe Subsystem
command: syntax: :SENSe[n]:[CHANnel[m]]POWer:REFerence:STATe:RATio?
description: Returns the reference setting for the module. parameters: none response: results are displayed relative to an absolute reference or to the current power reading from
examples: sens1:pow:ref:stat:rat?
affects: All power meters dual sensors: Master and slave channels are independent.
command: syntax: :SENSe[n]:[CHANnel[m]]:POWer:UNIT<wsp>DBM|0|Watt|1
description: Sets the sensor power unit parameters: An integer value: 0: dBm
response: none example: sens1:pow:unit 1 affects: All power meters dual sensors: Master and slave channels are independent.
:SENSe[
another channel.
sens1:pow:ref:stat:rat?
:SENSe[
or DBM or Watt
n
]:[CHANnel[m]]:POWer:REFerence:STATe:RATio?
n
]:[CHANnel[m]]:POWer:UNIT
1: Watt
+255,+0<END>
+2,+1<END>
results are displayed relative to an absolute reference
results are displayed relative to channel 2.1
command: syntax: :SENSe[n]:[CHANnel[m]]:POWer:UNIT?
description: Inquires the current sensor power unit parameters: none response: An integer value: 0: Current power units are dBm.
example: sens1:pow:unit? → +1<END> affects: All power meters dual sensors: Master and slave channels are independent.
:SENSe[
n
]:[CHANnel[m]]:POWer:UNIT?
1: Current power units are Watts.
98 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Measurement Functions – The SENSe Subsystem Measurement Operations & Settings
command: syntax: :SENSe[n]:[CHANnel[m]]:POWer:WAVelength<wsp><value>|MIN|MAX|DEF
description: Sets the sensor wavelength. parameters: The wavelength as a float value in meters.
response: none example: sens1:pow:wav 1550nm affects: All power meters dual sensors: Master and slave channels are independent.
command: syntax: :SENSe[n]:[CHANnel[m]]:POWer:WAVelength?[<wsp>MIN|MAX|DEF]
description: Inquires the current sensor wavelength. parameters: none
:SENSe[
[PM|NM|UM|MM|M]
Also allowed are: MIN: minimum programmable value
:SENSe[
Also allowed are: MIN: minimum programmable value
n
]:[CHANnel[m]]:POWer:WAVelength
MAX: maximum programmable value DEF: This is not the preset (*RST) default value but is
half the sum of, the minimum programmable value and the maximum programmable value
n
]:[CHANnel[m]]:POWer:WAVelength?
MAX: maximum programmable value DEF: This is not the preset (*RST) default value but is
half the sum of, the minimum programmable value and the maximum programmable value
response: The wavelength as a float value in meters. example sens1:pow:wav? → +1.55000000E-006<END> affects: All power meters dual sensors: Master and slave channels are independent.
command: syntax: :SENSe[n]:[CHANnel[m]]:RETurnloss:CALibration:FACTory
description: For all sources, overwrites the current calibration values with the factory-set calibration set-
parameters: none response: none example sens1:ret:cal:fact affects: All return loss modules
:SENSe[
tings. See “:SENSe[n]:[CHANnel[m]]:RETurnloss:CALibration:COLLect:TERMination” on page 100 and “:SENSe[n]:[CHANnel[m]]:RETurnloss:CORRection:REFLectance[l]?” on page 102 for information on calibrating your return loss module.
n
]:[CHANnel[m]]:RETurnloss:CALibration:FACTory
Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition 99
Measurement Operations & Settings Measurement Functions – The SENSe Subsystem
command: syntax: :SENSe[n]:[CHANnel[m]]:RETurnloss:CALibration:COLLect:REFLectance
description: For the currently selected source, start the calibration and save the calibration values for a
parameters: none response: none example sens1:ret:cal:coll:refl affects: All return loss modules
command: syntax: :SENSe[n]:[CHANnel[m]]:RETurnloss:CALibration:COLLect:TERMination
description: For the currently selected source, start the calibration and save the calibration values for a
parameters: none response: none example sens1:ret:cal:coll:term affects: All return loss modules
:SENSe[
defined reflectance reference measurement. See “:SENSe[n]:[CHANnel[m]]:RETurn­loss:CORRection:REFLectance[l]” on page 101 for information on setting the return loss val-
ue of your reference reflector.
:SENSe[
defined termination reference measurement. See “:SENSe[n]:[CHANnel[m]]:RETurn­loss:CORRection:REFLectance[l]” on page 101 for information on setting the return loss val-
ue of your reference reflector.
n
]:[CHANnel[m]]:RETurnloss:CALibration:COLLect:REFLectance
n
]:[CHANnel[m]]:RETurnloss:CALibration:COLLect:TERMination
command: syntax: :SENSe[n]:[CHANnel[m]]:RETurnloss:CALibration:VALues?
description: Returns the the current calibration values
parameters: Returns power values in W response: none example sens1:ret:cal:val affects: All return loss modules
:SENSe[
1. monitor diode reference power
2. return loss diode reference power
3. monitor diode parasitics power
4. return loss diode parasitics power.
n
]:[CHANnel[m]]:RETurnloss:CALibration:VALues?
100 Agilent 8163A/B, 8164A/B, & 8166A/B Programming Guide, Second Edition
Loading...