Agilent Technologies 86100, 90086 User Manual

Infiniium DCA and DCA-J Agilent 86100A/B/C Wide-Bandwidth Oscilloscope
Programmer’s Guide
Agilent Technologies
Notices
No part of this manual may be reproduced in any form or by any means (including electronic stor­age and retrieval or translation into a foreign lan­guage) without prior agreement and written consent from Agilent Technologies, Inc. as gov­erned by United States and international copy­right lays.
Manual Part Number
86100-90086
Technology Licenses
The hardware and/or software described in this document are furnished under a license and may be used or copied only in accordance with the terms of such license.
LZW compression/decompression: Licensed under U.S. Patent No. 4,558,302 and foreign counterparts. The purchase or use of LZW graph­ics capability in a licensed product does not authorize or permit an end user to use any other product or perform any other method or activity involving use of LZW unless the end user is sepa­rately licensed in writing by Unisys.
Trademark Acknowledgements
Microsoft is a U.S. registered trademark of Microsoft Corporation.
Windows and MS Windows are U.S. registered trademarks of Microsoft Corporation.
MATLAB ® is a U.S. registered trademark of The Math Works, Inc.
Edition
December 2005 Printed in Malaysia
Agilent Technologies, Inc. Digital Signal Analysis Division 1400 Fountaingrove Parkway Santa Rosa, CA 95403, USA
Warranty
The material contained in this document is pro­vided “as is,” and is subject to being changed, without notice, in future editions. Further, to the maximum extent permitted by applicable law, Agilent disclaims all warranties, either express or implied, with regard to this manual and any infor­mation contained herein, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Agilent shall not be liable for errors or for incidental or consequen­tial damages in connection with the furnishing, use, or performance of this document or of any information contained herein. Should Agilent and the user have a separate written agreement with warranty terms covering the material in this docu­ment that conflict with these terms, the warranty terms in the separate agreement shall control.
Restricted Rights Legend
If software is for use in the performance of a U.S. Government prime contract or subcontract, Soft­ware is delivered and licensed as “Commercial computer software” as defined in DFAR 252.227­7014 (June 1995), or as a “commercial item” as defined in FAR 2.101(a) or as “Restricted com­puter software” as defined in FAR 52.227-19 (June 1987) or any equivalent agency regulation or contract clause. Use, duplication or disclosure of Software is subject to Agilent Technologies’ standard commercial license terms, and non-DOD Departments and Agencies of the U.S. Govern­ment will receive no greater than Restricted Rights as defined in FAR 52.227-19(c)(1-2) (June
1987). U.S. Government users will receive no greater than Limited Rights as defined in FAR
52.227-14 (June 1987) or DFAR 252.227-7015 (b)(2) (November 1995), as applicable in any tech­nical data.
Safety Notices
CAUTION
Caution denotes a hazard. It calls attention to a procedure which, if not correctly performed or adhered to, could result in damage to or destruc­tion of the product. Do not proceed beyond a cau­tion sign until the indicated conditions are fully understood and met.
WARN ING
Warning denotes a hazard. It calls attention to a procedure which, if not correctly performed or adhered to, could result in injury or loss of life. Do not proceed beyond a warning sign until the indi­cated conditions are fully understood and met.
2

Contents

1 Introduction
Introduction 1-2 Starting a Program 1-4 Multiple Databases 1-6 Files 1-8 Status Reporting 1-11 Command Syntax 1-23 Interface Functions 1-34 Language Compatibility 1-36 New and Revised Commands 1-42 Commands Unavailable in Jitter Mode 1-44 Error Messages 1-46
2 Sample Programs
Sample C Programs 2-3 Listings of the Sample Programs 2-15
3 Common Commands
4 Root Level Commands
5 System Commands
6 Acquire Commands
7 Calibration Commands
8 Channel Commands
9 Clock Recovery Commands
10 Disk Commands
11 Display Commands
12 Function Commands
Contents-1
ContentsContents
13 Hardcopy Commands
14 Histogram Commands
15 Limit Test Commands
16 Marker Commands
17 Mask Test Commands
18 Measure Commands
19 S-Parameter Commands
20 Signal Processing Commands
21 TDR/TDT Commands
(Rev. A.05.00 and Below)
22 TDR/TDT Commands
(Rev. A.06.00 and Above)
23 Timebase Commands
24 Trigger Commands
25 Waveform Commands
26 Waveform Memory Commands
Contents-2
1
Introduction 1-2 Starting a Program 1-4 Multiple Databases 1-6 Files 1-8 Status Reporting 1-11 Command Syntax 1-23 Interface Functions 1-34 Language Compatibility 1-36 New and Revised Commands 1-42 Commands Unavailable in Jitter Mode 1-44 Error Messages 1-46

Introduction

Introduction

Introduction
Introduction
This chapter explains how to program the instrument. The programming syntax conforms to the IEEE 488.2 Standard Digital Interface for Programmable Instrumentation and to the Standard Commands for Programmable Instruments (SCPI). This edition of the manual doc­uments all 86100-series software revisions up through A.04.10. For a listing of commands that are new or revised for software revisions A.04.00 and A.04.10, refer to “New and Revised
Commands” on page 1-42.
If you are unfamiliar with programming instruments using the SCPI standard, refer to “Com-
mand Syntax” on page 1-23. For more detailed information regarding the GPIB, the IEEE
488.2 standard, or the SCPI standard, refer to the following books:
• International Institute of Electrical and Electronics Engineers. IEEE Standard 488.1-1987, IEEE Standard Digital Interface for Programmable Instrumentation. New York, NY, 1987.
• 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.
Throughout this book, BASIC and ANSI C are used in the examples of individual commands. If you are using other languages, you will need to find the equivalents of BASIC commands like OUTPUT, ENTER, and CLEAR, to convert the examples.
The instrument’s GPIB address is configured at the factory to a value of 7. You must set the output and input functions of your programming language to send the commands to this address. You can change the GPIB address from the instrument’s front panel.
Data Flow The data flow gives you an idea of where the measurements are made on the acquired data
and when the post-signal processing is applied to the data. The following figure is a block dia­gram of the instrument. The diagram is laid out serially for a visual perception of how the data is affected by the instrument.
1-2
Figure 1-1. Sample Data Processing
Introduction
Introduction
The sample data is stored in the channel memory for further processing before being dis­played. The time it takes for the sample data to be displayed depends on the number of post processes you have selected. Averaging your sampled data helps remove any unwanted noise from your waveform.
You can store your sample data in the instrument’s waveform memories for use as one of the sources in Math functions, or to visually compare against a waveform that is captured at a future time. The Math functions allow you to apply mathematical operations on your sampled data. You can use these functions to duplicate many of the mathematical operations that your circuit may be performing to verify that your circuit is operating correctly. The measure­ments section performs any of the automated measurements that are available in the instru­ment. The measurements that you have selected appear at the bottom of the display. The Connect Dots section draws a straight line between sample data points, giving an analog look to the waveform. This is sometimes called linear interpolation.
1-3
Introduction

Starting a Program

Starting a Program
The commands and syntax for initializing the instrument are listed in Chapter 3, “Common
Commands”. Refer to your GPIB manual and programming language reference manual for
information on initializing the interface. To make sure the bus and all appropriate interfaces are in a known state, begin every program with an initialization statement. For example, BASIC provides a CLEAR command which clears the interface buffer. When you are using GPIB, CLEAR also resets the instrument's parser. After clearing the interface, initialize the instrument to a preset state using the *RST command.
The AUTOSCALE command is very useful on unknown waveforms. It automatically sets up the vertical channel, time base, and trigger level of the instrument.
A typical instrument setup configures the vertical range and offset voltage, the horizontal range, delay time, delay reference, trigger mode, trigger level, and slope. An example of the commands sent to the instrument are:
:CHANNEL1:RANGE 16;OFFSET 1.00<terminator> :SYSTEM:HEADER OFF<terminator> :TIMEBASE:RANGE 1E-3;DELAY 100E-6<terminator>
This example sets the time base at 1 ms full-scale (100 μs/div), with delay of 100 μs. Vertical is set to 16 V full-scale (2 V/div), with center of screen at 1 V, and probe attenuation of 10.
The following program demonstrates the basic command structure used to program the instrument.
10 CLEAR 707 ! Initialize instrument interface 20 OUTPUT 707;"*RST" !Initialize instrument to preset state 30 OUTPUT 707;":TIMEBASE:RANGE 5E-4"! Time base to 500 us full scale 40 OUTPUT 707;":TIMEBASE:DELAY 25E-9"! Delay to 25 ns 50 OUTPUT 707;":TIMEBASE:REFERENCE CENTER"! Display reference at center 60 OUTPUT 707;":CHANNEL1:RANGE .16"! Vertical range to 160 mV full scale 70 OUTPUT 707;":CHANNEL1:OFFSET -.04"! Offset to -40 mV 80 OUTPUT 707;":TRIGGER:LEVEL,-.4"! Trigger level to -0.4 90 OUTPUT 707;":TRIGGER:SLOPE POSITIVE"! Trigger on positive slope 100 OUTPUT 707;":SYSTEM:HEADER OFF"<terminator> 110 OUTPUT 707;":DISPLAY:GRATICULE FRAME"! Grid off 120 END
• Line 10 initializes the instrument interface to a known state and Line 20 initializes the instrument to a preset state.
• Lines 30 through 50 set the time base, the horizontal time at 500 μs full scale, and 25 ns of delay referenced at the center of the graticule.
• Lines 60 through 70 set the vertical range to 160 millivolts full scale and the center screen at
1-4
Introduction
Starting a Program
−40 millivolts.
• Lines 80 through 90 configure the instrument to trigger at −0.4 volts with normal triggering.
• Line 100 turns system headers off.
• Line 110 turns the grid off.
The DIGITIZE command is a macro that captures data using the acquisition (ACQUIRE) sub­system. When the digitize process is complete, the acquisition is stopped. The captured data can then be measured by the instrument or transferred to the computer for further analysis. The captured data consists of two parts: the preamble and the waveform data record. After changing the instrument configuration, the waveform buffers are cleared. Before doing a measurement, the DIGITIZE command should be sent to ensure new data has been collected. You can send the DIGITIZE command with no parameters for a higher throughput. Refer to the DIGITIZE command in Chapter 4, “Root Level Commands” for details. When the DIGI­TIZE command is sent to an instrument, the specified channel’s waveform is digitized with the current ACQUIRE parameters. Before sending the :WAVEFORM:DATA? query to get waveform data, specify the WAVEFORM parameters. The number of data points comprising a waveform varies according to the number requested in the ACQUIRE subsystem. The ACQUIRE subsystem determines the number of data points, type of acquisition, and number of averages used by the DIGITIZE command. This allows you to specify exactly what the dig­itized information contains. The following program example shows a typical setup:
OUTPUT 707;":SYSTEM:HEADER OFF"<terminator> OUTPUT 707;":WAVEFORM:SOURCE CHANNEL1"<terminator> OUTPUT 707;":WAVEFORM:FORMAT BYTE"<terminator> OUTPUT 707;":ACQUIRE:COUNT 8"<terminator> OUTPUT 707;":ACQUIRE:POINTS 500"<terminator> OUTPUT 707;":DIGITIZE CHANNEL1"<terminator> OUTPUT 707;":WAVEFORM:DATA?"<terminator>
This setup places the instrument to acquire eight averages. This means that when the DIGI­TIZE command is received, the command will execute until the waveform has been averaged at least eight times. After receiving the :WAVEFORM:DATA? query, the instrument will start passing the waveform information when queried. Digitized waveforms are passed from the instrument to the computer by sending a numerical representation of each digitized point. The format of the numerical representation is controlled with the :WAVEFORM:FORMAT command and may be selected as BYTE, WORD, or ASCII. The easiest method of entering a digitized waveform depends on data structures, available formatting, and I/O capabilities. You must scale the integers to determine the voltage value of each point. These integers are passed starting with the leftmost point on the instrument's display. For more information, refer to Chapter 25, “Waveform Commands”. When using GPIB, a digitize operation may be aborted by sending a Device Clear over the bus (for example, CLEAR 707).
NOTE The execution of the DIGITIZE command is subordinate to the status of ongoing limit tests. (See commands
ACQuire:RUNTil on page 6-4, MTEST:RUNTil on page 17-7, and LTEST:RUNTil on page 15-4.) The DIGITIZE command will not capture data if the stop condition for a limit test has been met.
1-5
Introduction

Multiple Databases

Multiple Databases
Eye/Mask measurements are based on statistical data that is acquired and stored in the color grade/gray scale database. The color grade/gray scale database consists of all data samples displayed on the display graticule. The measurement algorithms are dependent upon histo­grams derived from the database. This database is internal to the instrument’s applications. The color grade/gray scale database cannot be imported into an external database applica­tion.
If you want to perform an eye measurement, it is necessary that you first produce an eye dia­gram by triggering the instrument with a synchronous clock signal. Measurements made on a pulse waveform while in Eye/Mask mode will fail.
Firmware revision A.03.00 and later allows for multiple color grade/gray scale databases to be acquired and displayed simultaneously, including
• all four instrument channels
• all four math functions
• one saved color grade/gray scale file
Using Multiple Databases in Remote Programs
The ability to use multiple databases allows for the comparison of
• channels to each other
• channels to a saved color grade/gray scale file
• functions to the channel data on which it is based
The advantage of acquiring and displaying channels and functions simultaneously is test times are greatly reduced. For example, the time taken to acquire two channels in parallel is approximately the same time taken to acquire a single channel.
Most commands that control histograms, mask tests, or color grade data have additional optional parameters that were not available in firmware revisions prior to A.03.00. You can use the commands to control a single channel or add the argument APPend to enable more than one channel. The following example illustrates two uses of the CHANnel<n>:DISPlay command.
SYSTem:MODE EYE CHANnel1:DISPlay ON CHANnel2:DISPlay ON
The result using the above set of commands, is Channel 1 cleared and disabled while Channel 2 is enabled and displayed. However, by adding the argument APPend to the last command of the set, both Channels 1 and 2 will be enabled and displayed .
SYSTem:MODE EYE CHANnel1:DISPlay ON
1-6
Introduction
Multiple Databases
CHANnel2:DISPlay ON,APPend
For a example of using multiple databases, refer to “multidatabase.c Sample Program” on
page 2-35.
Downloading a Database
The general process for downloading a color grade/gray scale database is as follows:
1 Send the command :WAVEFORM:SOURCE CGRADE
This will select the color grade/gray scale database as the waveform source.
2 Issue :WAVeform:FORMat WORD.
Database downloads only support word formatted data (16-bit integers).
3 Send the query :WAVeform:DATA?
The data will be sent by means of a block data transfer as a two-dimensional array, 451 words wide by 321 words high (refer to “Definite-Length Block Response Data” on page 1-26). The data is transferred starting with the upper left pixel of the display graticule, column by column, until the lower right pixel is transferred.
4 Send the command :WAVeform:XORigin to obtain the time of the left column.
5 Send the command :WAVeform:XINC to obtain the time increment of each column.
6 Send the command :WAVeform:YORigin to obtain the voltage or power of the vertical center
of the database.
7 Send the command :WAVeform:YORigin to obtain the voltage or power of the incremental row.
The information from steps 4 through 7 can also be obtained with the command :WAVe­form:PREamble.
Auto Skew Another multiple database feature is the auto skew. You can use the auto skew feature to set
the horizontal skew of multiple, active channels with the same bit rate, so that the waveform crossings align with each other. This can be very convient when viewing multiple eye dia­grams simultaneously. Slight differences between channels and test devices may cause a phase difference between channels. Auto skew ensures that each eye is properly aligned, so that measurements and mask tests can be properly executed.
In addition, auto skew optimizes the instrument trigger level. Prior to auto skew, at least one channel must display a complete eye diagram in order to make the initial bit rate measure­ment. Auto skew requires more data to be sampled; therefore, acquisition time during auto skew is slightly longer than acquisition time during measurements.
1-7
Introduction

Files

Files
When specifying a file name in a remote command, enclose the name in double quotation marks, such as "filename". If you specify a path, the path should be included in the quotation marks. All files stored using remote commands have file name extensions as listed in
Table 1-1. You can use the full path name, a relative path name, or no path.
If you do not specify an extension when storing a file, or specify an incorrect extension, it will be corrected automatically according to the following rules:
• No extension specified: add the extension for the file type.
• Extension does not match file type: retain the filename, (including the current extension) and add the appropriate extension.
You do not need to use an extension when loading a file if you use the optional destination parameter. For example, :DISK:LOAD "STM1_OC3",SMASK will automatically add .msk to the file name. ASCII waveform files can be loaded only if the file name explicitly includes the .txt extension. Table 1-2 on page 1-9 shows the rules used when loading a specified file.
If you don’t specify a directory when storing a file, the location of the file will be based on the file type. Table 1-3 on page 1-10 shows the default locations for storing files. On 86100C instruments, files are stored on the D: drive. On 86100A/B instruments, files are stored on the C: drive.
When loading a file, you can specify the full path name, a relative path name, or no path name. Table 1-4 on page 1-10 lists the rules for locating files, based on the path specified. Standard masks loaded from D:\Scope\masks. Files may be stored to or loaded from any path external drive or on any mapped network drive.
1-8
Table 1-1. File Name Extensions
File Type File Name Extension Command
Waveform - internal format .wfm “STORe” on page 10-9
Waveform - text format (Verbose, XY Verbose, or Y values)
Pattern Waveform .csv “PWAVeform:SAVE” on page 10-6
Setup .set “STORe” on page 10-9
Color grade - Gray Scale .cgs “STORe” on page 10-9
Jitter Memory .jd “STORe” on page 10-9
Screen image
a
Mask .msk, .pcm “SAVE” on page 17-7
TDR/TDT .tdr “STORe” on page 10-9
MATLAB script .m “MATLab:SCRipt” on page 20-5
S-Parameter (Touchstone format) .s1p, .s2p “SPARameter:SAVE” on page 10-8
S-Parameter (text format) .txt “SPARameter:SAVE” on page 10-8
.txt “STORe” on page 10-9
.bmp, .eps, .gif, .pcx, .ps, .jpg, .tif “SIMage” on page 10-7
Introduction
Files
a. For .gif and .tif file formats, this instrument uses LZW compression/decompression licensed under U.S. patent No 4,558,302 and foreign counterparts. End user should not modify, copy, or distribute LZW compression/decompression ca­pability. For .jpg file format, this instrument uses the .jpg software written by the Independent JPEG Group.
Table 1-2. Rules for Loading Files
File Name Extension Destination Rule
No extension Not specified Default to internal waveform format; add .wfm extension
Extension does not match file type Not specified Default to internal waveform format; add .wfm extension
Extension matches file type Not specified Use file name with no alterations; destination is based on extension
file type
No extension Specified Add extension for destination type; default for waveforms is internal
format (.wfm)
Extension does not match destination file type
Extension matches destination file type
Specified Retain file name; add extension for destination type. Default for
waveforms is internal format (.wfm)
Specified Retain file name; destination is as specified
1-9
Introduction
Files
Table 1-3. Default File Locations
File Type Default Location
Waveform - internal format, text format (Verbose, XY Verbose, or Y values),
Pattern Waveforms D:\User Files\waveforms
Setup D:\User Files\setups
Color Grade - Gray Scale D:\User Files\colorgrade-grayscale
Jitter Memory D:\User Files\jitter data
Screen Image D:\User Files\screen images
Mask C:\Scope\masks (standard masks)
TDR/TDT calibration data (software revision A.05.00 and below) D:\User Files\TDR normalization
TDR/TDT calibration data (software revision A.06.00 and above) D:\User Files\TDR calibration
MATLAB script D:\User Files\Matlab scripts
S-Parameters D:\User Files\S-parameter data
D:\User Files\waveforms
D:\User Files\masks (user-defined masks)
Table 1-4. File Locations (Loading Files)
File Name Rule
Full path name Use file name and path specified
Relative path name Full path name is formed relative to the present working directory, set with the command :DISK:CDIR. The
present working directory can be read with the query :DISK:PWD?
File name with no preceding path
Add the file name to the default path (D:\User Files) based on the file type. (C drive on 86100A/B instruments.)
1-10
Introduction

Status Reporting

Status Reporting
Almost every program that you write will need to monitor the instrument for its operating status. This includes querying execution or command errors and determining whether or not measurements have been completed. Several status registers and queues are provided to accomplish these tasks. In this section, you’ll learn how to enable and read these registers.
• Refer to Figure 1-4 on page 1-14 for an overall status reporting decision chart.
• See Figure 1-3 and Figure 1-4 to learn the instrument's status reporting structure which allows you to monitor specific events in the instrument.
Table 1-5 on page 1-17 lists the bit definitions for each bit in the status reporting data struc- ture.
The Status Byte Register, the Standard Event Status Register group, and the Output Queue are defined as the Standard Status Data Structure Model in IEEE 488.2-1987. IEEE 488.2 defines data structures, commands, and common bit definitions for status reporting. There are also instrument-defined structures and bits.
To monitor an event, first clear the event, then enable the event. All of the events are cleared when you initialize the instrument. To generate a service request (SRQ) interrupt to an external computer, enable at least one bit in the Status Byte Register. To make it possible for any of the Standard Event Status Register bits to generate a summary bit, the corresponding bits must be enabled. These bits are enabled by using the *ESE common command to set the corresponding bit in the Standard Event Status Enable Register. To generate a service request (SRQ) interrupt to the computer, at least one bit in the Status Byte Register must be enabled. These bits are enabled by using the *SRE common command to set the correspond­ing bit in the Service Request Enable Register. These enabled bits can then set RQS and MSS (bit 6) in the Status Byte Register. For more information about common commands, see
Chapter 3, “Common Commands”.
Status Byte Register
The Status Byte Register is the summary-level register in the status reporting structure. It contains summary bits that monitor activity in the other status registers and queues. The Sta­tus Byte Register is a live register. That is, its summary bits are set and cleared by the pres­ence and absence of a summary bit from other event registers or queues. If the Status Byte Register is to be used with the Service Request Enable Register to set bit 6 (RQS/MSS) and to generate an SRQ, at least one of the summary bits must be enabled, then set. Also, event bits in all other status registers must be specifically enabled to generate the summary bit that sets the associated summary bit in the Status Byte Register.
The Status Byte Register can be read using either the *STB? common command query or the GPIB serial poll command. Both commands return the decimal-weighted sum of all set bits in the register. The difference between the two methods is that the serial poll command reads
1-11
Introduction
Status Reporting
bit 6 as the Request Service (RQS) bit and clears the bit which clears the SRQ interrupt. The *STB? query reads bit 6 as the Master Summary Status (MSS) and does not clear the bit or have any affect on the SRQ interrupt. The value returned is the total bit weights of all of the bits that are set at the present time.
Figure 1-2. Status Reporting Decision Chart
1-12
Introduction
Status Reporting
The use of bit 6 can be confusing. This bit was defined to cover all possible computer inter­faces, including a computer that could not do a serial poll. The important point to remember is that, if you are using an SRQ interrupt to an external computer, the serial poll command clears bit 6. Clearing bit 6 allows the instrument to generate another SRQ interrupt when another enabled event occurs. The only other bit in the Status Byte Register affected by the *STB? query is the Message Available bit (bit 4). If there are no other messages in the Output Queue, bit 4 (MAV) can be cleared as a result of reading the response to the *STB? query.
If bit 4 (weight = 16) and bit 5 (weight = 32) are set, a program would print the sum of the two weights. Since these bits were not enabled to generate an SRQ, bit 6 (weight = 64) is not set.
Figure 1-3. Status Reporting Overview
1-13
Introduction
Status Reporting
Figure 1-4. Status Reporting Data Structures
1-14
Introduction
Status Reporting
Status Reporting Data Structures (continued)
1-15
Introduction
Status Reporting
This BASIC example uses the *STB? query to read the contents of the instrument’s Status Byte Register when none of the register's summary bits are enabled to generate an SRQ inter­rupt.
10 OUTPUT 707;":SYSTEM:HEADER OFF;*STB?"!Turn headers off 20 ENTER 707;Result!Place result in a numeric variable 30 PRINT Result!Print the result 40 End
The next program prints 132 and clears bit 6 (RQS) of the Status Byte Register. The differ­ence in the decimal value between this example and the previous one is the value of bit 6 (weight = 64). Bit 6 is set when the first enabled summary bit is set, and is cleared when the Status Byte Register is read by the serial poll command.
This example uses the BASIC serial poll (SPOLL) command to read the contents of the instrument’s Status Byte Register.
10 Result = SPOLL(707) 20 PRINT Result 30 END
Use Serial Polling to Read the Status Byte Register. Serial polling is the preferred method to read the contents of the Status Byte Register because it resets bit 6 and allows the next enabled event that occurs to generate a new SRQ interrupt.
Service Request Enable Register
Trigger Event Register (TRG)
Setting the Service Request Enable Register bits enables corresponding bits in the Status Byte Register. These enabled bits can then set RQS and MSS (bit 6) in the Status Byte Regis­ter. Bits are set in the Service Request Enable Register using the *SRE command, and the bits that are set are read with the *SRE? query. Bit 6 always returns 0. Refer to the Status Reporting Data Structures shown in Figure 1-4This example sets bit 4 (MAV) and bit 5 (ESB) in the Service Request Enable Register.
OUTPUT 707;"*SRE 48"
This example uses the parameter “48” to allow the instrument to generate an SRQ interrupt under the following conditions:
• When one or more bytes in the Output Queue set bit 4 (MAV).
• When an enabled event in the Standard Event Status Register generates a summary bit that sets bit 5 (ESB).
This register sets the TRG bit in the status byte when a trigger event occurs. The TRG event register stays set until it is cleared by reading the register or using the *CLS (clear status) command. If your application needs to detect multiple triggers, the TRG event register must be cleared after each one. If you are using the Service Request to interrupt a computer oper­ation when the trigger bit is set, you must clear the event register after each time it is set.
1-16
Introduction
Status Reporting
Table 1-5. Status Reporting Bit Definition (1 of 2)
Bit Description Definition
ACQ Acquisition Indicates that acquisition test has completed in the Acquisition Register.
AREQD Autoscale Required Indicates that a parameter change in Jitter Mode has made an autoscale necessary.
CLCK CloCk Indicates that one of the enabled conditions in the Clock Recovery Register has
occurred.
CME Command Error Indicates if the parser detected an error.
COMP Complete Indicates the specified test has completed.
DDE Device Dependent Error Indicates if the device was unable to complete an operation for device dependent
reasons.
EFAIL Edge Characterization
Fail
ESB Event Status Bit Indicates if any of the enabled conditions in the Standard Event Status Register have
EXE Execution Error Indicates if a parameter was out of range or was inconsistent with the current
FAIL Fail Indicates the specified test has failed.
JLOSS Pattern Synchronization
Loss
LCL Local Indicates if a remote-to-local transition occurs.
LOCK LOCKed Indicates that a locked or trigger capture condition has occurred in the Clock Recovery
LOSS Time Reference Loss Indicates the Precision Timebase (provided by the Agilent 86107A module) has
LTEST Limit Test Indicates that one of the enabled conditions in the Limit Test Register has occurred.
MAV Message Available Indicates if there is a response in the output queue.
MSG Message Indicates if an advisory has been displayed.
MSS Master Summary Status Indicates if a device has a reason for requesting service.
MTEST Mask Test Indicates that one of the enabled conditions in the Mask Test Register has occurred.
NSPR1 No Signal Present
Receiver 1
NSPR2 No Signal Present
Receiver 2
OPC Operation Complete Indicates if the device has completed all pending operations.
OPER Operation Status
Register
PON Power On Indicates power is turned on.
Indicates that the characterizing of edges in Jitter Mode has failed.
occurred.
settings.
Indicates that the pattern synchronization is lost in Jitter Mode.
Module.
detected a time reference loss due to a change in the reference clock signal.
Indicates that the Clock Recovery Module has detected the loss of an optical signal on receiver one.
Indicates that the Clock Recovery Module has detected the loss of an optical signal on receiver two.
Indicates if any of the enabled conditions in the Operation Status Register have occurred.
1-17
Introduction
Status Reporting
Table 1-5. Status Reporting Bit Definition (2 of 2)
Bit Description Definition
PTIME Precision Timebase Indicates that one of the enabled conditions in the Precision Timebase Register has
occurred.
QYE Query Error Indicates if the protocol for queries has been violated.
RQL Request Control Indicates if the device is requesting control.
RQS Request Service Indicates that the device is requesting service.
SPR1 Signal Present
Receiver 1
SPR2 Signal Present
Receiver 2
TRG Trigger Indicates if a trigger has been received.
UNLK UNLoCKed Indicates that an unlocked or trigger loss condition has occurred in the Clock Recovery
URQ Not used. Permanently set to zero.
USR User Event Register Indicates if any of the enabled conditions have occurred in the User Event Register.
Indicates that the Clock Recovery Module has detected an optical signal on receiver one.
Indicates that the Clock Recovery Module has detected an optical signal on receiver two.
Module.
Standard Event Status Register
The Standard Event Status Register (SESR) monitors the following instrument status events:
• PON - Power On
• CME - Command Error
• EXE - Execution Error
• DDE - Device Dependent Error
• QYE - Query Error
• RQC - Request Control
• OPC - Operation Complete
When one of these events occurs, the corresponding bit is set in the register. If the corre­sponding bit is also enabled in the Standard Event Status Enable Register, a summary bit (ESB) in the Status Byte Register is set. The contents of the Standard Event Status Register can be read and the register cleared by sending the *ESR? query. The value returned is the total bit weights of all of the bits set at the present time. If bit 4 (weight = 16) and bit 5 (weight = 32) are set, the program prints the sum of the two weights.
This example uses the *ESR? query to read the contents of the Standard Event Status Regis­ter.
10 OUTPUT 707;":SYSTEM:HEADER OFF"!Turn headers off 20 OUTPUT 707;"*ESR?" 30 ENTER 707;Result!Place result in a numeric variable 40 PRINT Result!Print the result 50 End
1-18
Introduction
Status Reporting
Standard Event Status Enable Register
NOTE Disabled SESR Bits Respond, but Do Not Generate a Summary Bit. Standard Event Status Register bits that are
User Event Register (UER)
Local Event Register (LCL)
For any of the Standard Event Status Register (SESR) bits to generate a summary bit, you must first enable the bit. Use the *ESE (Event Status Enable) common command to set the corresponding bit in the Standard Event Status Enable Register. Set bits are read with the *ESE? query. Suppose your application requires an interrupt whenever any type of error occurs. The error status bits in the Standard Event Status Register are bits 2 through 5. The sum of the decimal weights of these bits is 60. Therefore, you can enable any of these bits to generate the summary bit by sending:
OUTPUT 707;"*ESE 60"
Whenever an error occurs, the instrument sets one of these bits in the Standard Event Status Register. Because the bits are all enabled, a summary bit is generated to set bit 5 (ESB) in the Status Byte Register. If bit 5 (ESB) in the Status Byte Register is enabled (via the *SRE com­mand), a service request interrupt (SRQ) is sent to the external computer.
not enabled still respond to their corresponding conditions (that is, they are set if the corresponding event occurs). However, because they are not enabled, they do not generate a summary bit in the Status Byte Register.
This register hosts the LCL bit (bit 0) from the Local Events Register. The other 15 bits are reserved. You can read and clear this register using the UER? query. This register is enabled with the UEE command. For example, if you want to enable the LCL bit, you send a mask value of 1 with the UEE command; otherwise, send a mask value of 0.
This register sets the LCL bit in the User Event Register and the USR bit (bit 1) in the Status byte. It indicates a remote-to-local transition has occurred. The LER? query is used to read and to clear this register.
Operation Status Register (OPR)
This register hosts the CLCK bit (bit 7), the LTEST bit (bit 8), the ACQ bit (bit 9) and the MTEST bit (bit 10). The CLCK bit is set when any of the enabled conditions in the Clock Recovery Event Register have occurred. The LTEST bit is set when a limit test fails or is com­pleted and sets the corresponding FAIL or COMP bit in the Limit Test Events Register. The ACQ bit is set when the COMP bit is set in the Acquisition Event Register, indicating that the data acquisition has satisfied the specified completion criteria. The MTEST bit is set when the Mask Test either fails specified conditions or satisfies its completion criteria, setting the corresponding FAIl or COMP bits in the Mask Test Events Register. The PTIME bit is set when there is a loss of the precision timebase reference occurs setting a bit in the Precision Timebase Events Register. The JIT bit is set in Jitter Mode when a bit is set in the Jitter Events Register. This occurs when there is a failure or an autoscale is needed. If any of these bits are set, the OPER bit (bit 7) of the Status Byte register is set. The Operation Status Reg­ister is read and cleared with the OPER? query. The register output is enabled or disabled using the mask value supplied with the OPEE command.
1-19
Introduction
Status Reporting
Acquisition Event Register (AER)
Clock Recovery Event Register (CRER)
Bit 0 (COMP) of the Acquisition Event Register is set when the acquisition limits complete. The Acquisition completion criteria are set by the ACQuire:RUNtil command. Refer to
“RUNTil” on page 6-4. The Acquisition Event Register is read and cleared with the ALER?
query. Refer to “ALER?” on page 4-3.
This register hosts the UNLK bit (bit 0), LOCK bit (bit 1), NSPR1 bit (bit 2), SPR1 bit (bit 3), NSPR2 bit (bit 4) and SPR2 (bit 5). Bit 0 (UNLK) of the Clock Recovery Event Register is set when an 83491/2/3/4/5/6A clock recovery module becomes unlocked or trigger loss has occurred. Bit 1 (LOCK) of the Clock Recovery Event Register is set when a clock recovery module becomes locked or a trigger capture has occurred. If an 83496A module is locked, sending the CRECovery:RELock command does not set UNLK bit (bit 0) or LOCK bit (bit 1). To determine if the RELock command has completed, use the CRECovery:LOCKed? query. Refer to “RELock” on page 9-9.
Bits 2 through 5 provide information on optical signals and so are not effected by 83495A modules. Bit 2 (NSPR1) of the Clock Recovery Event Register is set when an clock recovery module transitions to no longer detecting an optical signal on receiver one. Bit 3 (SPR1) of the Clock Recovery Event Register is set when an clock recovery module transitions to detecting an optical signal on receiver one. Bit 4 (NSPR2) of the Clock Recovery Event Regis­ter is set when an clock recovery module transitions to no longer detecting an optical signal on receiver two. Bit 5 (SPR2) of the Clock Recovery Event Register is set when an clock recovery module transitions to detecting an optical signal on receiver two. The Clock Recov­ery Event Register is read and cleared with the CRER? query. Refer to “CRER?” on page 4-6. When either of the UNLK, LOCK, NSPR1, SPR1, NSPR2 or SPR2 bits are set, they in turn set CLCK bit (bit 7) of the Operation Status Register. Results from the Clock Recovery Event Register can be masked by using the CREE command to set the Clock Recovery Event Enable Register. Refer to Refer to “CREE” on page 4-5 for enable and mask value definitions.
Limit Test Event Register (LTER)
Jitter Event Register (JIT)
Bit 0 (COMP) of the Limit Test Event Register is set when the Limit Test completes. The Limit Test completion criteria are set by the LTESt:RUN command. Refer to “RUNTil” on
page 15-4. Bit 1 (FAIL) of the Limit Test Event Register is set when the Limit Test fails. Fail-
ure criteria for the Limit Test are defined by the LTESt:FAIL command. Refer to “FAIL” on
page 15-2. The Limit Test Event Register is read and cleared with the LTER? query. Refer to “LTER?” on page 4-9. When either the COMP or FAIL bits are set, they in turn set the LTEST
bit (bit 8) of the Operation Status Register. You can mask the COMP and FAIL bits, thus pre­venting them from setting the LTEST bit, by defining a mask using the LTEE command. Refer
to “LTEE” on page 4-9. When the COMP bit is set, it in turn sets the ACQ bit (bit 9) of the
Operation Status Register. Results from the Acquisition Register can be masked by using the AEEN command to set the Acquisition Event Enable Register to the value 0. You enable the COMP bit by setting the mask value to 1.
Bit 0 (EFAIL) of the Jitter Event Register is set when characterizing edges in Jitter Mode fails. Bit 1 (JLOSS) of the register is set when pattern synchronization is lost in Jitter Mode. Bit 2 (AREQD) of the register is set when a parameter change in Jitter Mode has made autoscale necessary. Bit 12 of the Operation Status Register (JIT) indicates that one of the
1-20
Introduction
Status Reporting
enabled conditions in the Jitter Event Register has occurred. You can mask the EFAIL, JLOSS, and AREQD bits, thus preventing them from setting the JIT bit, by setting corre­sponding bits to zero using the JEE command. Refer to “JEE” on page 4-7.
Mask Test Event Register (MTER)
Precision Timebase Event Register (PTER)
Error Queue As errors are detected, they are placed in an error queue. This queue is first in, first out. If
Bit 0 (COMP) of the Mask Test Event Register is set when the Mask Test completes. The Mask Test completion criteria are set by the MTESt:RUNTil command. Refer to “RUNTil” on
page 17-6. Bit 1 (FAIL) of the Mask Test Event Register is set when the Mask Test fails. This
will occur whenever any sample is recorded within any region defined in the mask. The Mask Test Event Register is read and cleared with the MTER? query. Refer to “MTER?” on
page 4-10. When either the COMP or FAIL bits are set, they in turn set the MTEST bit (bit
10) of the Operation Status Register. You can mask the COMP and FAIL bits, thus preventing them from setting the MTEST bit, by setting corresponding bits to zero using the MTEE com­mand. Refer to “MTEE” on page 4-10.
The Precision Timebase feature requires the installation of the Agilent 86107A Precision Timebase Module. Bit 0 (LOSS) of the Precision Timebase Event Register is set when loss of the time reference occurs. Time reference is lost when a change in the amplitude or fre­quency of the reference clock signal is detected. The Precision Timebase Event Register is read and cleared with the PTER? query. Refer to “PTER?” on page 4-12. When the LOSS bit is set, it in turn sets the PTIME bit (bit 11) of the Operation Status Register. Results from the Precision Timebase Register can be masked by using the PTEE command to set the Precision Timebase Event Enable Register to the value 0. You enable the LOSS bit by setting the mask value to 1. Refer to “PTEE” on page 4-11.
the error queue overflows, the last error in the queue is replaced with error –350, “Queue overflow”. Any time the queue overflows, the oldest errors remain in the queue, and the most recent error is discarded. The length of the instrument's error queue is 30 (29 positions for the error messages, and 1 position for the “Queue overflow” message). The error queue is read with the SYSTEM:ERROR? query. Executing this query reads and removes the oldest error from the head of the queue, which opens a position at the tail of the queue for a new error. When all the errors have been read from the queue, subsequent error queries return 0, “No error.” The error queue is cleared when any of the following occurs:
• When the instrument is powered up.
• When the instrument receives the *CLS common command.
• When the last item is read from the error queue.
For more information on reading the error queue, refer to the SYSTEM:ERROR? query in
Chapter 5, “System Commands”. For a complete list of error messages, refer to “Error Mes­sages” on page 1-46.
1-21
Introduction
Status Reporting
Output Queue The output queue stores the instrument-to-computer responses that are generated by cer-
tain instrument commands and queries. The output queue generates the Message Available summary bit when the output queue contains one or more bytes. This summary bit sets the MAV bit (bit 4) in the Status Byte Register. The output queue may be read with the BASIC ENTER statement.
Message Queue The message queue contains the text of the last message written to the advisory line on the
screen of the instrument. The queue is read with the SYSTEM:DSP? query. Note that mes­sages sent with the SYSTem:DSP command do not set the MSG status bit in the Status Byte Register.
Clearing Registers and Queues
The *CLS common command clears all event registers and all queues except the output queue. If *CLS is sent immediately following a program message terminator, the output queue is also cleared.
1-22
Introduction

Command Syntax

Command Syntax
In accordance with IEEE 488.2, the instrument’s commands are grouped into “subsystems.” Commands in each subsystem perform similar tasks. Starting with Chapter 5, “System Com-
mands” each chapter covers a separate subsystem.
Sending a Command
Short or Long Forms
It’s easy to send a command to the instrument. Simply create a command string from the commands listed in this book, and place the string in your program language’s output state­ment. For commands other than common commands, include a colon before the subsystem name. For example, the following string places the cursor on the peak laser line and returns the power level of this peak:
OUTPUT 720;”:MEAS:SCAL:POW? MAX”
Commands can be sent using any combination of uppercase or lowercase ASCII characters. Instrument responses, however, are always returned in uppercase.
The program instructions within a data message are executed after the program message ter­minator is received. The terminator may be either a NL (new line) character, an EOI (End­Or-Identify) asserted in the GPIB interface, or a combination of the two. Asserting the EOI sets the EOI control line low on the last byte of the data message. The NL character is an ASCII linefeed (decimal 10). The NL (New Line) terminator has the same function as an EOS (End Of String) and EOT (End Of Text) terminator.
Commands and queries may be sent in either long form (complete spelling) or short form (abbreviated spelling). The description of each command in this manual shows both versions; the extra characters for the long form are shown in lowercase. However, commands can be sent using any combination of uppercase or lowercase ASCII characters. Instrument responses, however, are always returned in uppercase. Programs written in long form are easily read and are almost self-documenting. Using short form commands conserves the amount of controller memory needed for program storage and reduces the amount of I/O activity.
The short form is the first four characters of the keyword, unless the fourth character is a vowel. Then the mnemonic is the first three characters of the keyword. If the length of the keyword is four characters or less, this rule does not apply, and the short form is the same as the long form.
For example:
:TIMEBASE:DELAY 1E-6 is the long form.
:TIM:DEL 1E-6 is the short form.
1-23
Introduction
Command Syntax
.
Table 1-6. Long and Short Command Forms
Long Form Short Form How the Rule is Applied
RANGE RANG Short form is the first four characters of the keyword.
PATTERN PATT Short form is the first four characters of the keyword.
DISK DISK Short form is the same as the long form.
DELAY DEL Fourth character is a vowel, short form is the first three characters.
White Space White space is defined to be one or more characters from the ASCII set of 0 through 32 deci-
mal, excluding 10 (NL). White space is usually optional, and can be used to increase the read­ability of a program.
Combining Commands
You can combine commands from the same subsystem provided that they are both on the same level in the subsystem’s hierarchy. Simply separate the commands with a semi-colon (;). If you have selected a subsystem, and a common command is received by the instrument, the instrument remains in the selected subsystem. For example, the following commands turn averaging on, then clears the status information without leaving the selected subsystem.
":ACQUIRE:AVERAGE ON;*CLS;COUNT 1024"
You can send commands and program queries from different subsystems on the same line. Simply precede the new subsystem by a semicolon followed by a colon.
Multiple commands may be any combination of compound and simple commands. For exam­ple:
:CHANNEL1:RANGE 0.4;:TIMEBASE:RANGE 1
Adding parameters to a command
String Arguments Strings contain groups of alphanumeric characters which are treated as a unit of data by the
Many commands have parameters that specify an option. Use a space character to separate the parameter from the command as shown in the following line:
OUTPUT 720;”:INIT:CONT ON”
Separate multiple parameters with a comma (,). Spaces can be added around the commas to improve readability.
OUTPUT 720;”:MEAS:SCAL:POW:FREQ? 1300, MAX”
instrument. You may delimit embedded strings with either single (') or double (") quotation marks. These strings are case-sensitive, and spaces act as legal characters just like any other character. For example, this command writes the line string argument to the instrument’s advisory line:
:SYSTEM:DSP ""This is a message.""
1-24
Introduction
Command Syntax
Numbers Some commands require number arguments. All numbers are expected to be strings of ASCII
characters. You can use exponential notation or suffix multipliers to indicate the numeric value. The following numbers are all equal:
28 = 0.28E2 = 280E-1 = 28000m = 0.028K = 28E-3K
When a syntax definition specifies that a number is an integer, any fractional part is ignored and truncated. Using "mV" or "V" following the numeric voltage value in some commands will cause Error 138–Suffix not allowed. Instead, use the convention for the suffix multiplier.
.
Table 1-7. <suffix mult>
Value Mnemonic Value Mnemonic
1E18 EX 1E-3 m
1E15 PE 1E-6 u
1E12 T 1E-9 n
1E9 G 1E-12 p
1E6 MA 1E-15 f
1E3 K 1E-18 a
Infinity Representation
Sequential and Overlapped Commands
Table 1-8. <suffix unit>
Suffix Referenced Unit
VVolt
s Second
WWatt
BIT Bits
dB Decibel
% Percent
Hz Hertz
The representation for infinity for this instrument is 9.99999E+37. This is also the value returned when a measurement cannot be made.
IEEE 488.2 makes a distinction between sequential and overlapped commands. Sequential commands finish their task before the execution of the next command starts. Overlapped commands run concurrently. Commands following an overlapped command may be started before the overlapped command is completed. The common commands *WAI and *OPC may be used to ensure that commands are completely processed before subsequent commands are executed.
1-25
Introduction
Command Syntax
Definite-Length Block Response Data
Queries Command headers immediately followed by a question mark (?) are queries. After receiving a
Definite-length block response data allows any type of device-dependent data to be transmit­ted over the system interface as a series of 8-bit binary data bytes. This is particularly useful for sending large quantities of data or 8-bit extended ASCII codes. The syntax is a pound sign (#) followed by a non-zero digit representing the number of digits in the decimal integer. After the non-zero digit is the decimal integer that states the number of 8-bit data bytes being sent. This is followed by the actual data. For example, for transmitting 4000 bytes of data, the syntax would be:
#44000 <4000 bytes of data> <terminator>
The leftmost “4” represents the number of digits in the number of bytes, and “4000” repre­sents the number of bytes to be transmitted.
query, the instrument interrogates the requested subsystem and places the answer in its out­put queue. The answer remains in the output queue until it is read or until another command is issued. When read, the answer is transmitted across the bus to the designated listener (typically a computer). For example, the query:
:TIMEBASE:RANGE?
places the current time base setting in the output queue. In BASIC, the computer input state­ment:
ENTER < device address >;Range
passes the value across the bus to the computer and places it in the variable Range. You can use query commands to find out how the instrument is currently configured. They are also used to get results of measurements made by the instrument. For example, the command:
:MEASURE:RISETIME?
tells the instrument to measure the rise time of your waveform and place the result in the output queue. The output queue must be read before the next program message is sent. For example, when you send the query :MEASURE:RISETIME? you must follow it with an input statement. In BASIC, this is usually done with an ENTER statement immediately followed by a variable name. This statement reads the result of the query and places the result in a speci­fied variable. If you send another command or query before reading the result of a query, the output buffer is cleared and the current response is lost. This also generates a query-inter­rupted error in the error queue. If you execute an input statement before you send a query, it will cause the computer to wait indefinitely.
If a measurement cannot be made because of the lack of data, because the source signal is not displayed, the requested measurement is not possible (for example, a period measure­ment on an FFT waveform), or for some other reason, 9.99999E+37 is returned as the mea­surement result. In TDR mode with ohms specified, the returned value is 838MΩ.
You can send multiple queries to the instrument within a single program message, but you must also read them back within a single program message. This can be accomplished by either reading them back into a string variable or into multiple numeric variables. For exam­ple, you could read the result of the query :TIMEBASE:RANGE?;DELAY? into the string vari­able Results$ with the command: ENTER 707;Results$
1-26
Loading...
+ 334 hidden pages