Agilent 86100A Programmer’s Guide

Programmer’s Guide
© Copyright 2000 Agilent Technologies All Rights Reserved. Repro­duction, adaptation, or trans­lation without prior written permission is prohibited, except as allowed under copy­right laws.
Agilent Part No. 86100-90003 Printed in USA February 2000
Agilent Technologies Lightwave Division 1400 Fountaingrove Parkway Santa Rosa, CA 95403-1799, USA (707) 577-1400
Notice.
The information contained in this document is subject to change without notice. Com­panies, names, and data used in examples herein are ficti­tious unless otherwise noted. Agilent Technologies makes no warranty of any kind with regard to this material, includ­ing but not limited to, the implied warranties of mer­chantability and fitness for a particular purpose. Agilent Technologies shall not be lia­ble for errors contained herein or for incidental or conse­quential damages in connec­tion with the furnishing, performance, or use of this material.
Restricted Rights Legend.
Use, duplication, or disclo­sure by the U.S. Government is subject to restrictions as set forth in subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 for DOD agencies, and sub­paragraphs (c) (1) and (c) (2) of the Commercial Computer Software Restricted Rights clause at FAR 52.227-19 for other agencies.
Warranty.
This Agilent Technologies instrument product is war­ranted against defects in material and workmanship for a period of one year from date of shipment. During the war­ranty period, Agilent Technol­ogies will, at its option, either repair or replace products which prove to be defective. For warranty service or repair, this product must be returned to a service facility desig­nated by Agilent Technolo­gies. Buyer shall prepay shipping charges to Agilent Technologies and Agilent Technologies shall pay ship­ping charges to return the product to Buyer. However, Buyer shall pay all shipping charges, duties, and taxes for products returned to Agilent Technologies from another country.
Agilent Technologies war­rants that its software and firmware designated by Agi­lent Technologies for use with an instrument will execute its programming instructions when properly installed on that instrument. Agilent Tech­nologies does not warrant that the operation of the instru­ment, or 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 interfac­ing, unauthorized modifica­tion 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 dis-
claims the implied warranties of merchantability and fitness for a particular purpose.
Exclusive Remedies.
The remedies provided herein are buyer's sole and exclusive remedies. Agilent Technolo­gies shall not be liable for any direct, indirect, special, inci­dental, or consequential dam­ages, whether based on contract, tort, or any other legal theory.
Safety Symbols.
CAUTION
The hazard. It calls attention to a procedure which, if not cor­rectly performed or adhered to, could result in damage to or destruction of the product. Do not proceed beyond a cau­tion sign until the indicated conditions are fully under­stood and met.
WARNING
The hazard. It calls attention to a procedure which, if not cor­rectly performed or adhered to, could result in injury or loss of life. Do not proceed beyond a warning sign until the indicated conditions are fully understood and met.
sign denotes a
caution
warning
sign denotes a
The instruction man­ual symbol. The prod­uct is marked with this warning symbol when it is necessary for the user to refer to the instructions in the manual.
The laser radiation symbol. This warning symbol is marked on products which have a laser output.
The AC symbol is used to indicate the required nature of the line module input power.
The ON symbols are
|
used to mark the posi­tions of the instrument power line switch.
The OFF symbols
are used to mark the positions of the instru­ment power line switch.
The CE mark is a reg­istered trademark of the European Commu­nity.
The CSA mark is a reg­istered trademark of the Canadian Stan­dards Association.
ISM1-A This text denotes that the instrument is an Industrial Scientific and Medical Group 1 Class A product.
Typographical Conven­tions.
The following conventions are used in this book:
key type
for keys or text located on the keyboard or instrument.
softkey type
are displayed on the instru­ment’s screen.
display type
characters displayed on the computer’s screen or instru­ment’s display.
user type
ters that you type or enter.
emphasis
characters that emphasize some point or that are used as place holders for text that you type.
for key names that
for words or
for words or charac-
type for words or
ii
General Safety Considerations
General Safety Considerations
WARNING
WARNING
CAUTION
If this product is not used as specified, the protection provided by the equipment could be impaired. This product must be used in a normal condition (in which all means for protection are intact) only.
No operator serviceable parts inside. Refer servicing to qualified personnel. To prevent electrical shock, do not remove covers.
Fiber-optic connectors are easily damaged when connected to dirty or damaged cables and accessories. The digital communications analyzers front­panel INPUT connector is no exception. When you use improper cleaning and handling techniques, you risk expensive instrument repairs, damaged cables, and compromised measurements. Before you connect any fiber-optic cable to the digital communications analyzer, refer to Cleaning Connectors for Accurate Measurements in the instrument on-line help system.
This product has been designed and tested in accordance with IEC Publica­tion 61010-1, Safety Requirements for Electrical Equipment for Measurement, Control, and Laboratory Use, and has been supplied in a safe condition. The instruction documentation contains information and warnings that must be followed by the user to ensure safe operation and to maintain the product in a safe condition.
Agilent 86100A Quick Start Guide
, or in the
iii

Contents

1 Introduction
Communicating with the Analyzer 1-2 Output Command 1-3 Device Address 1-3 Instructions 1-4 Instruction Header 1-4 White Space (Separator) 1-4 Program Data 1-5 Header Types 1-5 Duplicate Mnemonics 1-7 Query Headers 1-7 Program Header Options 1-8 Character Program Data 1-9 Numeric Program Data 1-9 Embedded Strings 1-10 Program Message Terminator 1-10 Common Commands within a Subsystem 1-10 Selecting Multiple Subsystems 1-11 File Names and Types 1-11 File Locations 1-13 Getting Started Programming 1-15 Initialization 1-15 Example Program 1-17 Using the DIGITIZE Command 1-18 Receiving Information from the Analyzer 1-19 String Variable Example 1-20 Numeric Variable Example 1-20 Definite-Length Block Response Data 1-21 Multiple Queries 1-21 Analyzer Status 1-22
2 Interface Functions
GPIB Interface Connector 2-2 GPIB Default Startup Conditions 2-2 Interface Capabilities 2-3 Command and Data Concepts 2-3 Communicating Over the Bus 2-4
Contents-1
Contents
Bus Commands 2-5
3 Message Communication and System Functions
Protocols 3-2
4 Status Reporting
Status Reporting Data Structures 4-5 Status Byte Register 4-8 Service Request Enable Register 4-10 Trigger Event Register (TRG) 4-10 Standard Event Status Register 4-11 Standard Event Status Enable Register 4-12 User Event Register (UER) 4-12 Local Event Register (LCL) 4-13 Operation Status Register (OPR) 4-13 Limit Test Event Register (LTER) 4-13 Mask Test Event Register (MTER) 4-14 Acquisition Event Register (AER) 4-15 Error Queue 4-15 Output Queue 4-16 Message Queue 4-16 Clearing Registers and Queues 4-16
5 Programming Conventions
Data Flow 5-2 Truncation Rule 5-3 The Command Tree 5-4 Infinity Representation 5-10 Sequential and Overlapped Commands 5-10 Response Generation 5-10 EOI 5-10
6 Sample Programs
Sample Program Structure 6-3 Sample C Programs 6-4 init.c - Initialization 6-5 init.c - Global Definitions and Main Program 6-6
Contents-2
init.c - Initializing the Analyzer 6-7 init.c - Acquiring Data 6-8 init.c - Making Automatic Measurements 6-9 init.c - Error Checking 6-11 init.c - Transferring Data to the PC 6-13 init.c - Converting Waveform Data 6-15 init.c - Storing Waveform Time and Voltage Information 6-16 gen_srq.c - Generating a Service Request 6-17 Listings of the Sample Programs 6-21 hpib_decl.h Sample Program 6-22 init.c Sample Program 6-24 gen_srq.c Sample Program 6-30 srq.c Sample Program 6-32 learnstr.c Sample Program 6-34 sicl_IO.c Sample Program 6-37 natl_IO.c Sample Program 6-40 init.bas Sample Program 6-44 srq.bas Sample Program 6-50 lrn_str.bas Sample Program 6-53
Contents
7 Common Commands
Receiving Common Commands 7-2 Status Registers 7-3 Common Commands 7-4 *CLS (Clear Status) 7-4 *ESE (Event Status Enable) 7-4 *ESR? (Event Status Register) 7-6 *IDN? (Identification Number) 7-7 *LRN? (Learn) 7-7 *OPC (Operation Complete) 7-9 *OPT? (Option) 7-10 *RCL (Recall) 7-10 *RST (Reset) 7-11 *SAV (Save) 7-16 *SRE (Service Request Enable) 7-16 *STB? (Status Byte) 7-17 *TRG (Trigger) 7-19
Contents-3
Contents
*TST? (Test) 7-19 *WAI (Wait-to-Continue) 7-20
8 Root Level Commands
Status Reporting Data Structures 8-3 Root Level Commands 8-4 AEEN (Acquisition Limits Event Enable register) 8-4 ALER? (Acquisition Limits Event Register) 8-4 AUToscale 8-4 BLANk 8-5 CDISplay 8-6 COMMents 8-6 DIGitize 8-7 LER? (Local Event Register) 8-8 LTEE (Limit Test Event Enable register) 8-8 LTER? (Limit Test Event Register) 8-9 MODel? 8-9 MTEE (Mask Event Enable register) 8-10 MTER? (Mask Test Event Register) 8-11 OPEE 8-11 OPER? 8-11 PRINt 8-12 RECall:SETup 8-12 RUN 8-12 SERial (Serial Number) 8-12 SINGle 8-13 STOP 8-14 STORe:SETup 8-14 STORe:WAVEform 8-14 TER? (Trigger Event Register) 8-15 UEE (User Event Enable register) 8-15 UER? (User Event Register) 8-16 VIEW 8-16
9 System Commands
DATE 9-3 DSP 9-3
Contents-4
ERRor? 9-4 HEADer 9-6 MODE 9-7 SETup 9-7 TIME 9-9
10 Acquire Commands
AVERage 10-3 COUNt 10-3 POINts 10-4 RUNTil 10-4 SSCReen 10-5 SSCReen:AREA 10-6 SSCReen:IMAGe 10-6 SWAVeform 10-7 SWAVeform:RESet 10-8
Contents
11 Calibration Commands
Mainframe Calibration 11-2 Module Calibration 11-2 Probe Calibration 11-4 CANCel 11-5 CONTinue 11-5 ERATio:DLEVel? CHANnel<N> 11-5 ERATio:STARt CHANnel<N> 11-6 ERATio:STATus? 11-6 FRAMe:LABel 11-6 FRAMe:STARt 11-6 FRAMe:TIME? 11-7 MODule:OCONversion 11-7 MODule:OPOWer 11-7 MODule:OPTical 11-8 MODule:OWAVelength 11-8 MODule:STATus? 11-8 MODule:TIME? 11-9 MODule:VERTical 11-9 OUTPut 11-9
Contents-5
Contents
PROBe:CHANnel<N> 11-10 SAMPlers 11-10 SDONe? 11-11 SKEW 11-11 STATus? 11-12 Calibration Procedure 11-12
12 Channel Commands
BANDwidth 12-3 DISPlay 12-3 FDEScription? 12-4 FILTer 12-4 FSELect 12-5 OFFSet 12-6 PROBe:CALibrate 12-6 RANGe 12-7 SCALe 12-7 WAVelength 12-8
13 Disk Commands
CDIRectory 13-3 DELete 13-3 DIRectory? 13-4 LOAD 13-4 MDIRectory 13-5 PWD? 13-5 STORe 13-6
14 Display Commands
CGRade:LEVels? 14-3 CONNect 14-3 DATA? 14-4 DCOLor (Default COLor) 14-4 GRATicule 14-5 LABel 14-6 LABel:DALL 14-6 PERSistence 14-6
Contents-6
SCOLor 14-7 SSAVer 14-9 TEXT 14-9
15 Function Commands
FUNCtion<N>? 15-3 DISPlay 15-3 HORizontal 15-4 HORizontal:POSition 15-4 HORizontal:RANGe 15-5 INVert 15-6 MAGNify 15-6 OFFSet 15-7 RANGe 15-8 SUBTract 15-9 VERSus 15-10 VERTical 15-11 VERTical:OFFSet 15-12 VERTical:RANGe 15-13
Contents
16 Hardcopy Commands
AREA 16-3 DPRinter 16-3 FACTors 16-4 IMAGe 16-5 PRINters? 16-5
17 Histogram Commands
Histograms and the Database 17-3 AXIS 17-4 MODE 17-4 SCALe:SIZE 17-5 WINDow:DEFault 17-5 WINDow:SOURce 17-6 WINDow:X1Position 17-6 WINDow:X2Position 17-7 WINDow:Y1Position 17-8
Contents-7
Contents
WINDow:Y2Position 17-9
18 Limit Test Commands
FAIL 18-3 LLIMit 18-4 MNFound 18-5 RUNTil 18-6 SOURce 18-7 SSCReen 18-7 SSCReen:AREA 18-8 SSCReen:IMAGe 18-9 SSUMmary 18-9 SWAVeform 18-10 SWAVeform:RESet 18-11 TEST 18-11 ULIMit 18-13
19 Marker Commands
STATe 19-3 X1Position 19-4 X1Y1source 19-4 X2Position 19-5 X2Y2source 19-6 XDELta? 19-6 Y1Position 19-7 Y2Position 19-8 YDELta? 19-9
20 Mask Test Commands
Mask Handling 20-3 Mask Files 20-3 ALIGn 20-4 COUNt:FAILures? 20-4 COUNt:FSAMples? 20-5 COUNt:HITS? 20-5 COUNt:SAMPles? 20-6 COUNt:WAVeforms? 20-6
Contents-8
DELete 20-7 EXIT 20-7 LOAD 20-7 MASK:DELete 20-8 MMARgin:PERCent 20-9 MMARgin:STATe 20-9 RUNTil 20-10 SCALe:DEFault 20-11 SCALe:SOURce? 20-11 SCALe:X1 20-12 SCALe:XDELta 20-13 SCALe:Y1 20-14 SCALe:Y2 20-14 SCALe:YTRack 20-15 SSCReen 20-16 SSCReen:AREA 20-17 SSCReen:IMAGe 20-17 SSUMmary 20-18 STARt 20-19 SWAVeform 20-19 SWAVeform:RESet 20-20 TEST 20-20 TITLe? 20-21
Contents
21 Measure Commands
Measurement Setup 21-3 User-Defined Measurements 21-3 Measurement Error 21-3 Making Measurements 21-4 APOWer 21-6 CGRade:COMPlete 21-7 CGRade:CROSsing 21-7 CGRade:DCDistortion 21-8 CGRade:EHEight 21-9 CGRade:ERATio 21-10 CGRade:ESN 21-10 CGRade:EWIDth 21-11
Contents-9
Contents
CGRade:JITTer 21-12 CGRade:OLEvel 21-13 CGRade:PEAK? 21-13 CGRade:ZLEVel 21-14 CLEar 21-15 DEFine 21-15 FALLtime 21-17 HISTogram:HITS 21-18 HISTogram:M1S 21-19 HISTogram:M2S 21-20 HISTogram:M3S 21-21 HISTogram:MEAN 21-22 HISTogram:MEDian 21-22 HISTogram:PEAK 21-23 HISTogram:PP 21-24 HISTogram:SCALe? 21-25 HISTogram:STDDev 21-25 OVERshoot 21-26 PERiod 21-27 RESults? 21-28 RISetime 21-29 SCRatch 21-30 SENDvalid 21-31 SOURce 21-31 TEDGe? 21-32 VAMPlitude 21-33 VPP 21-34 VRMS 21-35
22 Time Base Commands
BRATe 22-2 POSition 22-2 RANGe 22-3 REFerence 22-4 SCALe 22-4 UNITs 22-5
Contents-10
23 Trigger Commands
BWLimit 23-3 GATed 23-3 HYSTeresis 23-4 LEVel 23-4 SLOPe 23-4 SOURce 23-5
24 Waveform Commands
Data Acquisition 24-2 Waveform Data and Preamble 24-2 Data Conversion 24-3 Conversion from Data Value to Units 24-3 Data Format for GPIB Transfer 24-4 BANDpass? 24-5 BYTeorder 24-5 COUNt? 24-6 DATA 24-6 FORMat 24-9 POINts? 24-10 PREamble 24-11 SOURce 24-14 TYPE? 24-15 XDISplay? 24-16 XINCrement? 24-16 XORigin? 24-17 XRANge? 24-17 XREFerence? 24-18 XUNits? 24-18 YDISplay? 24-19 YINCrement? 24-19 YORigin? 24-20 YRANge? 24-20 YREFerence? 24-21 YUNits? 24-21
Contents
Contents-11
Contents
25 Waveform Memory Commands
DISPlay 25-3 LOAD 25-3 SAVE 25-4 XOFFset 25-4 XRANge 25-4 YOFFset 25-5 YRANge 25-6
26 Language Compatability
Agilent 83480A Commands Not Used in the Agilent 86100A 26-2
27 Error Messages
Error Queue 27-2 Error Numbers 27-3 Command Error 27-3 Execution Error 27-4 Device- or Analyzer-Specific Error 27-4 Query Error 27-5 List of Error Messages 27-6
Index
Contents-12
1
Communicating with the Analyzer 1-2 Output Command 1-3 Device Address 1-3 Instructions 1-4 Instruction Header 1-4 White Space (Separator) 1-4 Program Data 1-5 Header Types 1-5 Duplicate Mnemonics 1-7 Query Headers 1-7 Program Header Options 1-8 Character Program Data 1-9 Numeric Program Data 1-9 Embedded Strings 1-10 Program Message Terminator 1-10 Common Commands within a Subsystem 1-10 Selecting Multiple Subsystems 1-11 File Names and Types 1-11 File Locations 1-13 Getting Started Programming 1-15 Initialization 1-15 Example Program 1-17 Using the DIGITIZE Command 1-18 Receiving Information from the Analyzer 1-19 String Variable Example 1-20 Numeric Variable Example 1-20 Definite-Length Block Response Data 1-21 Multiple Queries 1-21 Analyzer Status 1-22

Introduction

Introduction
Introduction to Programming
Introduction to Programming
This chapter introduces the basics for remote programming of an analyzer. The programming commands in this manual conform to the IEEE 488.2 Stan­dard Digital Interface for Programmable Instrumentation. The programming commands provide the means of remote control.
Basic operations that you can do with a computer (GPIB controller) and an analyzer include:
Set up the analyzer.
Make measurements.
Get data (waveform, measurements, configuration) from the analyzer.
Send information, such as waveforms and configurations, to the analyzer.
Other tasks are accomplished by combining these functions.
.
Example Programs are Written in HP BASIC and C
The programming examples for individual commands in this manual are written in HP BASIC and C.

Communicating with the Analyzer

Computers communicate with the analyzer by sending and receiving messages over a remote interface, usually with GPIB programming. Commands for pro­gramming normally appear as ASCII character strings embedded in the output statements of a “host” language available on your computer. The input com­mands of the host language are used to read in responses from the analyzer.
For example, HP BASIC uses the OUTPUT statement for sending commands and queries. After a query is sent, the response is usually read using the HP BASIC ENTER statement. The ENTER statement passes the value across the bus to the computer and places it in the designated variable.
1-2
Introduction

Output Command

For the GPIB interface, messages are placed on the bus using an output com­mand and passing the device address, program message, and a terminator. Passing the device address ensures that the program message is sent to the correct GPIB interface and GPIB device.
This HP BASIC OUTPUT statement sends a command that sets the channel 1 scale value to 500 mV:
OUTPUT <device address>;":CHANNEL1:SCALE 500E-3"<terminator>
The device address represents the address of the device being programmed. Each of the other parts of the above statement are explained in the following pages.
Use the Suffix Multiplier Instead
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 as described in Chapter 3, “Message Communication and System Functions”.
Output Command
The output command depends entirely on the programming language. Throughout this book, HP BASIC and ANSI C are used in the examples of indi­vidual commands. If you are using other languages, you will need to find the equivalents of HP BASIC commands like OUTPUT, ENTER, and CLEAR, to convert the examples.

Device Address

The location where the device address must be specified depends on the pro­gramming language you are using. In some languages, it may be specified out­side the OUTPUT command. In HP BASIC, it is always specified after the keyword OUTPUT. The examples in this manual assume that the analyzer and interface card are at GPIB device address 707. When writing programs, the device address varies according to how the bus is configured.
1-3
Introduction

Instructions

Instructions
Instructions, both commands and queries, normally appear as strings embed­ded in a statement of your host language, such as HP BASIC, Pascal, or C. The only time a parameter is not meant to be expressed as a string is when the instruction's syntax definition specifies <block data>, such as HP BASIC’s "learnstring" command. There are only a few instructions that use block data.
Instructions are composed of two main parts:
The header, which specifies the command or query to be sent.
The program data, which provides additional information to clarify the meaning
of the instruction.

Instruction Header

The instruction header is one or more command mnemonics separated by colons (:) that represent the operation to be performed by the analyzer. See
Chapter 5, Programming Conventions for more information.
Queries are formed by adding a question mark (?) to the end of the header. Many instructions can be used as either commands or queries, depending on whether or not you include the question mark. The command and query forms of an instruction usually have different program data. Many queries do not use any program data.

White Space (Separator)

White space is used to separate the instruction header from the program data. If the instruction does not require any program data parameters, you do not need to include any white space. In this manual, white space is defined as one or more spaces. ASCII defines a space to be character 32, in decimal.
1-4
Introduction

Program Data

Program Data
Program data is used to clarify the meaning of the command or query. It pro­vides necessary information, such as whether a function should be on or off or which waveform is to be displayed. Each instruction's syntax definition shows the program data, and the values they accept. See “Numeric Program Data” on
page 1-9 for more information about general syntax rules and acceptable val-
ues.
When there is more than one data parameter, they are separated by commas (,). You can add spaces around the commas to improve readability.

Header Types

There are three types of headers:
Simple Command headers
Compound Command headers
Common Command headers
Simple Command Header
Simple command headers contain a single mnemonic. AUTOSCALE and DIGI­TIZE are examples of simple command headers typically used in this analyzer. The syntax is:
<program mnemonic><terminator>
or
OUTPUT 707;”:AUTOSCALE”
When program data must be included with the simple command header (for example, :DIGITIZE CHAN1), white space is added to separate the data from the header. The syntax is:
<program mnemonic><separator><program data><terminator>
or
OUTPUT 707;:DIGITIZE CHANNEL1,FUNCTION2
1-5
Introduction
Header Types
Compound Command Header
Compound command headers are a combination of two program mnemonics. The first mnemonic selects the subsystem, and the second mnemonic selects the function within that subsystem. The mnemonics within the compound message are separated by colons. For example:
To execute a single function within a subsystem:
:<subsystem>:<function><separator><program data><terminator>
For example:
OUTPUT 707;:CHANNEL1:BANDWIDTH HIGH
Combining Commands in the Same Subsystem
To execute more than one command within the same subsystem, use a semi­colon (;) to separate the commands:
:<subsystem>:<command><separator><data>;<command><separator><data><terminator>
For example:
:CHANNEL1:DISPLAY ON;BWLIMIT ON
Common Command Header
Common command headers, such as clear status, control the IEEE 488.2 func­tions within the analyzer. The syntax is:
*<command header><terminator>
No space or separator is allowed between the asterisk (*) and the command header. *CLS is an example of a common command header.
1-6
Introduction

Duplicate Mnemonics

Duplicate Mnemonics
Identical function mnemonics can be used for more than one subsystem. For example, the function mnemonic RANGE may be used to change the vertical range or to change the horizontal range.
To set the vertical range of channel 1 to 0.4 volts full scale:
:CHANNEL1:RANGE .4
To set the horizontal time base to 1 second full scale:
:TIMEBASE:RANGE 1
CHANNEL1 and TIMEBASE are subsystem selectors, and determine which range is being modified.

Query Headers

Command headers immediately followed by a question mark (?) are queries. After receiving a query, the analyzer interrogates the requested subsystem and places the answer in its output 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 HP BASIC, the computer input statement:
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 analyzer is currently config­ured. They are also used to get results of measurements made by the analyzer. For example, the command:
:MEASURE:RISETIME?
tells the analyzer to measure the rise time of your waveform and place the result in the output queue.
1-7
Introduction

Program Header Options

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 HP 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 specified variable.
Handling Queries Properly
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-interrupted error in the error queue. If you execute an input statement before you send a query, it will cause the computer to wait indefinitely.
Program Header Options
You can send program headers using any combination of uppercase or lower­case ASCII characters. Analyzer responses, however, are always returned in uppercase.
You may send program command and query headers in either long form (com­plete spelling), short form (abbreviated spelling), or any combination of long form and short form. For example:
:TIMEBASE:DELAY 1E-6
:TIM:DEL 1E-6
is the short form.
is the long form.
Using Long Form or Short Form
Programs written in long form are easily read and are almost self-documenting. The short form syntax conserves the amount of computer memory needed for program storage and reduces I/O activity.
The rules for the short form syntax are described in Chapter 5, “Programming
Conventions”.
1-8
Introduction

Character Program Data

Character Program Data
Character program data is used to convey parameter information as alpha or alphanumeric strings. For example, the :TIMEBASE:REFERENCE command can be set to left, center, or right. The character program data in this case may be LEFT, CENTER, or RIGHT. The command :TIMEBASE:REFERENCE RIGHT sets the time base reference to right.
The available mnemonics for character program data are always included with the instruction's syntax definition. Either the long form of commands, or the short form (if one exists), may be sent. Uppercase and lowercase letters may be mixed freely. When receiving responses, uppercase letters are used exclu­sively.

Numeric Program Data

Some command headers require program data to be expressed numerically. For example, :TIMEBASE:RANGE requires the desired full scale range to be expressed numerically.
For numeric program data, you can use exponential notation or suffix multi­pliers 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, it means that the number should be whole. Any fractional part is ignored and truncated. Numeric data parameters that accept fractional values are called real num­bers. For more information see Chapter 2, Interface Functions”.
All numbers are expected to be strings of ASCII characters.
When sending the number 9, you would send a byte representing the ASCII code for the character “9” (which is 57).
A three-digit number like 102 would take up three bytes (ASCII codes 49, 48, and 50). The number of bytes is figured automatically when you include the en­tire instruction in a string.
1-9
Introduction

Embedded Strings

Embedded Strings
Embedded strings contain groups of alphanumeric characters which are treated as a unit of data by the analyzer. An example of this is the line of text written to the advisory line of the analyzer with the :SYSTEM:DSP command:
:SYSTEM:DSP ""This is a message.""
You may delimit embedded strings with either single (') or double (") quota­tion marks. These strings are case-sensitive, and spaces act as legal characters just like any other character.

Program Message Terminator

The program instructions within a data message are executed after the pro­gram message terminator is received. The terminator may be either a NL (New Line) character, an EOI (End-Or-Identify) asserted in the GPIB inter­face, 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 line­feed (decimal 10).
New Line Terminator Functions Like EOS and EOT
The NL (New Line) terminator has the same function as an EOS (End Of String) and EOT (End Of Text) terminator.

Common Commands within a Subsystem

Common commands can be received and processed by the analyzer whether they are sent over the bus as separate program messages or within other pro­gram messages. If you have selected a subsystem, and a common command is received by the analyzer, the analyzer remains in the selected subsystem. For example, if the program message
":ACQUIRE:AVERAGE ON;*CLS;COUNT 1024"
is received by the analyzer, the analyzer turns averaging on, then clears the status information without leaving the selected subsystem.
1-10
Introduction

Selecting Multiple Subsystems

If some other type of command is received within a program message, you must re-enter the original subsystem after the command. For example, the program message
":ACQUIRE:AVERAGE ON;:AUTOSCALE;:ACQUIRE:AVERAGE:COUNT 1024"
turns averaging on, completes the autoscale operation, then sets the acquire average count. In this example, :ACQUIRE must be sent again after the AUTOSCALE command to re-enter the ACQUIRE subsystem and set count.
Selecting Multiple Subsystems
You can send multiple program commands and program queries for different subsystems on the same line by separating each command with a semicolon. The colon following the semicolon lets you enter a new subsystem. For exam­ple:
<program mnemonic><data>;:<program mnemonic><data><terminator>
:CHANNEL1:RANGE 0.4;:TIMEBASE:RANGE 1
You Can Combine Compound and Simple Commands
Multiple commands may be any combination of compound and simple commands.

File Names and Types

When specifying a file name in a remote command, enclose the name in dou­ble quotation marks, such as "filename". If you specify a path, the path should be included in the quotation marks.
You can use the full path name, a relative path name, or no path. For example, you can specify:
a full path name: "C:\User Files\waveforms\channel2.wfm"
a relative path name: "..\myfile.set"
a simple file name: "Memory1.txt"
All files stored using remote commands have file name extensions.The follow­ing table shows the file name extension used for each file type.
1-11
Introduction
File Names and Types
Table 1-1. File Name Extensions
File Type File Name Extension
Waveform - internal format .wfm
Waveform - text format (Verbose or Y values) .txt
Setup .set
Color grade - Gray Scale .cgs
Screen image .bmp, .eps, .gif, .pcx, .ps
Mask .msk
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 and change to the ap-
propriate 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",MASK will automatically add .msk to the file name.
The following table shows the rules used when loading a specified file.
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
Extension matches file type Not specified Use file name with no
No extension Specified Add extension for destination
1-12
Not specified Default to internal waveform
format; add .wfm extension
alterations; destination is based on extension file type
type; default for waveforms is internal format (.wfm)
Table 1-2. Rules for Loading Files (Continued)
File Name Extension Destination Rule
Introduction

File Locations

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
Note
ASCII waveform files can be loaded only if the file name explicitly includes the .txt extensio
n.
File Locations
If you dont specify a directory when storing a file, the location of the file will be based on the file type. The following table shows the default locations for storing files.
Table 1-3. Default File Locations (Storing Files)
File Type Default Location
Waveform - internal format C:\User Files\waveforms
Waveform - text format (Verbose or Y values) C:\User Files\waveforms
Setup C:\User Files\setups
Color Grade - Gray Scale C:\User Files\colorgrade-grayscale
Screen Image C:\User Files\screen images
Mask C:\Scope\masks (for standard masks)
When loading a file, you can specify the full path name, a relative path name, or no path name. The following table shows the rules for locating files, based on the path specified.
1-13
Introduction
File Locations
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 (determine using :DISK:PWD?)
File name with no preceding path Add the file name to the default path based on
the file type.
Files may be stored to or loaded from an internal hard drive under the root path C:\User Files only. The only exceptions are the standard masks loaded from C:\Scope\masks. Attempting to access files outside the root path will generate an error message.
Files may be stored to or loaded from any path on the A: drive.
1-14
Loading...
+ 374 hidden pages