HP 16533A Manual

Programmer’s Guide
Publication number 16534-97004
First edition, August 1995
For Safety information, Warranties, and Regulatory
information, see the pages behind the index
Copyright Hewlett-Packard Company 1987, 1990, 1991, 1993, 1994, 1995
All Rights Reserved
HP 16533A 1-GSa/s and
HP 16534A 2-GSa/s Digitizing
Oscilloscope


In This Book
This guide, combined with the HP
16500B/16501A Programmer’s Guide,
provides you with the information needed
to program the HP 16533/34A
oscilloscope module. Each module has
its own reference to supplement the
mainframe manual since not all
mainframes will be configured with the
same modules.
Chapter 1 contains:
•Mainframe system commands that are
frequently used with the oscilloscope
module
•HP 16533/34A Oscilloscope command
tree
•Alphabetic command-to-subsystem
directory
Chapter 2 contains module level
commands.
Chapters 3 through 10 contain the
subsystem commands for the oscilloscope.
Chapter 11 contains program examples of
actual tasks that show you how to get
started in programming the HP
16533/34A oscilloscope. These examples
are written in HP BASIC 6.2; however,
the program concepts can be used in any
other popular programming language that
allows communications with either the
HP-IB or RS-232C buses.
Error messages for the HP 16533/34A are
included in generic system error
messages and are in the HP
16500B/16501A Programmer’s Guide.
Programming the HP 16533/34A
1
Module Level Commands
2
ACQuire Subsystem
3
CHANnel Subsystem
4
DISPlay Subsystem
5
MARKer Subsystem
6
MEASure Subsystem
7
TIMebase Subsystem
8
TRIGger Subsystem
9
WAVeform Subsystem
10
Programming Examples
11
Index
iii

iv

Contents
1 Programming the HP 16533/34A Oscilloscope Module
Introduction 1–2
Selecting the Module 1–3
Setting up an Oscilloscope 1–3
Mainframe Commands 1–5
Command Set Organization 1–9
Module Status Reporting 1–10
MESE <N> 1–11
MESR <N>? 1–13
2 Module Level Commands
AUToscale 2–3
DIGitize 2–4
VARiation 2–5
3 ACQuire Subsystem
Introduction 3–2
COUNt 3–4
TYPE 3–5
4 CHANnel Subsystem
COUPling 4–5
ECL 4–6
OFFSet 4–7
PROBe 4–8
RANGe 4–9
TTL 4–10
Contents–1

5 DISPlay Subsystem
ACCumulate 5–4
CONNect 5–4
INSert 5–5
LABel 5–7
MINus 5–8
OVERlay 5–8
PLUS 5–9
REMove 5–9
6 MARKer Subsystem
Introduction 6–2
AVOLt 6–6
ABVolt? 6–7
BVOLt 6–7
CENTer 6–8
MSTats 6–8
OAUTo 6–9
OTIMe 6–10
RUNTil 6–11
SHOW 6–12
TAVerage? 6–12
TMAXimum? 6–13
TMINimum? 6–13
TMODe 6–14
VMODe 6–15
VOTime? 6–16
VRUNs? 6–16
VXTime? 6–17
XAUTo 6–18
XOTime? 6–19
XTIMe 6–19
Contents
Contents–2

7 MEASure Subsystem
Introduction 7–2
ALL? 7–5
FALLtime? 7–6
FREQuency? 7–6
NWIDth? 7–7
OVERshoot? 7–7
PERiod? 7–8
PREShoot? 7–8
PWIDth? 7–9
RISetime? 7–9
SOURce 7–10
VAMPlitude? 7–11
VBASe? 7–11
VMAX? 7–12
VMIN? 7–12
VPP? 7–13
VTOP? 7–13
8 TIMebase Subsystem
DELay 8–4
MODE 8–5
RANGe 8–6
9 TRIGger Subsystem
CONDition 9–5
DELay 9–7
LEVel 9–8
LOGic 9–10
MODE 9–11
PATH 9–12
SLOPe 9–12
SOURce 9–13
Contents
Contents–3

10 WAVeform Subsystem
Format for Data Transfer 10–4
Data Conversion 10–6
COUNt? 10–9
DATA? 10–9
FORMat 10–10
POINts? 10–10
PREamble? 10–11
RECord 10–12
SOURce 10–12
SPERiod? 10–13
TYPE? 10–13
VALid? 10–14
XINCrement? 10–15
XORigin? 10–16
XREFerence? 10–16
YINCrement? 10–17
YORigin? 10–17
YREFerence? 10–18
11 Programming Examples
Introduction 11–2
Digitizing Waveform Data 11–3
Using the MEASURE ALL? Query 11–4
Combined Measurement Example 11–5
Contents
Contents–4

1
Programming the
HP 16533/34A Oscilloscope
Module

Introduction
This chapter introduces you to the basic command structure used to
program the oscilloscope. Also included is an example program that
displays a waveform and makes automatic parametric measurements.
Additional program examples are in chapter 11.
1–2

Selecting the Module
Before you can program the oscilloscope, you must first "select" it, otherwise,
there is no way to direct your commands to the oscilloscope.
To select the module, use the system command :SELect followed by the
numeric reference for the slot location of the oscilloscope (1...10 refers to
slot A...J respectively). For example, if the oscilloscope card is in slot E, then
the command:
:SELect 5
would select this module. For a multi-card configuration you would select
the topmost card slot of the multi-card configuration. For more information
on the select command, refer to the HP 16500B/16501A Programmer’s
Guide.
Setting up an Oscilloscope
The easiest and fastest way to set up the oscilloscope is to use the
AUTOSCALE command. The AUTOSCALE command causes the
oscilloscope to automatically select the vertical sensitivity, vertical offset,
trigger source, trigger level and timebase settings for optimum viewing of any
input signals. The trigger source is the lowest channel on which the trigger
was found. If no signal is found, the oscilloscope defaults to auto-trigger.
To demonstrate a quick oscilloscope setup, we will use the AC CAL signal
available at the rear panel of the card. This square wave is normally used for
calibration and probe compensation.
Connect the CAL OUTPUT signal from the rear panel output connector to
CHAN 1, also on the rear panel. Ensure that the mainframe is connected to a
controller. Enter the program listed on the next page and execute it.
Programmingthe
HP 16533/34A Oscilloscope Module SelectingtheModule
1–3

Example 10 OUTPUT XXX;":SELECT 5"
20 OUTPUT XXX;":AUTOSCALE"
25 WAIT 5
30 DIM Me$[200]
40 OUTPUT ;":MEASURE:SOURCE CHANNEL1;ALL?"
50 ENTER XXX;Me$
60 PRINT Me$
70 END
The three Xs(XXX) after the OUTPUT and ENTER statements in the above
example refer tothe device address required for programming over either
HP-IB or RS-232-C. Refer to yourcontroller manual andprogramminglanguage
reference manual for information on initializing theinterface.
Program Comments
Line 10 selects the oscilloscope in slot E.
Line 20 causes the oscilloscope to execute the AUTOSCALE command.
Line 25 causes the oscilloscope to wait 5 seconds (the time you allow
for the measurement to be complete).
Line 30 dimensions and reserves memory for the string array.
Line 40 causes the oscilloscope to make all the parametric
measurements of the Measure subsystem. The source for the
measurements is channel 1.
Line 50 enters data from the oscilloscope.
Line 60 causes the data to be printed either on controller screen or
hardcopy, depending on the output device chosen.
For more information on the specific oscilloscope commands, refer to
chapters 2 through 10 of this manual.
Programmingthe
HP 16533/34A Oscilloscope Module
Setting up an Oscilloscope
1–4

Mainframe Commands
These commands are part of the HP 16500B/16501A mainframe system and
are mentioned here only for reference. For more information on these
commands, refer to the HP 16500B/16501A Programmer’s Guide.
CARDcage?
The CARDcage query returns a series of integers which identify the modules
that are installed in the mainframe. The returned string is in two parts. The
first five two-digit numbers identify the card type. The identification number
for the both the HP 16533A and the HP 16534A oscilloscope is 14. Use the
VARiation query to identify the card. A "-1" in the first part of the string
indicates no card is installed in the slot.
The five single-digit numbers in the second part of the string indicate which
slots have cards installed, which card has the controlling software for the
module, and where the master card is located.
Example For an HP 16500B Mainframe without the HP 16501A Expander:
1,14,-1,-1,31,0,2,0,0,5
The first five numbers of the returned string of -1,14,-1,-1,31,0,2,0,0,5 means:
Slot A is empty (-1).
The oscilloscope (ID number 14) is loaded in slot B.
The next two slots (C and D) are empty (-1).
Slot E contains a logic analyzer module (ID number 31).
The next group of numbers (0,2,0,0,5) mean:
Either Slot A is empty (0), the module software is not recognized, or the
module software is not loaded.
A single card module is installed in slot B.
Either slots C and D (0) are empty, the module software is not recognized, or
the module software is not loaded.
The last digit (5) in this group indicates that a single module card is loaded in
slot E.
Complete information for the CARDcage query is in the HP 16500B/16501A
Programmer’s Guide.
Programmingthe
HP 16533/34A Oscilloscope Module Mainframe Commands
1–5

MENU
The MENU command selects the menu to be displayed on the screen. The
first parameter specifies the desired module. The optional second parameter
specifies the desired menu in the module (defaults to 0 if not specified).
For the HP 16533/34A Oscilloscope:
•X,0 - Channel Menu
•X,1 - Trigger Menu
•X,2 - Display Menu
•X,3 - Auto-Measure Menu
•X,4 - Marker Menu
•X,5 - Calibration Menu
X = slot number that contains the oscilloscope card
MENU?
The MENU query returns the currently selected (and displayed) menu.
SELect
The SELect command selects which module or intermodule will have parser
control. SELect 0 selects system/intermodule, and assuming the HP 16501B
extender is being used, SELect 1 through 10 selects modules A through J
respectively. Parameters -1 and -2 select software options 1 and 2.
SELect ?
The SELect query returns the currently selected module.
STARt
The STARt command starts the selected module or intermodule. If the
selected module is configured for intermodule, STARt will start all modules
configured for intermodule.
STOP
Programmingthe
HP 16533/34A Oscilloscope Module
MainframeCommands
1–6

The STOP command stops the selected module or intermodule. If the
selected module is configured for intermodule, STOP will stop all modules
configured for intermodule.
RMODe
The RMODe command specifies the run mode (either single or repetitive) for
a module or intermodule. If the selected module is configured for
intermodule, the intermodule run mode will be set by this command.
RMODe?
The RMODe query returns the current setting.
SYSTem:ERRor?
The SYSTem:ERRor query returns the oldest error in the error queue. In
order to return all the errors in the error queue, a simple FOR/NEXT loop can
be written to query the queue until all errors are returned. Once all errors
are returned, the queue will return zeros.
SYSTem:PRINt
The SYSTem:PRINt command initiates a print of the screen or listing buffer
over the current printer communication interface.
SYSTem:PRINt?
The SYSTem:PRINt query sends the screen or listing buffer data over the
current controller communication interface.
MMEMory Subsystem
The MMEMory Subsystem commands provide access to both internal disc
drives for loading and storing configurations.
INTermodule Subsystem
The INTermodule Subsystem commands are used to specify intermodule
arming between multiple modules.
Programmingthe
HP 16533/34A Oscilloscope Module Mainframe Commands
1–7

Table 1-1. AlphabeticalCommand to Subsystem Directory
Programmingthe
HP 16533/34A Oscilloscope Module
MainframeCommands
1–8

Command Set Organization
The command set for the HP 16533/34A is divided into module level
commands and subsystem commands. Module level commands are listed in
Chapter 2 and each of the subsystem commands are covered in their
individual chapters starting with Chapter 3.
Each of these chapters contain a description of the subsystem, syntax
diagrams and the commands in alphabetical order. The commands are
shown in longform and shortform using upper and lowercase letters. For
example, TRIGger indicates that the longform of the command is TRIGGER
and the shortform is TRIG. Each of the commands contains a description of
the command and its arguments, the command syntax, and a programming
example.
Figure 1-1 is the command tree for the HP 16533/34A oscilloscope module.
Figure 1-1
HP 16533/34A Command Tree
Programmingthe
HP 16533/34A Oscilloscope Module Command SetOrganization
1–9

Module Status Reporting
Each module reports its status to the Module Event Status Register (MESR)
which in turn reports to the Combined Event Status Register (CESR) in the
HP 16500B/16501A mainframe (see HP 16500B/16501A Programmer’s
Guide, Chapter 6). The Module Event Status Register is enabled by the
Module Event Status Enable Register (MESE).
The following descriptions of the MESE and MESR commands provide the
module specific information needed to enable and interpret the contents of
the registers.
Figure 1-2
Module Status Reporting
Programmingthe
HP 16533/34A Oscilloscope Module
Module StatusReporting
1–10

MESE <N>
Command :MESE<N> <enable_mask>
The MESE <N> command sets the Module Event Status Enable register bits.
The MESE register contains a mask value for the bits enabled in the MESR
register. A one in the MESE register will enable the corresponding bit in the
MESR, a zero will disable the bit.
The first parameter specifies the module, and the second parameter specifies
the enable value. 1...10 refers to the module in slot A...J.
Refer to table 1-2 for information about the Module Event Status Enable
register bits, bit weights, and what each bit masks for the module.
<N> {1|2|3|4|5|6|7|8|9|10} number of slot where the module resides
<enable_mask> integer 0 to 255
Example: OUTPUT XXX;":MESE5 2"
Query :MESE<N>?
The MESE query returns the current setting.
Returned Format: [MESE]<enable_mask><NL>
Example: 10 OUTPUT XXX;":MESE5?"
20 ENTER XXX; Mes
30 PRINT Mes
40 END
Programmingthe
HP 16533/34A Oscilloscope Module MESE <N>
1–11

Table 1-2. Module Event Status Register
The Module Event Status Enable Register contains a mask value for the bits
to be enabled in the Module Event Status Register (MESR). A one in the
MESE enables the corresponding bit in the MESR, a zero disables the bit.
Bit Weight Enables
7 128 Notused
6 64 Not used
5 32 Not used
4 16 Number ofaverages met
3 8 Autotriggered
2 4 Triggerreceived
1 2 RNT-Run until satisfied
0 1 MC-Measurementcomplete
Programmingthe
HP 16533/34A Oscilloscope Module
MESE <N>
1–12
This manual suits for next models
1
Table of contents
Other HP Test Equipment manuals