Text preview for : HP 54825A_45A Programmer.pdf part of Agilent HP 54825A 45A Programmer Agilent HP 54825A_45A Programmer.pdf



Back to : HP 54825A_45A Programmer. | Home

Programmer's Reference


Publication Number 54810-97076
March 2002




This reference applies directly to software revision code A.04.20 and later.




For Safety information, Warranties, and Regulatory information,
see the pages at the end of this book.




Copyright Agilent Technologies 1997-2002
All Rights Reserved.




Infiniium Oscilloscopes
Programming Command Set




ii
iii
iv
v
In This Book




This book is your guide to programming the Infiniium-Series Oscilloscopes.
Chapters 1-5 give you an introduction to programming the oscilloscopes, along
with necessary conceptual information. These chapters describe basic program
communications, interface, syntax, data types, and status reporting.
Chapter 6 shows example BASIC and C programs, and describes chunks of one
program to show you some typical applications. The BASIC and C example
programs, and a "readme" file are also shipped on a disk with the oscilloscope.
Chapters 7-24 describe the commands used to program the Infiniium-Series
Oscilloscopes. Each chapter describes the set of commands that belong to an
individual subsystem, and explains the function of each command. These
chapters include:

Common HARDcopy
Root Level HISTogram
SYSTem MARKer
ACQuire MEASure
CALibration Mask TESt
CHANnel SELF-Test
DISK TIMe Base
DISPlay TRIGger
EXTernal Channel WAVeform
FUNCtion Waveform MEMory

Chapters 25 and 26 describe the language compatibility for 548xx,
Hewlett-Packard 547xx, and Hewlett-Packard 545xx Oscilloscopes. These
chapters also show you how to choose one of these command languages if you
want to use existing programs on Infiniium Oscilloscopes without having to
modify your programs.
Chapter 27 describes error messages.
Command syntax diagrams are in the Programmer's Quick Reference.
A Quick Start Guide, Online User's Guide, and Service Guide also ship with the
548xx oscilloscopes.




vii
viii
Contents


1 Introduction to Programming
Communicating with the Oscilloscope 1-3
Output Command 1-4
Device Address 1-4
Instructions 1-4
Instruction Header 1-4
White Space (Separator) 1-5
Braces 1-5
Ellipsis 1-5
Square Brackets 1-5
Program Data 1-5
Header Types 1-6
Duplicate Mnemonics 1-8
Query Headers 1-9
Program Header Options 1-10
Character Program Data 1-10
Numeric Program Data 1-11
Embedded Strings 1-12
Program Message Terminator 1-12
Common Commands within a Subsystem 1-13
Selecting Multiple Subsystems 1-13
Programming Getting Started 1-13
Initialization 1-14
Example Program using HP Basic 1-15
Using the DIGITIZE Command 1-16
Receiving Information from the Oscilloscope 1-18
String Variable Example 1-19
Numeric Variable Example 1-19
Definite-Length Block Response Data 1-20
Multiple Queries 1-21
Oscilloscope Status 1-21
2 LAN and GPIB Interfaces
LAN Interface Connector 2-3
GPIB Interface Connector 2-3
Default Startup Conditions 2-4
Interface Capabilities 2-5
GPIB Command and Data Concepts 2-6
Communicating Over the GPIB Interface 2-7
Communicating Over the LAN Interface 2-8
Bus Commands 2-9




Contents-1
Contents




3 Message Communication and System Functions
Protocols 3-3
4 Status Reporting
Status Reporting Data Structures 4-5
Status Byte Register 4-8
Service Request Enable Register 4-10
Message Event Register 4-10
Trigger Event Register 4-10
Standard Event Status Register 4-11
Standard Event Status Enable Register 4-12
Operation Status Register 4-13
Operation Status Enable Register 4-14
Mask Test Event Register 4-15
Mask Test Event Enable Register 4-16
Trigger Armed Event Register 4-17
Error Queue 4-17
Output Queue 4-17
Message Queue 4-18
Clearing Registers and Queues 4-18
5 Programming Conventions
Data Flow 5-3
Truncation Rule 5-5
The Command Tree 5-6
Infinity Representation 5-13
Sequential and Overlapped Commands 5-13
Response Generation 5-13
EOI 5-13
6 Sample Programs

Sample Program Structure 6-3
Sample C Programs 6-4

Listings of the Sample Programs 6-20
gpibdecl.h Sample Header 6-21
srqagi.c Sample Program 6-23
learnstr.c Sample Program 6-25
sicl_IO.c Sample Program 6-29
natl_IO.c Sample Program 6-33
init.bas Sample Program 6-38



Contents-2
Contents




srq.bas Sample Program 6-46
lrn_str.bas Sample Program 6-50
7 Common Commands
*CLS (Clear Status) 7-4
*ESE (Event Status Enable) 7-5
*ESR? (Event Status Register) 7-7
*IDN? (Identification Number) 7-9
*LRN? (Learn) 7-10
*OPC (Operation Complete) 7-12
*OPT? (Option) 7-13
*PSC (Power-on Status Clear) 7-14
*RCL (Recall) 7-15
*RST (Reset) 7-16
*SAV (Save) 7-17
*SRE (Service Request Enable) 7-18
*STB? (Status Byte) 7-20
*TRG (Trigger) 7-22
*TST? (Test) 7-23
*WAI (Wait) 7-24
8 Root Level Commands
AER? (Arm Event Register) 8-3
AUToscale 8-4
BLANk 8-5
CDISplay 8-6
DIGitize 8-7
MTEE 8-8
MTER? 8-9
MODel? 8-10
OPEE 8-11
OPER? 8-12
OVLEnable 8-13
OVLRegister? 8-14
PRINt 8-15
RECall:SETup 8-16
RUN 8-17
SERial (Serial Number) 8-18
SINGle 8-19
STOP 8-20
STORe:SETup 8-21
STORe:WAVeform 8-22




Contents-3
Contents




TER? (Trigger Event Register) 8-23
VIEW 8-24
9 System Commands
DATE 9-3
DEBug 9-4
DSP 9-6
ERRor? 9-7
HEADer 9-8
HELP:HEADers 9-10
LANGuage 9-12
LONGform 9-13
SETup 9-15
TIME 9-17
10 Acquire Commands
AllowMaxSR 10-3
AVERage 10-4
AVERage:COUNt 10-5
BWLimit 10-6
COMPlete 10-7
COMPlete:STATe 10-9
CONFig 10-10
INTerpolate 10-11
MODE 10-12
POINts 10-13
POINts:AUTO 10-15
SRATe (Sample RATe) 10-16
SRATe:AUTO 10-18
11 Calibration Commands
Oscilloscope Calibration 11-3
Probe Calibration 11-4

Calibration Commands 11-5
CANCel 11-6
CONTinue 11-7
MPRotect 11-8
OUTPut 11-9
SDONe? 11-10
SKEW 11-11
STARt 11-12



Contents-4
Contents




STATus? 11-13
12 Channel Commands
BWLimit 12-3
DISPlay 12-4
INPut 12-5
OFFSet 12-6
PROBe 12-7
PROBe:ATTenuation 12-9
PROBe:EADapter 12-10
PROBe:ECoupling 12-12
PROBe:EGAin 12-14
PROBe:EOFFset 12-15
PROBe:GAIN 12-16
PROBe:ID? 12-17
PROBe:SKEW 12-18
PROTection:CLEar 12-19
PROTection? 12-20
RANGe 12-21
SCALe 12-22
UNITs 12-23
13 Disk Commands
CDIRectory 13-3
DELete 13-4
DIRectory? 13-5
LOAD 13-6
MDIRectory 13-7
PWD? 13-8
SIMage 13-9
STORe 13-10
14 Display Commands
CGRade 14-3
CGRade:LEVels? 14-5
COLumn 14-7
CONNect 14-8
DATA? 14-9
DCOLor 14-10
GRATicule 14-11
LINE 14-13
PERSistence 14-14



Contents-5
Contents




ROW 14-15
SCOLor 14-16
SSAVer 14-19
STRing 14-20
TEXT 14-21
15 External Channel Commands
BWLimit 15-3
INPut 15-4
PROBe 15-5
PROBe:ATTenuation 15-6
PROBe:EADapter 15-7
PROBe:ECoupling 15-9
PROBe:EGAin 15-11
PROBe:EOFFset 15-12
PROBe:GAIN 15-13
PROBe:ID? 15-14
PROBe:SKEW 15-15
RANGe 15-16
UNITs 15-17
16 Function Commands
FUNCtion? 16-4
ADD 16-5
AVERage 16-6
DIFF (Differentiate) 16-7
DISPlay 16-8
DIVide 16-9
FFT:FREQuency 16-10
FFT:RESolution? 16-11
FFT:WINDow 16-12
FFTMagnitude 16-14
FFTPhase 16-15
HORizontal 16-16
HORizontal:POSition 16-17
HORizontal:RANGe 16-18
INTegrate 16-19
INVert 16-20
MAGNify 16-21
MAXimum 16-22
MEASurement 16-23
MINimum 16-25




Contents-6
Contents




MULTiply 16-26
OFFSet 16-27
RANGe 16-28
SUBTract 16-29
VERSus 16-30
VERTical 16-31
VERTical:OFFSet 16-32
VERTical:RANGe 16-33
17 Hardcopy Commands
AREA 17-3
DPRinter 17-4
FACTors 17-6
IMAGe 17-7
PRINters? 17-8
18 Histogram Commands
AXIS 18-4
MODE 18-5
SCALe:SIZE 18-6
WINDow:DEFault 18-7
WINDow:SOURce 18-8
WINDow:X1Position | LLIMit 18-9
WINDow:X2Position | RLIMit 18-10
WINDow:Y1Position | BLIMit 18-11
WINDow:Y2Position | TLIMit 18-12
19 Marker Commands
CURSor? 19-3
MEASurement:READout 19-4
MODE 19-5
TDELta? 19-6
TSTArt 19-7
TSTOp 19-9
VDELta? 19-11
VSTArt 19-12
VSTOp 19-14
X1Position 19-16
X2Position 19-17
X1Y1source 19-18
X2Y2source 19-19
XDELta? 19-20



Contents-7
Contents




Y1Position 19-21
Y2Position 19-22
YDELta? 19-23
20 Measure Commands
AREA 20-6
CGRade:CROSsing 20-7
CGRade:DCDistortion 20-8
CGRade:EHEight 20-9
CGRade:EWIDth 20-10
CGRade:JITTer 20-11
CGRade:QFACtor 20-12
CLEar 20-13
CTCJitter 20-14
DEFine 20-16
DELTatime 20-20
DUTYcycle 20-22
FALLtime 20-24
FFT:DFRequency 20-26
FFT:DMAGnitude 20-27
FFT:FREQuency 20-28
FFT:MAGNitude 20-29
FFT:PEAK1 20-30
FFT:PEAK2 20-31
FFT:THReshold 20-32
FREQuency 20-33
HISTogram:HITS 20-35
HISTogram:MEAN 20-37
HISTogram:MEDian 20-39
HISTogram:M1S 20-41
HISTogram:M2S 20-43
HISTogram:M3S 20-45
HISTogram:PEAK 20-47
HISTogram:PP 20-49
HISTogram:STDDev 20-51
JITTer:DIRection 20-53
JITTer:STATistics 20-55
NWIDth 20-57
OVERshoot 20-59
PERiod 20-61
PHASe 20-63
PREShoot 20-65
PWIDth 20-67



Contents-8
Contents




RESults? 20-69
RISetime 20-72
SCRatch 20-74
SENDvalid 20-75
SOURce 20-76
STATistics 20-77
TEDGe 20-78
TMAX 20-80
TMIN 20-82
TVOLt 20-83
VAMPlitude 20-85
VAVerage 20-87
VBASe 20-89
VLOWer 20-91
VMAX 20-92
VMIDdle 20-94
VMIN 20-95
VPP 20-97
VRMS 20-99
VTIMe 20-101
VTOP 20-102
VUPPer 20-104
21 Mask Test Commands
ALIGn 21-4
AlignFIT 21-5
AMASk:CREate 21-7
AMASk:SOURce 21-8
AMASk:SAVE | STORe 21-9
AMASk:UNITs 21-10
AMASk:XDELta 21-11
AMASk:YDELta 21-13
AUTO 21-15
AVERage 21-16
AVERage:COUNt 21-17
COUNt:FAILures? 21-18
COUNt:FWAVeforms? 21-19
COUNt:WAVeforms? 21-20
DELete 21-21
ENABle 21-22
HAMPlitude 21-23
IMPedance 21-24
INVert 21-26



Contents-9
Contents




LAMPlitude 21-27
LOAD 21-28
NREGions? 21-29
PROBe:IMPedance? 21-30
RUMode 21-31
RUMode:SOFailure 21-33
SCALe:BIND 21-34
SCALe:X1 21-35
SCALe:XDELta 21-36
SCALe:Y1 21-37
SCALe:Y2 21-38
SOURce 21-39
STARt | STOP 21-40
STIMe 21-41
TITLe? 21-42
TRIGger:SOURce 21-43
22 Self-Test Commands
AttenSET? 22-3
CANCel 22-4
SCOPETEST 22-5
23 Time Base Commands
DELay 23-3
POSition 23-5
RANGe 23-6
REFerence 23-7
SCALe 23-8
VIEW 23-9
WINDow:DELay 23-10
WINDow:POSition 23-12
WINDow:RANGe 23-13
WINDow:SCALe 23-14
24 Trigger Commands

Organization of Trigger Modes and Commands 24-5

Summary of Trigger Modes and Commands 24-6
Trigger Modes 24-8
HOLDoff 24-9
HTHReshold 24-10
HYSTeresis 24-11



Contents-10
Contents




LEVel 24-12
LTHReshold 24-13
SWEep 24-14

Edge Trigger Mode and Commands 24-15
EDGE:COUPling 24-17
EDGE:SLOPe 24-18
EDGE:SOURce 24-19

Glitch Trigger Mode and Commands 24-20
GLITch:POLarity 24-22
GLITch:SOURce 24-23
GLITch:WIDTh 24-24

Advanced COMM Trigger Mode and Commands 24-25
COMM:BWIDth 24-26
COMM:ENCode 24-27
COMM:LEVel 24-28
COMM:PATTern 24-29
COMM:POLarity 24-30
COMM:SOURce 24-31

Advanced Pattern Trigger Mode and Commands 24-32
PATTern:CONDition 24-34
PATTern:LOGic 24-35

Advanced State Trigger Mode and Commands 24-36
STATe:CLOCk 24-38
STATe:CONDition 24-39
STATe:LOGic 24-40
STATe:LTYPe 24-41
STATe:SLOPe 24-42

Advanced Delay By Event Mode and Commands 24-43
EDLY:ARM:SOURce 24-45
EDLY:ARM:SLOPe 24-46
EDLY:EVENt:DELay 24-47
EDLY:EVENt:SOURce 24-48
EDLY:EVENt:SLOPe 24-49
EDLY:TRIGger:SOURce 24-50
EDLY:TRIGger:SLOPe 24-51




Contents-11
Contents




Advanced Delay By Time Mode and Commands 24-52
TDLY:ARM:SOURce 24-54
TDLY:ARM:SLOPe 24-55
TDLY:DELay 24-56
TDLY:TRIGger:SOURce 24-57
TDLY:TRIGger:SLOPe 24-58

Advanced Standard TV Mode and Commands 24-59
STV:FIELd 24-61
STV:LINE 24-62
STV:SOURce 24-63
STV:SPOLarity 24-64

Advanced User Defined TV Mode and Commands 24-65
UDTV:EDGE 24-68
UDTV:ENUMber 24-69
UDTV:PGTHan 24-70
UDTV:PLTHan 24-71
UDTV:POLarity 24-72
UDTV:SOURce 24-73

Advanced Trigger Violation Modes 24-75
VIOLation:MODE 24-76

Pulse Width Violation Mode and Commands 24-77
VIOLation:PWIDth:SOURce 24-79
VIOLation:PWIDth:POLarity 24-80
VIOLation:PWIDth:DIRection 24-81
VIOLation:PWIDth:WIDTh 24-82

Setup Violation Mode and Commands 24-83
VIOLation:SETup:MODE 24-86
VIOLation:SETup:SETup:CSOurce 24-87
VIOLation:SETup:SETup:CSOurce:LEVel 24-88
VIOLation:SETup:SETup:CSOurce:EDGE 24-89
VIOLation:SETup:SETup:DSOurce 24-90
VIOLation:SETup:SETup:DSOurce:HTHReshold 24-91
VIOLation:SETup:SETup:DSOurce:LTHReshold 24-92
VIOLation:SETup:SETup:TIME 24-93
VIOLation:SETup:HOLD:CSOurce 24-94
VIOLation:SETup:HOLD:CSOurce:LEVel 24-95
VIOLation:SETup:HOLD:CSOurce:EDGE 24-96



Contents-12
Contents




VIOLation:SETup:HOLD:DSOurce 24-97
VIOLation:SETup:HOLD:DSOurce:HTHReshold 24-98
VIOLation:SETup:HOLD:DSOurce:LTHReshold 24-99
VIOLation:SETup:HOLD:TIME 24-100
VIOLation:SETup:SHOLd:CSOurce 24-101
VIOLation:SETup:SHOLd:CSOurce:LEVel 24-102
VIOLation:SETup:SHOLd:CSOurce:EDGE 24-103
VIOLation:SETup:SHOLd:DSOurce 24-104
VIOLation:SETup:SHOLd:DSOurce:HTHReshold 24-105
VIOLation:SETup:SHOLd:DSOurce:LTHReshold 24-106
VIOLation:SETup:SHOLd:SetupTIMe (STIMe) 24-107
VIOLation:SETup:SHOLd:HoldTIMe (HTIMe) 24-108

Transition Violation Mode 24-109
VIOLation:TRANsition 24-111
VIOLation:TRANsition:SOURce 24-112
VIOLation:TRANsition:SOURce:HTHReshold 24-113
VIOLation:TRANsition:SOURce:LTHReshold 24-114
VIOLation:TRANsition:TYPE 24-115
25 Waveform Commands
BANDpass? 25-5
BYTeorder 25-6
CLIPped? 25-7
COMPlete? 25-8
COUNt? 25-9
COUPling? 25-10
DATA 25-11
FORMat 25-32
POINts? 25-35
PREamble 25-36
SOURce 25-41
TYPE? 25-42
VIEW 25-44
XDISplay? 25-46
XINCrement? 25-47
XORigin? 25-48
XRANge? 25-49
XREFerence? 25-50
XUNits? 25-51
YDISplay? 25-52
YINCrement? 25-53
YORigin? 25-54



Contents-13
Contents




YRANge? 25-55
YREFerence? 25-56
YUNits? 25-57
26 Waveform Memory Commands
DISPlay 26-3
LOAD 26-4
SAVE 26-5
XOFFset 26-6
XRANge 26-7
YOFFset 26-8
YRANge 26-9
27 Infiniium and HP 547XX Digitizing Oscilloscopes Language
Compatibility
To select a command language 27-4
Acquisition System Command Language Compatibility 27-5
Calibration Command Language Compatibility 27-6
Channel Command Language Compatibility 27-7
Disk Command Language Compatibility 27-8
Display Command Language Compatibility 27-9
External Command Language Compatibility 27-10
FFT Command Language Compatibility 27-11
Function Command Language Compatibility 27-12
Hardcopy Command Language Compatibility 27-13
Limit Test Command Language Compatibility 27-14
Marker Command Language Compatibility 27-15
Measure Command Language Compatibility 27-16
Multiple Memory Command Language Compatibility 27-17
Memory Test Command Language Compatibility 27-18
Pixel Memory Command Language Compatibility 27-19
Self-Test Command Language Compatibility 27-20
Sequential Command Language Compatibility 27-21
System Command Language Compatibility 27-22
Time Base Command Language Compatibility 27-23
Trigger Command Language Compatibility 27-24
Waveform Command Language Compatibility 27-27
Waveform Memory Command Language Compatibility 27-28
Root Command Language Compatibility 27-29
Common Command Language Compatibility 27-30




Contents-14
Contents




28 Infiniium and HP 545XX Oscilloscopes Language
Compatibility
To select a command language 28-4
Acquisition System Command Language Compatibility 28-5
Calibration Command Language Compatibility 28-6
Channel Command Language Compatibility 28-7
Disk Command Language Compatibility 28-8
Display Command Language Compatibility 28-9
External Command Language Compatibility 28-10
FFT Command Language Compatibility 28-11
Function Command Language Compatibility 28-12
Hardcopy Command Language Compatibility 28-13
Limit Test Command Language Compatibility 28-14
Marker Command Language Compatibility 28-15
Measure Command Language Compatibility 28-16
Multiple Memory Command Language Compatibility 28-18
Memory Test Command Language Compatibility 28-19
Pixel Memory Command Language Compatibility 28-20
Self-Test Command Language Compatibility 28-21
Sequential Command Language Compatibility 28-22
System Command Language Compatibility 28-23
Time Base Command Language Compatibility 28-24
Trigger Command Language Compatibility 28-25
Waveform Command Language Compatibility 28-28
Waveform Memory Command Language Compatibility 28-29
Root Command Language Compatibility 28-30
Common Command Language Compatibility 28-31
29 Error Messages
Error Queue 29-3
Error Numbers 29-4
Command Error 29-5
Execution Error 29-6
Device- or Oscilloscope-Specific Error 29-7
Query Error 29-8
List of Error Messages 29-9




Contents-15
Contents-16
1




Introduction to Programming
Introduction to Programming



This chapter introduces the basics for remote programming of an
oscilloscope. The programming commands in this manual conform to
the IEEE 488.2 Standard Digital Interface for Programmable
Instrumentation. The programming commands provide the means of
remote control.
Basic operations that you can do with a computer and an oscilloscope
include: