Programmer’s Guide Publication Number 54622-97038 September 2002 For Safety information see the pages behind the Index. © Copyright Agilent Technologi
1-4Introduction to ProgrammingProgram Message SyntaxProgram Message Syntax To program the instrument remotely, you must understand the command format
8-12Programmer’s Quick ReferenceCommands and Queriesn/a *STB? <value> ::= 0 to 255; an integer in NR1 format, as shown in thefollowing: Bit Wei
8-13Programmer’s Quick ReferenceCommands and Queries:TIMebase:RANGe <range_value> :TIMebase:RANGe? <range_value> ::= 50 ns through 500 s i
8-14Programmer’s Quick ReferenceCommands and Queries:TRIGGER:DURation:LESSthan<less than time> [suffix]:TRIGger:DURation:LESSthan? <less than
8-15Programmer’s Quick ReferenceCommands and Queries:TRIGger:GLITch:RANGe<greater than time> [suffix],<less than time> [suffix]:TRIGger:GL
8-16Programmer’s Quick ReferenceCommands and Queries:TRIGger:SEQuence:EDGE{1 | 2}<source>, <slope>:TRIGger:SEQuence:EDGE{1 | 2}? <sourc
8-17Programmer’s Quick ReferenceCommands and Queries:TRIGger:TV:STANdard <standard> :TRIGger:TV:STANdard? <standard> ::= {GENeric | NTSc |
8-18Programmer’s Quick ReferenceCommands and Queries:WAVeform:UNSigned {{0 | OFF} | {1 | ON}}:WAVeform:UNSigned? {0 | 1}:WAVeform:VIEW <view> :W
IndexIndex-1AAnalyzing Data iiiArm event Register (ARM) 6-13AUToscale Command 2-4BBasic Operations 1-2Baud Rate 4-6Block Response Data 2-12Bus Command
IndexIndex-2RRegistersClearing 6-15Response Generation 5-16Root Level Commands 5-6RQC 6-11RS232 Interface 4-2Cables 4-3Capabilities 4-7Configuration 4
Agilent Technologies Inc.P.O. Box 21971900 Garden of the Gods RoadColorado Springs, CO 80901-2197, U.S.A.Safety NoticesThis apparatus has been designe
1-5Introduction to ProgrammingProgram Message SyntaxInstructions Instructions (both commands and queries) normally appear as a string embedded in a st
Notices© Agilent Technologies, Inc. 2000-2002No part of this manual may be reproduced in any form or by any means (including electronic storage and re
1-6Introduction to ProgrammingProgram Message SyntaxHeader Types There are three types of headers: • Simple Command headers • Compound Command headers
1-7Introduction to ProgrammingCombining Commands from the Same SubsystemCombining Commands from the Same Subsystem To execute more than one function w
1-8Introduction to ProgrammingDuplicate MnemonicsDuplicate Mnemonics Identical function mnemonics can be used in more than one subsystem. For example,
1-9Introduction to ProgrammingQuery CommandQuery Command Command headers immediately followed by a question mark (?) are queries. After receiving a qu
1-10Introduction to ProgrammingProgram Header OptionsProgram Header Options You can send program headers using any combination of uppercase or lowerca
1-11Introduction to ProgrammingProgram Data Syntax RulesProgram Data Syntax Rules Prog ram data is used to convey a par am eter information related t
1-12Introduction to ProgrammingProgram Data Syntax RulesAll numbers must be strings of ASCII characters. Thus, when sending the number 9, you would se
1-13Introduction to ProgrammingProgram Message TerminatorProgram Message Terminator The program instructions within a data message are executed after
iiProgramming the Oscilloscope When you attach an interface module to the rear of the oscilloscope, it becomes programmable. That is, you can hook a c
1-14Introduction to ProgrammingSelecting Multiple SubsystemsSelecting Multiple Subsystems You can send multiple program commands and program queries f
2 Programming Getting Started
2-2Programming Getting Started This chapter explains how to set up the instrument, how to retrieve setup information and measurement results, how to d
2-3Programming Getting StartedInitializationInitialization To make sure the bus and all appropriate interfaces are in a known state, begin every progr
2-4Programming Getting StartedAutoscaleAutoscale The AUTOSCALE feature performs a very useful function for unknown waveforms by setting up the vertica
2-5Programming Getting StartedSetting Up the InstrumentSetting Up the Instrument A typical oscilloscope setup would set the vertical range and offset
2-6Programming Getting StartedExample ProgramExample Program This program demonstrates the basic command structure used to program the oscilloscope. 1
2-7Programming Getting StartedUsing the DIGitize CommandUsing the DIGitize Command The DIGitize command is a macro that captures data satisfying the s
2-8Programming Getting StartedUsing the DIGitize CommandThe following program example shows a typical setup: OUTPUT 707;":ACQUIRE:TYPE AVERAGE&qu
2-9Programming Getting StartedReceiving Information from the InstrumentReceiving Information from the Instrument After receiving a query (command head
iiiCapture Once you initialize the oscilloscope, you can begin capturing data for analysis. Remember that while the oscilloscope is responding to comm
2-10Programming Getting StartedString VariablesString Variables The output of the instrument may be numeric or character data depending on what is que
2-11Programming Getting StartedNumeric VariablesNumeric Variables The following example shows the data being returned to a numeric variable: 10 OUTPUT
2-12Programming Getting StartedDefinite-Length Block Response DataDefinite-Length Block Response Data Definite-length block response data allows any t
2-13Programming Getting StartedMultiple QueriesMultiple Queries You can send multiple queries to the instrument within a single program message, but y
3 Programming over GPIB
3-2Programming over GPIB This section describes the GPIB interface functions and some general concepts. In general, these functions are defined by IEE
3-3Programming over GPIBInterface CapabilitiesInterface Capabilities The interface capabilities of the oscilloscope, as defined by IEEE 488.1, are SH1
3-4Programming over GPIBAddressingAddressing To set up the GPIB interface (optional Agilent N2757A GPIB Interface Module must be connected to the osci
3-5Programming over GPIBCommunicating Over the BusCommunicating Over the Bus Because GPIB can address multiple devices through the same interface card
ivIn This Book This Programmer’s Guide is your introduction to programming the oscilloscope using an instrument controller. This book, with the Progra
3-6Programming over GPIBLockoutLockoutWith GPIB, the instrument is placed in the lockout mode by sending the local lockout command (LLO). The instrume
4 Programming over RS-232-C
4-2Programming over RS-232-C This section describes the interface functions and some general concepts of the RS-232-C interface. The RS-232-C interfac
4-3Programming over RS-232-CInterface OperationInterface Operation The oscilloscope can be programmed with a controller over RS-232-C using either a m
4-4Programming over RS-232-CMinimum Three-Wire Interface with Software ProtocolMinimum Three-Wire Interface with Software Protocol With a three-wire i
4-5Programming over RS-232-CExtended Interface with Hardware HandshakeExtended Interface with Hardware Handshake With the extended interface, both the
4-6Programming over RS-232-CConfiguring the InterfaceThe TD (Transmit Data) line from the oscilloscope must connect to the RD (Receive Data) line on t
4-7Programming over RS-232-CInterface CapabilitiesInterface Capabilities The baud rate, stop bits, parity, handshake protocol, and data bits must be c
4-8Programming over RS-232-CLockout CommandLockout CommandTo lockout the front panel controls use the system command LOCK. When this function is on, a
5 Programming and Documentation Conventions
ContentsContents-11 Introduction to ProgrammingTalking to the Instrument 1-3Program Message Syntax 1-4Combining Commands from the Same Subsystem 1-
5-2Programming and Documentation Conventions This chapter covers conventions used in programming the instrument, as well as conventions used in the on
5-3Programming and Documentation ConventionsCommand Set OrganizationCommand Set Organization The command set is divided into common commands, root lev
5-4Programming and Documentation ConventionsCommand Set OrganizationTable 5-1Alphabetic Command Reference Command Subsystem Where usedACKNowledge TRIG
5-5Programming and Documentation ConventionsCommand Set Organization*PMC CommonPMODe CHANnel<n>POINts ACQuirePOINts WAVeformPOLarity TRIGger:TVP
5-6Programming and Documentation ConventionsThe Command TreeThe Command Tree The command tree shows all of the commands and the relationships of the c
5-7Programming and Documentation ConventionsThe Command Tree
5-8Programming and Documentation ConventionsThe Command TreeSubsystem Commands Subsystem commands are grouped together under a common node of the comm
5-9Programming and Documentation ConventionsThe Command TreeExample 2: OUTPUT 707;":TIMEBASE:REFERENCE CENTER ; DELAY 0.00001" or OUTPUT 707
5-10Programming and Documentation ConventionsObsolete and Discontinued CommandsObsolete and Discontinued CommandsCore CommandsCore commands are a comm
5-11Programming and Documentation ConventionsObsolete and Discontinued CommandsObsolete CommandsObsolete commands are older forms of commands that are
ContentsContents-25 Programming and Documentation ConventionsCommand Set Organization 5-3The Command Tree 5-6Obsolete and Discontinued Commands 5-10
5-12Programming and Documentation ConventionsObsolete and Discontinued CommandsFUNCtion:VIEW FUNCtion:DISPlayHARDcopy:DEVice HARDcopy:FORMat PLOTter,
5-13Programming and Documentation ConventionsObsolete and Discontinued CommandsDiscontinued CommandsDiscontinued commands are commands that were used
5-14Programming and Documentation ConventionsObsolete and Discontinued CommandsDiscontinued ParametersSome previous oscilloscope queries returned cont
5-15Programming and Documentation ConventionsTruncation RulesTruncation Rules The truncation rule for the mnemonics used in headers and alpha argument
5-16Programming and Documentation ConventionsInfinity RepresentationInfinity Representation The representation of infinity is 9.9E+37. This is also th
5-17Programming and Documentation ConventionsNotation Conventions and DefinitionsNotation Conventions and Definitions The following conventions and de
5-18Programming and Documentation ConventionsProgram ExamplesProgram Examples The BASIC program examples given for commands in the online Programmer’s
6 Status Reporting
6-2Status Reporting Figure 6-1 is an overview of the oscilloscope’s status reporting structure. The status reporting structure allows monitoring spec
6-3Status ReportingFigure 6-1Status Reporting Overview Block DiagramThe status reporting structure consists of the registers in figure 6-1.
1 Introduction to Programming
6-4Status ReportingTable 6-1 is a list of the bit definitions for the bit in the status reporting data structure. Table 6-1Status Reporting Bit Defini
6-5Status ReportingStatus Reporting Data StructuresStatus Reporting Data Structures Figure 6-2 brings together the different status reporting data str
6-6Status ReportingStatus Reporting Data StructuresFigure 6-2Status Reporting Data Structures
6-7Status ReportingStatus Reporting Data StructuresFigure 6-2 (continued)Status Reporting Data Structures
6-8Status ReportingStatus Byte Register (SBR)Status Byte Register (SBR) The Status Byte Register is the summary-level register in the status reporting
6-9Status ReportingStatus Byte Register (SBR)Example The following example uses the *STB? query to read the contents of the oscilloscopes Status Byte
6-10Status ReportingService Request Enable Register (SRER)Service Request Enable Register (SRER) Setting the Service Request Enable Register bits enab
6-11Status ReportingStandard Event Status Register (SESR)Standard Event Status Register (SESR) The Standard Event Status Register (SESR) monitors the
6-12Status ReportingStandard Event Status Enable Register (SESER)Standard Event Status Enable Register (SESER) To allow any of the Standard Event Stat
6-13Status ReportingOperation Status Register (OPR)Operation Status Register (OPR) This register hosts the RUN bit (bit 3), the WAIT TRIG bit (bit 5),
1-2Introduction to Programming Chapters 1 and 2 introduce the basics for remote programming of an oscilloscope. The programming instructions in this m
6-14Status ReportingError QueueError Queue As errors are detected, they are placed in an error queue. This queue is first in, first out. If the error
6-15Status ReportingOutput QueueOutput Queue The output queue stores the oscilloscope-to-controller responses that are generated by certain instrument
6-16Status ReportingClearing Registers and QueuesFigure 6-3Status Reporting Decision Chart
7Installing and Using the Programmer’s Reference
7-2Installing and Using the Programmer’s Reference The Programmer’s Reference is supplied as an online help file readable with the Microsoft Windows h
7-3Installing and Using the Programmer’s ReferenceTo install the help file under Microsoft WindowsTo install the help file under Microsoft Windows The
7-4Installing and Using the Programmer’s ReferenceTo get updated help and program files via the InternetTo get updated help and program files via the
7-5Installing and Using the Programmer’s ReferenceTo start the help fileTo start the help file To open the help file under Microsoft Windows, double-c
7-6
8 Programmer’s Quick Reference
1-3Introduction to ProgrammingTalking to the InstrumentTalking to the Instrument Computers acting as controllers communicate with the instrument by se
8-2Introduction The Programmer’s Quick Reference provides the commands and queries with their corresponding arguments and returned formats for the osc
8-3Programmer’s Quick ReferenceConventionsConventions The following conventions used in this guide include: Suffix Multipliers The following suffix mu
8-4Programmer’s Quick ReferenceCommands and QueriesCommands and Queries The following tables facilitate easy access to each command and query for the
8-5Programmer’s Quick ReferenceCommands and Queries:CHANnel<n>:IMPedence <impedence>:CHANnel<n>:IMPedence? <impedence> ::= {ON
8-6Programmer’s Quick ReferenceCommands and Queries:DISPlay:DATA [format][,][area]<display data>:DISPlay:DATA? [format][,][area] <format>
8-7Programmer’s Quick ReferenceCommands and Queries:FUNCtion:RANGe <range> :FUNCtion:RANGe? <range> ::= the full-scale vertical axis value
8-8Programmer’s Quick ReferenceCommands and Queriesn/a :MARker:XDELta? <return_value> ::= X cursors delta value in NR3 format :MARKer:Y1Position
8-9Programmer’s Quick ReferenceCommands and Queries:MEASure:PERiod [<source>] :MEASure:PERiod? [<source>] <source> ::= {CHANnel<n
8-10Programmer’s Quick ReferenceCommands and Queries:MEASure:VBASe [<source>] :MEASure:VBASe? [<source>] <source> ::= {CHANnel<n&
8-11Programmer’s Quick ReferenceCommands and QueriesOVLenable <mask> OVLenable? <mask> ::= 8-bit integer in NR1 format as shown, 54640-se
Comments to this Manuals