Agilent Technologies 54621A Programmer's Manual
Agilent Technologies 54621A Programmer's Manual

Agilent Technologies 54621A Programmer's Manual

Mixed-signal oscilloscopes
Hide thumbs Also See for 54621A:
Table of Contents

Advertisement

Programmer's Guide
Publication Number 54622-97038
September 2002
For Safety information see the pages behind the Index.
© Copyright Agilent Technologies 2000-2002
All Rights Reserved
Agilent 54621A/22A/24A/41A/42A
Oscilloscopes and
Agilent 54621D/22D/41D/42D
Mixed-Signal Oscilloscopes

Advertisement

Table of Contents
loading

Summary of Contents for Agilent Technologies 54621A

  • Page 1 Programmer’s Guide Publication Number 54622-97038 September 2002 For Safety information see the pages behind the Index. © Copyright Agilent Technologies 2000-2002 All Rights Reserved Agilent 54621A/22A/24A/41A/42A Oscilloscopes and Agilent 54621D/22D/41D/42D Mixed-Signal Oscilloscopes...
  • Page 2 Programming the Oscilloscope When you attach an interface module to the rear of the oscilloscope, it becomes programmable. That is, you can hook a controller (such as a PC or workstation) to it, and write programs on that controller to automate oscilloscope setup and data capture.
  • Page 3 Capture Once you initialize the oscilloscope, you can begin capturing data for analysis. Remember that while the oscilloscope is responding to commands from the controller, it is not performing acquisitions. Also, when you change the oscilloscope configuration, any data already captured will most likely be rendered.
  • Page 4 In This Book This Programmer’s Guide is your introduction to programming the oscilloscope using an instrument controller. This book, with the Programmer’s Reference, provides a comprehensive description of the oscilloscope’s programmatic interface. The Programmer’s Reference is supplied as a Microsoft Windows Help file on a 3.5" diskette. The oscilloscope has a built-in RS-232-C port for programming.
  • Page 5: Table Of Contents

    Contents 1 Introduction to Programming Talking to the Instrument 1-3 Program Message Syntax 1-4 Combining Commands from the Same Subsystem 1-7 Duplicate Mnemonics 1-8 Query Command 1-9 Program Header Options 1-10 Program Data Syntax Rules 1-11 Program Message Terminator 1-13 Selecting Multiple Subsystems 1-14 2 Programming Getting Started Initialization 2-3...
  • Page 6 Contents 5 Programming and Documentation Conventions Command Set Organization 5-3 The Command Tree 5-6 Obsolete and Discontinued Commands 5-10 Truncation Rules 5-15 Infinity Representation 5-16 Sequential and Overlapped Commands 5-16 Response Generation 5-16 Notation Conventions and Definitions 5-17 Program Examples 5-18 6 Status Reporting Status Reporting Data Structures 6-5 Status Byte Register (SBR) 6-8...
  • Page 7: Introduction To Programming

    Introduction to Programming...
  • Page 8 Introduction to Programming Chapters 1 and 2 introduce the basics for remote programming of an oscilloscope. The programming instructions in this manual conform to the IEEE488.2 Standard Digital Interface for Programmable Instrumentation. The programming instructions provide the means of remote control. To program the oscilloscope you must add either a GPIB (N2757A) interface, or program over the built-in RS-232-C interface on the rear panel.
  • Page 9: Talking To The Instrument

    Introduction to Programming Talking to the Instrument Talking to the Instrument Computers acting as controllers communicate with the instrument by sending and receiving messages over a remote interface. Instructions for programming normally appear as ASCII character strings embedded inside the output statements of a host language available on your controller.
  • Page 10: Program Message Syntax

    Introduction to Programming Program Message Syntax Program Message Syntax To program the instrument remotely, you must understand the command format and structure expected by the instrument. The IEEE 488.2 syntax rules govern how individual elements such as headers, separators, program data, and terminators may be grouped together to form complete instructions.
  • Page 11 Introduction to Programming Program Message Syntax Instructions Instructions (both commands and queries) normally appear as a string embedded in a statement of your host language, such as 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 <learn string>.
  • Page 12 Introduction to Programming Program Message Syntax 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 DIGITIZE are examples of simple command headers typically used in this instrument.
  • Page 13: Combining Commands From The Same Subsystem

    Introduction to Programming Combining Commands from the Same Subsystem Combining Commands from the Same Subsystem To execute more than one function within the same subsystem, separate the functions with a semicolon (;): :<subsystem>:<function><separator><data>; <function><separator><data><terminator> (For example :CHANNEL1:COUPLING DC;BWLIMIT ON)
  • Page 14: Duplicate Mnemonics

    Introduction to Programming Duplicate Mnemonics Duplicate Mnemonics Identical function mnemonics can be used in more than one subsystem. For example, the function mnemonic RANGE may be used to change the vertical range or to change the horizontal range: :CHANNEL1:RANGE sets the vertical range of channel 1 to 0.4 volts full scale. :TIMEBASE:RANGE 1 sets the horizontal time base to 1 second full scale.
  • Page 15: Query Command

    Introduction to Programming Query Command Query Command Command headers immediately followed by a question mark (?) are queries. After receiving a query, the instrument interrogates the requested function and places the answer in its output queue. The answer remains in the output queue until it is read or another command is issued.
  • Page 16: Program Header Options

    Introduction to Programming Program Header Options Program Header Options You can send program headers using any combination of uppercase or lowercase ASCII characters. Instrument responses, however, are always returned in uppercase. Program command and query headers may be sent in either long form (complete spelling), short form (abbreviated spelling), or any combination of long form and short form.
  • Page 17: Program Data Syntax Rules

    Introduction to Programming Program Data Syntax Rules Program Data Syntax Rules Program data is used to convey a parameter information related to the command header. At least one space must separate the command header or query header from the program data. <program mnemonic><separator><data><terminator>...
  • Page 18 Introduction to Programming Program Data Syntax Rules All numbers must be strings of ASCII characters. Thus, 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).
  • Page 19: Program Message Terminator

    Introduction to Programming Program Message Terminator Program Message Terminator The program instructions within a data message are executed after the program message terminator is received. The terminator may be either an NL (New Line) character, an EOI (End-Or-Identify) asserted in the GPIB interface, or a combination of the two.
  • Page 20: Selecting Multiple Subsystems

    Introduction to Programming Selecting Multiple Subsystems 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 enables you to enter a new subsystem. For example: <program mnemonic><data>;...
  • Page 21: Programming Getting Started

    Programming Getting Started...
  • Page 22 Programming Getting Started This chapter explains how to set up the instrument, how to retrieve setup information and measurement results, how to digitize a waveform, and how to pass data to the controller. Languages for Programming Examples The programming examples in this manual are written in HPBASIC 6.3 or C.
  • Page 23: Initialization

    Programming Getting Started Initialization Initialization To make sure the bus and all appropriate interfaces are in a known state, begin every program with an initialization statement. HP BASIC provides a CLEAR command which clears the interface buffer: CLEAR 707 ! initializes the interface of the instrument When you are using GPIB, CLEAR also resets the oscilloscope’s parser.
  • Page 24: Autoscale

    Programming Getting Started Autoscale Autoscale The AUTOSCALE feature performs a very useful function for unknown waveforms by setting up the vertical channel, time base, and trigger level of the instrument. The syntax for the autoscale function is: :AUTOSCALE<terminator>...
  • Page 25: Setting Up The Instrument

    Programming Getting Started Setting Up the Instrument Setting Up the Instrument A typical oscilloscope setup would set the vertical range and offset voltage, the horizontal range, delay time, delay reference, trigger mode, trigger level, and slope. An example of the commands that might be sent to the oscilloscope are: :CHANNEL1:PROBE 10;RANGE 16;OFFSET 1.00<terminator>...
  • Page 26: Example Program

    Programming Getting Started Example Program Example Program This program demonstrates the basic command structure used to program the oscilloscope. CLEAR 707 ! Initialize instrument interface OUTPUT 707;"*RST" ! Initialize to preset state OUTPUT 707;":TIMEBASE:RANGE 5E-4" ! Time base to 50 us/div OUTPUT 707;":TIMEBASE:DELAY 0"...
  • Page 27: Using The Digitize Command

    Programming Getting Started Using the DIGitize Command Using the DIGitize Command The DIGitize command is a macro that captures data satisfying the specifications set up by the ACQuire subsystem. When the digitize process is complete, the acquisition is stopped. The captured data can then be measured by the instrument or transferred to the controller for further analysis.
  • Page 28 Programming Getting Started Using the DIGitize Command The following program example shows a typical setup: OUTPUT 707;":ACQUIRE:TYPE AVERAGE"<terminator> OUTPUT 707;":ACQUIRE:COMPLETE 100"<terminator> OUTPUT 707;":WAVEFORM:SOURCE CHANNEL1"<terminator> OUTPUT 707;":WAVEFORM:FORMAT BYTE"<terminator> OUTPUT 707;":ACQUIRE:COUNT 8"<terminator> OUTPUT 707;":WAVEFORM:POINTS 500"<terminator> OUTPUT 707;":DIGITIZE CHANNEL1"<terminator> OUTPUT 707;":WAVEFORM:DATA?"<terminator> This setup places the instrument into the averaged mode with eight averages. This means that when the DIGitize command is received, the command will execute until the signal has been averaged at least eight times.
  • Page 29: Receiving Information From The Instrument

    Programming Getting Started Receiving Information from the Instrument Receiving Information from the Instrument After receiving a query (command header followed by a question mark), the instrument interrogates the requested function and places the answer in its output queue. The answer remains in the output queue until it is read or another command is issued.
  • Page 30: String Variables

    Programming Getting Started String Variables String Variables The output of the instrument may be numeric or character data depending on what is queried. Refer to the specific commands for the formats and types of data returned from queries. Express String Variables Using Exact Syntax In HP BASIC 6.3, string variables are case sensitive and must be expressed exactly the same each time they are used.
  • Page 31: Numeric Variables

    Programming Getting Started Numeric Variables Numeric Variables The following example shows the data being returned to a numeric variable: 10 OUTPUT 707;":CHANNEL1:RANGE?" 20 ENTER 707;Rang 30 PRINT Rang 40 END After running this program, the controller displays: 2-11...
  • Page 32: Definite-Length Block Response Data

    Programming Getting Started Definite-Length Block Response Data Definite-Length Block Response Data Definite-length block response data allows any type of device-dependent data to be transmitted 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.
  • Page 33: Multiple Queries

    Programming Getting Started Multiple Queries Multiple Queries 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.
  • Page 34 2-14...
  • Page 35: Programming Over Gpib

    Programming over GPIB...
  • Page 36 Programming over GPIB This section describes the GPIB interface functions and some general concepts. In general, these functions are defined by IEEE 488.1. They deal with general interface management issues, as well as messages which can be sent over the interface as interface commands. For more information on connecting the controller to the oscilloscope, see the documentation for the GPIB interface card you are using.
  • Page 37: Interface Capabilities

    Programming over GPIB Interface Capabilities Interface Capabilities The interface capabilities of the oscilloscope, as defined by IEEE 488.1, are SH1, AH1, T5, L4, SR1, RL1, PP0, DC1, DT1, C0, and E2. Command and Data Concepts The interface has two modes of operation: •...
  • Page 38: Addressing

    Programming over GPIB Addressing Addressing To set up the GPIB interface (optional Agilent N2757A GPIB Interface Module must be connected to the oscilloscope), refer to the “To set up the I/O port to use a controller” topic in the Utilities chapter of the User’s Guide. •...
  • Page 39: Communicating Over The Bus

    Programming over GPIB Communicating Over the Bus Communicating Over the Bus Because GPIB can address multiple devices through the same interface card, the device address passed with the program message must include not only the correct interface select code, but also the correct instrument address. Interface Select Code (Selects Interface) Each interface card has a unique interface select code.
  • Page 40: Lockout

    Programming over GPIB Lockout Lockout With GPIB, the instrument is placed in the lockout mode by sending the local lockout command (LLO). The instrument can be returned to local by sending the go-to-local (GTL) command to the instrument. Bus Commands The following commands are IEEE 488.1 bus commands (ATN true).
  • Page 41: Programming Over Rs-232-C

    Programming over RS-232-C...
  • Page 42 Programming over RS-232-C This section describes the interface functions and some general concepts of the RS-232-C interface. The RS-232-C interface on this instrument is Hewlett-Packard’s implementation of EIA Recommended Standard RS-232-C, Interface Between Data Terminal Equipment and Data Communications Equipment Employing Serial Binary Data Interchange. With this interface, data is sent one bit at a time and characters are not synchronized with preceding or subsequent data characters.
  • Page 43: Interface Operation

    Programming over RS-232-C Interface Operation Interface Operation The oscilloscope can be programmed with a controller over RS-232-C using either a minimum three-wire or extended hardwire interface. The operation and exact connections for these interfaces are described in more detail in subsequent sections of this chapter.
  • Page 44: Minimum Three-Wire Interface With Software Protocol

    Programming over RS-232-C Minimum Three-Wire Interface with Software Protocol Minimum Three-Wire Interface with Software Protocol With a three-wire interface, the software (as compared to interface hardware) controls the data flow between the oscilloscope and the controller. This provides a much simpler connection between devices because you can ignore hardware handshake requirements.
  • Page 45: Extended Interface With Hardware Handshake

    Programming over RS-232-C Extended Interface with Hardware Handshake Extended Interface with Hardware Handshake With the extended interface, both the software and the hardware can control the data flow between the oscilloscope and the controller. This allows you to have more control of data flow between devices. The oscilloscope uses the following connections on its RS-232-C interface for extended interface communication (on a 25-pin connector): •...
  • Page 46: Configuring The Interface

    Programming over RS-232-C Configuring the Interface The TD (Transmit Data) line from the oscilloscope must connect to the RD (Receive Data) line on the controller. Likewise, the RD line from the oscilloscope must connect to the TD line on the controller. The RTS (Request To Send) line is an output from the oscilloscope which can be used to control incoming data flow.
  • Page 47: Interface Capabilities

    Programming over RS-232-C Interface Capabilities Interface Capabilities The baud rate, stop bits, parity, handshake protocol, and data bits must be configured exactly the same for both the controller and the oscilloscope to properly communicate over the RS-232-C bus. The oscilloscope’s RS-232-C interface capabilities are as follows: •...
  • Page 48: Lockout Command

    Programming over RS-232-C Lockout Command Lockout Command To lockout the front panel controls use the system command LOCK. When this function is on, all controls (except the power switch) are entirely locked out. Local control can only be restored by sending the command :SYSTEM:LOCK OFF.
  • Page 49: Programming And Documentation Conventions

    Programming and Documentation Conventions...
  • Page 50 Programming and Documentation Conventions This chapter covers conventions used in programming the instrument, as well as conventions used in the online Programmer’s Reference and the remainder of this manual. This chapter also contains a detailed description of the command tree and command tree traversal.
  • Page 51: Command Set Organization

    Programming and Documentation Conventions Command Set Organization Command Set Organization The command set is divided into common commands, root level commands and sets of subsystem commands. Each of the groups of commands is described in the Programmer’s Reference, which is supplied as an online help file for Microsoft Windows.
  • Page 52 Programming and Documentation Conventions Command Set Organization Table 5-1 Alphabetic Command Reference Command Subsystem Where used Command Subsystem Where used Command Subsystem Where used DEVice HARDcopy LABel CHANnel<n> ACKNowledge TRIGger:CAN DIGitize Root level LABel DIGital ACTivity CHANnel<n> DISPlay CHANnel<n> LABel DISPLay ACTivity Root level...
  • Page 53 Programming and Documentation Conventions Command Set Organization Command Subsystem Where used Command Subsystem Where used Command Subsystem Where used *PMC Common SHOW MEASure TYPE ACQuire PMODe CHANnel<n> SIGNal TRIGger:CAN TYPE WAVeform POINts ACQuire SIGnal TRIGger:LIN TYPE TRIGger:IIC:TRIGger POINts WAVeform SINGle Root level POLarity TRIGger:TV...
  • Page 54: The Command Tree

    Programming and Documentation Conventions The Command Tree The Command Tree The command tree shows all of the commands and the relationships of the commands to each other. The IEEE 488.2 common commands are not listed as part of the command tree because they do not affect the position of the parser within the tree.
  • Page 55 Programming and Documentation Conventions The Command Tree Ã…‚‚‡ 68Uv‰v‡’ T`TUr€) 68Rˆv…r) 86Gvi…h‡r) 8C6Iry13) 9DBv‡hy13) @YUr…hy) 9DTQyh’) 6VU‚†phyr 96U@ 8PHQyr‡r 96U@ 7XGv€v‡ 9DTQyh’ 8G@h… 7XGv€v‡ 7G6Ix 8PVI‡ G67ry 8PVQyvt G67ry 96U6 DHQrqhpr 89DTƒyh’ @SS‚… HP9@ TXDUpu 9DTQyh’ QPTv‡v‚ G67ry QSP7r 9DBv‡v“r GP8F QPDI‡†...
  • Page 56 Programming and Documentation Conventions The Command Tree Subsystem Commands Subsystem commands are grouped together under a common node of the command tree, such as the TIMEBASE commands. Only one subsystem may be selected at any given time. When the instrument is initially turned on, the command parser is set to the root of the command tree, therefore, no subsystem is selected.
  • Page 57 Programming and Documentation Conventions The Command Tree Example 2: OUTPUT 707;":TIMEBASE:REFERENCE CENTER ; DELAY 0.00001" OUTPUT 707;":TIMEBASE:REFERENCE CENTER" OUTPUT 707;":TIMEBASE:DELAY 0.00001" OUTPUT 707;":TIMEBASE:REFERENCE CENTER; :TIMEBASE:DELAY 0.00001" In the first line of example 2, the subsystem selector is implied for the DELAY command in the compound command.
  • Page 58: Obsolete And Discontinued Commands

    Programming and Documentation Conventions Obsolete and Discontinued Commands Obsolete and Discontinued Commands Core Commands Core commands are a common set of commands that provide basic oscilloscope functionality on this oscilloscope and future Agilent 54600-series oscilloscopes. Core commands are unlikely to modified in the future. If you restrict your programs to core commands, the programs should work across product offerings in the future, assuming appropriate programming methods are employed.
  • Page 59 Programming and Documentation Conventions Obsolete and Discontinued Commands Obsolete Commands Obsolete commands are older forms of commands that are provided to reduce customer rework for existing systems and programs. Generally, these commands are mapped onto some of the Core and Non-core commands, but may not strictly have the same behavior as the new command.
  • Page 60 Programming and Documentation Conventions Obsolete and Discontinued Commands Obsolete Command Current Command Equivalent Behavior Differences FUNCtion:VIEW FUNCtion:DISPlay HARDcopy:DEVice HARDcopy:FORMat PLOTter, THINkjet not supported; TIF, BMP, CSV, SEIko added MEASure:LOWer MEASure:DEFine:THResholds MEASure:DEFine:THResholds can define absolute values or percentage from 1% to 99% for lower, middle, and upper thresholds on analog channels.
  • Page 61 Programming and Documentation Conventions Obsolete and Discontinued Commands Discontinued Commands Discontinued commands are commands that were used by previous oscilloscopes, but are not supported by the 54620/40-series oscilloscopes. Listed below are the Discontinued commands and the nearest equivalent command available (if any). Discontinued Commands Discontinued Command Current Command Equivalent...
  • Page 62 Programming and Documentation Conventions Obsolete and Discontinued Commands Discontinued Parameters Some previous oscilloscope queries returned control setting values of OFF and ON. The 54620/40-series oscilloscopes only return the enumerated values 0 (for off) and 1 (for on). 5-14...
  • Page 63: Truncation Rules

    Programming and Documentation Conventions Truncation Rules Truncation Rules The truncation rule for the mnemonics used in headers and alpha arguments is: The mnemonic 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.
  • Page 64: Infinity Representation

    Programming and Documentation Conventions Infinity Representation Infinity Representation The representation of infinity is 9.9E+37. This is also the value returned when a measurement cannot be made. Sequential and Overlapped Commands IEEE 488.2 distinguishes between sequential and overlapped commands. Sequential commands finish their task before the execution of the next command starts.
  • Page 65: Notation Conventions And Definitions

    Programming and Documentation Conventions Notation Conventions and Definitions Notation Conventions and Definitions The following conventions and definitions are used in this manual and the online Programmer’s Reference in descriptions of remote operation: Conventions < > Angle brackets enclose words or characters that symbolize a program code parameter or an interface command.
  • Page 66: Program Examples

    Programming and Documentation Conventions Program Examples Program Examples The BASIC program examples given for commands in the online Programmer’s Reference were written using the HPBASIC 6.3 programming language. The programs always assume the oscilloscope is at address 7 and the interface is at address 7 for a program address of 707.
  • Page 67: Status Reporting

    Status Reporting...
  • Page 68 Status Reporting Figure 6-1 is an overview of the oscilloscope’s status reporting structure. The status reporting structure allows monitoring specified events in the oscilloscope. The ability to monitor and report these events allows determination of such things as the status of an operation, the availability and reliability of the measured data, and more.
  • Page 69 Status Reporting Figure 6-1 Status Reporting Overview Block Diagram The status reporting structure consists of the registers in figure 6-1.
  • Page 70 Status Reporting Table 6-1 is a list of the bit definitions for the bit in the status reporting data structure. Table 6-1 Status Reporting Bit Definition Description Indicates Power On Power is turned on. User Request Whether a front-panel key has been pressed. Command Error Whether the parser detected an error.
  • Page 71: Status Reporting Data Structures

    Status Reporting Status Reporting Data Structures Status Reporting Data Structures Figure 6-2 brings together the different status reporting data structures mentioned in this chapter and shows how they work together. To make it possible for any of the Standard Event Status Register bits to generate a summary bit, the bits must be enabled.
  • Page 72 Status Reporting Status Reporting Data Structures Figure 6-2 T‡hqh…qÃ@‰r‡ÃT‡h‡ˆ†ÃSrtv†‡r…Ãà SrhqÃi’Ã@TS4 & É Q‚r…ÃP É V†r…ÃSr„ˆr†‡ 8‚€€hqÃ@……‚… É É @‘rpˆ‡v‚Ã@……‚… y à 9r‰vprÃ9rƒrqr‡Ã@……‚… É " ‚ É Rˆr…’Ã@……‚… U…vttr… É É Pƒr…h‡v‚Ã8‚€ƒyr‡r &ÃÃÃÃÃ%ÃÃÃÃ$ÃÃÃÃÃ#ÃÃÃÃÃ"ÃÃÃÃ!ÃÃÃÃà ÃÃÃà T‡hqh…qÃ@‰r‡ÃT‡h‡ˆ†Ã@hiyrÃSrtv†‡r… Tr‡Ãi’Ã@T@à Tr…‰vprà SrhqÃi’Ã@T@4 Sr„ˆr†‡ Brr…h‡v‚ RˆrˆrÃI‚‡Ã@€ƒ‡’ Pˆ‡ƒˆ‡ÃRˆrˆr SrhqÃi’ÃTr…vhyÃQ‚yy (6% 0$9...
  • Page 73 Status Reporting Status Reporting Data Structures Figure 6-2 (continued) &KDQ &KDQ &KDQ &KDQ PWGS4 P‰r…y‚hqÃ@‰r‡ 7ULJ Srtv†‡r… P‰r…y‚hqÃ@‰r‡ PWG4 @hiyrÃSrtv†‡r… 6@S4 SˆÃiv‡Ã†r‡Ãvsà †p‚ƒrÁ‚‡Ã†‡‚ƒƒrq Pƒr…h‡v‚ :DLW 29/5 PQ@S4 7ULJ T‡h‡ˆ† Srtv†‡r… Pƒr…h‡v‚ PQ@@ T‡h‡ˆ†Ã@hiyr PQ@@4 Srtv†‡r… &0( 4<( 23& @TS4 T‡hqh…qÃ@‰r‡ T‡h‡ˆ†ÃSrtv†‡r…...
  • Page 74: Status Byte Register (Sbr)

    Status Reporting Status Byte Register (SBR) Status Byte Register (SBR) 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 Status Byte Register is a live register. That is, its summary bits are set and cleared by the presence and absence of a summary bit from other event registers or queues.
  • Page 75 Status Reporting Status Byte Register (SBR) Example The following example uses the *STB? query to read the contents of the oscilloscopes Status Byte Register. OUTPUT 707;"*STB?" !Query the Status Byte Register ENTER 707;Result !Place result in a numeric variable PRINT Result !Print the result The next program prints 112 and clears bit 6 (RQS) of the Status Byte Register.
  • Page 76: Service Request Enable Register (Srer)

    Status Reporting Service Request Enable Register (SRER) Service Request Enable Register (SRER) Setting the Service Request Enable Register bits enable corresponding bits in the Status Byte Register. These enabled bits can then set RQS and MSS (bit 6) in the Status Byte Register. 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.
  • Page 77: Standard Event Status Register (Sesr)

    Status Reporting Standard Event Status Register (SESR) Standard Event Status Register (SESR) The Standard Event Status Register (SESR) monitors the following oscilloscope status events: • PON - Power On • URQ - User Request • CME - Command Error • EXE - Execution Error •...
  • Page 78: Standard Event Status Enable Register (Seser)

    Status Reporting Standard Event Status Enable Register (SESER) Standard Event Status Enable Register (SESER) To allow any of the Standard Event Status Register (SESR) bits to generate a summary bit, you must first enable that bit. Enable the bit by using the *ESE (Event Status Enable) common command to set the corresponding bit in the Standard Event Status Enable Register (SESER).
  • Page 79: Operation Status Register (Opr)

    Status Reporting Operation Status Register (OPR) Operation Status Register (OPR) This register hosts the RUN bit (bit 3), the WAIT TRIG bit (bit 5), and the OVLR bit (bit 11). • The RUN bit is set whenever the instrument is not stopped. •...
  • Page 80: Error Queue

    Status Reporting Error Queue Error Queue As errors are detected, they are placed in an error queue. This queue is first in, first out. If the error queue overflows, the last error in the queue is replaced with error 350, Queue overflow. Any time the queue overflows, the least recent errors remain in the queue, and the most recent error is discarded.
  • Page 81: Output Queue

    Status Reporting Output Queue Output Queue The output queue stores the oscilloscope-to-controller responses that are generated by certain 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.
  • Page 82 Status Reporting Clearing Registers and Queues Figure 6-3 Status Reporting Decision Chart 6-16...
  • Page 83: Installing And Using The Programmer's Reference

    Installing and Using the Programmer’s Reference...
  • Page 84 Installing and Using the Programmer’s Reference The Programmer’s Reference is supplied as an online help file readable with the Microsoft Windows help viewer. Sample programs for the oscilloscopes are included in the Examples subdirectory. This chapter explains how to install the help file on your system, discusses the text and program files, and explains how you can get the programs and help file via the Internet.
  • Page 85: To Install The Help File Under Microsoft Windows

    Installing and Using the Programmer’s Reference To install the help file under Microsoft Windows To install the help file under Microsoft Windows The Programmer’s Reference help file requires Microsoft Windows 95/98/NT or greater running on an IBM-compatible PC. The file uses the Microsoft Windows help viewer, WINHELP.EXE.
  • Page 86: To Get Updated Help And Program Files Via The Internet

    Installing and Using the Programmer’s Reference To get updated help and program files via the Internet To get updated help and program files via the Internet The latest versions of the help and example program files are available via the internet.
  • Page 87: To Start The Help File

    Installing and Using the Programmer’s Reference To start the help file To start the help file To open the help file under Microsoft Windows, double-click the Programmer’s Reference icon in the Programmer’s Reference program group in the Program Manager. The help file requires the program WINHELP.EXE for Microsoft Windows 95/98/NT or greater.
  • Page 89: Programmer's Quick Reference

    Programmer’s Quick Reference...
  • Page 90 Introduction The Programmer’s Quick Reference provides the commands and queries with their corresponding arguments and returned formats for the oscilloscopes. The arguments for each command list the minimum argument required. The part of the command or query listed in uppercase letters refers to the short form of that command or query. The long form is the combination of the uppercase and lowercase letters.
  • Page 91: Conventions

    Programmer’s Quick Reference Conventions Conventions The following conventions used in this guide include: < > Indicates that words or characters enclosed in angular brackets symbolize a program code parameter or an GPIB command. ::= "is defined as." <A>::= <B> indicates that <A> can be replaced by <B> in any statement containing <A>.
  • Page 92: Commands And Queries

    Programmer’s Quick Reference Commands and Queries Commands and Queries The following tables facilitate easy access to each command and query for the oscilloscopes. The commands and queries are divided into separate categories with each entry alphabetized. The arguments for each command list the minimum argument required. The part of the command or query listed in uppercase letters refers to the short form of that command or query.
  • Page 93 Programmer’s Quick Reference Commands and Queries Command Query Options and Query Returns :CHANnel<n>:IMPedence :CHANnel<n>:IMPedence? <impedence> ::= {ONEMeg} for 54620-series <impedence> <impedence> ::= {ONEMeg | FIFTy} for 54640-series <n> ::= 1-2 or 1-4 in NR1 format :CHANnel<n>:INVert :CHANnel<n>:INVert? {0 | 1} {{0 | OFF} | {1 | ON}} <n>...
  • Page 94 Programmer’s Quick Reference Commands and Queries Command Query Options and Query Returns :DISPlay:DATA [format][,][area] :DISPlay:DATA? [format][,][area] <format> ::= {TIFF} (command only) <display data> <area> ::= {GRATicule} (command only) <format> ::= {TIFF | BMP} (query only) <area> ::= {GRATicule | SCReen} (query only) <display data>...
  • Page 95 Programmer’s Quick Reference Commands and Queries :FUNCtion:RANGe <range> :FUNCtion:RANGe? <range> ::= the full-scale vertical axis value in NR3 format. The range for ADD, SUBT, MULT is 8E-6 to 800E+3. The range for the INTegrate function is 8E-9 to 400E+3. The range for the DIFFerentiate function is 80E-3 to 8.0E12 (depends on current sweep speed).
  • Page 96 Programmer’s Quick Reference Commands and Queries Command Query Options and Query Returns :MARker:XDELta? <return_value> ::= X cursors delta value in NR3 format :MARKer:Y1Position :MARKer:Y1Position? <positon> ::= Y1 cursor position value in NR3 format <positon>[suffix] [suffix] ::= {V | mV | dB} <return_value>...
  • Page 97 Programmer’s Quick Reference Commands and Queries Command Query Options and Query Returns :MEASure:PERiod [<source>] :MEASure:PERiod? [<source>] <source> ::= {CHANnel<n> | FUNCtion | MATH} for 546xxA <source> ::= {CHANnel<n> | DIGital0,...,DIGital15 | FUNCtion | MATH} for 546xxD <n> ::= 1-2 or 1-4 in NR1 format <return_value>...
  • Page 98 Programmer’s Quick Reference Commands and Queries Command Query Options and Query Returns :MEASure:VBASe [<source>] :MEASure:VBASe? [<source>] <source> ::= {CHANnel<n> | FUNCtion | MATH} <n> ::= 1-2 or 1-4 in NR1 format <base_voltage> ::= voltage at the base of the selected waveform in NR3 format :MEASure:VMAX [<source>] :MEASure:VMAX? [<source>]...
  • Page 99 Programmer’s Quick Reference Commands and Queries Command Query Options and Query Returns OVLenable <mask> OVLenable? <mask> ::= 8-bit integer in NR1 format as shown, 54640-series only: Bit Weight Input External Trigger Channel 4 Channel 3 Channel 2 Channel 1 OVLRegister? <value>...
  • Page 100 Programmer’s Quick Reference Commands and Queries Command Query Options and Query Returns *STB? <value> ::= 0 to 255; an integer in NR1 format, as shown in the following: Bit Weight Name Condition OPER 0 = no enabled operations status conditions occurred 1 = an enabled operation status condition occurred RQS/MS 0 = instrument has no reason for service...
  • Page 101 Programmer’s Quick Reference Commands and Queries Command Query Options and Query Returns :TIMebase:RANGe <range_value> :TIMebase:RANGe? <range_value> ::= 50 ns through 500 s in NR3 format for 54620- series <range_value> ::= 10 ns through 500 s in NR3 format for 54640- series :TIMebase:REFerence :TIMebase:REFerence?
  • Page 102 Programmer’s Quick Reference Commands and Queries Command Query Options and Query Returns :TRIGGER:DURation:LESSthan :TRIGger:DURation:LESSthan? <less than time> ::= floating-point number from 5 ns to 10seconds <less than time> [suffix] in NR3 format [suffix] ::= {s | ms | us | ns | ps} :TRIGger:DURation:PATTern :TRIGger:DURation:PATTern? <value>...
  • Page 103 Programmer’s Quick Reference Commands and Queries Command Query Options and Query Returns :TRIGger:GLITch:RANGe :TRIGger:GLITch:RANGe? <greater than time> ::= start time from 10 ns to 9.99 seconds in <greater than time> [suffix], NR3 format <less than time> [suffix] <less than time> ::= stop time from 15 ns to 10 seconds in NR3 format [suffix] ::= {s | ms | us | ns | ps} :TRIGger:GLITch:SOURce <source>...
  • Page 104 Programmer’s Quick Reference Commands and Queries Command Query Options and Query Returns :TRIGger:SEQuence:EDGE{1 | 2} :TRIGger:SEQuence:EDGE{1 | 2}? <source> ::= {CHANnel<n> | EXTernal} for the 546xxA <source>, <slope> <source> ::= {CHANnel<n> | DIGital0,...,DIGital15} for the 546xxD <slope> ::= {POSitive | NEGative} <n>...
  • Page 105 Programmer’s Quick Reference Commands and Queries Command Query Options and Query Returns :TRIGger:TV:STANdard <standard> :TRIGger:TV:STANdard? <standard> ::= {GENeric | NTSc | PAL | PALM | SECam} :TRIGger:TV:TVMODE <mode> :TRIGger:TV:TVMODE? <mode> ::= {Field<n> | ALLFields | LINE | ALLLines | LINEField<n> | LINEAlt | LINEVert} <n>...
  • Page 106 Programmer’s Quick Reference Commands and Queries Command Query Options and Query Returns :WAVeform:UNSigned :WAVeform:UNSigned? {0 | 1} {{0 | OFF} | {1 | ON}} :WAVeform:VIEW <view> :WAVeform:VIEW? <view> ::= {MAIN} :WAVeform:XINCrement? <return_value> ::= x-increment in the current preamble in NR3 format :WAVeform:XORigin? <return_value>...
  • Page 107 Index Analyzing Data iii Enabling Events 6-2 Local Lockout 3-6, 4-8 Arm event Register (ARM) 6-13 ENTER Command 1-9, 2-9 Lockout 3-6, 4-8 AUToscale Command 2-4 Error Queue 6-14 LTEST 6-13 ESB 6-10, 6-12 Events Clearing 6-2 Basic Operations 1-2 MASK 6-13 Enabling 6-2 Baud Rate 4-6...
  • Page 108 Index Registers Tree Traversal Rules 5-8 Clearing 6-15 Trigger Event Register (TRG) 6-10 Response Generation 5-16 Truncation Rules 5-15 Root Level Commands 5-6 RQC 6-11 RS232 Interface 4-2 URQ 6-11 Cables 4-3 Capabilities 4-7 Configuration 4-6 WAIT TRIG 6-13 Extended Interface 4-5 White Space 1-5 Three-Wire Interface 4-4 XON/XOFF 4-7...
  • Page 109 (for volt- age reduction or mains isola- tion), the common terminal must be connected to the earth termi- nal of the power source. Agilent Technologies Inc. P.O. Box 2197 1900 Garden of the Gods Road Colorado Springs, CO 80901-2197, U.S.A.
  • Page 110 Trademark Acknowledgements WARNING Windows and MS Windows are Document Warranty U.S. registered trademarks of Microsoft Corporation. © Agilent Technologies, Inc. A WARNING notice The material contained in 2000-2002 denotes a hazard. It calls this document is provided No part of this manual may be attention to an operating “as is,”...

This manual is also suitable for:

54624a54622a54641a54621d54622d54641d ... Show all

Table of Contents