Page 1

Programmer's Guide
HP
83480A
Analyzer
,
HP 54750A Oscilloscope
Page 2

HP part number: 83480-90023
Printed in USA July 1997
Notice
The information contained in this document is subject to change without
notice.
Hewlett-Packard makes no warranty of any kind with regard to this material,
including but not limited to, the implied warranties of merchantability and
tness for a particular purpose. Hewlett-Packard shall not be liable for errors
contained herein or for incidental or consequential damages in connection
material.
this
of
use
or
with
furnishing,
the
performance
,
Page 3

c
Copyright Hewlett-Packard Company 1997
All Rights Reserved. Reproduction, adaptation, or translation without prior
written permission is prohibited, except as allowed under the copyright laws.
1400 Fountaingrove Parkway, Santa Rosa, CA 95403-1799, USA
R
MS-DOS
is a U.S. registered trademark of Microsoft Corporation.
Page 4

Safety Notes
The following safety notes are used throughout this manual. Familiarize
yourself with each of the notes and its meaning before operating this
instrument.
WARNING
N
O
I
T
U
A
C
Warning denotes a hazard. It calls attention to a procedure which, if not
correctly performed or adhered to, could result in injury or loss of life.Do
not proceed beyond a warning note until the indicated conditions are
fully understood and met.
Caution
correctly
instrument.
the
of
conditions
denotes
performed
fully
are
hazard.
a
or
not
Do
understood
calls
It
adhered
proceed
attention
would
,
to
beyond
met.
and
to
result
caution
a
procedure that,
a
damage to
in
until
sign
if not
or destruction
the indicated
iv
Page 5

General Safety Considerations
WARNING
IN
RN
WA
N
O
I
T
U
A
C
Before this instrument is switched on
, make sure it has been properly
grounded through the protective conductor of the ac power cable to a
socket outlet provided with protective earth contact.
Any interruption of the protective (grounding) conductor, inside or
outside the instrument, or disconnection of the protective earth terminal
can result in personal injury.
the
of
damage
cause
by
only
circuitry
to
can,
require operation
performed
be
primary
its
sure
.
source
voltage
plugged
could
in.
power
cause
make
power
ac
correct
is
which
G
There
personal injury
are
.Be
points
many
Any adjustments
protective covers
service
instrument
this
adapted
set
to
with
personnel.
the
when
instrument
trained
Before
been
has
ailure
F
instrument
the
in
extremely careful.
or service
the
to
power
ac
the
procedures that
switched
is
voltage
input
power
ac
removed should
on,
the
of
the
to
cable
instrument
the
contacted,
if
v
Page 6

Typeface conventions
WARNING
N
O
I
T
U
A
C
4
Front-Panel Key
NNNNNNNNNNNNNNNNNNNNNNN
Softkey
5
This represents a key physically located on the instrument.
This indicates a \softkey," a key whose label is determined
by the rmware of the instrument.
Screen Text
This indicates text displayed on the instrument's screen.
This symbol will appear along with bold print to highlight a warning.
required.
is
an important
to
care
point
text.
the
in
This
N
This
symbol
E
T
O
symbol
will
will
appear
appear
call
to
when
attention
special
vi
Page 7

Contents
1. Programming
Introduction . . . . . . . . . . . . . . . . . . . .
Sending Commands to the Instrument . . . . . . . . .
Returning Data to the Computer . . . . . . . . . . .
Sending and Receiving Binary Data . . . . . . . . . .
Making a Measurement . . . . . . . . . . . . . . .
Monitoring the Instrument . . . . . . . . . . . . . .
Status Rep
Queues
Instrumen
Example
Digitize
Results?
Learn
Service
Conguration
Limit
Automated
Diagram
e
Ey
Messages
Error
orting Registers
.
.
.
.
k
c
Blo
t
Programs
Example
Measuremen
String
Example
Request
Example
Example
est
T
STM-16
Measurement
.
.
.
.
Diagram
.
.
.
.
t
Example
.
Measuremen
. .
. .
. .
. .
. .
.
.
.
.
.
.
.
.
Example
.
.
.
.
.
.
.
.
.
Example .
.
.
. .
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
t
.
.
.
.
. .
. .
. .
. .
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Example
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
1-5
1-7
1-11
1-13
1-14
1-17
1-20
.
.
.
.
.
1-30
.
.
.
.
.
1-32
.
.
.
.
1-34
.
.
.
.
.
1-35
.
.
.
.
.
1-41
.
. .
.
.
1-44
.
.
.
.
.
1-48
.
.
.
.
.
1-51
.
.
.
.
.
1-52
.
.
.
.
.
1-56
.
.
.
.
.
1-60
.
.
.
.
.
1-63
.
.
.
.
.
2.
Common
*CLS
Commands
(Clear
Status)
. .
. .
.
.
.
.
.
.
.
.
*ESE (Event Status Enable) . . . . . . . . . . . .
*ESR? (Event Status Register) . . . . . . . . . . .
*IDN? (Identication Number) . . . . . . . . . . .
*LRN (Learn) . . . . . . . . . . . . . . . . . .
*OPC (Operation Complete) . . . . . . . . . . . .
. .
.
.
.
.
.
.
.
.
.
.
(Recall)
CL
*R
*RST
*SAV(Sa
(Reset)
ve) . . . . . . . . . . . . .
*SRE (Service Request Enable)
*STB? (Status Byte)
*TRG(T
*TST? (T
*WAI (W
rigger) .
est) .
ait-to-Continue) . . . . . . . . . . . .
. .
.
.
.
. .
.
.
.
.
.
.
.
.
.
. . . . . .
. . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . .
. . . . . . .
.
. .
.
.
.
.
2-4
.
.
2-5
2-7
2-9
2-10
2-11
2-13
.
.
2-13
.
.
2-17
2-17
2-19
2-21
2-21
.
2-22
Contents-1
Page 8

3. Root Level Commands
AER? (Arm Event Register) . . . . . . . . . . . .
AUToscale . . . . . . . . . . . . . . . . . . . .
BLANk . . . . . . . . . . . . . . . . . . . . .
CDISplay . . . . . . . . . . . . . . . . . . . .
DIGitize . . . . . . . . . . . . . . . . . . . . .
ERASe . . . . . . . . . . . . . . . . . . . . . .
HEEN (Histogram Event Enable register) . . . . . .
HER? (Histogram Event Register) . . . . . . . . .
LER? (Local Event Register) . . . . . . . . . . . .
LTEE (Limit Test Event Enable register) . . . . . .
LTER? (Limit Test Event Register . . . . . . . . .
MENU
MER
MODel?
MTEE
MTER?
OPEE
OPER?
PRINt
RECall:SET
UN
R
SERial
SINGle
STOP
.
Ge .
(Mask
(Mask
(Op
(Op
.
.
.
(Serial
.
.
.
.
.
Ev
eration
eration
.
.
up
.
.
Num
.
.
.
.
.
.
.
.
en
est
T
.
.
.
. .
.
.
.
.
.
.
.
.
.
STORe:PMEMory1
.
STORe:SET
up
STORe:WAVeform . . . . . . . . . . . . . . . . .
TEER (Trigger Event Enable Register) . . . . . . .
TER? (Trigger Event Register) . . . . . . . . . . .
UEE (User Event Enable register) . . . . . . . . .
UER? (User Event Register) . . . . . . . . . . . .
.
.
.
.
VIEW
.
.
.
.
.
.
.
Enable
t
en
Ev
Status
Status
. .
.
.
.
.
er)
b
. .
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
Register)
t
Enable
Register)
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
register)
register)
.
.
.
.
. .
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
. .
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
3-7
3-7
3-9
3-9
3-10
3-12
3-13
3-13
3-14
3-15
3-16
3-17
.
.
3-18
3-19
.
3-20
.
3-21
.
3-21
.
3-22
.
3-23
.
3-24
.
3-24
.
3-25
.
3-26
.
3-26
.
3-27
.
3-27
3-27
3-28
3-29
3-30
3-30
3-31
.
System
4.
Contents-2
Commands
DATE . . . . . . . . . . . . . . .
DSP .
. . . . . . . . . . . . . . . . .
. . . . . . .
. . . . .
ERRor? . . . . . . . . . . . . . . . . . . . .
HEADer . . . . . . . . . . . . . . . . . . . . .
KEY .
. . . . . . . . . . . . . . . . . . . . . .
LONGform . . . . . . . . . . . . . . . . . . . .
4-3
4-4
.
4-5
4-7
4-8
4-11
Page 9

SETup . . . . . . . . . . . . . . . . . . . . . .
TIME ........................ 4-14
5. Acquire Commands
AVERage . . . . . . . . . . . . . . . . . . . .
BEST (
HP 54750A Only
COUNt . . . . . . . . . . . . . . . . . . . . .
POINts . . . . . . . . . . . . . . . . . . . . .
6. Calibration Commands
FRAMe:CANCel . . . . . . . . . . . . . . . . .
FRAMe:CONTinue . . . . . . . . . . . . . . . .
A .
T
FRAMe:D
FRAMe:DONE?
FRAMe:LABel
A
.
.
FRAMe:MEMory?
.
t
FRAMe:ST
FRAMe:TIME?
OUTPut
PLUGin:A
AR
.
.
.
.
.
CCuracy
PLUGin:CANCel
PLUGin:CONTin
ue
PLUGin:DONE? .
PLUGin:MEMory? .
PLUGin:OFFSet
er
PLUGin:OPO
W
PLUGin:OPTical
PLUGin:OWAVelength . . . . . . . . . . . . . . .
PLUGin:TIME? . . . . . . . . . . . . . . . . . .
PLUGin:VERTical . . . . . . . . . . . . . . . .
PROBe . . . . . . . . . . . . . . . . . . . . .
SAMPlers . . . . . . . . . . . . . . . . . . . .
.
.
.
.
A
T
us?
.
.
.
.
.
SKEW
ST
) ............ .. 5-3
.
.
.
.
.
.
.
.
.
.
. .
. .
. .
. .
. .
. .
. .
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
. .
. .
.
.
.
.
.
.
. .
. .
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
4-12
5-3
5-4
5-5
6-4
6-5
6-5
.
6-6
6-6
.
6-7
.
6-7
.
6-8
.
6-8
.
6-9
.
6-9
.
6-9
.
6-10
.
6-10
.
6-11
.
6-11
.
6-12
.
6-12
6-13
6-13
6-14
6-14
6-15
.
6-15
Contents-3
Page 10

7. Channel Commands
AUToscale . . . . . . . . . . . . . . . . . . . .
BANDwidth . . . . . . . . . . . . . . . . . . .
DISPlay . . . . . . . . . . . . . . . . . . . . .
FDEScription . . . . . . . . . . . . . . . . . .
FILTer . . . . . . . . . . . . . . . . . . . . .
FSELect . . . . . . . . . . . . . . . . . . . . .
OFFSet ....................... 7-9
PROBe . . . . . . . . . . . . . . . . . . . . .
PROBe:CALibrate . . . . . . . . . . . . . . . .
RANGe . . . . . . . . . . . . . . . . . . . . .
SCALe . . . . . . . . . . . . . . . . . . . . .
.
.
SKEW
UNITs
UNITs:A
.
. .
TT
uation
en
.
UNITs:OFFSet
.
.
.
.
.
.
.
.
.
.
.
.
.
8.
V
A
W
Commands
Disk
DELete
DIRectory?
ORMat
F
AD
LO
STORe
elength
.
7-3
7-4
7-5
7-6
7-7
7-8
7-10
7-11
7-12
7-13
7-14
.
.
. .
. .
. .
. .
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
7-15
7-16
.
7-17
.
.
7-18
8-3
.
8-3
.
8-4
.
8-4
.
8-5
.
Display
9.
Contents-4
Commands
ASSign
.
.
.
.
.
.
.
.
.
.
. .
. .
. .
. .
.
.
CGRade . . . . . . . . . . . . . . . . . . . . .
CGRade:LEVels? . . . . . . . . . . . . . . . . .
COLumn . . . . . . . . . . . . . . . . . . . .
DATA . . . . . . . . . . . . . . . . . . . . . .
DCOLor (Default COLor) . . . . . . . . . . . . .
eform
V
A
W
D
ORMat
F
Ticule
GRA
INVerse . . . . . .
LINE . . . . . . . . .
(Dra
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . .
. . . . . . . . . . . . .
eform) .
V
A
W
w
MASK . . . . . . . . . .
PERSistence . . . . . . . . . . . .
ROW . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. . . . . . . . . . .
. . . . . . .
. . . . . . . . . . .
.
.
.
.
.
.
.
SCOLor . . . . . . . . . . . . . . . . . . . . .
9-3
.
9-4
9-6
9-7
9-8
9-10
9-11
.
9-12
.
9-13
.
9-14
9-15
9-15
9-18
9-19
9-20
Page 11

SOURce . . . . . . . . . . . . . . . . . . . . .
STRing .... ........ ........ ... 9-24
TEXT . . . . . . . . . . . . . . . . . . . . . .
10. FFT Commands
DISPlay . . . . . . . . . . . . . . . . . . . . .
FREQuency . . . . . . . . . . . . . . . . . . .
MAGNify . . . . . . . . . . . . . . . . . . . .
MSPan . . . . . . . . . . . . . . . . . . . . .
OFFSet . . . . . . . . . . . . . . . . . . . . .
RANGe . . . . . . . . . . . . . . . . . . . . .
SOURce . . . . . . . . . . . . . . . . . . . . .
WINDo
w .
9-23
9-24
10-3
10-4
10-5
10-6
10-7
10-8
10-9
10-10
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
11.
Function
ADD
BWLimit
DIFF
DISPla
DIVide
FFT:FREQuency
FFT:MA
FFT:MSPan
FFT:WINDow
FFTMagnitude
HORizon
HORizon
HORizontal:RANGe . . . . . . . . . . . . . . .
INTegrate . . . . . . . . . . . . . . . . . . . .
INVert . . . . . . . . . . . . . . . . . . . . .
MAGNify . . . . . . . . . . . . . . . . . . . .
MAXimum . . . . . . . . . . . . . . . . . . . .
MINim
MUL
OFFSet
ONLY . . . . . .
RANGe . . . . . . . . .
SUBTract . . . . . . . . .
VERSus . . . . . . . . . . . .
VERTical . . . . . . . . . . . .
VERTical:OFFSet . . . . . . . . . . . . . . . .
Commands
.
.
.
.
tiate
eren
.
.
y
.
.
GNify
tal
tal:POSition
.
um
Tiply
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
. .
. .
. .
. .
.
.
.
. .
. .
. .
. .
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . .
. . . . . . . .
11-4
.
.
.
.
11-5
.
.
.
.
11-6
.
.
.
.
11-7
.
.
.
.
11-8
.
.
.
.
11-9
.
.
.
.
11-9
.
.
.
.
11-10
.
.
.
.
11-11
.
.
.
.
11-12
.
.
.
.
11-13
.
.
.
.
11-14
.
.
.
.
11-15
11-16
11-17
11-18
11-19
11-20
.
.
.
.
11-21
.
.
.
.
11-22
.
.
.
.
11-23
11-25
11-26
11-27
11-28
11-29
Contents-5
Page 12

VERTical:RANGe . . . . . . . . . . . . . . . .
12. Hardcopy Commands
ADDRess . . . . . . . . . . . . . . . . . . . .
AREA . . . . . . . . . . . . . . . . . . . . .
BACKground . . . . . . . . . . . . . . . . . .
DESTination . . . . . . . . . . . . . . . . . . .
DEVice . . . . . . . . . . . . . . . . . . . . .
FACTors . . . . . . . . . . . . . . . . . . . .
FFEed (Form FEed) . . . . . . . . . . . . . . .
FILename . . . . . . . . . . . . . . . . . . . .
LENGth . . . . . . . . . . . . . . . . . . . . .
.
.
MEDia
. .
11-30
12-3
12-4
12-5
12-6
12-7
12-8
12-9
12-10
12-11
12-12
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Histogram
13.
AXIS
MODE
RRA
UNTil
R
SCALe
SCALe:OFFSet
SCALe:RANGe
SCALe:SCALe .
SCALe:TYPE .
WINDo
WINDo
WINDo
WINDow:X2Position . . . . . . . . . . . . . . .
WINDow:Y1Position . . . . . . . . . . . . . . .
WINDow:Y2Position . . . . . . . . . . . . . . .
14. Limit Test Commands
AIL
F
LLIMit
MNF
RUN (R
SOURce
SSCReen .
SSCReen:DDISk . . .
SSCReen:DDISk:BACKground . . .
SSCReen:DDISk:MEDia . . . . . . . . . . . . . .
Commands
.
.
.
.
.
.
.
.
.
.
.
.
.
e
T
.
.
.
.
.
.
.
.
.
.
w:DEF
w:SOURce
w:X1P
.
ound
ault
osition
. .
.
.
.
.
.
.
.
.
.
.
UMode) . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
13-4
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
13-5
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
13-6
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
13-7
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
13-8
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
13-9
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
13-10
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
13-11
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
13-13
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
13-14
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
13-15
.
.
.
.
.
.
. .
. .
. .
. .
.
.
13-16
.
.
.
.
.
.
. .
. .
. .
. .
.
13-17
13-18
13-19
14-4
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
14-6
.
.
. .
.
.
.
.
.
.
.
.
.
.
. .
.
14-7
.
.
. .
.
.
.
.
.
.
.
.
.
.
. .
.
14-8
14-10
14-11
. . . . . . . . . . . . . .
. . . . . . . .
14-12
14-13
14-14
Contents-6
Page 13

SSCReen:DDISk:PFORmat . . . . . . . . . . . .
SSCReen:DPRinter .................. 14-16
SSCReen:DPRinter:ADDRess . . . . . . . . . . .
SSCReen:DPRinter:BACKground . . . . . . . . . .
SSCReen:DPRinter:MEDia . . . . . . . . . . . .
SSCReen:DPRinter:PFORmat . . . . . . . . . . .
SSCReen:DPRinter:PORT . . . . . . . . . . . . .
SSUMmary . . . . . . . . . . . . . . . . . . .
SSUMmary:ADDRess . . . . . . . . . . . . . . .
SSUMmary:FORMat . . . . . . . . . . . . . . .
SSUMmary:MEDia . . . . . . . . . . . . . . . .
SSUMmary:PFORmat . . . . . . . . . . . . . . .
. .
. .
.
.
.
.
.
.
.
.
.
.
SSUMmary:POR
eform
AV
SW
.
TEST
ULIMit
.
.
T
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
14-15
14-17
14-18
14-19
14-20
14-21
14-21
14-23
14-24
14-25
14-26
14-27
14-28
14-29
14-31
15.
Marker
Commands
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
CURSor?
MEASuremen
MODE
TDELta?
Art
TST
TSTOp
VDELta? .
VSTArt
VSTOp .
X1Position . . . . . . . . . . . . . . . . . . . .
X2Position . . . . . . . . . . . . . . . . . . . .
X1Y1source . . . . . . . . . . . . . . . . . . .
X2Y2source . . . . . . . . . . . . . . . . . . .
XDELta? . . . . . . . . . . . . . . . . . . . .
XUNits?
osition
Y1P
osition
Y2P
YDELta? . . . . . . . . . . . . . . . . .
YUNits? . . . . . . . . . . . . . . . . . .
.
t:READout
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
. .
.
. .
. .
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
. . .
. .
.
.
.
.
.
.
.
.
.
.
.
15-3
15-4
15-5
15-6
15-7
15-8
15-10
15-11
15-13
15-15
15-16
15-17
15-18
15-19
15-19
15-20
15-21
15-22
15-22
Contents-7
Page 14

16. Mask Test Commands
ALIGn (
AMASk:CReate . . . . . . . . . . . . . . . . .
AMASk:SOURce . . . . . . . . . . . . . . . . .
AMASk:UNITs . ....... ...... ...... 16-10
AMASk:XDELta . . . . . . . . . . . . . . . . .
AMASk:YDELta . . . . . . . . . . . . . . . . .
MTEST:AMODe (
COUNt:FAILures? . . . . . . . . . . . . . . . .
COUNt:FSAMples? . . . . . . . . . . . . . . . .
COUNt:FWAVeforms? . . . . . . . . . . . . . .
COUNt:SAMPles? . . . . . . . . . . . . . . . .
COUNt:W
FENable
MASK:DEFine
MASK:DELete
MMARgin:PER
MMARgin:ST
POL
POL
POL
RECall
UMo
R
SA
SCALe:DEF
SCALe:SOURce
SCALe:X1
SCALe:XDELta . . . . . . . . . . . . . . . . .
SCALe:Y1 . . . . . . . . . . . . . . . . . . . .
SCALe:Y2 . . . . . . . . . . . . . . . . . . . .
SSCReen . . . . . . . . . . . . . . . . . . . .
SSCReen:DDISk . . . . . . . . . . . . . . . . .
SSCReen:DDISk:BA
SSCReen:DDISk:MEDia
SSCReen:DDISk:PF
SSCReen:DPRinter
SSCReen:DPRinter:ADDRess .
SSCReen:DPRinter:BACKground . .
SSCReen:DPRinter:MEDia . . . .
SSCReen:DPRinter:PFORmat
SSCReen:DPRinter:PORT . . . . . . . . . . . . .
HP 83480A Only
V
A
. .
Ygon:DEFine
Ygon:DELete
Ygon:MO
.
.
.
de
.
.
.
VE
ault
.
eforms?
.
.
.
.
Cen
e
T
A
VE
.
.
.
.
.
.
.
.
) ...... ....... . 16-8
HP 83480A Only
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
t
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
. .
. .
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
CKground
.
ORmat
. . . . . . . . . . . . . . . .
) ......... 16-14
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
. .
. .
. .
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
. .
.
.
.
.
.
. . . . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . .
. . . . . .
. .
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
16-8
16-9
16-11
16-12
16-15
16-16
16-17
16-18
16-19
16-20
16-21
16-24
16-24
16-25
16-26
16-28
16-28
16-29
16-29
16-32
16-32
16-33
16-34
16-35
16-36
16-37
16-38
16-39
16-40
16-41
16-42
16-43
16-44
16-45
16-46
16-47
16-48
Contents-8
Page 15

SSUMmary . . . . . . . . . . . . . . . . . . .
SSUMmary:ADDRess ................. 16-50
SSUMmary:MEDia . . . . . . . . . . . . . . . .
SSUMmary:PFORmat . . . . . . . . . . . . . . .
SSUMmary:PORT . . . . . . . . . . . . . . . .
STANdard (
HP 83480A Only
SWAVeform . . . . . . . . . . . . . . . . . . .
SWAVeform:RESet . . . . . . . . . . . . . . . .
TEST . . . . . . . . . . . . . . . . . . . . . .
17. Measure Commands
APOWer (
HP 83480A Only
CGRade:COMPlete
CGRade:CR
OSsing
CGRade:DCDistortion
CGRade:EHEigh
CGRade:ERA
CGRade:ER
CGRade:ERF
Tio
Calibrate
actor
CGRade:EWIDth
CGRade:JITT
er
CGRade:PEAK?
Ctor
CGRade:QF
CLEar
DEFine .
atime .
DELT
A
.
.
.
.
.
DUTYcycle .
FALLtime . . . . . . . . . . . . . . . . . . . .
FFT . . . . . . . . . . . . . . . . . . . . . .
FFT:DFRequency . . . . . . . . . . . . . . . .
FFT:DMAGnitude . . . . . . . . . . . . . . . .
FFT:FREQuency . . . . . . . . . . . . . . . . .
FFT:MA
FFT:PEAK1
FFT:PEAK2
GNitude
.
.
FFT:THReshold . . . . . . . . . . . . . . . . .
FREQuency . . . . . . . . . . . . . . . . . .
HISTogram:HITS . . . . . . . . . . . . . . . . .
HISTogram:MEAN . . . . . . . . . . . . . . . .
HISTogram:MEDian . . . . . . . . . . . . . . .
HISTogram:M1S . . . . . . . . . . . . . . . . .
t
(
.
.
.
. .
. .
. .
.
HP
(
.
.
.
HP
(
.
.
.
. .
HP
) .... ...... .. 16-54
) ............. 17-6
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
. .
. .
. .
. .
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
Only
Only
.
.
.
.
.
.
.
.
.
.
..
)
.
.
.
..
)
.
.
.
.
..
)
. .
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
)
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
. .
.
.
.
.
.
83480A
83480A
HP
(
83480A
.
.
.
.
.
.
.
.
.
83480A
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Only
.
.
.
Only
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 17-17
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
16-49
16-51
16-52
16-53
16-55
16-56
16-57
17-8
17-9
17-10
17-11
17-12
17-13
17-13
17-14
17-15
17-16
17-18
17-18
17-22
17-23
17-25
17-26
17-27
17-28
17-28
17-29
17-30
17-31
17-32
17-32
17-34
17-35
17-36
17-37
Contents-9
Page 16

HISTogram:M2S . . . . . . . . . . . . . . . . .
HISTogram:M3S ...... ........ ..... 17-40
HISTogram:OFFSet? . . . . . . . . . . . . . . .
HISTogram:PEAK . . . . . . . . . . . . . . . .
HISTogram:PP . . . . . . . . . . . . . . . . . .
HISTogram:SCALe? . . . . . . . . . . . . . . .
HISTogram:STDDev . . . . . . . . . . . . . . .
NWIDth . . . . . . . . . . . . . . . . . . . . .
OVERshoot . . . . . . . . . . . . . . . . . . .
PERiod . . . . . . . . . . . . . . . . . . . . .
PREShoot . . . . . . . . . . . . . . . . . . . .
PWIDth . . . . . . . . . . . . . . . . . . . . .
. .
. .
. .
. .
.
.
.
.
.
.
.
.
.
.
h
alid
.
er
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
. .
. .
.
.
.
.
.
.
.
.
.
.
. .
. .
. .
. .
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
RESults?
RISetime
SCRatc
SENDv
SOURce
Tistics
A
ST
TEDGe
TMAX
TMIN
OLt
TV
AMPlitude
V
erage
V
A
V
VBASe
W
VLO
VMAX
VMIDdle . . . . . . . . . . . . . . . . . . . .
VMIN . . . . . . . . . . . . . . . . . . . . . .
VPP . . . . . . . . . . . . . . . . . . . . . .
VRMS . . . . . . . . . . . . . . . . . . . . .
VTIMe . . . . . . . . . . . . . . . . . . . . .
VTOP
er
VUPp
17-39
17-42
17-43
17-44
17-46
17-47
17-48
17-49
17-51
17-52
17-54
17-55
.
.
17-59
.
.
17-60
.
17-61
.
.
17-62
.
.
17-63
.
.
17-64
.
.
17-66
.
.
17-67
.
.
17-69
.
.
17-70
.
.
17-72
.
.
17-73
.
.
17-74
.
.
17-75
.
17-77
17-78
17-79
17-80
17-82
17-83
.
17-85
.
.
Contents-10
Page 17

18. Pixel Memory Commands
ADD . . . . . . . . . . . . . . . . . . . . . .
CLEar . . . . . . . . . . . . . . . . . . . . .
DISPlay . . . . . . . . . . . . . . . . . . . . .
ERASe . . . . . . . . . . . . . . . . . . . . .
MERGe . . . . . . . . . . . . . . . . . . . . .
RECall . . . . . . . . . . . . . . . . . . . . .
STORe ....................... 18-5
19. Service Commands
COMMents . . . . . . . . . . . . . . . . . . .
DECLassify . . . . . . . . . . . . . . . . . . .
18-3
18-3
18-4
18-4
18-4
18-5
19-3
19-3
20.
Timebase
BRA
DELa
POSition
RANGe
REF
SCALe
UNITs
VIEW
WINDow:DELa
WINDow:POSition
WINDo
WINDo
WINDo
Commands
HP
(
e
T
.
y
.
erence
.
HP
(
.
.
w:RANGe
w:SCALe
w:SOURce
83480
.
.
.
.
.
.
.
.
.
.
83480
.
.
y
.
.
.
.
.
Only
.
Only
.
.
.
.
.
.
.
.
.
..
..
.
.
.
.
.
)
. .
. .
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
. .
. .
. .
. .
.
. .
. .
. .
. .
.
.
21. Trigger Commands
Trigger Commands . . . . . . . . . . . . . . . . .
HYSTeresis . . . . . . . . . . . . . . . . . . .
LEVel . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
e
SLOP
.
.
.
.
.
.
.
.
. .
.
.
.
.
SOURce
SWEep
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
20-3
.
.
.
20-4
.
.
.
20-5
.
.
.
20-7
.
.
.
20-8
.
.
.
20-9
.
.
.
20-10
.
.
.
20-11
.
.
.
20-12
.
.
.
20-13
.
.
.
20-14
.
.
.
20-15
.
.
.
20-16
.
.
.
21-2
21-3
21-3
21-4
.
.
.
21-4
.
.
21-5
.
.
Contents-11
Page 18

22. TriggerN Commands
BWLimit . . . . . . . . . . . . . . . . . . . .
23. Waveform Commands
BANDpass? . . . . . . . . . . . . . . . . . . .
BYTeorder . . . . . . . . . . . . . . . . . . . .
COMPlete? ... ..... ........ ..... 23-7
COUNt? . . . . . . . . . . . . . . . . . . . .
COUPling? . . . . . . . . . . . . . . . . . . .
DATA . . . . . . . . . . . . . . . . . . . . . .
FORMat . . . . . . . . . . . . . . . . . . . .
POINts? . . . . . . . . . . . . . . . . . . . .
.
PREam
SOURce
TYPE?
VIEW
XDISpla
XINCremen
X
XRANge?
XREF
XUNits?
YDISpla
YINCremen
YORigin? .
YRANge? .
YREFerence?
YUNits? . . . . . . . . . . . . . . . . . . . .
ble .
.
y?
ORigin?
erence?
y?
.
. .
.
.
.
.
.
.
. .
.
.
.
.
.
.
t?
.
.
.
.
.
.
.
.
.
.
.
.
.
t?
.
.
. .
. .
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
.
.
.
.
.
.
.
.
.
.
. .
. .
.
. .
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
. .
.
.
. .
.
.
.
.
.
.
.
.
.
22-3
23-5
23-6
23-8
23-9
23-9
23-12
23-14
23-15
. .
.
.
.
.
.
.
.
.
.
.
23-21
.
.
.
.
.
.
.
.
.
.
.
23-22
.
.
.
.
.
.
.
.
.
.
.
.
23-23
.
.
.
.
.
.
.
.
.
.
.
.
23-25
.
.
.
.
.
.
.
.
.
.
.
.
23-25
.
.
.
.
.
.
.
.
.
.
.
23-26
.
.
.
.
.
.
.
.
.
.
.
.
23-27
.
.
.
.
. .
.
.
.
.
.
.
23-28
.
.
.
. .
.
.
.
.
.
.
.
23-28
.
.
.
.
. .
.
.
.
.
.
.
23-29
.
.
. .
. .
.
.
.
.
.
.
23-30
.
. .
. .
.
.
.
.
.
.
.
23-31
.
.
.
.
.
.
.
.
.
.
.
.
23-31
.
.
.
.
.
.
.
.
.
.
.
.
23-32
.
.
.
.
.
.
.
.
.
.
.
.
23-33
24. Waveform Memory Commands
DISPlay . . . . . . . . . . . . . . . . . . . . .
SAVE . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
X
XRANge
YOFFset
YRANge . . . . . . .
Index
Contents-12
OFFset
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
. .
.
.
.
. . . . . . . . . . . . .
24-3
24-3
24-4
.
.
.
24-4
.
.
.
24-5
.
.
.
24-5
Page 19

Tables
17-1. Result States ........ ....... ...... . 17-57
Contents-13
Page 20

Contents
Page 21

1
Programming
Page 22

Default
address
instrument
Programming
This chapter contains information on how to program the instrument. You
can perform the following tasks by programming the instrument:
Set up the instrument.
Make measurements.
Get data (waveform, measurements, conguration) from the instrument.
Send information (pixel image, congurations) to the instrument.
You'll nd a list of error messages and their denitions at the end of this
chapter.
ou
Y
7.
key
of
presses:
instrument
The
change this
the
Press
1.
N
Press
N
HP-IB
2.
is
address from
4
5
y
Utilit
N
N
N
N
N
N
N
N
N
N
N
NN
N
N
N
N
N
N
N
N
Setup
congured
the
.
key
N
N
N
N
N
N
NN
N
N
N
N
N
N
N
N
N
N
N
N
.
N
N
.
at
front
N
N
N
N
.
factory
the
panel
N
N
N
N
and
then
for
the
using
N
N
NN
N
N
N
N
N
N
N
N
N
N
Address
N
N
N
N
N
N
N
N
N
following
.
address
HP-IB
an
can
3.
4.
Use
Press
the
N
N
Exit
numeric
N
N
N
N
N
N
N
N
N
N
N
N
keypad
to
HP-IB address
new
the
enter
.
.
IEEE 488.2
The programming instructions in this manual conform to the IEEE 488.2 Standard Digital Interface for
Programmable Instrumentation. You can nd additional detailed information about the IEEE 488.2
Standard in ANSI/IEEE Std 488.2-1987,
\IEEE Standard Codes, Formats, Protocols, and Common
Commands."
1-2
Page 23

Programming
NOTE
The programming examples for individual commands in this manual are written in HP BASIC 5.0 for an
HP 9000 Series 200/300 Controller.
1-3
Page 24

Programming
Command are grouped
in subsystems
Interface
capability
In accordance with IEEE 488.2, the instrument's commands are grouped into
\subsystems." Commands in each subsystem perform similar tasks. The
following subsystems are provided:
Common Commands
Root Level Commands
System Commands
Acquire Commands
Calibration Commands
Channel Commands
Disk Commands
Display Commands
the instrument's
On
interface
dened
capabilities
following
the
in
Code Interface
SH1 Source
Handshake
rear panel,
supported
Function
FFT Commands
Function Commands
Hardcopy Commands
Histogram Commands
Limit Test Commands
Marker Commands
Mask Test Commands
Measure Commands
.
table
Interface
next
by
the
to
instrument.
this
Capabilities
Capability
Full
HP-IB
Pixel Memory Commands
Service Commands
Timebase Commands
Trigger Commands
TriggerN Commands
Waveform Commands
Waveform Memory Commands
list
a
is
connector
These
,
capabilities
Capability
of
are
HP-IB
AH1 Acceptor Handshake Full Capability
Mode/
Only
alk
oll/T
T5 T
alker
alker/Serial
T
Basic
Unaddress
P
Listen Address
if
(MLA)
L4 Listener Basic
Listener/
Unaddresses if Talk Address (MTA)
SR1 Service Request Full Capability
RL1 Remote Local Complete Capability
PP1 Parallel Poll Remote Conguration
DC1 Device
T1
D
Device
Clear
rigger
T
Full
Full
Capability
Capability
C0 Controller No Capability
E2 Driver Electronics Tri State (1 MB/SEC MAX)
1-4
Page 25

Introduction
Computers communicate with the instrument by sending and receiving
messages over the HP-IB bus. Programming commands are normally sent
as ASCII character strings embedded inside output statements of your
programming language. Input statements are used to read in responses from
the instrument.
For example, HP 9000 Series 200/300 BASIC uses the
OUTPUT
statement for
sending commands and queries. After a query is sent, the response is usually
,and
of the
ASIC
B
of
message
on
7
the
language
the
keyword
statement.
and enter
terminator.
is sent
instrument is
OUTPUT
channel
is
an
device
output
1:
to
sent
interface
address
are
you
command.
OUTPUT
statements pass
instrument
the
the
correct
Passing
to
7.
statement
the
with
using.
The
.
sends
instrument
code
select
be
must
some
In
HP B
In
examples
specied
instrument
the
interface
command
a
at address
7(700
languages
ASIC, this
this
in
address
address
and
/100
ensures
instrument.
turns
that
This
707.
7).
=
is dependent
may
,this
is always
manual
assume
,
The
on
on
the
ENTER
the
using
read
language's output
Your
program message
program message
the
that
default
The
the
Notice
indicates
The
the
be
specied
address
following
bandwidth
OUTPUT
707;":CHANNEL1:BWLIMIT ON"
the
that
address
location
where
programming
specied
outside
after
HP
limit
the
instrument is at device address 707. When writing programs, the address
varies according to how the bus is congured.
Also notice that in HP BASIC, the string sent to the instrument is enclosed in
quotes.
displayed
When
the
on
instrument
the
instrument
is
screen.
in
the
remote
mode
,
the
Remote
message
is
1-5
Page 26

Always initialize
instrument
the
Programming
Introduction
Program Message Terminator
The instructions within the program message are executed after the instruction terminator is received.
The terminator may be either a New Line (NL) character, an End-Or-Identify (EOI) asserted, or a
combination of the two. All three ways are equivalent. Asserting the EOI sets the EOI control line low
on the last byte of the data message. The NL character is an ASCII linefeed (decimal 10).
The NL (New Line) terminator has the same function as an EOS (End Of String) and EOT (End Of Text)
terminator.
is
It
This
or
F
practice
good
ensures
example
,
that
HP
to
the
ASIC
B
initialize
and
bus
provides
the instrument
all appropriate
a
CLEAR
command
at the
interfaces are
start
which
a
in
clears
known
interface
the
program.
every
of
buer:
707
CLEAR
state
.
The
.
you
parser
send.
the
you
When
parser
After
is
clearing
instrument
OUTPUT
using
are
program
the
the
a
to
707;"*RST"
HP-IB
interface
preset
that
state:
,
CLEAR
reads in
use
,
the
resets
also
instructions
the
*RST
instrument's
the
command
that
initialize
to
Refer to the \Common Commands" chapter for the actual commands and
syntax for initializing the instrument.
1-6
Page 27

Sending Commands to the Instrument
It's easy to send a command to the instrument. Simply create a command
string, and place the string in your program language's output statement. For
commands other than Common Commands, include a semicolon (;) before
the subsystem name.For example, the following string sends the DELAY
command in the Timebase subsystem.
OUTPUT 707;":TIMEBASE:DELAY 1US"
or
short
either
Use
forms
Combine
commands
the same subsystem
long
Commands
short
manual
letters
The
And
Programs
documenting.
memory
in
o
T
form
shows
.
following is
OUTPUT
OUTPUT
707;":TIMEBASE:DELAY
is
this
707;":TIM:DEL
written
needed
execute
queries
and
(abbreviated
long
the
long
a
form
short
the
long
in
short
The
program
for
than
more
may
spelling).
form
form
of
1US"
form
form
function
one
sent
be
with
command:
a
of
1US"
same
the
are
syntax
storage
in
The
short
the
easily
conserves
and
within
either
description
command:
long
form
and
read
reduces
the same
each
of
indicated
almost
are
amount
the
amount
the
subsystem, separate
(complete
form
commands with a semicolon (;). For example, the following two lines,
OUTPUT 707;":TIMEBASE:REFERENCE CENTER"
OUTPUT 707;":TIMEBASE:POSITION 0.00001"
can be combined into one line:
OUTPUT
The
707;":TIMEBASE:REFERENCE
semicolon
between
REFERENCE
the
command separates the two functions
need TIMEB
ASE preceding it since the TIMEB
CENTER;POSITION
command and
POSITION command does not
. The
ASE:REFERENCE
0.00001"
the
selects the subsystem.
command
lowercase
using
self-
controller
of
I/O
of
POSITION
command
spelling)
this
in
activity
or
.
the
1-7
Page 28

Programming
Sending Commands to the Instrument
Combine commands
from dierent
subsystems
Sending common
commands
You can send commands and program queries from dierent subsystems on
the same line. Simply precede the new subsystem by a semicolon (;) followed
by a colon (:). In the following example, the colon before CHANNEL1 allows
you to send a command from another subsystem.
OUTPUT 707;":TIMEBASE:REFERENCE CENTER;:CHANNEL1:OFFSET 0"
If a subsystem has been selected and a Common Command is received by the
instrument, the instrument remains in the selected subsystem. For example,
if the program message:
":ACQUIRE:TYPE AVERAGE;*CLS;COUNT 1024"
received
is
count,
then
the instrument,
by
the status
clears
the instrument
sets the
information without
acquire type
leaving the
and
selected
subsystem.
you
sets
the
and
,
the
,
acquire
set
the
other
some
If
reenter
must
program
"ACQUIRE:TYPE
the
sets
count.
A
In
UTOSCALE
type
the
message:
acquire
example
this
command
after
within
the
command
of
original
received
is
subsystem
AVERAGE;:AUTOSCALE;ACQUIRE:COUNT
autoscale
CQUIRE
A
order
the
reenter
to
command
the
type
completes
,
the
,
in
program
a
command.
1024"
operation,
be
must
cquire
A
message
example
or
F
then
again after
sent
subsystem
count.
parameters
Adding
command
Duplicate command
names
space
a
as
Use
shown
a
to
commands
Many
character
separate
to
have
parameters
parameter
the
that
from
specify
the
option.
an
command
following line:
OUTPUT 707;":HARDCOPY:DEVICE LASERJET"
Separate multiple parameters with a comma (,). Spaces can be added around
the commas to improve readability.
WMEMORY1"
OUTPUT
707;":FUNCTION1:MULTIPLY
CHANNEL1
Identical function mnemonics can be used for more than one
example, the command RANGE can be used to change the
,
subsystem. F
vertical range or to
change the horizontal range:
OUTPUT 707;":CHANNEL1:RANGE .4"
sets the vertical range of channel 1 to 0.4 volts full scale.
1-8
in
the
or
Page 29

Programming
Sending Commands to the Instrument
OUTPUT 707;":TIMEBASE:RANGE 1"
sets the horizontal time base to 1 second full scale.
CHANNEL1 and TIMEBASE select the subsystem and determine which range
is being modied.
You can use upper or
lowercase letters
White space
Embedded
strings
Numbers
Program headers can be sent using any combination of uppercase or
lowercase ASCII characters. Instrument responses, however, are always
returned in uppercase.
White space is dened to be one or more characters from the ASCII set of
decimal,
32
to
0
increase
to
used
Embedded
treated
written
as
to
strings
unit
a
the
excluding
readability
the
contain
data
of
advisory
by
line
decimal
10
groups
the
the
of
(NL).
program.
a
of
alphanumeric
of
instrument.
instrument
It
or
F
usually
is
example
with
optional,
characters
the
,
STEM:DSP
:SY
the
and
which are
text
of
line
be
can
command:
:SYSTEM:DSP
Embedded
strings
These
other
any
numbers
All
sending
the
"This
strings
case-sensitive
are
character
expected to
are
number
may
.
9,
delimited
be
you
and
be strings
would
with
spaces
send
either
act
of ASCII
byte
a
or
(')
single
characters
legal
as
characters.
representing
double
Thus
ASCII
the
just
when
,
quotes
(")
like
code for
message."
a
is
the character \9" (which is 57). A three-digit number like 102 would take up
three bytes (ASCII codes 49, 48, and 50). This is taken care of automatically
when you include the entire instruction in a string. The following numbers
are all equal:
.
28
0.28E2
280E-1
28000m
0.028K
28E-3K
The representation for innity for
also the value returned when a
measurement cannot be made
this instrument is 9.99999E+37. This is
.
1-9
Page 30

Programming
Sending Commands to the Instrument
Sux Multipliers
Multiplier Mnemonic
1E18 EX
1E15 PE
1E12 T
1E9 G
1E6 MA
1E3 K
Sux Units
Unit Referenced
V V
S Second
Multiplier Mnemonic
1E-3 M
1E-6 U
1E-9 N
1E-12 P
1E-15 F
1E-18 A
Unit
olt
1-10
Page 31

Returning Data to the Computer
Data is requested from the instrument using a query. Queries can be used
to nd out how the instrument is currently congured. They are also used
to get results of measurements made by the instrument, with the query
actually activating the measurement. Responses are returned as uppercase
letters.You can select either the long or short form responses with the
SYSTEM:LONGFORM command.
Queries usually take the form of a command followed by a question mark (?).
command
ASIC,
queue
the
receiving
After
The answer
is issued.
OUTPUT
places
the current
controller
707;Range
ENTER
instrument
the
,
query
a
remains in
example,
For
the output
the query:
707;"TIMEBASE:RANGE?"
setting
base
time
input statement:
places
queue until
output
the
in
the
it
answer
read
is
queue
in
or
In
.
output
its
another
B
HP
.
value
passes
Range
the
.
Sending another
output
causes
This
The
the
also
output
generates
the
of
bus
queue
an
the
to
error
or
be
in
across
command
instrument may
controller
the
to
before
,
query
cleared and
the error
be numeric
reading
the current
queue.
or character
and
places
the
it
of
result
response
data, depending
a
to
query
lost.
be
,
variable
the
in
on what is queried. Refer to the specic commands for the formats and types
of data returned from queries. The following example shows the data being
returned to a string variable:
10 DIM Rang$[30]
20 OUTPUT 707;":CHANNEL1:RANGE?"
30
40
50
PRINT
END
Rang$
707;Rang$
ENTER
After running this program, the controller displays:
+8.00000E-01
1-11
Page 32

Programming
Returning Data to the Computer
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 computer displays:
.8
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.
or
F
example
,
of
result
the
read
could
you
the query:
:TIMEBASE:RANGE?;DELAY?
example
or
into
,
numeric
the
string
a
into
variables
string
response
<range_value>;
following
the
Use
of
the
variable
each
,
preceding
<delay_value>
program
When
.
response
query
read
you
is
would
message
the
separated
be:
read
to
result
by
the
multiple
of
semicolon.
a
query
into
queries
F
multiple
variables:
707;Result1,Result2
ENTER
1-12
Page 33

Sending and Receiving Binary Data
You will often need to send or receive binary data. An example is receiving
binary data via the :WAVEFORM:DATA? command. This is done using the
denite-length block data format. This format allows any type data to be
transmitted as a series of 8-bit binary bytes. This is particularly useful for
sending large quantities of data or 8-bit extended ASCII codes.
With denite-length block data format, the binary data is preceded by several
bytes which describe the length of the data.
(#).
The
The
the data
The
The
or
F
the
to
#41000
rst byte
second byte
length.
following \n"
remaining bytes
when
example
,
instrument:
<1000 bytes
pound
is a
is a
bytes give
transmitting
sign
digit indicating
length
the
are data.
1000
data>
of
how
bytes
many
of
of
the
data,
the
of
binary
send
bytes
next
data.
following bytes
the
describe
\4"
The
number
to
Refer
indicates
data
of
examples
the
that
bytes
the
in
,
of
four
next
case
this
receiving
give
bytes
being transmitted.
1000,
binary
data
the number
this chapter
in
that
.
indicates
the
1-13
Page 34

Making a Measurement
Making a measurement involves changing the instrument settings, capturing
the data, and then returning the data to the computer.
Changing instrument
settings
Use the AUTOSCALE command on unknown waveforms to automatically set
up the vertical channel, time base, and trigger level of the instrument.
OUTPUT 707;":AUTOSCALE"
The following lines show how to manually set up the instrument for an input
signal:
OUTPUT
OUTPUT
707;":CHANNEL1:PROBE 10;RANGE
707;":TIMEBASE:MODE
This example
attenuation
probe
vertical
center
scale
of
timebase
:
:
:
delay
program
This
CLEAR 707
10
20 OUTPUT
OUTPUT
30
OUTPUT
40
:
::
:
:
:
::
:
instrument
:
:
::
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
sets the
screen
:
::
:
:
:
:
:
:
demonstrates
707;"*RST"
707;":TIMEBASE:RANGE
707;":TIMEBASE:DELAY
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
preparing
NORMAL;RANGE
to
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
8E-3;OFFSET 1E-3"
1E-3;DELAY
following
the
:
:
:
:
:
:
:
:
:
:
:
:
:
::
:
:
:
:
:
:
::
:
:
:
:
:
:
:
:
:
:
:
:
:
::
:
:
:
:
::
:
:
:
:
:
:
instrument
the
5E-4"
22E-9"
::
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
settings:
:
:
:
:
:
:
mV
8
:
:
:
:
:
:
ms
1
:
:
:
:
:
:
:
for
100E-6"
:
:
:
:
:
:
:
:
:
:
:
:
full-scale
:
:
:
full-scale
:
:
:
(100
:
:
:
:
:
:
:
:
:
(100
::
:
:
:
:
:
:
:
:
measurements:
::
:
:
:
mV/div)
:
::
:
:
:
100
100
:
10
:
:
:
mV
s/div)
50 OUTPUT 707;":TIMEBASE:REFERENCE LEFT"
60 OUTPUT 707;":CHANNEL1:PROBE 10"
70 OUTPUT 707;":CHANNEL1:RANGE .8"
80 OUTPUT 707;":CHANNEL1:OFFSET -.4"
90 OUTPUT 707;":TRIGGER:LEVEL TRIG2,-.4"
100 OUTPUT 707;":TRIGGER:SLOPE POSITIVE"
110 OUTPUT
OUTPUT
120
END
130
707;":ACQUIRE:TYPE
707;":DISPLAY:GRATICULE
NORMAL"
FRAME"
s
1-14
Page 35

Programming
Making a Measurement
Capture data with the
DIGITIZE command
When the DIGITIZE command is sent to an instrument, the specied channel
signal is digitized with the current ACQUIRE parameters.To obtain waveform
data, you must specify the WAVEFORM parameters for the waveform data
prior to sending the :WAVEFORM:DATA? query.
When the DIGITIZE process is complete, the acquisition is stopped, and the
captured data can then be measured by the instrument or transferred to the
computer for further analysis. The captured data consists of two parts: the
waveform data record and the preamble.
After changing the instrument conguration, the waveform buers are
cleared. Before doing a measurement, the DIGITIZE command should be sent
sent
be
subsystem
number
and
specify
to
can
to
of
exactly
example
has
data
parameters
number
the
typical
a
OUTPUT
OUTPUT
OUTPUT
OUTPUT
new
for
of data
points comprising
requested in
number of
the
DIGITIZE command.
the
by
used
digitized
information
setup:
707;":ACQUIRE:TYPE AVERAGE"
707;":WAVEFORM:SOURCE
707;":WAVEFORM:FORMAT
707;":ACQUIRE:COUNT
ensure
to
without
The number
the
determines
averages
what
shows
OUTPUT 707;":ACQUIRE:POINTS
OUTPUT
OUTPUT
707;":DIGITIZE
707;":WAVEFORM:DATA?"
collected.
been
higher
a
the A
data points
CHANNEL1"
throughput.
a waveform
cquire
subsystem.
,
contains.
CHANNEL1"
BYTE"
8"
500"
The
type
The
DIGITIZE
acquisition,
of
allows
This
following
varies
The
command
according
cquire
A
you
program
This
setup
places
instrument
the
into
averaged mode
the
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.
When using HP-IB, a DIGITIZE operation may be aborted by sending a Device
Clear over the bus (
CLEAR 707
).
1-15
Page 36

Programming
Making a Measurement
Returning the data to
the computer
After receiving the :WAVEFORM:DATA? query, the instrument passes
the waveform information when addressed to talk. Digitized waveforms
are passed from the instrument to the computer by sending a numerical
representation of each digitized point. The format of the numerical
representation is controlled with the :WAVEFORM:FORMAT command and
may be selected as BYTE, WORD, or ASCII.
The easiest method of entering a digitized waveform depends on data
structures, available formatting, and I/O capabilities.You must scale the
integers to determine the voltage value of each point. These integers are
passed starting with the leftmost point on the instrument's display.For more
information, refer to the chapter on the Waveform subsystem.
1-16
Page 37

Monitoring the Instrument
The following gure shows the instrument's status reporting structure.
The status reporting structure monitors and reports events including the
following:
Status of an operation
Availability of the measured data
Reliability of the measured data
The *CLS common command clears all event registers and all queues except
request
message
the
for
the output
terminator,
*OPC bit
queue.
the output
is also
If *CLS
cleared.
sent
is
queue is
immediately
also cleared.
following
addition,
In
program
a
the
1-17
Page 38

Programming
Monitoring the Instrument
1-18
Status Reporting Overview Block Diagram
Page 39

Programming
Monitoring the Instrument
Status
Reporting
Decision
Chart
1-19
Page 40

Programming
Monitoring the Instrument
Status Reporting Registers
The following gures show the dierent status reporting data structures and
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.
These bits are enabled by using the *ESE common command to set the
corresponding bit in the Standard Event Status Enable Register.
To generate a service request (SRQ) interrupt to an external controller,at
least one bit in the Status Byte Register must be enabled. These bits are
enabled by using the *SRE common command to set the corresponding bit in
RQS
set
then
can
the Service
and MSS
(bit 6)
Request Enable
in the
Status
Register.
Register
Byte
These
enabled
.
bits
1-20
Page 41

Programming
Monitoring the Instrument
Status Reporting Data Structures
1-21
Page 42

Programming
Monitoring the Instrument
1-22
Status Reporting Data Structures (continued)
Page 43

Programming
Monitoring the Instrument
Status Byte Register
(STB)
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.
If the Status Byte Register is to be used with the Service Request Enable
Register to set bit 6 (RQS/MSS) and to generate an SRQ, at least one of the
summary bits must be enabled, then set. Also, event bits in all other status
registers must be specically enabled to generate the summary bit that sets
the associated summary bit in the Status Byte Register.
commands
The
command
clears
Summary
SRQ
the
that are
to cover
do
SRQ
Clearing
another
common
dierence
reads
SRQ
the
Status
interrupt.
the
at
set
possible
all
poll. The
serial
a
interrupt to
6
bit
enabled
return
bit
The
an
allows
Register
Status
The
command
Byte
or
the
SPOLL
the decimal-weighted
two methods
between
as
6
interrupt.
(MSS)
value
present
The
computer
important
external
the
event
the
the Request
The
does
and
returned
.
time
bit
of
use
interfaces
point
computer
instrument
.
occurs
Service (RQS)
*STB? command
not
the
is
can
6
remember
to
the
,
generate
to
can
(HP-IB
sum of
clear the
total
confusing.
be
including
,
serial
be
serial
all set
is that
bit
bit
weights
bit
a
is
poll
another
using
read
poll)
bits in
SPOLL
the
clears
and
reads bit
have
or
of
This
computer
you
if
that
command
SRQ
either
command.
the
(serial
the
as
6
aect
any
of
all
was
bit
that
are
clears
interrupt
the
register
bit
Master
the
on
bits
the
dened
could
using
bit
when
*STB?
Both
.
poll)
which
not
an
6.
No other bits in the Status Byte Register are cleared by either the *STB?
query or the SPOLL (serial poll) command, except the Message Available bit
(bit 4). If there are no other messages in the Output Queue,bit4(MAV) can
be cleared as a result of reading the response to the *STB? command.
4 (weight = 16) and bit 5 (weight = 32) are set, the program prints the
If bit
sum
SRQ,
of
bit
the
6
weights
two
(weight
=
64)
.
Since
not
is
these
set.
bits
were
not
enabled
to generate
The following example uses the *STB? query to read the contents of
an
the
instrument Status Byte Register when none of the register's summary bits are
enabled to generate an SRQ interrupt.
1-23
Page 44

Programming
Monitoring the Instrument
10 OUTPUT 707;":SYSTEM:HEADER OFF;*STB?" !Turn headers off
20 ENTER 707;Result !Place result in a numeric variable
30 PRINT Result !Print the result
40 End
The next program prints 112 and clears bit 6 (RQS) of the Status Byte
Register. The dierence in the decimal value between this example and the
previous one is the value of bit 6 (weight = 64). Bit 6 is set when the rst
enabled summary bit is set and is cleared when the Status Byte Register is
read by the serial poll command.
The following example uses the HP BASIC serial poll (SPOLL) command to
read the contents of the instrument Status Byte Register.
SPOLL(707)
Result
10
20 PRINT
END
30
E
T
O
N
=
Result
Service
Request
Register (SRE)
Enable
Serial
resets
Setting
the preferred
is
polling
and allows
6
bit
the Service
method
event
enabled
next
the
Request Enable
occurs
that
Register
to
bits
generate
enables
interrupt.
SRQ
new
a
corresponding
bits
in
it
because
Register
Byte
Status
the
of
contents
the
read
to
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.
following
The
Enable
OUTPUT
example
Register
.
707;"*SRE 48"
sets bit
4
(MA
V)
and
bit
5
(ESB)
in
the
Service
Request
This example uses the parameter \48" to enable the instrument to generate
an SRQ interrupt under the following conditions:
When one or more bytes in the Output Queue set bit 4 (MA
V).
1-24
Page 45

Programming
Monitoring the Instrument
When an enabled event in the Standard Event Status Register generates a
summary bit that sets bit 5 (ESB).
Trigger Event Register
(TRG)
Status
Standard
Register
Event
(SESR)
This register sets the TRG bit in the status byte when a trigger event occurs.
The TRG Event Register stays set until it is cleared by reading the register
or using the *CLS command. If your application needs to detect multiple
triggers, the TRG Event Register must be cleared after each one.
If you are using the Service Request to interrupt a program or controller
operation when the trigger bit is set, then you must clear the Trigger Event
Register after each time it has been set.
The
Standard
Event
Status
Register
monitors
the
following
instrument
status
events:
On
ower
P
-
PON
Request
User
-
URQ
CME
EXE
DDE
QYE
RQC
OPC
When
register
bits
the
Command
-
Execution
-
Device
-
Query
-
Request
-
Operation
-
of
one
the
If
.
in
set
Error
Error
Dependent
Error
Control
Complete
events
these
bits are
this register
Error
, the
occur
enabled in
generate a
event sets
the Standard
summary bit
corresponding
the
Event Status
bit
to set
Enable
(ESB)
5
in
bit
Register
in
the
the
Status Byte Register.
,
The contents of the Standard Event Status Register can be read and the
register cleared by sending the *ESR? query. The value returned is the total
bit weights of all of the bits that are set at the present time.
following
The
Standard
10
Event
OUTPUT
the
example
Status
uses
Register
.
707;":SYSTEM:HEADER
*ESR
query
OFF"
to
!Turn
read
contents of
the
headers
off
the
20 OUTPUT 707;"*ESR?"
30 ENTER 707;Result
40 PRINT Result
!Place result in a numeric variable
!Print the
result
50 End
If bit 4 (weight = 16) and bit 5 (weight = 32)
are set, the program prints the
sum of the two weights.
1-25
Page 46

Programming
Monitoring the Instrument
Standard Event Status
Enable Register (SESE)
Register
Event
User
(UER)
To make it possible for any of the Standard Event Status Register bits to be
able to generate a summary bit, rst enable the 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.
Set bits are read with the *ESE? query.
For example, suppose your application requires an interrupt whenever any
type of error occurs. The error related bits in the Standard Event Status
Register are bits 2 through 5. The sum of the decimal weights of these bits is
60. Therefore, you can enable any of these bits to generate the summary bit
by sending:
OUTPUT
Whenever
Status
set
to
bit 5
If
SRQ, service
an
Standard
707;"*ESE
an
Register
(ESB)
5
bit
(ESB)
Event Status
corresponding
occurs).
summary
This
other
UER?
However,
bit
register hosts
15 bits
query.
error
.
in
to
are reserved.
This register
60"
it
,
occurs
Status
the
Status
the
Byte
interrupt,
Because
in
the
request
Register
conditions (that
LCL
they
Byte
bit
ou
Y
the
because
Status
the
is
one
sets
are
bits
Byte
Register
is
bits
they
,
is
are
Register
(bit
can
enabled
of
enabled,
all
Register
sent
that
are
enabled,
not
.
from
0)
read
with
these
.
enabled
is
to
are
set
the
and
the
the
not
if
clear
UEE
in
bits
summary
a
(via
external
enabled
corresponding
the
they
Event
Local
this
(User
Standard
the
the
computer
still
not
do
register
Event
is
bit
command),
*SRE
respond
generate
Register
using
Enable
Event
generated
.
their
to
event
a
The
.
the
Register) command. For example, if you want to enable the LCL bit, you send
a mask value of \1" with the UEE command; otherwise, send a mask value of
\0".
Local Event
Register
(LER)
Operation Status
Register (OPER)
This register
the
in
1)
LER?
The
This register hosts the W
sets the LCL bit in the User Event Register and the USR bit (bit
status
query
byte
is
remote-to-local
read
a
and
to
.
used
indicates
It
to
AIT TRIG bit (bit 5), the L
clear
transition
register
this
TEST bit (bit 8), the HIST
has
.
bit (bit 9), the MASK bit (bit 10), and the PROG bit (bit 14).
AIT TRIG bit is set by the Trigger Armed Event Register and indicates
The W
that the trigger is armed.
1-26
occurred.
Page 47

T
Limit
Register
est
Event
TER)
(L
Programming
Monitoring the Instrument
The LTEST bit is set when a limit test fails or is completed and sets the
corresponding FAIL or COMP bits in the Limit Test Event Register.
The HIST bit is set when the COMP bit is set in the Histogram Event Register,
indicating that the histogram measurement has satised the specied
completion criteria.
The MASK bit is set when the Mask Test either fails specied conditions or
satises its completion criteria, setting the corresponding FAIL or COMP bits
in the Mask Test Event Register.
The PROG bit is reserved for future use.
If any of these bits are set, the OPER bit (bit 7) of the Status Byte Register is
T
est
query.
with
The
set.
register output
The
OPEE
the
(COMP)
0
Bit
completes
Operation
command.
the
of
Limit
The
.
Status
enabled
is
Limit
est
T
Register
disabled
or
Event
est
T
completion
read
is
Register
criteria
and
using
cleared
the
set
is
set
are
with
mask
when
by
value
the
the
OPER?
the
supplied
Limit
TESt:RUN
L
command.
est Event
Mask T
Register (MTER)
1
Bit
ailure
F
The
When
(bit
,
bits
using
(F
Limit
either
of
8)
thus
the
AIL) of
criteria
the
for the
est Event
T
COMP or
the
Operation
the
preventing
command.
TEE
L
Limit
Register is
Status
them
T
Limit
Bit 0 (COMP) of the Mask T
completes. The Mask T
est completion criteria are set by the MTESt:RUMode
command.
Limit
the
when
set
.
set,
Y
the
is
by
cleared
they
ou can
TEST bit,
L
TESt:F
L
the
with
turn
in
mask the
command.
AIL
TER?
L
the
the
set
COMP and
by dening
est
FAIL
from
Event
est
T
read
bits
Register
setting
Register
are
are
dened
and
Enable Mask Value
Block COMP and FAIL 0
Enable
Enable
Enable
COMP,
AIL,
F
COMP
block
block
and
AIL
F
COMP
AIL
F
1
2
3
est Event Register is set when the Mask T
T
query
TEST
L
a mask
est
FAIL
est
fails
.
bit
1-27
.
Page 48

Programming
Monitoring the Instrument
Bit 1 (FAIL) of the Mask Test Event Register is set when the Mask Test fails.
This will occur whenever any sample is recorded within any polygon dened
in the mask.
The Mask Test Event Register is read and cleared with the MTER? query.
When either the COMP or FAIL bits are set, they in turn set the MASK bit (bit
10) of the Operation Status Register.You can mask the COMP and FAIL bits,
thus preventing them from setting the MASK bit, by dening a mask using
the MTEE command.
Enable Mask Value
Histogram
Register
Event
(HER)
Arm Event Register
(ARM)
the
Register
Event
the
0
1
2
3
set
is
criteria
Event
HIST
Enable
mask
when
Register
(bit
bit
can
value
the
set
are
is
of
9)
masked
be
Register
to
by
read
the
to
1.
the
and
Operation
using
by
the
(COMP)
0
Bit
Histogram
ogram:RUNTil
HIST
cleared
When
Status
the
value
with
the
Register
HEEN
0.
of
completes
the
COMP
.
command
enable
ou
Y
Histogram
the
.
command.
HER?
is
bit
Results
to
the
Block
Enable
Enable
Enable
The
query
set,
from
set
COMP
COMP and
block
,
COMP
block
AIL,
F
and
COMP
Event
Histogram
Histogram
The
.
turn
in
it
Histogram
the
Histogram
the
by
bit
FAIL
FAIL
COMP
AIL
F
Register
completion
sets
setting
This register sets bit 5 (Wait Trig bit) in the Operation Status Register and the
OPER bit (bit 7) in the Status Byte Register when the instrument becomes
armed.
register
The
with
detect
to
one
Event Register
ARM
AER? query
the
multiple triggers
.
or
stays
using
the
,
set
the
ARM
until
*CLS
Event
cleared
is
it
command.
Register
by
your
If
must
reading
the
application
cleared
be
needs
after
each
If you are using the Service Request to interrupt a program or controller
operation when the trigger bit is set, then you must clear the event register
after each time it has been set.
1-28
Page 49

Programming
Monitoring the Instrument
Status Reporting Bit Denition
Bit Description Denition
PON Power On Indicates that a power-o-to-on transition has occurred.
URQ User Request Indicates that a front-panel key has been pressed.
CME Command Error Indicates that the parser detected an error.
EXE Execution Error Indicates that a parameter was out of range, or inconsistent with
the current settings.
DDE Device Dependent Error Indicates that the device was unable to complete an operation for
device dependent reasons.
all
requesting
for
output
yed.
violated.
pending
the Operation
in
.
the
in
queue
occurred
have
operations.
service
Standard
.
.
in
Query
QYE
Request
RQL
OPC Operation
Operation
OPER
Request
RQS
Master
MSS
Event
ESB
Message
MAV
Message
MSG
User Event
USR
Error
Control
Complete Indicates
Register
Status
Service
Summary
Status
Status
Bit Indicates
vailable
A
Register Indicates
Indicates
Indicates
Indicates
Register
Indicates
Indicates
Status
Indicates
Indicates
Event
User
that
that
that
that
have
that
that
that
Register
that
that
that
Register
the protocol
device
the
device
the
the
of
y
an
occurred.
device
the
device
the
the
of
y
an
occurred.
have
a
is
there
advisory
an
the
of
y
an
.
for queries
requesting
is
completed
has
enabled
requesting
is
a
has
enabled
response
has
enabled
conditions
reason
conditions
in
been
conditions
has been
control.
service
the
displa
TRG Trigger Indicates that a trigger has been received.
LCL Local Indicates that a remote-to-local transition has occurred.
FAIL Fail Indicates that the specied test has failed.
COMP Complete Indicates that the specied test has completed.
TEST Limit
L
MTEST
Mask
est
T
est
T
Indicates
Register
Indicates
has
that
occurred.
of
one
enabled conditions
the
conditions
enabled
the
of
one
that
in
est
T
Mask
the
in
est
Limit T
the
Register has occurred.
HIST Histogram Indicates that one of the
enabled conditions in the Histogram
Register has occurred.
AIT
W
W
rigger Indicates that the instrument is armed and ready for trigger
ait for T
.
TRIG
Status
Event
the
1-29
Page 50

Programming
Monitoring the Instrument
Queues
As errors are detected, they are placed in an error queue. This queue is
rst in, rst out. If the error queue overows, the last error in the queue is
replaced with error0350, \Queue overow." Any time the queue overows,
the least recent errors remain in the queue, and the most recent error is
discarded. The length of the instrument error queue is 30 (29 positions for
the error messages, and 1 position for the \Queue overow" message).
Error queue
Output queue
Message queue
The error queue is read with the SYSTEM:ERROR? query. Executing this
0,
the
\No
the
which
errors
front
reads
query
position
a
opens
been
have
."
error
queue
error
The
instrument
the
the instrument
the last
the instrument
item
and
read
removes
the
at
from
cleared
is
powered
is
receives
read
is
switched
is
the
the
tail
queue
from
oldest
of the
when
up
the
the
from
error from
queue for
subsequent
,
of
any
.
common
*CLS
queue
error
talk
the
only
the head
anew
queries
error
following
command.
.
addressed
to
error.
items
of the
When
return
occur:
mode
queue,
all
on
panel.
the
to
refer
,
queue
error
System
the
\Error
the
Commands
Messages" in
chapter.
this chapter
a complete
For
.
list
or more
F
STEM:ERROR?
SY
error
of
information on
messages
query
refer
,
reading
in
to
The output queue stores the instrument-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
The output
.
queue
ENTER
Basic
HP
the
with
read
be
may
statement.
The message queue contains the text of the last message written to the
advisory line on the screen of the instrument. The length of the instrument's
message queue is 1. The queue is read with the SY
that messages sent with the SY
status bit in the Status Byte Register
STEM:DSP command do not set the MSG
.
STEM:DSP? query
.Note
1-30
Page 51

Programming
Monitoring the Instrument
Key queue
The key queue contains the key codes for the last 10 keys pressed on the
front panel. This queue is rst in, rst out. If the key queue overows, the
oldest key codes are discarded as additional keys are pressed. The key queue
is read with the SYSTEM:KEY? query.
1-31
Page 52

Instrument Block Diagram
As the following block diagram shows, the digitizer samples the applied signal
and converts it to a digital signal. The FISO holds the data until the system
bus is ready for the data. The output of the FISO is raw data, and it is used
as an address to the calibration read-through table (cal table).
The cal table automatically applies the calibration factors to the raw
that the output of the cal table is calibrated data.
1-32
data, so
Page 53

Programming
Instrument Block Diagram
Notice that averaging is turned on or o before the data is stored in the
channel memories. That means once the data is acquired, if you need to turn
averaging on or o before making any measurements, you must reacquire the
data.
Also, you may notice that postprocessing the data includes calculating
functions, storing data to the waveform memories, transferring data over the
HP-IB bus, or transferring data to and from the disk.
After the measurements are performed, the data is sent through the display
portion of the instrument. Notice that connected dots is a display feature,and
that it has no inuence on the measurement results. The pixel memory is
also part of the video RAM, which is past the point where the measurements
performed
are
data
waveform
the
in the
on
pixel
memories
data.
the
memory
Therefore
But,
.
the
or
you
color
,
can
grade
you
make
cannot
make
measurements
display
.
measurements
data
on
on
stored
to
1-33
Page 54

Example Programs
The programs listed in this section are the same as those on the disk provided
with this programmer's reference. The disks are provided in both LIF and
DOS formats. The disks contain some additional les that are created while
running the programs.To preserve the original quality of the example
programs disk, make a copy of the originals and use the copy for running the
programs.
The following example programs are provided in this section:
Digitize
Results?
String
Learn
Service
Conguration
T
Limit
utomated
A
Diagram
Eye
Example
Measurement Example
Example
Request
Example
Example
Example
est
STM-16
Measurement
Measurement
Example
Example
1-34
Page 55

Digitize Example
10 ! RE-SAVE "DIG_83480"
20 !
30 ! Copyright: (c) 1994, Hewlett-Packard Co. All rights reserved.
40 ! Contributor: Colorado Springs Division
50 ! Product: Example Program
60 !
70 ! $Revision: 3.0
80 ! $Date: 93/06/16 14:31:02 $ 6.9.93
90 ! $Author: hmgr $ Ed Mierzejewski
100 !
110 ! Description: DIG_83480.ibw autoscales to get a waveform on screen and
120 ! digitizes the waveform. Then the operator can reposition
! before
130
!
140
!
150
! recalls
160
!
170
Main Routine:
180 !
190
200
210
220
230
240
250
260
270
280
290
300
310
320
330
340 Begin_main:
350
360 CALL Initscope(@Scope)
370 CALL Get_waveform(@Scope,Waveform(*),Preamble(*))
380 CALL Save_waveform(@Path,Waveform(*),Preamble(*))
390 CALL Readme2
400 CALL Retrieve_wave(@Path,Waveform(*),Preamble(*))
410 CALL Graph(Waveform(*),Preamble(*))
420 PRINT TABXY(15,30);"Program has Ended."
430 LOCAL
440
450
460
470
480 SUB Readme
490 ! Description: Readme prints program explaination to the computer
500 ! screen.
510 ! Parameters: none.
520 !
530 CLEAR SCREEN
540 PRINT "DIG_83480.ibw does the following tasks:"
550 PRINT
routines: none.
Sub
!
programs:
Sub
!
!
Functions:
!
Variable
!
!
Preamble
!
!
!
Waveform
!
! @Path
@Scope
!
!
Preamble(1:15)
REAL
INTEGER
Readme
CALL
707
End_main:
END
Begin_subs:!
!
List:
=
=
Waveform(1:4096)
!
!
computer
computer
transfering the
will
screen.
that data
the
draw
also
It
before drawing
Begin_main.
Initscope,
Get_waveform,
Retrieve_wave, Save_waveform.
none.
Preamble
Real
=
preamble,
parameters
Integer
=
path
the
scope's
The
Graph,
Waveform,
&
for
array
they
are
array
saving/recalling
for
complete
the
are
alphas
to
@Path,
first
numerics
store
HPIB
data to
waveform
saves
15
are
and
the
address.
the computer.
repositioned
as
data
the
it.
Readme,
@Scope
&
parameters
the
and
used.
not
wavefrom
to/from
data
a
to
Readme2,
the
of
remaining
data.
media.
Then
on
record
3
Example Programs
the
the
and
Programming
1-35
Page 56

Programming
Example Programs
560 PRINT " a. initialize interface and scope"
570 PRINT " b. digitize and acquire data"
580 PRINT " c. store data to disk"
590 PRINT " d. retrieve data from disk"
600 PRINT " e. draw signal on computer"
610 PRINT
620 PRINT "Assumed system configuration is:"
630 PRINT
640 PRINT " HP-IB address = 7"
650 PRINT " Scope address = 7"
660 PRINT " signal attached to channel 1"
670 PRINT
680 PRINT "If the addresses are not correct, change the ASSIGN "
690 PRINT "statements in sub program 'Initscope'."
700 PRINT
710 PRINT "Press Continue when ready to start"
720 PAUSE
730
740
750 !
760
770
780
790
800
810
820
830
840
850
860
870
880
890
900
910
920
930
940
950
960
970 ! Description: Initscope assigns the path to the scope, initializes
980 ! the scope, autoscales, and sets up the acquisiton
990 ! parameters.
1000 ! Parameters:
1010 ! Passed: @Scope = the HPIB address of the scope.
1020 ! Internal: @Isc = interface select code of the HPIB interface.
1030 ! Modified Variables: @Scope and @Isc
1040
1050
1060
Assign_paths:
1070
1080 ASSIGN @Isc TO 7
1090 ASSIGN @Scope TO 707
1100 Init_sys:
1110
1120 OUTPUT @Scope;"*RST;*CLS"
1130 OUTPUT @Scope;":AUToscale"
1140 OUTPUT @Scope;":SYStem:HEADer OFF"
1150 Acq_setup:
1160 OUTPUT @Scope;":ACQuire;POINts 500"
SCREEN
CLEAR
SUBEND
Readme2
SUB
!
Description:
!
!
Parameters:
!
!
SCREEN
CLEAR
PRINT
"The
PRINT
"read
PRINT
PRINT
"When
PRINT
"from
PRINT
PRINT
"Press
PRINT
PAUSE
SCREEN
CLEAR
SUBEND
!
Initscope(@Scope)
SUB
!
!
SCREEN
CLEAR
"INITIALIZE"
PRINT
CLEAR @Isc
waveform
from
you
the
!_
!
Readme2
none.
the
press
disk,
CONTINUE
!
data
scope
continue
and
to
user
is
preamble
and
stored
and
that
plotted
continue."
status.
information
the
in
computer
the
and
have
computer's
will
screen."
Select Code = 7
information
information
to
! Interface
! scope address
! clear HP-IB interface
! set scope to default
now
be
been"
disk."
retrieved"
config
1-36
Page 57

1170 OUTPUT @Scope;":WAVeform:FORMat BYTE;SOURce CHANnel1"
1180 !
1190 ! Normally WORD data would be recommended because it allows better
1200 ! use of the full resolution of the scope.
1210 ! Byte data is shown because HPBasic doesn't recognize signed bytes
1220 ! and requires a conversion. FNBcon will do the conversion.
1230 !
1240 CLEAR SCREEN
1250 SUBEND
1260 !
1270 SUB Get_waveform(@Scope,INTEGER Waveform(*),REAL Preamble(*))
1280 !
1290 ! Description: Get_waveform digitizes the autoscaled waveform,
1300 ! gets wavefrom data and preamble after the operator
1310 ! adjusts the display to show the data as desired.
1320 !
1330 ! There are 2 forms of digitize: 1. 'with parameters'
!
1340
!
1350
1360 !
!
1370
!
1380
!
1390
!
1400
!
1410
!
1420
!
1430
!
1440
1450
1460
1470
1480
1490
1500
1510
1520
1530
1540
1550
1560
1570
1580 OUTPUT @Scope;":DIGitize"
1590 User_sets_disp: !
1600 LOCAL 707
1610 PRINT "Adjust Display as you want it. Press continue when ready."
1620 PAUSE
1630 Read_data: !
1640 OUTPUT @Scope;":WAVeform:DATA?"
1650
1660
1670
1680
1690 CLEAR SCREEN
1700 PRINT
1710 PRINT "Reading
1720
1730 !Redimension the array for the waveform data.
1740 !read in, one extra byte
1750 !attached to the
1760 !
1770 REDIM Waveform(1:Length)
Parameters:
!
!
!
!
!
!
!
Modified
!
!
!
CLEAR
PRINT
! OUTPUT
ENTER
One_char$="#"
IF
ENTER
ENTER
!
Passed:
Internal:
Variables:
SCREEN
"Get_waveform"
@Scope;":DIGitize CHAN1"
@Scope
@Scope
@Scope
digitize
will
blanked,
is
function memory.
all
associated
but
Both
the
will
@Scope,
Digits
Length
End$
One_char$
USING
USING
USING
channels/functions
'on'
stopped.
digitizes
lines
used.
be
Waveform,
this
=
the
=
enpties
=
=
Waveform, Preamble,
One_char$.
"#,1A,";One_char$
THEN
"#,1D";Digits
"#,"&VAL$(Digits)&"D";Length
";Length;" bytes from scope"
end of the scope's output buffer.
specified
the
place
then
2. 'without
channel/function
here
are
commented
be
must
Preamble
the length
is
of
number
output
find
to
used
read to clear the line feed (10)
channel/function,
data
the
and
memory,
on
and
out
the
of
of
bytes
of
buffer
the '#'
Digits, Length,
associated
in
parameters'
places
and
adjacent
only
or
data
from
data
linefeed.
character.
After data is
digitizes
data
leaves
lines.
the last
header.
the
End$,
screen
channel/
the
in
them
scope.
One
one
and
Programming
Example Programs
on
of
1-37
Page 58

Programming
Example Programs
1780 ENTER @Scope USING "#,B";Waveform(*)
1790 ENTER @Scope USING "-K,B";End$
1800 OUTPUT @Scope;":WAVEFORM:PREAMBLE?"
1810 ENTER @Scope;Preamble(*)
1820 ELSE
1830 PRINT "BAD DATA"
1840 END IF
1850 SUBEND
1860 !
1870 SUB Save_waveform(@Path,INTEGER Waveform(*),REAL Preamble(*))
1880 !
1890 ! Description: Save_waveform sends acquired data and preamble to the
1900 ! computer's disk. It is stored in 'WAVESAMPLE'. If
1910 ! 'WAVESAMPLE' already exist, it will be purged then a
1920 ! new one created.
1930 !
1940 ! Parameters:
1950
1960
1970 !
1980
1990
2000
2010
2020
2030
2040
2050
2060
2070
2080
2090
2100
2110
2120
2130
2140
2150
2160
2170
2180
2190 Waveform(Con)=FNBcon(Waveform(Con))
2200 NEXT Con
2210 SUBEND
2220 !
2230 SUB Graph(INTEGER Waveform(*),REAL Preamble(*))
2240 !
2250 ! Description: Graph takes the converted data and plots it on screen.
2260
2270
2280
2290
2300 ! Parameters: Waveform(*) = array of
2310 !
2320 !
2330
2340 ! Internal: Vrange = preamble(14), y-axis duration
2350 !
2360 !
2370 !
2380 ! vmax = upper limit vertically.
Passed:
!
Internal:
!
Modified
!
Sub
!
!
ON
CREATE
ASSIGN
OUTPUT
SUBEND
!
SUB
!
Description:
!
!
Parameters:
!
!
!
Functions:
!
!
ASSIGN
ENTER
FOR Con=1
!
!
!
Variables:
programs:
CALL
ERROR
BDAT
@Path
@Path;Waveform(*),Preamble(*)
Retrieve_wave(@Path,INTEGER
Passed:
Internal:
@Path TO
@Path;Waveform(*),Preamble(*)
TO Preamble(3)
!
!
Waveform,
@Path,
none
none
Ertrap
Ertrap
"WAVESAMPLE",1,4080
"WAVESAMPLE"
TO
Retrieve_wave
'WAVESAMPLE'.
Waveform,
@Path,
= indexing
Con
=
FNBcon
"WAVESAMPLE"
uses
It
screen
on
seen
as
Preamble(*)
Srange = preamble(12), x-axis
Offset =
vmin = lower limit vertically.
preamble(15), center of screen vertically.
Preamble
Waveform(*),REAL
preamble
and
data
reads
Preamble
variable
converts
from
Display
'Y
the
vertically,
horizontally (pre(14
leaves as voltages.
= the preamble for the data.
bytes.
signed
Range' to
Display
and 'X
and
data values. Enters as q levels
duration of waveform displayed.
Preamble(*))
stored
the
show
Range'
respectively).
12
of waveform displayed.
data
in
seen
as
show
to
1-38
Page 59

2390 ! hmin = lower limit horizontally (preamble(13)).
2400 ! hmax = upper limit horizontally.
2410 ! Hdata(*) = Horizontal values in proper units.
2420 ! Vdata(*) = Vertical values in proper units.
2430 ! I = indexing variable.
2440 !
2450 ! Modified variables: Hdata(*), Vdata(*), and I
2460 !
2470 ! Subprogram calls:V_convert and H_convert.
2480 !
2490 ALLOCATE REAL Hdata(1:Preamble(3))
2500 ALLOCATE REAL Vdata(1:Preamble(3))
2510 CALL V_convert(Waveform(*),Preamble(*),Vdata(*))
2520 CALL H_convert(Hdata(*),Preamble(*))
2530 Vrange=Preamble(14)
2540 Srange=Preamble(12)
2550 Offset=Preamble(15)
Vmin=Offset-Vrange/2
2560
Vmax=Vrange/2+Offset
2570
2580 Hmin=Preamble(13)
Hmax=Hmin+Srange
2590
GCLEAR
2600
2610
2620
2630
2640
2650
2660
2670
2680
2690
2700
2710
2720
2730
2740
2750
2760
2770
2780
2790
2800 DEF FNBcon(INTEGER B)
2810 !
2820 ! Description: FNBcon takes the signed byte value from the scope and
2830 ! converts it to a positive integer of the proper value.
2840 ! Parameters:
2850 ! Passed: B
2860 ! Internal: Orparam = value to OR with the passed value, B, when the
2870
2880
2890
2900
2910 IF BIT(B,7) THEN B=BINIOR(Orparam,B)
2920 RETURN B
2930 FNEND
2940
2950 SUB Ertrap
2960 !
2970 ! Description: Ertrap
2980 !
2990 ! file name. The existing file will be purged.
SCREEN
CLEAR
GINIT
ON
GRAPHICS
0,130,35,100
VIEWPORT
Hmin,Hmax,Vmin,Vmax
WINDOW
FRAME
4
PEN
Hdata(1),Vdata(1)
MOVE
FOR
NEXT
PAUSE
PRINT
PRINT
DEALLOCATE
DEALLOCATE
SUBEND
!
!
Modified
!
!
Preamble(3)
TO
I=1
Hdata(I),Vdata(I),-2
PLOT
Hdata(I),Vdata(I)+ABS(Vmax-Vmin)*.002
DRAW
I
TABXY(0,18),"Vertical=";Vrange/8;"
TABXY(0,19),"Time=";Srange/10;"
Hdata(*)
Vdata(*)
MSB
Variables:
B
Orparam=-256
!
is called by an error interupt. It checks for
error #54 which will occur when there is a duplicate
set.
is
!initialize
!plot
V/div";TAB(50),"Offset
s/div"
data
graphics
points
= ";Offset;"V"
Programming
Example Programs
1-39
Page 60

Programming
Example Programs
3000 ! Parameters: none
3010 !
3020 IF ERRN=54 THEN PURGE "WAVESAMPLE"
3030 OFF ERROR
3040 SUBEND
3050 !
3060 SUB V_convert(INTEGER Wav(*),REAL Pre(*),Vdata(*))
3070 !
3080 ! Description: V_convert takes the data from the scope and converts it
3090 ! into voltage values using the equation from the manual.
3100 !
3110 ! Parameters: Wav(*) = array of data values. Enters as q levels
3120 ! leaves as voltages.
3130 ! Pre(*) = the preamble for the data.
3140 ! Vdata (*) = array of vertical values, volts.
3150 !
3160 ! Internal: yref = pre(10), level associated with y origin.
!
3170
!
3180
3190 !
!
3200
Modified
!
3210
!
3220
Yref=Pre(10)
3230
Yinc=Pre(8)
3240
Yorg=Pre(9)
3250
3260
3270
3280
3290
3300
3310
3320
3330
3340
3350
3360
3370
3380
3390
3400
3410 ! xorg = pre(6), x-axis value of first point in record.
3420 !
3430 ! Modified variables: Hdata(*)
3440 !
3450 Xref=Pre(7)
3460 Xinc=Pre(5)
3470 Xorg=Pre(6)
3480
3490
3500
3510
C=1
FOR
Vdata(C)=(Wav(C)-Yref)*Yinc+Yorg
C
NEXT
SUBEND
!
H_convert(Hdata(*),Pre(*))
SUB
!
Description:
!
!
!
Parameters:
!
!
!
Internal:
!
! xinc
C=1
FOR
Hdata(C)=((C-1)-Xref)*Xinc+Xorg
C
NEXT
SUBEND
yinc
yorg
C=
variables:
Pre(3)
TO
H_convert
equation
Hdata(*)
Pre(*)
xref
Pre(3)
TO
=
=
=
= pre(5),
duration
pre(8),
y-axis
pre(9),
indexing variable.
Vdata(*)
creates
from
Horizontal
=
the
=
data
pre(7),
duration between
horizontal
manual.
the
preamble
point
between
value
values.
for
at
the
associated
y-axis
level
axis
data.
x-axis
levels.
zero.
values using
the
with
points.
data
origin.
x
the
1-40
Page 61

Results? Measurement Example
10 ! RE-SAVE "RESU_83480"!Operation of SENDValid & STATistics on RESULTS?
20 !
30 !**********************************************************************!
40 !******************** Main Program, Rev. 1.18 ***********************!
50 !**********************************************************************!
60 Readme
70 Initscope(@Scope)
80 True_rep(@Scope)
90 Measure(@Scope)
100 PRINT "End of Program -- Results are on your printer."
110 BEEP 15,2
120 !*************************************************************!
END !*
130
140
150 !
160
170
180 !********************************************************
190
200
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350
360 PRINT
370 PRINT " HP-IB interface is at address 7."
380 PRINT " Scope is at address 7."
390 PRINT " An 83483A is installed into slots 1 & 2."
400 PRINT " Printer at 701"
410 PRINT
420 PRINT "If these addresses are incorrect, break program and set addresses"
430
440
450
460
470
480 SUBEND
490 !
500 SUB Initscope(@Scope)
510 !****************************************************************!
520 !* This sub program initializes the I/O and
530 !****************************************************************!
540 ASSIGN @Scope TO 707
550 CLEAR @Scope !clear HP-IB interface
!********************************************************
!*************************************************************!
!*
Readme
SUB
!********************************************************
sub program
!*This
!********************************************************
SCREEN
CLEAR
"This
PRINT
"from
PRINT
PRINT
"It
PRINT
"Then
PRINT
PRINT
"The
PRINT
"of
PRINT
PRINT
"This
PRINT
PRINT
"The
PRINT
"as
PRINT
PRINT
"PRESS
PRINT
PAUSE
SCREEN
CLEAR
example
HP8133A
an
measures
the
uses
report
STATISTICS
program
program
in
needed
continue
writes
program
the
*RESULTS?*
from
ON|OFF
will
assumes
the
to
generator
Positive
the
print
ASSIGN
run
End of
Begin
user
will
RESULTS?
and
that the
program"
Main Program
Programs
Sub
information
program
measure
any
(or
Width
Pulse
report
to
varies
SENDValid
results
the
system is
statements."
the
to
signal."
the
signal).
similar
Statistics."
with
HPIB."
the
over
each
on
the
of
depending
ON|OFF."
for
configured such
scope. *!
*********!
screen.*!
*********!
"
the status"
cases."
*****!
*****!
that:"
Programming
Example Programs
*!
*!
1-41
Page 62

Programming
Example Programs
560 OUTPUT @Scope;"*cls"
570 OUTPUT @Scope;"*RST" !reset scope to default config
580 OUTPUT @Scope;":SYSTEM:HEADER OFF"!turn off header
590 CLEAR SCREEN
600 SUBEND
610 !
620 SUB True_rep(@Scope)
630 !****************************************************************!
640 !* This sets up the scope to look at the signal of the 8133. *!
660 !****************************************************************!
670 PRINT " Connect the HP 8133A CHANNEL 1 Output to the Input "
680 PRINT " of the 83483A. "
690 PRINT
700 PRINT " Press continue when ready to continue. "
710 PAUSE
720 CLEAR SCREEN
730 OUTPUT @Scope;":channel1:display on"
770
780
790 WAIT
800
810
820
840
850
860
SUBEND
870
!
880
SUB
890
900
910
920
930
940
950
960
970
980
990
1000
1010
1020 !***************************************************************!
1030 OUTPUT @Scope;":measure:source channel1"
1040 PRINTER IS 701
1050 FOR C=1 TO 4
1060 OUTPUT @Scope;"run"
1070 MAT R= (0)
1080 OUTPUT @Scope;":measure:statistics ";INT(C/3)
1090
1100
1110
1120
1130 ENTER @Scope;Sv$
1140 OUTPUT @Scope;":measure:pwidth"
1150 OUTPUT CRT;"Measuring
1160
1170 OUTPUT @Scope;"stop"!* See that values match ON
1180 OUTPUT @Scope;":measure:results?"
1190 ENTER @Scope USING
1200 OUTPUT
1210 PRINT
@Scope;":autoscale"
OUTPUT
@Scope;":display:persistence
OUTPUT
5
displayed
The
"
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
!********************************************************
!*
!*
!********************************************************
CLEAR
PRINT
REAL
!********************************************************
!
!
!
! statistics,
representation
"
Sampling
"
Analog
"
Measure(@Scope)
program
sub
This
also
will
It
SCREEN
Measuring
"
R(1:12)
Normally
by a
want
OUTPUT
OUTPUT
ENTER
OUTPUT
WAIT 20
when
DIGITIZE. But,
from
it
@Scope;":measure:sendvalid
@Scope;":measure:statistics?"
@Scope;St$
@Scope;":measure:sendvalid?"
!* Give the measurements a chance to build up values *!
report
Waveform
making
previous
I will
waveform
the
of
is
rate
Bandwidth
make
will
mean
the
measurements,
because I
sub
not use
for 20 seconds to get good stats."
on
8133A
40
is
a +width
and
Reporting
and
programs
the
infinite"
the
signal."
kSa/s,"
GHz"
20
standard
have the
DIGITIZE
";C
is the
83480A
measurement.
deviation.
Results.
should
they
scope
will
I
and
command.
2
MOD
be
setup
be
true "
"
preceeded
using
SCREEN & OVER HPIB *!
CRT;"Printing Results to your printer"
"%,K";R(*)
*******!
*******!
*******!
like
the !
*!
*!
!
!
I
!
1-42
Page 63

1220 PRINT "Statistics is ";St$,"SendValid is ";Sv$
1230 PRINT
1240 PRINT "First value is ";R(1)
1250 PRINT "Second value is ";R(2)
1260 PRINT "Third value is ";R(3)
1270 PRINT "Fourth value is ";R(4)
1280 PRINT "Fifth value is ";R(5)
1290 PRINT "Sixth value is ";R(6)
1300 PRINT "Seventh value is ";R(7)
1310 WAIT 5
1320 CLEAR SCREEN
1330 NEXT C
1340 PRINTER IS CRT
1350 SUBEND
Programming
Example Programs
1-43
Page 64

Programming
Example Programs
Learn String Example
10 !RE-SAVE "LSTG_83480" !HP Basic for HP-IB interface, rev 2.0
20 !*******************************************************************
30 !* This program reads and returns the learn string from and to a *
40 !* 83480 Oscilloscope. *
50 !* ******************** *
60 !* ******************** *
70 !* Begin MAIN PROGRAM *
80 !*******************************************************************
90 COM /Io/ @Scope,Hpib
100 Readme !Description of the program
110 Initscope !initialize interface and scope
120 Length=FNStsize !find setup string size.
Get_learnstr(Length) !save
130
Recall_learnstr(Length)
140
PRINT
150
BEEP 15,1
160
PRINT
170
180 !********************************************************
!*
190
!********************************************************
200
END
210
!********************************************************
220
!*
230
!********************************************************
240
250
260
270
280
290
300
310
320
330
340 OUTPUT
350
360 OUTPUT @Scope;":SYST:HEAD OFF"
370 OUTPUT @Scope;"*OPC?" !wait for scope to finish auto
380 ENTER @Scope;Opc
390 SUBEND
400 !
410 SUB Readme
420 !*********************************************************************
430 !*
440
450
460
470
480 PRINT "scope in three different configurations and will store"
490 PRINT "them to the computer disk. Any of the three configurations"
500 PRINT "may then be recalled from the disk and sent to the
510 PRINT
520 PRINT "The program assumes that the system is
530 PRINT "
540 PRINT "
550 PRINT " a signal is attached to channel 1"
Initscope
SUB
!********************************************************
!*
!********************************************************
COM /Io/
Hpib=7
Scope=7
ASSIGN
CLEAR
OUTPUT
!*
!********************************************************
CLEAR
PRINT
done"
"program
End
Begin
initializes
program
sub
This
@Scope,Hpib
Hpib*100+Scope
TO
@Scope
Hpib
@Scope;"*RST"
@Scope;":AUTOSCALE"
displays
program
sub
This
user.
SCREEN
"This
program
sample
HP-IB interface is at address 7"
scope is at address 7"
3 configurations
recall
&
!select
Programs *
of Main
Programs
Sub
INTERFACE
the
address
!scope
HPIB
!clear
scope
!set
!AUTOSCALE
about
message
a
the user
prompt
will
on disk
setups
3
of
1
*******
*******
*******
*******
AND
**
**
SCOPE
interface
config
default
to
program
the
*************
up
set
to
configured such that:"
*
for
the"
scope"
the
*
*
*
1-44
Page 65

Example Programs
560 PRINT
570 PRINT "If these addresses are incorrect, break program and set addresses"
580 PRINT "as needed in the Initialize in the ASSIGN statements."
590 PRINT
600 PRINT "Press CONTINUE when ready to start. Scope will first autoscale"
610 PRINT "on signal on channel 1 and will then prompt for user to setup"
620 PRINT "scope as desired before saving configurations in computer."
630 PRINT
640 PAUSE
650 CLEAR SCREEN
660 SUBEND
670 !
680 SUB Get_learnstr(Length)
690 !**************************************************************
700 !* This sub program will get the learn string from the 83480 *
710 !* and place it in SET$. Then it will create a BDAT file *
720 !* called "JSETUPS" which holds 3 records. If this file is *
730
740
750 COM
760
770
780
790
800
810
820
830
840
850
860
870
880
890
900
910
920
930
940
950
960
970 SUBEND
980 !
990 SUB Ertrap
1000 !***********************************************************
1010 !* The program will branch to this Error Trap if the *
1020 !* ON ERROR is ON and an error occurs. It reset the *
1030 !* ON ERROR to OFF the return to where it was called. *
1040
1050
1060
1070
1080 ELSE
1090 CLEAR SCREEN
1100 PRINT ERRM$
1110
1120 PAUSE
1130 END IF
1140 SUBEND
1150 !
1160 SUB Recall_learnstr(Length)
already
!*
!********************************************************
/Io/ @Scope,Hpib
CALL
ERROR
ON
BDAT
CREATE
Set$[Length]
ALLOCATE
@Path
ASSIGN
TO
I=1
FOR
SCREEN
CLEAR
@Scope
LOCAL
"PLEASE
PRINT
A$
INPUT
@Scope;":SYSTEM:SETUP?"
OUTPUT
@Scope
ENTER
Set$[1;1]="#"
IF
OUTPUT
ELSE
SCREEN
CLEAR
"Received
PRINT
IF
END
I
NEXT
@Path
ASSIGN
DEALLOCATE Set$
!********************************************************
ERRN=54
IF
"JSETUPS"
PURGE
ERROR
OFF
BEEP
it
created
Ertrap
"JSETUPS",3,Length
"JSETUPS"
TO
3
SETUP
HAVE
"-K";Set$
USING
THEN
@Path,I;Set$
bad
*
TO
Error 54
!
THEN
will
data.
be
#";I;"
is
PURGED!
!create
!setups.
!temp
!open
READY
!query
!read
!store
setup
No
Duplicate
files
3
variable
file
PRESS
AND
learnstring
learn
setup
saved."
Name
File
for
to
RETURN"
string
string
hold
******
different
3
string.
from
from
disk
to
!close
***
scope
scope
*
file
Programming
1-45
Page 66

Programming
Example Programs
1170 !
1180 ! This sub program lets the user select which of the 3 setups
1190 ! that have been stored on the disk in "JSETUPS1, 2, or 3 to
1200 ! use to setup the scope. It will loop until the user selects
1210 ! (E) to exit.
1220 !
1230 COM /Io/ @Scope,Hpib
1240 ASSIGN @Path TO "JSETUPS" !open file
1250 ALLOCATE Set$[Length] !create temp variable.
1260 Done=0
1270 REPEAT
1280 CLEAR SCREEN
1290 PRINT "Please enter (1) to recall setup 1"
1300 PRINT " (2) to recall setup 2"
1310 PRINT " (3) to recall setup 3"
1320 PRINT " (E) to exit"
1330 INPUT A$
1340
1350
1360 ENTER
1370
!
1380
!
1390
!
1400
1410
1420
1430
1440
1450
1460
1470
1480
UNTIL
1490
DEALLOCATE
1500
ASSIGN
1510
SUBEND
1520
!
1530
DEF
1540
1550
1560
1570
1580 !The format of the data is #NX...X<setup data string>. Then I
1590 !add 5 for the bdat file management headers.
1600 !
1610 COM /Io/ @Scope,Hpib
1620 DIM Psign$[1]
1630 INTEGER Length,Cnt,L
1640 ON TIMEOUT Hpib,3 CALL Tout
1650
1660
OUTPUT
1670
1680
1690 Cnt=0
1700 REPEAT
1710 ENTER @Scope
1720
1730 !indicates the beginning of the block header.
1740 Cnt=Cnt+1
1750 !FN must keep
1760 !sign
1770 UNTIL Psign$="#"
UPC$(A$)
SELECT
"1","2","3"
CASE
@Path,VAL(A$);Set$ !read
Set$[1;1]="#"
IF
command
Add
OUTPUT
ELSE
CLEAR
PRINT
IF
END
"E"
CASE
Done=1
SELECT
END
Done
Set$
@Path
FNStsize
!
setup
!The
!revision. Must
!Set
!the
@Scope;":SYSTEM:SETUP?"
!Query
!Enter a character at a time until find the # sign. It
THEN
string
setup
to
header
"#,K";":SYSTEM:SETUP
USING
@Scope
SCREEN
string
no
data,
*
bus
sign,
scope
bad
size
read the
timeout
will stop
we
for
can
header to
the
vary,
so
setup
depending
there is
if
and
string.
"Received
TO
string
the
#
USING "#,A";Psign$
track of the number of characters before the #
for cases where the system headers are ON.
and send
entered."
determine
the
let
!Have
entire string
";Set$
operating
on
the
no/bad
operator
data from
good
data,
proper
know.
data.
system
can't
disk.
scope.
to
lengths.
find
1-46
Page 67

1780 ENTER @Scope USING "#,A";Psign$
1790 !Next character tells the number of digits in the header.
1800 ENTER @Scope USING "#,"&Psign$&"D";Length
1810 !Length is the number of data values to follow before the NL.
1820 ALLOCATE Temp$[Length+1]
1830 ENTER @Scope USING "#,-K";Temp$
1840 L=7+Cnt+VAL(Psign$)+Length
1850 DEALLOCATE Temp$
1860 RETURN L
1870 FNEND
1880 !
1890 SUB Tout
1900 !Branching here says that the HPIB bus was idle for 3 seconds.
1910 !This would be caused by reaching the end of the setup data without
1920 !finding a # sign.
1930 CLEAR SCREEN
1940 PRINT "Bad Data, query aborted."
1950
1960
1970 SUBEND
BEEP
PAUSE
Programming
Example Programs
1-47
Page 68

Programming
Example Programs
Service Request Example
10 ! RE-SAVE "SRQ_83480"
20 ! This program sets the Event Status Enable Register and the
30 ! Service Request Enable Register so that an error will cause
40 ! a service request. It also saves a setup to a setup memory
50 ! and recalls that setup.
60 DIM Query$[15],Command$[15],Q$[9000]
70 COM /Err/ Hpib,Scope
80 COM /S/ @S
90 Hpib=7
100 CLEAR Hpib
110 Scope=7
120 Saddr=Hpib*100+Scope !Sets the I/O address.
Readme
130
ASSIGN
140
INTR Hpib,15
150 ON
CLEAR Saddr
160
OUTPUT
170
180 !
190
200
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350
360 LOCAL Saddr
370 Readme2
380 END
390 !
400 SUB Ermsg !Error Trap
410 COM /S/ @S
420 COM /Err/ Hpib,Scope
430
440
450
460
470
480 OUTPUT @S;"*ESR?"!Reads then clears the Standard Event
490 ENTER @S;J
500 Srq_type(J) !Call to the SRQ interpreter subprogram.
510 Done=0
520 REPEAT
530 ! Read the Error Queue to
540 ! until the Queue is empty. Each time the queue is read the
550 ! be reported or the message 'THERE ARE NO MORE ERRORS' will be returned.
*ESE XX
!
!
!
!
!
!
*SRE
!
!
ENABLE
Saveset$="*SAV
Recallset$="*RCL
!
OUTPUT
WAIT
LOCAL
Readme1
OUTPUT
DIM
PRINT
Sp=SPOLL(707)
IF
Testing
!
Saddr
TO
@S
@S;"*ESE
INTR
@S;Saveset$
1
Saddr
CALL Ermsg
60;*SRE
the
sets
or
CME
=>
32
16
-----------------------------------
60
XX
32
=>
8=>
=>
4
sets
=>
Hpib;2
EXE
DDE
QYE
ESB
"
the
1"
or
or
or
or
@S;Recallset$
32;*CLS"
Event
Command
Execution
Device
Query
Service
Event
!Allows
!This
!This
!Send
!Recalls
!Tells
Status
Error
Dependent
Error
Request
Status
command
recalls
the
Error
the
command,
E$[50]
occured.",
error
"An
bit
THEN
6
will
tell
us if
BIT(Sp,6)
determine the specific error. Repeat reading
computer
Enable
Error
Enable
Bit
HPIB
is
setup
setup
scope
the
where
Regiser.
Register.
to
missing
causes
#1.
is
to
interrupt
the
#1.
CME
source
the
on
go
the
parameter,
until
error
an
computer.
1
the
the
of
Status Register
1.
added.
is
interrupt.
error will
1-48
Page 69

560 OUTPUT @S;":SYSTEM:ERROR? STRING"
570 ENTER @S;E$
580 IF E$[1;1]="0" THEN
590 PRINT "THERE ARE NO MORE ERRORS."
600 OUTPUT @S;"*CLS" !Clears all event registers and queues except
610 !the output queue.
620 ENABLE INTR Hpib;2
630 Done=1
640 Readme3
650 ELSE
660 PRINT E$
670 END IF
680 UNTIL Done
690 ELSE
700 CLEAR SCREEN
710 PRINT "An interrupt on the HPIB has occured but it is not the "
720 PRINT "scope. Please clear the other source of interrupt before"
730
740
750 END
SUBEND
760
!
770
SUB
780
790
800
810
820
830
840
850
860
870
880
890
900
910
920
930
940
950
960
970 PRINT " The scope is at address 7"
980 PRINT " The HPIB is at address 7"
990 PRINT
1000 PRINT " If the configuration is different, break program and set "
1010 PRINT " the addresses as required using the variables Hpib and "
1020 PRINT " Scope. Then run again."
1030 PRINT
1040
1050
1060
1070
1080 SUBEND
1090 !
1100 SUB Readme1
1110
1120 PRINT "
1130 PRINT
1140 PRINT "
1150 PRINT
1160 PRINT
"restarting
PRINT
PAUSE
IF
Readme
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT "
PRINT
PRINT
PAUSE
CLEAR
service
a
"
The
"
the
"
there
"
parameter.
"
After
"
save
to
"
Once
"
current
"
change
"
restored."
"be
The expected
Press
"
SCREEN
second
current
is
you
you have
the
Continue
program
This
"
PRINT
Service
"
PRINT
The current setup has been
Change
" press continue, the original setup will be restored."
program."
this
and the"
Register
Enable
Status
Event
the
Request
request.
function
scope
bug
a
It
have
setup."
the
setup
setup.
sets
Enable
setup
this
in
needs
seen
fixed the
setup
to
"
of
how
When
Register
this
to
program.
1 after
a
the
bug
memory
you
so
program
from
and
the
SRQ's
program
the
then
1
continue,
that
to
is
setup memory
save
The
space
you
work
pause
the
error
an
save
command
or
may
will
and
original
'*SAV
run
will
and
1.
edit
and
allow
then
However,"
missing
is
1'."
line
save
you
setup
cause"
configuration is;"
when
ready
to resume
operation."
saved in setup memory #1."
the scope's setup from the front panel. When you"
recall"
280"
the"
to
will"
Programming
Example Programs
a"
"
1-49
Page 70

Programming
Example Programs
1170 BEEP
1180 PAUSE
1190 CLEAR SCREEN
1200 SUBEND
1210 !
1220 SUB Readme2
1230 PRINT " The program has ended. Thanks for trying our Save "
1240 PRINT " and Recall setup memories."
1250 PRINT
1260 ! PRINT " Now you have the opportunity to edit the program"
1270 ! PRINT " to generate an error and see how the interrupt masking"
1280 ! PRINT " works."
1290 PRINT
1300 PRINT " GOODBYE. "
1310 SUBEND
1320 !
1330 SUB Readme3
PRINT
1340
this
at
program
the
Break
"
PRINT
1350
1360 PRINT
PRINT
1370
PRINT
1380
PRINT
1390
PRINT
1400
STOP
1410
CLEAR
1420
SUBEND
1430
!
1440
1450
1460
1470
1480
1490
1500
1510
1520
1530
1540
1550
1560
1570
1580 CASE 4
1590 PRINT "4 => QYE or Query Error."
1600 END SELECT
1610 SUBEND
Srq_type(J)
SUB
The
!
Standard
!
read
!
SRQ
!
PRINT
SELECT
CASE
PRINT
CASE
PRINT
CASE
PRINT "8
"the
Once
"
the
"
RUN."
"
SCREEN
scope
the
by
generated.
was
"ESR
J
32
"32
16
"16 =>
8
has
Event
value
=>
=> DDE
error."
error
*ESR?
have
you
code
interrupted
Status
will
";J
is
or
CME
EXE or
or Device
the
fixed
message,
and
computer
the
Register.
evaluated
be
Error."
Command
Execution Error."
Dependent
time
cause
Now
and
the
of
rerun the
and
the value,
determine
to
Error."
determine
error
program by
have
we
J,
why
described
read
that
the
the
cause of
by"
pressing"
the
was
"
1-50
Page 71

Conguration Example
10 !RE-SAVE "CONFIG" !This is an RMB and IBasic Program.
20 !
30 !It queries the scope to determine the configuration and then
40 !prints it to the crt. It assumes that the scope is at HPIB 7
50 !
60 DIM Mframe$[13],Slot$(1:4)[13]
70 OUTPUT 707;":SYSTEM:HEADER ON"
80 OUTPUT 707;":SYSTEM:LONGFORM ON"
90 !
100 !***** DETERMINE THE FRAME MODEL NUMBER ******!
110 !
120 OUTPUT 707;":MODEL? FRAME"
ENTER 707;Mframe$
130
!
140
!*****
150
!
160
170
180 OUTPUT
190
200
210
220
230
240
250
260
270
280
290
300
310
320
330
I=1
FOR
ENTER
I
NEXT
!
!*****
!
CLEAR
PRINT
PRINT
PRINT
PRINT
PRINT "The
PRINT
PRINT
PRINT
END
DETERMINE
4
TO
707 USING
707;Slot$(I)
REPORT
SCREEN
Main
"The
plug-in
"The
plug-in
"The
plug-in
plug-in
"The
of
"End
THE
"K";":MODEL?
MAINFRAME
THE
frame
in
in
in
in
Program"
PLUG-INS
";Mframe$
is
1
slot
2
slot
3
slot
4
slot
AND
PLUGIN";I
MODEL
";Slot$(1)
is
";Slot$(2)
is
";Slot$(3)
is
";Slot$(4)
is
THEIR
AND
#
LOCATIONS
PLUG-INS
Programming
Example Programs
********!
*******!
1-51
Page 72

Programming
Example Programs
Limit Test Example
10 ! RE-SAVE "MLIM"
20 !
30 ! Copyright: (c) 1994, Hewlett-Packard Co. All rights reserved.
40 ! Contributor: Colorado Springs Division
50 ! Product: Throughput Application
60 !
70 ! $Revision: 1.1 $ 3.0
80 ! $Date: 93/06/16 14:32:52 $ 6-14-93
90 ! $Author: hmgr $ Ed Mierzejewski
100 !
110 ! Structure Chart: None
120 ! Description: This Uses Measure Limit Testing to make 3 measurements
! on
130
!
140
Considerations: None
150 !
! Main
160
!
170
180 !
!
190
!
200
Variable_list:!
210
Begin_main:
220
CALL
230
CALL
240
CALL
250
CALL
260
End_of_main:
270
END
280
!
290
Begin_subs:
300
!
310
SUB
320
!
330
!
340
!
350
360 ! proper setup prior to continuing the program.
370 !
380 ! Parameters: None
390 !
400 CLEAR SCREEN
410 PRINT TABXY(5,5)
420 PRINT "MLIM.ibw uses a HP8133 to generate "
430
440
450
460
470
480 PRINT
490 PRINT "It makes a Vpp, Risetime, and Positive pulse width measurement"
500 PRINT "on each and reports the mean after all 10 measurement sets
510 PRINT "complete."
520 PRINT
530 PRINT "There are NO specific plug-ins
540 PRINT "must be in channel 1. (Program was developed using a 83483A"
550 PRINT "installed in slot 1 of a 83480A."
routine: Begin_main
Sub-routines:
Functions: None
Sub-programs:
!
Readme
Set_paths(@Scope,Isc)
Set_scope(@Scope)
Meas(@Scope,Isc)
!
!
Readme
Description: Readme
pulses
"
PRINT
"(these
PRINT
"standard
PRINT
PRINT
PRINT
It
"
10 successive
None
Readme,
writes instructions
beginning
30.303
a
with
settings
settings.)"
work
will
Set_paths,
of
can
with
program for
the
ns
selected
be
any similar
pulses at
Set_scope,
and information
the user
period, 0.1
recalling
by
signal."
required, except a suitable one"
Hz
a10
Meas,
amplitude"
V
rate.
Tcount
at the
to ensure
the"
are"
1-52
Page 73

560 PRINT
570 PRINT "The HPIB card is assumed to be at interface select code 7 and"
580 PRINT "the scope is at address 7."
590 PRINT
600 PRINT "If using the 8133A, "
610 PRINT "connect CHANNEL1 OUTPUT to Channel 1 Input, and"
620 PRINT "connect TRIGGER CHANNEL OUTPUT to Trigger 2 Input, then"
630 PRINT "enable CHANNEL1 OUTPUT and TRIGGER CHANNEL OUTPUT."
640 PRINT
650 PRINT "Ensure all of this is correct before continuing."
660 PRINT
670 PRINT "press continue when through reading this."
680 PAUSE
690 CLEAR SCREEN
700 SUBEND
710 !
720 SUB Set_scope(@S)
!
730
Description:
!
740
750 !
!
760
!
770
780
790
800
810
820
830
840
850
860
870
880
890
900
910
920
930
940
950
960
970 !
980 ! Turn off sendvalid, on statistics, and sets source to channel 1
990 !
1000 OUTPUT @S;":meas:vpp;ris;pwid"
1010 SUBEND
1020 !
1030 SUB Set_paths(@Scope,Isc)
1040
1050
1060
1070
1080 ! Parameters:
1090 !
1100 !
1110
1120 ! Modified Variables: @Scope
1130 !
1140 CLEAR SCREEN
1150 Isc=7
1160 Scope=7
Parameters:
!
!
Internal:
!
!
Modified
!
!
Omit
!
Part_1:
OUTPUT
OUTPUT
OUTPUT
OUTPUT
OUTPUT
OUTPUT
OUTPUT
OUTPUT
OUTPUT
Part_2:
OUTPUT @S;":meas:send
!
Description:
!
!
!
Passed: @Scope =
! Internal:
Set_scope
initialize the
1--
set
--
2
@Scope
(@S)
Passed:
Variables:
Part_1
@S;"*rst;*cls"
@S;":opee
@S;"*sre
@S;":disp:grat
@S;":blan
@S;":blan
@S;":acq:poin
@S;":chan1:band
@S;":autoscale" !
None
already
you
if
256"
128"
chan2;view
chan3;blan
Set_paths
scope
the
= the HPIB address that the scope is selected to.
scope
Isc = the interface select code for the HPIB card.
parts:
2
has
for
fram"
512"
high;disp
measurement
specific
=
a
have
!
chan1"
chan4"
suitable scale
Get a
scope
on;offs
off;stat on;sour
assigns HPIB
simply
address to
I/O path 707
i/o.
and
the
of
scope's
instrument state.
good
Initialize
Unmasks
!
Unmasks
!
0;prob
chan1"
select
7.
be
pulses.
address,
measure
to
Lim.Tst.
the
bit,
oper
the
1,rat;scal
for measurement.
Set
!
code
pulses.
Comp.
see
.1"
Measurements
7
be
to
bit.
Ltest.
and
Programming
Example Programs
1-53
Page 74

Programming
Example Programs
1170 ASSIGN @Scope TO Isc*100+Scope
1180 SUBEND
1190 !
1200 SUB Meas(@S,Isc)
1210 !
1220 ! Description: The scope is setup and waiting to make continuous meas's.
1230 ! 1 -- Setup On interupt so Lim. Tst. Comp. gives SRQ.
1240 ! 2 -- Setup Limit test.
1250 ! 3 -- Set RUN Limit Tests.
1260 ! 4 -- Report results.
1270 !
1280 ! Parameters:
1290 ! Passed: (@S) @Scope = specific scope's address,
1300 ! COM /For_cnt/ INTEGER num_acq, M
1310 !
1320 ! Internal: Results(*) = array of values returned from a RESULTS?
1330 ! Value 4 of each set is the mean. Therefore,
!
1340
!
1350
1360 !
!
1370
!
1380
Modified
!
1390
!
1400
1410
1420
1430
1440
1450
1460
1470
Part1:
1480
1490
Part2:
1500
1510
1520
1530
1540
1550
Part3:
1560
1570
1580 OUTPUT @S;":run" ! scope will wait for triggers.
1590 REPEAT ! wait for limit test complet.
1600 UNTIL Num_acq=M
1610 Part4: !
1620 OUTPUT @S;":meas:res?" ! read summary of measurements.
1630 ENTER @S;Results(*)
1640 CLEAR SCREEN
1650
1660
1670
1680
1690 PRINT
1700 PRINT "The results report
1710 SUBEND
1720
1730 SUB Tcount
1740 !
1750 ! Description: Tcount
1760 !
1770 ! Parameters:
Calls
!
!
/For_cnt/
COM
REAL
M=10
Num_acq=0
CLEAR
INTR
ON
!
OUTPUT
OUTPUT
OUTPUT
OUTPUT
OUTPUT
!
ENABLE INTR
PRINT
PRINT
PRINT
PRINT
!
sub
Results(1:27)
SCREEN
@S;":ltes:sour
@S;":ltes:sour
@S;":ltes:sour
@S;":stop;cdis"
@S;":ltes:test on"
"
"The
"the
"the
measurement sets
M=
Num_acq
Variables:
programs:
INTEGER
CALL
Isc,9
Isc;2
The
mean
vpp
time mean
rise
+width
Test Complete interupt occurs.
Results(4),
interest.
termination
the
=
Num_acq
Tcount
Num_acq,M,S
Tcount
nev;mnf
1;fail
nev;mnf pass;run
2;fail
nev;mnf
3;fail
are;"
results
is ";Results(4);","
mean
";Results(13);",
is
";Results(22);"."
is
is:";Results(*);"."
will set Num_acq to the stop value when the Lim.
(13),
requested.
variable.
need
!
parameters
9
!
Setup
!
pass;run
pass;run
and
pass
to
interupt
wav,";M
wav,";M
wav,";M
and"
(22)
are
num_acq
measurement.
per
the
of
ones
intr.
on
1-54
Page 75

1780 ! Passed:
1790 ! COM /For_cnt/ INTEGER Num_acq,M
1800 ! Num_acq = the variable used to terminate at proper number.
1810 ! M = the number of acquisitions wanted, termination value.
1820 ! Internal: None
1830 !
1840 ! Modified Variables: num_acq
1850 !
1860 ! Calls sub programs: None
1870 !
1880 COM /For_cnt/ INTEGER Num_acq,M,S
1890 PRINT "hello"
1900 Num_acq=M
1910 SUBEND
Programming
Example Programs
1-55
Page 76

Programming
Example Programs
Automated STM-16 Measurement Example
10 ! RE-SAVE "TEST_83480"
20 ! This program prompts the user to set up a source and then
30 ! test for compliance with STM-16, with 15% margin.
40 !
50 ! It assumes an optical module is in Channel 1; otherwise,
60 ! the average power measurement will be invalid.
70 !
80 DIM Query$[15],Command$[15],Q$[9000]
90 COM /Err/ Hpib,Scope
100 COM /S/ @S
110 Hpib=7
120
130
140
150 Readme_init
160
170
180 !
190
200
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350 OUTPUT @S;":TIMEBASE:POSITION "&Begin$
360 End$=FNQuery$(@S,":MTESt:SCALe:XDELta?") ! and the scale to the width of the mask.
370 OUTPUT @S;":TIMEBASE:SCALe "&VAL$(VAL(End$)/10)
380 OUTPUT @S;":TIMebase:UNITs BITS" ! Select timebase units to be bit period.
390 OUTPUT @S;":MTESt:RUMode SAMPles,300000" ! Test for 300k samples.
400 OUTPUT @S;":RUN" !
410 Reg=VAL(FNQuery$(@S,":MTER?")) ! Clear the Mask Test Event Register.
420 REPEAT ! Wait until the Mask RUNTIL is achieved.
430
440
450
460
470 PRINT "MASK TEST PASSED"
480 Fail=0
490 ELSE
500 PRINT "MASK TEST FAILED"
510 Fail=1
520 PRINT FNQuery$(@S,":MTESt:COUNt:FSAMples?");"samples failed."
530 END IF
Hpib
CLEAR
Scope=7
Saddr=Hpib*100+Scope
TO Saddr
@S
ASSIGN
Saddr
CLEAR
Wait
!
!
THEN
Wait
a
Wait
!
bit
@S;"*RST"
OUTPUT
@S;":CHAN1:FILTer
OUTPUT
@S;":TIMebase:UNITs BITS"
OUTPUT
@S;":TIMebase:BRATe
OUTPUT
@S;":AUToscale"
OUTPUT
@S;":TIMebase:SCALe
OUTPUT
@S;":MTESt:STANdard
OUTPUT
@S;":MTESt:MMARgin:STATe
OUTPUT
@S;":MTESt:MMARgin:PERCent
OUTPUT
@S;":MTESt:TEST
OUTPUT
Waitfor(@S)
!
1
WAIT
@S;":MTESt:ALIGn"
OUTPUT
Waitfor(@S)
@S;":TIMebase:UNITs
OUTPUT
Begin$=FNQuery$(@S,":MTESt:SCALe:X1?")
Reg=VAL(FNQuery$(@S,":MTER?"))
BIT(Reg,0)
UNTIL
Fwavs=VAL(FNQuery$(@S,":MTESt:COUNt:FWAVeforms?"))
Fwavs<2
IF
Set
for
more,
for
!Sets
scope
the
ON"
2.48832E+09"
Get
!
2"
STM16"
!
ON"
scope
since
Scale
!
scope to
TIME"
Turn
!
good
a
Show
!
ON"
Enable
finish the
to
scope
finish the
the
to
!
!
15"
mask
!
I/O
known
a
on
Select
trigger
2
Select
Turn
!
!
mask
needs
to
Select
address.
state.
built-in
timebase
Set
!
level
periods
bit
a
on
amount
Set
testing.
operation.
extra
trace.
operation.
timebase
! Set
bit
standard
mask
the position
filter.
units
rate
and
on
margin.
of
time.
units
to
Hz)
(in
vertical
screen.
mask.
margin.
mask
to
to the
be
be
bit
for
scale.
bit
period.
STM-16.
period.
beginning of
the
540 Readme_pwr
mask.
1-56
Page 77

550 OUTPUT @S;":MTESt:TEST OFF" ! Disable mask testing.
560 OUTPUT @S;":RUN" ! Re-enable data acquisition.
570 Avgpower=VAL(FNQuery$(@S,":MEASure:APOWer? DECibel, CHANnel1")) ! Measure channel 1
580 ! average power in dBm
590 SELECT Avgpower
600 CASE <-2
610 PRINT "AVERAGE POWER TEST FAILED"
620 Fail=1
630 PRINT "Average power is ";Avgpower;"dBm."
640 CASE >9.99E+37
650 PRINT "AVERAGE POWER TEST DATA INVALID"
660 CASE ELSE
670 PRINT "AVERAGE POWER TEST PASSED"
680 END SELECT
690 Readme_cal
700 OUTPUT @S;":DISPlay:CGRade ON" ! Turn on color grade database.
710 ! assure meaningful results.
720
730
740 Readme_extinct
750
760
770
780
790
800
810
820
830
840
850
860
870
880
890
900
910
920
930
940
950
960 PRINT "TEST PASSED"
970 END IF
980 LOCAL Saddr ! Return DCA to user's control.
990 Readme_end
1000 END
1010 !
1020 SUB Readme_init
1030
1040
1050
1060
1070 PRINT
1080 PRINT " The expected
1090 PRINT "
1100
1110 PRINT
1120 PRINT " If the configuration
1130 PRINT " the
1140 PRINT
1150 PRINT
@S;":MEASure:CGRade:ERCalibrate"
OUTPUT
Waitfor(@S)
calibration
Clear
@S;":CDISplay"
OUTPUT
REPEAT
WAIT
OUTPUT
ENTER
UNTIL
Eratio=VAL(FNQuery$(@S,":MEASure:CGRade:ERATio?
SELECT
CASE
PRINT
Fail=1
PRINT
CASE
PRINT
CASE
PRINT
END
Fail THEN
IF
PRINT
ELSE
CLEAR
PRINT
PRINT
PRINT
Allow
!
.1
@S;":MEASure:CGRade:PEAK?"
@S;Peakvalue
Peakvalue>50
Eratio
<5
"EXTINCTION
"Extinction
>9.99E+37
"EXTINCTION
ELSE
"EXTINCTION
SELECT
"TEST
SCREEN
This
"
margin.
"
needs.
"
PRINT "
" Scope. Then run again."
!
the instrument
for
time
some
Peakvalue<9.999E+37
AND
in
RATIO
ratio
RATIO
RATIO
ratio
FAILED"
TEST
";Eratio;"dB."
is
DATA
TEST
PASSED"
TEST
extinction
!
FAILED"
tests for
program
You can
easily
"
The scope is at address 7"
The HPIB is at address 7"
addresses as required, using the variables Hpib and "
configuration is;"
is different, break program and set "
!
Find
!
dB.
INVALID"
compliance
it
edit
Calibrate
from
data
to acquire
the
out
Loop
!
DECibel"))
with
customize
to
input
database.
number
until
STM-16,
offset.
some
of
the
with
it
hits
amount
Measure
!
for
data.
in
returned is
15%"
your"
the densest
database
valid
Programming
Example Programs
pixel.
enough
large
and
to
1-57
Page 78

Programming
Example Programs
1160 PRINT " Connect your source and set it for STM-16 (2.48832 Gbit/s)."
1170 PRINT
1180 PRINT " The recommended source is an HP 70841B Pattern Generator."
1190 PRINT
1200 PRINT " Connect Clock Out to Trigger 2."
1210 PRINT " Connect the signal to be tested to Input 1."
1220 PRINT
1230 PRINT " The recommended pattern is 2^31-1."
1240 PRINT
1250 PRINT " Press Continue when ready to resume operation."
1260 PRINT
1270 PAUSE
1280 CLEAR SCREEN
1290 SUBEND
1300 !
1310 SUB Readme_cal
1320 PRINT
1330
1340
1350 PRINT
1360
1370
1380
1390
1400
1410
1420
1430
1440
1450
1460
1470
1480
1490
1500
1510
1520
1530
1540
1550
1560
1570 PRINT
1580 PRINT " The input offset is now calibrated; turn the laser back"
1590 PRINT " on."
1600 PRINT
1610 PRINT " Press Continue to resume operation when the laser is back"
1620 PRINT " on."
1630 PRINT
1640
1650
1660
1670
1680 SUB Waitfor(@Path)
1690 OUTPUT @Path;"*OPC?"
1700 ENTER @Path;Completion$
1710
1720 !
1730 SUB Readme_pwr
1740 PRINT
1750 PRINT
1760 PRINT
"
PRINT
"
PRINT
" for
"
PRINT
"
PRINT
PRINT
PRINT
PRINT
PRINT
PAUSE
CLEAR
SUBEND
!
SUB
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
SUBEND
!
SUB Readme_extinct
PAUSE
CLEAR
SUBEND
Press
"
and
"
SCREEN
Readme_end
"
"
"
"
SCREEN
!
SUBEND
" We will now measure Average Power."
now
will
We
recommended
is
it
at least
the
After
calibration
Continue
laser
the
program
The
program."
testing
you can
Now
GOODBYE.
warm-up
measure
minutes."
10
the
of
resume
to
turned
is
ended.
has
edit the
extinction
that
complete,
is
input
program
"
allow
you
offset."
operation
off."
Thanks
ratio.
turn
for
customize
to
the
off the
when
trying
instrument
For
the
best
laser to
warmup
compliance
our
for
it
accuracy,"
warm up"
to
allow "
is complete"
needs."
your
"
1-58
Page 79

1770 PRINT " Press Continue to resume operation."
1780 PRINT
1790 PAUSE
1800 CLEAR SCREEN
1810 SUBEND
1820 !
1830 DEF FNQuery$(@Path,Cmd$)
1840 OUTPUT @Path;Cmd$
1850 ENTER @Path;Result$
1860 RETURN Result$
1870 FNEND
1880 !
Programming
Example Programs
1-59
Page 80

Programming
Example Programs
Eye Diagram Measurement Example
10 ! RE-SAVE "EYE_83480"
20 ! This program prompts the user to set up a source and then
30 ! makes all the common eye diagram measurements.
40 DIM Query$[15],Command$[15],Q$[9000]
50 COM /Err/ Hpib,Scope
60 COM /S/ @S
70 Hpib=7
80 CLEAR Hpib
90 Scope=7
100 Saddr=Hpib*100+Scope !Sets the I/O address.
110 Readme_init
ASSIGN
120
CLEAR Saddr
130
!
140
OUTPUT
150
OUTPUT
160
OUTPUT
170
180 OUTPUT
OUTPUT
190
OUTPUT
200
ENTER
210
LOCAL
220
Readme_scope
230
!
240
REPEAT
250
WAIT
260
OUTPUT
270
ENTER
280
PRINT "Waiting
290
UNTIL
300
!
310
PRINT
320
OUTPUT
330
340 ENTER
350 PRINT "Rise Time= ";FNEng_unit$(Risetime);"seconds."
360 !
370 OUTPUT @S;":MEASure:FALLtime? CGRade" ! Measure fall time.
380 ENTER @S;Falltime
390 PRINT "Fall Time= ";FNEng_unit$(Falltime);"seconds."
400 !
410 OUTPUT @S;":MEASure:OVERshoot? CGRade" ! Measure overshoot.
420 ENTER @S;Overshoot
PRINT
430
!
440
OUTPUT
450
ENTER
460
470 PRINT "Crossing Level=";Crossing;"%."
480 !
490 OUTPUT @S;":MEASure:CGRade:DCDistortion? PERCent" ! Measure duty cycle distortion in percent.
500 ENTER @S;Dcdistortion
510 PRINT "Duty Cycle Distortion=";Dcdistortion;"%."
520 !
530 OUTPUT @S;":MEASure:CGRade:EHEight?" ! Measure eye height.
540 ENTER @S;Eye_height
Saddr
TO
@S
instrument
the
Reset
@S;"*RST"
@S;":TIMebase:UNITs
@S;":AUToscale"
@S;":TIMebase:SCALe 2"
@S;":DISPlay:CGRade
@S;"*OPC?"
@S;Done
Saddr
.2
@S;Peakvalue
Peakvalue>=50
@S;":MEASure:RISetime?
!
!
some
Allow
!
@S;":MEASure:CGRade:PEAK?"
until
BITS" !
sensible
a
Get
Wait
AND
!
time
peak
Measurements
!
!
ON"
scope
for
the
for
color
Peakvalue<9.999E+37
CGRade"
@S;Risetime
"Overshoot=";Overshoot;"%."
@S;":MEASure:CGRade:CROSsing?"
@S;Crossing
Use bit
Turn
to
instrument
!
grade
to
trigger
color
on
finish
Find
hits
Measure
!
Measure
!
standard
a
periods
require
grade
before
to
the
out
reaches
Loop
!
assure
for
level
2
display
going
acquire
number
50;
until
meaningful
time.
rise
crossing
state.
horizontal
the
vertical
and
crossings.
for
scale.
scale.
eye measurements.
on.
data.
some
in the
hits
of
currently";Peakvalue;"."
the
level
amount
results.
percentage.
returned is
densest
pixel.
valid and
large
enough
to
1-60
Page 81

550 OUTPUT @S;":CHANnel1:UNITs?" ! Determine eye height units.
560 ENTER @S;Units$
570 PRINT "Eye Height= ";FNEng_unit$(Eye_height);Units$;"."
580 !
590 OUTPUT @S;":MEASure:CGRade:EWIDth?" ! Measure eye width.
600 ENTER @S;Eye_width
610 PRINT "Eye Width= ";FNEng_unit$(Eye_width);"seconds."
620 !
630 OUTPUT @S;":MEASure:CGRade:JITTer? RMS" ! Measure RMS jitter.
640 ENTER @S;Jitter
650 PRINT "RMS Jitter= ";FNEng_unit$(Jitter);"seconds."
660 !
670 LOCAL Saddr
680 Readme_end
690 END
700 !
710 SUB Readme_init
PRINT
720
PRINT
730
740 PRINT
PRINT
750
PRINT
760
PRINT
770
PRINT
780
PRINT
790
PRINT
800
PRINT
810
PRINT
820
PRINT
830
PRINT
840
PRINT
850
PRINT
860
PRINT
870
PRINT
880
PRINT
890
PRINT
900
PRINT
910
PRINT
920
PRINT
930
PAUSE
940
CLEAR SCREEN
950
960 SUBEND
970 !
980 SUB Readme_end
990 PRINT
1000 PRINT " The program has ended. Thanks for trying our eye diagram "
1010 PRINT " analysis program."
1020 PRINT
PRINT
1030
PRINT
1040
PRINT
1050
SUBEND
1060
1070 !
1080 SUB Readme_scope
1090 PRINT
PRINT "
1100
1110 PRINT "
1120 PRINT "
1130 PRINT
1140 PRINT
1150 PRINT
program
This
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
easily
can
You
expected
The
scope
The
HPIB
The
configuration
the
If
addresses
the
Then
Scope.
your
Connect
recommended
The
Clock
Connect
the
Connect
recommended pattern
The
Continue
Press
can
you
Now
GOODBYE.
Adjust signal, using the controls of the 83480, to show "
one ""Eye"" centered in the
more ""Eyes"" on
" Press Continue when ready to resume operation."
automated
performs
configuration
is
is
as
run
source
edit
at
address
at
required,
again."
to
it
address
is
and
source
Trigger
to
Out
be tested
to
signal
ready
when
the program
edit
"
the edges of the display."
tests
customize
is;"
7"
7"
using
it
an HP
for
2."
break
the
70841B
to Input
different,
set
is
is 2^31-1."
resume
to
customize
to
display and parts of two"
eye
on
your needs."
for
it
program
variables
your signal
Pattern
1."
operation."
it
diagrams."
set
and
Hpib and
requirements."
Generator."
your
for
"
"
needs."
Programming
Example Programs
1-61
Page 82

Programming
Example Programs
1160 PAUSE
1170 CLEAR SCREEN
1180 SUBEND
1190 !
1200 DEF FNEng_unit$(Number)
1210 SELECT Number/1000
1220 CASE <1.E-18
1230 RETURN VAL$(Number/1.E-18)&" a"
1240 CASE <1.E-15
1250 RETURN VAL$(Number/1.E-15)&" f"
1260 CASE <1.E-12
1270 RETURN VAL$(Number/1.E-12)&" p"
1280 CASE <1.E-9
1290 RETURN VAL$(Number/1.E-9)&" n"
1300 CASE <1.E-6
1310 RETURN VAL$(Number/1.E-6)&" u"
1320 CASE <1.E-3
1330
1340
1350 RETURN
1360
1370
1380
1390
1400
1410
1420
1430
1440
1450
1460
1470
1480
1490
1500
CASE
CASE
CASE
CASE
CASE
CASE
CASE
END
FNEND
!
RETURN
<1
<1.E+3
RETURN
<1.E+6
RETURN
<1.E+9
RETURN
<1.E+12
RETURN
<1.E+15
RETURN
ELSE
RETURN
SELECT
VAL$(Number/1.E-3)&"
VAL$(Number)
VAL$(Number/1.E+3)&"
VAL$(Number/1.E+6)&"
VAL$(Number/1.E+9)&"
VAL$(Number/1.E+12)&"
VAL$(Number/1.E+9)&"
VAL$(Number/1.E+12)&"
m"
k"
M"
G"
P"
T"
E"
1-62
Page 83

Error Messages
This section describes the error messages and how they are generated. The
possible causes for the generation of the error messages are also listed in the
table at the end of this section.
Error queue
Errors0100 to0199
As errors are detected, they are placed in an error queue. This queue is
rst in, rst out. You can read an error from the error queue using the
:SYSTEM:ERROR? query.
,
discarded.
is
the
for
Reading
queue
errors
all
error
\No
the
on
with
the
error
and
,
an
have
."
front
error
If the
Error
350, \Queue
0
oldest errors
length
The
and
from
a
read
error
instrument
the
*CLS
a
last
the
instrument
the
,
position
from
queue
command
item
messages
error
opens
been
The
queue
remain in
the
of
position
1
head
the
the
is
from
overows
overow
the
instrument's
for
the
of
tail
the
at
,
queue
cleared
powered
is
sent.
is
queue
the
switched
is
error
last
the
,
Anytime
."
the
and
,
queue
queue is
error
the \Queue
queue removes
queue for
the
of
any
read.
talk
error
of
only
the
subsequent
when
.
up
is
from
replaced
the
the
in
error
most
queue
recent
30 (29
queue
error
positions
is
overows
overow" message).
the
that error
new
a
from
error
When
.
queries return
following
addressed
to
occur:
mode
0,
panel.
These errors indicate that a syntax error has been detected by the instrument
parser. The occurrence of any error in this class sets the command error bit
(bit 5) in the Event Status Register.
Events that generate command errors do not generate execution errors,
.
errors
query
or
,
instrument-specic
errors
1-63
Page 84

Programming
Error Messages
Errors0200 to0299
399
0
to
300
0
Errors
+32767
to
+1
or
499
0
to
400
0
Errors
These errors indicate that an error was detected by the instrument execution
control block. The occurrence of any error in this class causes the execution
error bit (bit 4) in the Event Status Register to be set. It also indicates that
one of the following events occurred:
The program data following a header is outside the legal input range or is
inconsistent with the instrument's capabilities.
A valid program message could not be properly executed due to some
instrument condition.
Execution errors are reported by the instrument after expressions are
evaluated and rounding operations are completed. For example, rounding
.
element
numeric
a
Events that
data
generate execution
instrument-specic errors
or
self-test
class
this
with
class
to be
that
that
rmware
that
should
set. An
errors
These
instrument
abnormal
generated
any
of
Event
These
detected
error
any
operation
hardware
by
error in
Status
errors
problem
a
in
this
Status Register
indicate
a
Register to
indicate
not
will
query errors
,or
instrument
the
not
did
response
causes
set.
be
output
the
message
the
cause
occurrence
reported
be
errors do
not generate
.
has
or
,
queue
complete
or
F
full
a
control
properly
condition.
error
instrument-specic
the
exchange
query
the
an
of
an
as
detected
example
error
protocol.
error
error
execution
This
.
queue
of
bit
also
error
command
error
an
may
error
this
,
The
.
bit
error
instrument
the
occurrence
An
in
2)
(bit
means
,
errors
caused
due
be
may
occurrence
3)
(bit
has
Event
the
of
one
by
to
be
in
the
an
an
the
of
following is true:
An attempt is being made to read data from the output queue when no
output is either present or pending.
Data in the output queue has been lost.
1-64
Page 85

Error Messages, Positive Values
Programming
Error Messages
Error
Error Message Cause
Number
0 No error The error queue is empty. Every error in the queue has been read
(SYSTEM:ERROR? query) or the queue was cleared by power-up or *CLS.
+1 to
Indicates an instrument specic error has been detected.
+32767
2 The % option is not installed
3 No applications are currently installed
6 Incompatible
7 Mask test
8 System
signal
mask align
clock failure
failed
occurred: Service
is
required
is
9 A
memory
error
was
detected:
Service
required
incorrect
are
time
and
ow
date
battery
voltage
detected:
Service
is
11 System
12 L
required
occurred
error
system
atal
ycle power
c
rmware
rmware
error
occurred:
Please
13 System
14 F
15 Execution is not possible
35 No signal was found: Instrument setup is
unchanged
37 System load failed: System rmware is
unchanged
the
38 Measurement
waveform
selected
cannot
performed
be
on
39 Function cannot be performed on the selected
waveform
40 Command execution not possible on the
selected waveform
1-65
Page 86

Programming
Error Messages
Error Messages, Positive Values (continued)
Error
Error Message Cause
Number
41 Waveform data is not valid
48 Print canceled: Printer is not responding
50 Forms cannot be printed to disk
59 Overload condition on %
61 Memory error occurred in plug-in %: Try
reinstalling plug-in
62 Busy
timeout
plug-in
with
occurred
reinstalling plug-in
plug-in
at slot
%:
Service
63 Communication
required
is
Service
occurred
64 Id
error
failure exists
in
required
65 Plug-in
upgrade
66 Mainframe
perform
72 Could
not
supported:
not
is
%
needed
is
factor
cal
calibration
store calibration
System
memory
factors: Service
error:
required
ry
T
%:
%:
is
rmware
Please
is
required
73 Execution
not
possible:
Calibration
is
74 Execution not possible: Mainframe calibration
is required
79 Probe attenuation (or gain) exceeds calibration
limits
85 Incompatible
esting
88 T
setup
failed: Please
calibrate
mainframe
and
retry self-test
96 A system rmware le was not found on the
disk
1-66
Page 87

Error Messages, Positive Values (continued)
Programming
Error Messages
Error
Error Message Cause
Number
112 Unknown le type
113 LIF disk format not supported
114 The disk directory is full
116 Too many points sent
120 Execution not possible: Calibration does not
match mainframe
121 Execution
not
possible:
Calibration
does
match plug-in
122 GSP
125 Header
126 Signal
not responding:
information
clipped:
is
%
not
is
Instrument
valid
setup
is
unchanged
new
a
add
o
T
use:
in
are
delete
not
is
labels
an
selected
valid
old
polygon
point
one
is
caused
not
valid
an intersection
127 All
128 Selected
129 The
not
label,
and
vertices
y
man
130 T
oo
134 Insucient points to compute FFT
136 Can not store ASCII format for records
greater than 128k points
139 Execution not possible: Waveform memory
illegal
destination
140 Exceeded
141 Measurement cannot be
is
maximum
list
ASCII
performed: There
length
are no valid sources
143 Calibration is not possible for plug-in %
145 Display one channel when making color grade
measurements
1-67
Page 88

Programming
Error Messages
Error Messages, Positive Values (continued)
Error
Error Message Cause
Number
146 Unable to measure dark level: Check signal
level
147 Plug-in conguration not allowed
148 Plug-in initialization will destroy factory
calibration factors
150 Operation permitted for standard masks only
151 T
urn on
color grade
to measure
eye
parameters
Timebase
changed:
be
set
to
cannot
window
not
supported
for
this
type
154 Control
158 Comments
plug-in
160 Execution
calibration
161 Calibration
162 Execution
163 Execution
destination
possible:
not
required
is
data
possible:
not
possible: No
not
available
Reference
valid
not
is
Select %
plane
destination
valid %
view
of
is
164 Mask
channel to align
test
mask
align
1-68
failed:
Displa
y one
Page 89

Error Messages, Negative Values
Programming
Error Messages
Error
Error Message Cause
Number
0
100 Command error This is the generic syntax error used if the instrument cannot detect more
specic errors.
0
101 Invalid character A syntactic element contains a character that is invalid for that type.
0
102 Syntax error An unrecognized command or data type was encountered.
0
103 Invalid separator The parser was expecting a separator and encountered an illegal character.
0
104 Data type error The parser recognized a data element dierent than one allowed. For example,
received.
0
105 GET not
108Parameter not
0
109
0
0
0
0
0
0
Missing
112
Program
113
Undened
121
Invalid
123
Numeric
124Too man
allowed
parameter
mnemonic
header
character
overow
y digits
allowed
in
long
too
number
numeric
A Group
parameters were
More
parameters
ewer
F
header
The
header
The
,
example
invalid
An
,
example
Number
mantissa of
The
excluding
or string
Execute T
or
syntactically
is
*XYZ
character
\9"
a
too
is
leading
data was
rigger was
were
character
not
is
for
octal data.
in
or too
large
a decimal
zeros.
expected but
received within
received than
received
element
data
correct,
for
dened
data
the
small to
numeric data
than
but
the
type
expected
required
contains
it
instrument.
being
be
block data
is
represented
element contained
program
a
for
for
more
undened
parsed
was
the
the
than
for
was
internally
message
.
header
.
header
twelve
instrument.
the
encountered.
.
more
.
characters.
than
or
F
255
or
F
digits
0
128 Numeric data not allowed A legal numeric data element was received, but the instrument does not accept
one in this position for the header.
0
131 Invalid sux The sux does not follow the syntax described in IEEE 488.2 or the sux is
inappropriate for the instrument.
1-69
Page 90

Programming
Error Messages
Error Messages, Negative Values (continued)
Error
Error Message Cause
Number
0
138 Sux not allowed A sux was encountered after a numeric element that does not allow suxes.
0
141 Invalid character data Either the character data element contains an invalid character or the particular
element received is not valid for the header.
0
144 Character data too long
0
148 Character data not allowed A legal character data element was encountered where prohibited by the
instrument.
This
element.
data
parsing
parsing
more
but
cannot
was
before
but
cannot
specic
astring
detect a
for some
invalid
terminal
the
allowed
not
was
data
block
a
detect
was
but
an expression
.
error
more specic
quote
b
element.
more
a
allowed
not
data element.
reason. F
character
the
y
This
specic
y
b
when parsing
instrument
the
if
expected,
was
was
encountered
was
when
instrument
the
if
was encountered
parsing.
in
when
received
a
message
data
an
,
data
point
can
message
block
at
can
be generated
used
is
element
message
END
element
parsing.
in
generated
be
used
is
data element
point
this
generated
be
cannot detect
150
0
String
data error
This
error can
error
151
0
Invalid
string
data
A
string
example
allowed
158
0
String
160
0
Block
data
data
not
error
A
at
This
string
this
error
error
161
0
Invalid
168
0
Block
block
data
not
data
allowed
legal
A
instrument
170
0
Expression
error
error
This
the instrument
if
particular
error.
or
.
instrument
particular
.
error
the
It is
used
0
171 Invalid expression
0
178 Expression data not allowed Expression data was encountered but was not allowed by the instrument at this
point in parsing.
0
200 Execution error This is a generic syntax error which is used if the instrument cannot detect more
errors.
specic
1-70
Page 91

Error Messages, Negative Values (continued)
Programming
Error
Error Message Cause
Number
0
222 Data out of range Indicates that a legal program data element was parsed but could not be
executed because the interpreted value is outside the legal range dened bythe
instrument.
0
223 Too much data Indicates that a legal program data element of block, expression, or string type
was received that contained more data than the instrument could handle due to
memory or related instrument-specic requirements.
0
241 Hardware missing
overow
error
found
Indicates
recorded.
not
is
This
the
that
generic
a system
there
query
error occurred.
room
no
is
error
in
used
the
error
if the
queue
instrument
and
an
cannot
error
occurred
detect
more
256
0
0
310 System error Indicates that
350
0
400
0
File
Queue
Query
name not
errors.
410
0
0
0
0
420
430
440
Query
Query
Query
Query
INTERRUP
UNTERMINA
OCKED
DEADL
UNTERMINA
TED
TED
TED after
indenite
response
but
specic
was
1-71
Page 92

Programming
Page 93

2
Common
Commands
Page 94

Common Commands
Common commands are dened by the IEEE 488.2 standard. They control
generic device functions which could be common among many dierent
types of instruments. Common commands can be received and processed by
the instrument whether they are sent over the HP-IB as separate program
messages or within other program messages.
The following common commands and queries are implemented in this
instrument:
*CLS
*ESE
*ESR?
*IDN?
*LRN
*OPC
*RCL
*RST
V
A
*S
*SRE
*STB?
*TRG
*TST?
AI (W
*W
(Event
Status)
Status
Status
(Clear
(Event
(Identication
(Learn)
(Operation
(Recall)
(Reset)
(Save)
(Service
(Status
Request
Byte)
(Trigger)
est)
(T
ait-to-Continue)
Enable)
Register)
Number)
Complete)
Enable)
2-2
Page 95

Common Commands
Receiving Common
Commands
Status registers
Command
Descriptions
Common commands can be received and processed by the instrument
whether they are sent over the HP-IB as separate program messages or within
other program messages. If a subsystem is currently selected and a common
command is received by the instrument, the instrument remains in the
selected subsystem. For example, if the program message:
"ACQUIRE:TYPE AVERAGE;*CLS;COUNT 1024"
is received by the instrument, the instrument sets the acquire type, clears
the status information, and then sets the acquire count without leaving the
selected subsystem.
an
have
the
Register
at
,
status
the
in
beginning
following
The
enable
(mask)
information
Status
Byte
following
chapter
this
1,
Register
Register
Chapter
Event
Status
The
of
can
for
Status
status
two
register
selected
be
complete
a
Register
pages
.
registers
By setting
.
discussion
describe
used
,
bits in
for use
. Refer
of status
Status
the Common
common
by
the enable
to \Status
.
Registers
Status
Event
Request
Service
Commands listed
commands
register,
Reporting Registers"
Enable
Register
Enable
Register
Enable
These descriptions include:
the literal command
an example of how the command is used within a program
the query command
common variables
where
to
look
additional
for
information
2-3
Page 96

Common Commands
*CLS (Clear Status)
Command
Example
Also
See
*CLS
Clears the status data structures, including the device-dened error queue.It
also clears the Request-for-OPC ag.
The following example clears the status data structures of the instrument.
10 OUTPUT 707;"*CLS"
END
20
\Monitoring
Instrument
the
"
Chapter
in
1.
2-4
Page 97

*ESE (Event Status Enable)
Common Commands
Command
<
mask
>
Example
Query
Returned Format
<
mask
>
*ESE <mask>
Sets the Standard Event Status Enable Register bits.
An integer, 0 to 255, representing a mask value for the bits to be enabled
in the Standard Event Status Register as explained in \Monitoring the
Instrument " in Chapter 1.
The
Event
pressed,
is
following
Status
the Event
example
enables
Enable Register
Summary bit
the
. When
User
this
(ESB)
Request
is
bit
the
in
(URQ)
enabled
Status
bit
and
Byte
front-panel
a
Register
key
also
is
Standard
the
of
set.
OUTPUT 707;"*ESE
10
END
20
64"
*ESE?
query
The
Register
.
returns
the
current
contents
of
the
Standard
Event
Status
Enable
<mask><NL>
An integer, +0 to +255 (plus sign (+) also returned), representing a mask
value for the bits enabled in the Standard Event Status Register as explained
in \Monitoring the Instrument " in Chapter 1.
Example
printed
is
example
Register
following
The
Status
variable
Enable
10 OUTPUT 707;"*ESE?"
20 ENTER 707;Event
30 PRINT Event
40 END
on
places
the
in
controller's
the
current
the
numeric
contents
variable
screen.
Event.
,
the Standard
of
The value
Event
of
the
2-5
Page 98

Common Commands
The Standard Event Status Enable Register contains a mask value for the bits
to be enabled in the Standard Event Status Register. A \1" in the Standard
Event Status Enable Register enables the corresponding bit in the Standard
Event Status Register. A \0" in the enable register disables the corresponding
bit.
Standard Event Status Enable Register Bits
Bit Weight Enables
7 128 PON - Power On
6 64 URQ - User Request
5
4 16
3
2
1
0
Command
-
32
8
4
2
1
CME
EXE -
DDE
QYE
RQC
OPC
-
-
-
-
Execution Error
Device
Query
Request
Operation
Error
Dependent
Error
Control
Complete
Error
See
Also
\Monitoring
2-6
Instrument
the
"
Chapter
in
1.
Page 99

*ESR? (Event Status Register)
Common Commands
Query
Returned Format
status
>
<
Example
Also
See
*ESR?
The query returns the contents of the Standard Event Status Register.
Reading this register clears the Standard Event Status Register.
<status><NL>
integer
An
weights
bit
following
The
10
20
30
40
Register
to
OUTPUT
ENTER
PRINT
END
Status
variable
\Monitoring
+0
,
of all
example
controller's
the
707;"*ESR?"
707;Event
Event
the
+255
to
bits that
places
numeric
the
in
Instrument
(plus
are high
screen.
"
(+)
sign
current
the
variable
Chapter
in
also
at the
,
returned),
time
contents
Event,
1.
you
then
representing
the
read
Standard
the
of
prints
register
the
the
.
Event
value
of
total
the
2-7
Page 100

Common Commands
Standard Event Status Register Bits
Bit Weight Bit Name Condition
7 128 PON 1=OFF to ON transition has occurred.
6 64 URQ 0=no front-panel key has been pressed.
1=a front-panel key has been pressed.
5 32 CME 0=no command errors.
1=a command error has been detected.
4 16 EXE 0=no execution errors.
1=an execution error has been detected.
3 8 DDE 0=no
device-dependent errors.
device-dependent
1=a
detected.
1=a
query
query
2 4 QYE 0=no
1 2 RQC 0=request
0 1 OPC 0=operation
1=operation
rue=High
1=T
ow
alse=L
0=F
errors.
error
control
is
is
has
NO
-
complete
not
complete
error
been
T
used
.
been
has
detected.
Always
-
.
0.
2-8