Agilent 4396B GPIB Programming Guide

Page 1
Agilent
4396B Network/Spectrum/Impedance
Analyzer
GPIB Programming
This
applies
F
or
numbers
directly
additional
,
read
SERIAL
to
important
\Serial
NUMBERS
instruments
information
Number"
with
serial
about
in
Appendix
Guide
number
prex
serial
A.
JP1KE.
Agilent Part No. 04396-90063
Printed in Japan May 2003
Sixth Edition
Page 2
Notice
The
information
This
document
reserved.
language
No
part
without
contained
contains
of
this
the
prior
in
this
proprietary
document
written
document
information
may
be
consent
is
subject
that
is
photocopied,
of
the
Agilent T
to
change
protected
reproduced,
echnologies.
without
by
copyright.
or
notice
.
All
translated
rights
are
to another
Agilent
T
echnologies
Component
1-3-2,
Hyogo
Murotani,
,
651-2241
T
est
Japan,
PGU-Kobe
Nishi-ku,
Japan
Ltd.
Kobe-shi,
c
Copyright 1997, 1998, 2000, 2002, 2003 Agilent Technologies Japan, Ltd.
Page 3
Manual Printing
The
manual's
changes
at
reprint
technical
when
do
not
changes
printing
a
new
cause the
are
edition is
incorporated.
History
date
and part
date to
number indicate
printed. (Minor
change.)
The manual
its current
corrections and
part number
edition. The
updates that
changes when
printing date
are incorporated
extensive
March
July
March
March
1997
1997
1998
2000
November
May
2003
:
:
:
::
:
:
2002
::
::
:
::
::
::
::
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
::
::
::
::
:
:
:
:
:
:
:
:
First
Edition
::
::
::
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
::
::
::
::
:
:
:
:
:
:
:
Second
:
::
::
::
::
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
::
::
::
::
:
:
:
:
:
:
:
:
::
::
::
::
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
::
::
::
::
:
:
:
:
:
F
::
::
::
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
::
::
::
:
:
:
:
:
:
:
::
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
::
::
::
:
:
:
:
:
:
:
:
:
:
:
:
:
Third
ourth
Fifth
Sixth
Edition
Edition
Edition
Edition
Edition
(part
(part
(part
(part
(part
(part
number:
number:
number:
number:
number:
number:
04396-90023)
04396-90033)
04396-90043)
04396-90043)
04396-90053)
04396-90063)
iii
Page 4
Typeface Conventions
Bold
Italics
Computer
4
HARDKEYS
N
NN
NN
NN
N
N
5
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
SOFTKEYS
Graphic
General
denitions
N
Symbols
COMPUTER
computer
Boldface
symbols
Italic
type
publications
Italic
type
must
be
lename
type
the
Computer
Labeled
Softkeys located
of
other
graphic
denotes
as
the
type
.
is
is
typed
means
name
font
keys
system
is
used
used
for
.
also
used
in
place
to
type
of
a
is
used
on
the
to the
symbols
information
controller
when
emphasis
for
keyboard
of
the
the
le
such
for
on-screen
instrument
right
used in
for
.
a
term
and for
words
word
copy
as
file1
front
of
the
manuals.
a
programmer
is
dened.
titles of
entries
in
italics
,to
when
type a
.
prompts and
panel
are
CRT
are
enclosed
F
or example:
manuals and
a
name
.
For
example:
space,
messages.
enclosed in
using
an
or a
and then
4
N
NN
NN
.
in
external
icons
other
variable
copy
5
.
are
to
iB
ASIC
denotes
Instrument
information
B
ASIC
as
the
for
system
a
programmer
controller
using
an
analyzer
with
.
iv
Page 5
How to
This
Use This
provides
Network/Spectrum
write
programs
disks
.
your
immediate
quickly
Also
,
depending
may
want
1.
If
you
scan the
If
you
beginning
2.
If
you are
review
for
3.
If
you
commands
need
The
analyzer
other
manuals
Y
ou
locate
additional
to
for
can perform
needs
these
upon
to
do
one of
are
an experienced
examples in
have never
and
an experienced
some
examples
information
are
not
,
see
review
can
available
Manual
an
introduction to
Analyzer
the
analyzer,
each example
and
learn those
examples
your experience
the following:
this guide
programmed an
do the
examples that
to
an
experienced
the
GPIB
before
also
using
use
Instrument
for
writing B
(analyzer).
T
the examples
sequentially or
techniques.
.
in writing
programmer and
to nd
instrument similar
apply to
programmer,
decide where
on
GPIB
commands.
programmer
Command
this
the
analyzer
R
guide
B
ASIC.
eference
is
ASIC programs
o reduce
the time
shown in
you can
Use the
BASIC
have programmed
out
how
the
your
application.
but
do
not
have
you need
and
for
help
you
a
.
Documentation for
listed
in the
for the
required for
this guide
table of
programs using
are supplied
select the
contents
examples that
GPIB
GPIB systems
analyzer
to
.
do
list
the
any
See
not
of
the
can
be
used
analyzer
,
knowledge
the
GPIB
have
any
documentation
knowledge of
Instrument B
Documentation Map
4396B
you to
learn how
on sample
and
commands
before
in
your
you
can
of
GPIB
Command
that you
ASIC
on
the
apply to
the
index
,
you
system.
start
at
commands
R
eference
GPIB
and
next
,
you
the
will
the
page
to
to
can
,
.
v
Page 6
Documentation Map
The
following
User's
T
ask
Reference
The
make
measurement
T
ask
manuals
Guide
(Agilent P
User's
basic
Guide
measurements
(Agilent
Reference helps
are
available
art Number
walks
examples
P
art
step-by-step instructions
Function
Programming
GPIB
Option
Reference
The
Function
softkeys
system
The
.
performance
Programming
analyzer
Command
The
GPIB
also
provides
features
010
Operating
The
option
functions
(Agilent
Reference
It
also
Guide
and
describes
Reference
Command
information
conform
010
Operation
of
the
provides
,
and
(Agilent
Guide
Reference
to
the
Handbook
4396B
for
the analyzer
04396-900x1
you
through
,
explains
.
After
you
Number
you to
learn how
without concepts
P
art
Number
describes
information
some
topics
Part
Number
shows how
how Instrument
(Agilent
P
art
provides a
on
the
status
SCPI
standard).
(Agilent
Handbook
with
option
.
1
system
setup and
commonly
receive
your
04396-900x0
to use
the
.
04396-900x2
all
function
on
about
accessed
options
the
04396-900x3
to write
and use
BASIC
Number
04396-900x4
summary of
reporting structure
P
art
Number
describes
010.
)
initial power-on,
used
features
analyzer
1
)
analyzer
,
begin
.
1
)
from
and
accessories
analyzer's
works with
features
1
)
B
ASIC
the analyzer
all
available
04396-900x6
the
unique impedance
,
and
with
This
the
available
program
1
)
and
the
shows how
typical
this manual.
provides
front
panel
.
to
control
..
GPIB
trigger
1
)
measurement
application
simple
keys
and
,
specications
the
commands
system
(these
.
to
,
It
Instrument
The
programming
provide
B
Instrument
P
erformance T
The P
B
ASIC
Instrument
a
ASIC
Programming
erformance T
Manual
B
ASIC
language
general
B
ASIC
programming
Language
est Manual
est Manual explains how to verify conformance to published
Set
(Agilent
User's
,
T
echniques
provide
R
Handbook
eference
(Agilent P
P
art
introduces
some
helpful
reference
,
Instrument B
.
art
Number
Number
hints
.
It is
divided into
ASIC Interface
04396-901x0
04155-90151(E2083-90000))
you
to
the
on
getting
Instrument
the
most
three books
Techniques
1
)
B
ASIC
use
from it,
,
Instrument
,
and
specications.
Service Manual (Agilent P
art Number 04396-901x1
1
)
The Service Manual explains how to adjust, troubleshoot, and repair the instrument.
This manual is option 0BW only
1
The number indicated by \x" in the part number of each manual, is allocated for numbers increased by one each
time a revision is made
. The
latest edition comes with the product.
.
and
vi
Page 7
Contents
1.
Learning
Required
T
o
Prepare
GPIB
Commands
T
o
Execute
T
o
Program
Set
I/O
Set
Up
P
erform
Connect
Trigger a
P
ost-Processing
Transfer
T
o
Execute
T
o
Execute
2.
Triggering
T
o
Measure
Set
Trigger
Start
Continuous
T
o
Trigger
Set
Trigger
Trigger
Set
Trigger
Trigger
GPIB
Remote
Equipment
for
GPIB
Introduction
an
GPIB
a
Basic
Measurement
P
ath
.
.
.
the
Measurement
Calibration
DUT
a
a
a
.
.
Measurement .
.
Data
.
.
an
GPIB
a
Query
the
Analyzer
Continuously
Source
Measurement
Measurement
Source
Measurement
Source
Measurement
Control
.
.
.
.
Control
Command
.
.
.
.
P
arameters
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Command
.
.
.
.
from
.
.
.
.
.
.
From
.
.
.
.
.
.
.
.
..
..
Basics
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
with
.
.
Remote
.
.
.
.
Sweep
the
.
.
..
..
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
a
P
arameter
.
.
.
.
.
.
.
.
.
Controller
.
.
.
..
.
.
.
.
..
..
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
..
..
..
.
.
.
.
.
..
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
..
..
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
.
.
.
..
.
.
.
.
.
..
..
.
..
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
..
..
..
..
..
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
..
..
..
..
..
.
.
..
.
.
.
.
.
..
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
.
..
.
.
.
.
.
.
.
..
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
.
1-1
.
1-2
.
1-4
1-4
1-5
1-6
1-6
1-7
1-7
1-7
.
1-8
1-8
1-8
1-8
2-2
2-2
2-2
2-3
2-3
2-3
2-4
2-4
3.
Synchronizing
T
oW
ait F
or
Let
Controller W
T
oW
ait for
Enable
Enable SRQ Interrupt
Wait Until Measurement Is Done
GenerateSRQ ......................
To Report Command Error Occurrence
Enable
Report
Output Error
Return to Execute GPIB command
the
Analyzer
the
Preceding
ait F
or
Sweep End
Sweep-End
ErrorBit.... ...... ...... ...... .
Command Error
..
Bit
.... .....
from
Remote
Operation
Operation
.
.
.
.
.
...... .....
.......................
to
Complete
to
Complete
.
.
.
.
.
.
..
.
.
.
.................
...................
......................
.......
(OPC)
.
.
.
.
.
.
.
................
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
..
..
..
..
..
..
..
.
.
.
.
..
.
.
.
.
.
.
.
.....
...... ...
.......
...... ...... ..
..
.
. 3-2
.
.
.
. 3-5
...
Contents-1
3-2
3-3
3-3
3-4
3-4
3-4
3-5
3-6
3-6
3-7
Page 8
4.
Reading Measurement
T
5.
o Read
Search
Read
T
oGet
Set
Set
Read
T
o
Set
Set
Read
Set
Set
Read
W
riting
T
o
Read
Modify
Restore
Redrawing
T
o
Read
Restore
T
o
Read
Restore
Data
Maximum V
Data .
Measurement
the Receive
Data
Transfer
Data
Get
Measurement
the
Receive
Data
Transfer
Data
the
Receive
Data
Transfer
Data
Data
Modify
Modify
Modify
Calibration
Calibration
Calibration
Modied
Error-Corrected Data
Error-Corrected
Modied
Trace
Trace
Modied
.
.
.
Measurement
Using
the
alue
.
.
.
.
Trace
Array
F
ormat
.
.
.
.
Trace
Array
F
ormat
.
.
.
.
Array
F
ormat
.
.
.
.
Arrays
Data
Data
Data
Calibration
Error-Corrected
Data
Data
.
.
Trace
Data
Marker
.
.
.
.
.
.
.
.
.
.
.
to
the
.
Data
..
..
Data
Search
.
.
.
.
.
.
Using
.
.
.
.
.
.
.
.
Using
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
Analyzer
.
.
.
.
.
.
.
.
.
Data
Trace
..
.
.
.
.
.
.
.
.
.
.
.
ASCII
.
.
.
.
.
.
Binary
.
.
.
.
..
.
.
.
.
..
.
.
.
.
.
.
.
with
..
..
Data .
.
.
.
.
.
.
Function
.
.
.
..
..
F
ormat
.
.
.
.
.
.
..
..
F
ormat
.
.
.
.
.
.
..
..
..
..
.
.
.
..
..
..
..
.
.
.
.
.
.
.
.
.
Modied
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
.
.
..
.
.
..
..
.
.
..
.
.
..
.
.
..
..
..
.
.
.
.
.
.
.
.
.
.
.
..
Calibration
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
..
..
.
.
..
..
..
.
.
..
..
.
.
..
..
.
.
.
.
..
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
.
.
..
..
.
.
.
.
..
..
.
.
.
.
.
.
.
.
.
.
.
..
..
.
.
.
.
.
.
.
.
.
.
.
.
..
..
..
..
..
..
.
.
..
..
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Data
.
.
.
.
.
.
.
.
.
.
.
.
..
..
..
..
..
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
.
.
..
..
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
..
..
.
.
..
..
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
..
..
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
..
..
.
.
. 4-2
.
4-2
.
4-3
. 4-4
.
4-4
.
4-5
.
4-5
.
4-6
.
4-7
.
4-7
.
4-8
.
4-9
.
4-10
.
4-10
.
5-1
.
5-2
.
5-3
.
5-3
5-5
.
5-6
.
5-7
.
5-7
.
5-8
.
5-9
.
5-9
6.
Printing
T
o Print
Printer
Execute
T
o
Observe
7.
Controlling
T
o
Control
T
o
Execute
T
o
Run
Open
Send the Instrument B
Close the Instrument B
Run the Instrument B
To Transfer the Program to Instrument B
Open the Instrument B
Transfer the Program
Close the Instrument B
To Load an Array in an Instrument B
Transfer the Program Array of Instrument BASIC .............. 7-6
or
Plotting
Analyzer
Preparation .
Print
Printing
GPIB
an
an
Instrument
the
Display
.
Instrument
from
Instrument
Instrument
the
Analyzer's
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
B
ASIC
Instrument
B
ASIC
B
ASIC Program
B
ASIC
Editor .
ASIC Program
ASIC Editor
ASIC Program . . . . . . . . . . . . . . .
ASIC Editor
...... ..... ...... ...
ASIC Editor
Display
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
.
.
.
.
.
.
.
..
..
..
..
from
Remote
B
ASIC
Command
.
.
.
.
.
.
.
.
from the
From the
.
.
.
.
....
.....
ASIC.............
................
...... ...... ......
ASIC Program to the External Controller . .
External Controller
External Controller
.
.
.
.
.
...... ...... ....
................
.
.
.
.
.
.
.
.
..
.
.
.
.
..
..
.
.
.
..
.
.
.
.
.
.
.
.
.
.
..
..
..
..
..
.
.
.
......
.....
.......
..
.
.
..
..
.
....
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
.
.
.
...
6-1
6-1
6-1
6-1
7-1
7-3
7-4
7-4
7-4
7-4
7-5
7-5
7-5
7-6
7-6
7-6
Contents-2
Page 9
8.
Programming Limit
T
oP
erform
Edit
Limit Line
Set
Limit Line
Read
the Limit
9.
10.
11.
Using
T
Using
T
Using
T
A
Occupied
File
the
o
Set
List
Edit
List
Set
List
the
o
Synchronize
Send
Signal
Read
Signal
Application
otal
Harmonic
djacent
Transfer
File
Transfer from
File
Transfer
Displaying
limit
T
.
T
List
Sweep
Sweep
T
able
.
T
able
.
Analyzer's
External
to
the
from
Distortion
Channel
P
ower
Bandwidth
Function
from
List
of
Test
from
est
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
est
Results
Function
.
.
.
.
.
.
I/O
External
the
Programs
P
ower
4396B to
External Controller
Files in
.
.
.
.
.
.
.
.
.
.
.
.
.
P
ort
Handler
Handler
External
.
.
Calculation
Calculation
.
.
.
.
External Controller
Current Directory
Remote
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
with
Handler
.
.
.
.
.
..
..
..
.
.
..
.
..
..
.
.
.
.
..
..
..
..
..
..
Analyzer
.
.
.
.
.
.
..
..
.
.
.
.
.
.
.
..
..
to 4396B
..
..
..
..
..
..
..
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
..
..
..
..
..
.
.
.
..
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
..
..
..
..
.
.
.
.
.
.
..
..
..
.
.
.
..
.
.
.
.
.
.
.
.
.
.
..
..
..
..
.
.
.
.
.
.
..
..
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
..
.
.
.
.
.
.
..
.
..
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
..
.
..
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
8-1
.
.
.
8-2
.
.
.
8-3
.
.
.
8-4
.
.
.
9-1
.
.
.
9-2
.
.
.
9-3
.
.
.
10-2
.
.
.
10-2
.
.
.
10-3
.
.
.
11-1
.
.
.
11-4
.
.
.
11-6
.
.
.
11-9
.
.
.
11-10
.
.
.
11-12
.
.
.
.
11-15
12.
A.
If
Y
ou
Have
If
There
If
an
If
the
If
the
Manual
Introduction
Manual
Serial
Change
Index
Is
Error
Disk
GPIB
Changes
Changes
Number
1
a Problem
No
Response
Message
Cannot
Command
.
.
.
.
.
.
.
.
.
.
is
Displayed
Be
Read
Does
.
.
.
.
.
.
.
.
From
.
.
.
.
.
.
.
.
.
Not
.
.
.
.
an
.
.
.
.
.
Instrument
.
.
.
.
.
.
.
W
ork
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
..
on
.
.
.
.
.
.
..
..
..
..
the
.
.
.
..
..
..
GPIB
.
.
.
.
.
.
.
..
..
.
.
.
.
.
.
.
.
.
..
.
.
.
Bus
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
12-1
.
.
.
.
..
.
.
.
.
12-1
.
.
..
.
.
.
.
.
.
12-2
.
.
.
.
.
..
.
.
.
12-3
.
.
.
.
.
.
.
.
.
.
A
-1
.
.
.
.
.
.
.
.
.
.
A
-1
.
.
.
.
.
.
.
.
.
.
A
-2
.
.
.
.
.
.
.
.
.
.
A
-3
Contents-3
Page 10
Figures
1-1. System
1-2. Program
1-3. Sample
2-1. Trigger
2-2. Sample
2-3.
Sample
2-4.
Sample
3-1.
SRQ
3-2.
Sample
3-3.
Sample
3-4.
Sweep-End
3-5.
Sample
3-6. Command-Error
4-1.
Sample
4-2.
Sample
4-3.
Sample
4-4.
FORM3
4-5.
Sample
5-1.
Sample
5-2.
Data
5-3.
Sample
5-4.
Sample
6-1.
Sample
7-1.
P
ass
7-2.
Sample Program:
7-3.
Sample Program
7-4.
Sample Program
7-5. Sample Program : T
8-1. Sample Program : Limit T
9-1. Sample Program : List Sweep (1/2)
10-1. I/O P
10-2. Sample Program : Synchronization of an External Handler
10-3. 8-Bit Data of OUT0-7 . . . . . . . . . . . . . .
10-4. Sending Signal to an the External Handler . . . . . . . . . . . .
10-5. Reading Signal from the External Handler . . . . . . . . . . . . . . . . . . 10-3
11-1. Harmonic Distortion in a Signal . . . . . . . . . . . . . . . . . . . . . . . 11-1
11-2. Sample Program : Total Harmonic Distortion (THD) (1/2) . . . . . . . . . . . 11-2
11-3. Adjacent Channel Power.......................... 11-4
11-4. Sample Program : Adjacent Channel Power Calculation (1/2) . . . . . . . . . 11-4
11-5. 99 % Occupied PowerBandwidth...................... 11-6
11-6. Sample Program : Occupied Power Bandwidth Calculation (1/2) .. ..... 11-7
Conguration
Flow
.
Program
System
Program
Program
Program
Generation
Program:
Program
Bit
Enabling
Program
Program
Program
Program
F
ormat
F
ormat
Control
Controller
Controller)
Controller) . . . . .
ort . . . .
Data
Program
Program
Arrays
Program
Program
Program
(F
or
Transfer
(F
or
,
Data
.
.
(On External
.
for
.
.
.
:
Basic
.
.
.
:
T
o
Trigger
:
T
o
Trigger
:
T
o
Trigger
.
.
.
T
o
W
ait
:
T
o
W
:
T
o
Report
Bit
Enabling
:
T
o
Read
:
T
o
Get
:
T
o
Get
External
F
:
T
o
Get
Instrument
:
T
o
Modify
Processing,
:
T
o
Modify
:
T
o
Modify
:
T
o
Observe
.
.
.
To
Receive Control
:T
o Run
:T
o Transfer
.
.
.
o Load Instrument B
...... ...... ...... ..... ..
GPIB
Remote
.
.
.
.
.
Measurement
.
.
.
.
.
Measurements
a
Measurement
a
Measurement
.
.
.
.
.
for
the
ait
for
Sweep
.
.
.
.
Command
.
.
Data
Using
Measurement
Measurement
Controller)
ormat
.
.
Measurement
B
ASIC)
Calibration
and
Error-Corrected
Trace
Printing .
..
..
..
the Instrument
Controller) .
the Program
.
.
.
.
.
.........................
est
(1/2)..... ...... ...... .....
Control
.
.
.
.
.
(1/2)
.
.
.
.
.
.
.
.
.
Preceding
End
.
.
.
.
.
.
Error
.
.
.
.
.
Marker
Trace
Trace
(1/2)
.
.
.
.
.
.
Trace
.
.
.
.
Data
GPIB
Command
Data
.
..
.
.
.
(On
Instrument
B
..
..
.
.
ASIC Program Array (on External
.
.... ...... ...... ....
.
.
.
.
.
..
..
.
.
.
.
.
.
.
.
.
..
Continuously
from
Controller
from
Controller
.
..
..
Operation
.
.
.
.
.
.
.
.
.
.
Occurrence
.
.
.
.
.
Search
Using
Using
.
.
.
.
Using
.
.
(1/2)
Data
..
..
..
.
.
.
ASIC
..
to Instrument
.
.
Function
ASCII
IEEE
.
.
.
..
.
IEEE
.
.
.
.
..
..
.
.
..
.
.
.
B
Program
.
.
.
.
.
...... ...... ..
.
.
.
.
.
.
.
..
..
.
.
.
.
.
.
.
.
.
..
..
..
.
.
.
.
.
.
(1)
.
.
(2)
.
.
..
.
.
.
.
.
to
Complete
.
.
.
.
.
.
.
..
.
.
.
.
..
F
ormat
64-bit
.
.
..
.
.
.
.
64-bit
.
..
.
.
.
.
..
.
..
.
.
.
.
.
.
.
.
.
.
ASIC)
.
.
From
.
.
.
B
ASIC
.
.
.
with the Analyzer .
.
.
.
.
Floating
.
.
Floating
.
.
.
.
.
.
.
.
.
.
.
.
.
.
the
.
(on
..
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
External
.
.
......
.
.
..
.
.
.
.
.
.
..
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
External
.
.....
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
P
P
.
..
.
.
..
.
.
.
.
.
..
.
..
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
oint
.
.
.
.
oint
.
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
. 1-2
.
1-5
. 1-5
.
2-1
.
2-2
2-3
2-4
.
3-1
.
3-2
.
3-3
.
3-3
. 3-5
.
3-6
.
4-2
.
4-4
.
4-6
.
4-8
.
4-9
.
5-1
.
5-5
.
5-6
.
5-8
.
6-2
7-1
.
7-2
.
7-4
.
7-5
. 7-6
8-1
9-1
10-1
10-2
10-2
10-2
Contents-4
Page 11
11-7.
11-8.
11-9.
11-10.
A
-1. Serial
Sample Program:
Fixed length
block
Sample Program:
Sample Program:
Number
Plate
File Transfer
format
File
Displaying
.
.
Transfer
List
.
.
.
from
.
from
.
.
.
of
.
.
4396B
.
.
.
External
Files
in
.
.
..
to
External
.
.
..
Controller
Current
..
..
Directory
..
..
Controller
..
..
to
4396B
of
..
..
(1/2)
..
(1/2)
4396B
..
..
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
. 11-13
..
.
.
11-10
11-12
11-15
A
-2
Contents-5
Page 12
T
ables
A-1.
A
-2.
Manual Changes
Manual
Changes
by
Serial
by
Firmware
Number
V
ersion
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
..
. A
.
.
.
.
.
.
.
.
.
..
..
..
..
.
.
.
-1
A
-1
Contents-6
Page 13
1
Learning
This chapter
basic use
are the
command that
standard. F
of
the
simple
or
provides
GPIB
conforms
additional
manual.
What
is
GPIB?
Required
T
o
perform
1.
The
analyzer
2.
F
or
the
Equipment
the
GPIB
GPIB Remote
GPIB
commands
information
commands
to
the
on
.
In
.
F
or
each
Standard
information
The General
control
(analyzer).
computers
standards
interface
computer
and
receives
examples
and
system
in
the
accessories
controller
this
manual,
required
,
how
the
examples
of
Commands
of
about
of
the
and
IEEE
allows
.
The
you
Control Basics
to
congure
these
all
Purpose Interface
4396B
GPIB
is
peripherals
488.1
the
computer
data
from
need
to
test
the
GPIB
remote-control
used
in
this
manual,
commands
for
commands
,
there
Programmable
,
see
the
Bus (
Network/Spectrum/Impedance
a
standard
,
IEC-625
analyzer
the
the
following
a
specic
for
.
This
,
to
be
sends
commands
instrument
device
interfacing
standard
and
equipment:
most
is
also
Instruments
GPIB
gpib
)
is
supports
IEEE
488.2
controlled
or
through
under
system
of
the
commands
a
corresponding
(
Command
used
for
remote
Analyzer
instruments
worldwide
.
The
by
an
external
instructions
the
GPIB
test
(
dut
and
scpi
R
eference
GPIB
to
.
).
the
)
to
If the
analyzer has
the
Instrument
B
ASIC
installed,
it
can
be
used
as
the
system
controller.
Or,
An
HP
9000
coprocessor
hold
B
ASIC,
BASIC 3.0 or higher operating system
HPIB, GRAPH, IO
A disk drive is required to load B
(Depending on the disk drive
3. P
eripherals (printer, plotter
Series
or
needed binaries
200
or
card
300 computer
(
82300 or
82324). The
,
and
at
or an
computer must
least
64
HP V
ectra PC
kilobytes
with
have enough
of
program
a
measurement
memory to
space
.
and the following binary extensions:
, KBD
, and ERR
ASIC, if no internal disk drive is available
.
, a binary such as CS80 may be required.)
, and so on) and any GPIB instruments that are required for your
application.
4. 10833A/B/C/D GPIB cables to interconnect the computer, the analyzer, and any peripherals.
Learning GPIB Remote Control Basics 1-1
Page 14
To
Prepare for
1.
Connect
cables
.
the
analyzer
GPIB Control
and
controller
,
plus
any
other
instruments
and peripherals
with GPIB
2.
Turn
3.
Prepare
Figure
*
T
o
set
printer
on
the
analyzer
the
system
If
you
analyzer for
If you are using a computer as an external controller
a. Set the analyzer to addressable only mode
Press
or
.
controller
are
using
4
Local
1-1. System
plotter
see
Conguration for
Chapter
.
only
Instrument
your
use
.
F
or
NNNNNNNNNNNNNNNNNNNN
5
ADDRESSABLE ONLY
NNNNNNNNNNNNNNNNNNNNNNNNN
6.
details
B
ASIC
,
see
NNNNN
.
and
Using
GPIB
Remote
no
external
Instrument
,
.
Control
controller
B
ASIC with
,
b. Set GPIB address of the analyzer to 17.
Press
4
Local
N
NNNNNNNNNNNNNNNNNNNNNNNNN
5
SET ADDRESS
N
NNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNN
ADDRESS: 4396
NNNNNNNNNNNNNNN
4154754
5
.
2
1
c. Turn on the controller. Then load the BASIC operating system and the binary
extensions.
prepare
the 4396B
the
.
1-2 Learning GPIB Remote Control Basics
Page 15
How large
can you
congure?
a system
A
maximum of
The length
less
one
the
number of
controller
must
Star
,
allowed.
It is
connectors
resulting
mounting
15 devices
of cable
than or
equal to
bus system
between one
four meters
must be
devices connected
not
linear
counts as
exceed
,
and
There
one device).
20 meters
combinational
must
recommended that
be stacked
structure could
to damage
it.
can
less than
.
be
no
loop
no
more
together on
exert enough
be
connected
device and
.The
total length
or equal
on the
The total
cable
congurations are
.
than
four
one
device
force on
on
one
another must
to two
bus (the
length of
piggyback
.
Otherwise
the
bus
system.
be
of cable
in
meters times
GPIB
cable
,
the
connector
Learning GPIB Remote Control Basics 1-3
Page 16
GPIB Commands
All
the
GPIB
F
or
analyzer's
command,
example
,
front-panel
you
can
Introduction
keys have
operate the
a corresponding
analyzer as
if you
GPIB command.
were pressing
By executing
the corresponding
an
key.
Pressing
4
Preset
Note
T
o
Execute
Combine the
nally the
analyzer command.
Using
5
is
the
Each
One
Commands
commands
F
or
INST:TYPE
F
or
an
BASIC
Instrument
same
of
the
is
unique
example
details
GPIB
OUTPUT
as executing
analyzer's
to
analyzer
for
Programmable
that
are
unique
,
you
can
NA
(which
on
SCPI,
see
Command
statement
F
or
example
B
ASIC
the GPIB
functions
,
and
has
the
Instruments)
to
the
analyzer
use either
conforms
NA
to
GPIB Command
with
the
GPIB
,
to
execute
command,
two
PRES
corresponding
other corresponds
standard.
are
described.
(which
SCPI)
is unique
to select
the analyzer
Reference
select
code
,
the
PRES
command,
.
.
GPIB
to the
In
to
the
device
type:
commands:
SCPI (Standard
this
guide
, only
analyzer)
type.
address
,
the
or
and
And
press
4
Return
Using
And press
an
External
4
Return
to the preset state
What is GPIB remote
mode?
5
.
The
analyzer
goes to
the preset
state
.
Controller
5
. The analyzer is set to GPIB remote mode
. Then the
.
Executing an
analyzer,setsit tothe
mode, all the analyzer's front-panel keys
except
4
Local
OUTPUT
5
. Pressing
statement that
is addressed to the
GPIB remote mode
5
puts the analyzer back in local
4
Local
. In the remote
are locked out,
mode. In local mode, all front-panel keys are enabled.
analyzer goes
1-4 Learning GPIB Remote Control Basics
Page 17
To
Program a
This
section
shows
a
typical
describes
program
Basic Measurement
how
to organize
ow for
the commands
a measurement.
into a
measurement sequence
. Figure
1-2
The
following
program
This
guide shows
use
the
code
from
instead
Figure
performs
the
program
sample programs
7to
8
and
change
of
717).
1-2.
Program
measurement
lists
of
sample
in
this
guide
the
GPIB
Flow
ow controlling
programs
with
address
Instrument
for
from
17
the
an
B
to
ASIC,
analyzer
external
change
00
(that
using
GPIB
controller
the
is
,
use
800
.
T
select
.
o
d a
10
20
30
40
50
60 OUTPUT
70
!
!
Figure
!
ASSIGN
!
OUTPUT
1-3.
Basic
@Hp4396
@Hp4396;"PRES" !
TO
717
Measurement
!
When
Preset 4396B
@Hp4396;"CHAN1;NA;MEAS
iBASIC
S21;FMT
is used,
LOGM"
change "717"
to "800".
80 INPUT "Enter center frequency (Hz).",F_cent
90 INPUT "Enter frequency span (Hz).",F_span
100 OUTPUT @Hp4396;"CENT ";F_cent
110 OUTPUT @Hp4396;"SPAN ";F_span
120 !
130 ! Frequency Response Calibration
140 OUTPUT @Hp4396;"CALK N50"
150 OUTPUT @Hp4396;"CALI RESP"
! Select 50 ohm
type-N Cal. kit
! Select Response cal.
160 OUTPUT @Hp4396;"CLES" ! Clear all status
170 INPUT "Connect THRU, then press [Return].",Dum$
180 OUTPUT @Hp4396;"*SRE 4;ESNB 1" ! Set enable STB and ESB
190 ON INTR 7 GOTO Cal_end ! \ When iBASIC is used, change "7" to "8".
200 ENABLE INTR 7;2 !/
210 OUTPUT @Hp4396;"STANC" ! Measure THRU
Figure 1-3. Sample Program : Basic Measurement (1/2)
Learning GPIB Remote Control Basics 1-5
Page 18
220
Calibrating:
230
Cal_end:
240
250
260
270
280
290
300
310
320
330 ON
340
350
360
370
380 OUTPUT
390
400
410
420
430
440
c b
OUTPUT
OUTPUT
ENTER
DISP
@Hp4396;Dum
"Response
!
!
Measurement
INPUT
"Connect
OUTPUT
OUTPUT
INTR 7
ENABLE
OUTPUT
Measuring:
Sweep_end:
OUTPUT
OUTPUT
ENTER
PRINT
PRINT
@Hp4396;Val1,Val2,Swp
"Max
"Swp.Prmtr:",Swp;"Hz"
END
@Hp4396;"RESPDONE"
@Hp4396;"*OPC?"
@Hp4396;"CLES"
@Hp4396;"*SRE
INTR 7;2
@Hp4396;"MKR ON"
@Hp4396;"SEAM
@Hp4396;"OUTPMKR?"
GOTO
Calibrating
!
cal
completed."
DUT,
then press
!
4;ESNB
GOTO Sweep_end
@Hp4396;"SING" !
GOTO Measuring
!
MAX"
val:",Val1;"dB"
!
Calculating cal
!
\ Waiting
!
/
[Return].",Dum$
Clear all
1"
!\
When
!/
change "7"
Sweep mode
!
Marker
!
Search MAX
!
Output
coefficients
calculation end
status registers
iBASIC
to
is
used,
"8"
is SINGLE
1
ON
marker
value
Set
I/O
P
ath
40
ASSIGN
This operation
Figure
@Hp4396
allows
you
1-3.
to
Sample
TO
use
717
!
@Hp4396
Program
When
iBASIC
,
instead
:
Basic
of
Measurement
is
used,
717
(or
800
change
),
as
the
(2/2)
"717"
GPIB
to
address
"800".
in
the
program.
Set
Up
the
Measurement
60
70
80
90
100
110
OUTPUT
OUTPUT
INPUT
INPUT
OUTPUT
OUTPUT
@Hp4396;"PRES"
@Hp4396;"CHAN1;NA;MEAS
"Enter
"Enter
@Hp4396;"CENT
@Hp4396;"SPAN
You can execute GPIB commands in the
and 70 perform the same operation as pressing
NNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNN
NETWORK ANALYZER
NNNNNNNNNNNNNNNNNN
NNNNNNN
S PARAMETERS
P
arameters
center
frequency
frequency
NNNNNNNNNNNNNNNNNNNN
!
Preset
4396B
S21;FMT
LOGM"
(Hz).",F_cent
span
(Hz).",F_span
";F_cent
";F_span
same sequence as key operation. Lines 60
4
NNNNNNNNNNNNNNNNNN
Trans:FDW S21[B/R]
Preset54Chan 154Meas
NNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNN
4
F
NNNN
NNNNNNNNNNNNNNNNNNNNNNNNN
5
ANALYZER TYPE
NNNNNNNNNNNNNNNNNN
5
LOG MAG
ormat
NNNNNNNNNNNN
NNNNN
.
In general, the procedure for setting up measurements on the analyzer via GPIB follows the
same sequence as performing the procedure manually
the desired frequency range
, number of points
, and power level are set before performing the
. There is no required order
, as long as
calibration.
In line 70, several GPIB commands, separated by semicolon, are executed in a line. This is the
same as:
70 OUTPUT @Hp4396;"CHAN1"
71 OUTPUT @Hp4396;"NA"
72 OUTPUT @Hp4396;"MEAS S21"
73 OUTPUT @Hp4396;"FMT LOGM"
1-6 Learning GPIB Remote Control Basics
Page 19
In
lines 80
parameters
P
erform
to 110
, see
(setting
\T
o
Execute
Calibration
frequency),
an
GPIB
parameters
Command
are
with
required
a
P
arameter"
with
the
later
GPIB
in this
command.
chapter.
T
o
set
130 !
140
150
160
170
180
190
200
210
220
230
240
250
260
270
In
lines
front
panel.
Line
170
Lines
180
See
\T
Lines
240
of
the
Chapter
Frequency
OUTPUT
OUTPUT
OUTPUT
INPUT
OUTPUT
ON
INTR
ENABLE
OUTPUT
Calibrating:
Cal_end:
OUTPUT
OUTPUT
ENTER
DISP
"Response
140
to
240,
This
requests
through
o
W
ait
for
Sweep
through
calibration
3.
Response
@Hp4396;"CALK
@Hp4396;"CALI
@Hp4396;"CLES"
"Connect
THRU,
@Hp4396;"*SRE
7
GOTO
Cal_end
INTR
7;2
@Hp4396;"STANC"
GOTO
Calibrating
!
@Hp4396;"RESPDONE"
@Hp4396;"*OPC?"
@Hp4396;Dum
cal
completed."
the
GPIB
program follows
program
the
220
270
coecients
performs
operator
use
the
End"
use the
.
to
status
in
Chapter
*OPC?
See \T
connect
Calibration
N50"
RESP"
then
press
4;ESNB
1"
!
\
!
/
!
\
!
/
the key
a
response
bytes
a
THRU
to
detect
calibration.
3.
command
o
W
ait
F
or
the
!
Select
!
Select
!
Clear
50
Response
all
[Return].",Dum$
!
Set
enable
When
iBASIC
!
Measure
!
Calculating
Waiting
is
THRU
calculation
strokes required
calibration standard.
the
completion of
to
detect
the
Preceding
completion
Operation
ohm
type-N
status
STB
and
used,
cal
coefficients
Cal.
cal.
ESB
change
end
to calibrate
the
THRU
of
the
calculation
to
Complete
kit
"7" to
from
"8".
the
calibration.
"
in
Connect
300
Line
All
instrument
Trigger
310 OUTPUT @Hp4396;"CLES"
DUT
INPUT
300
requests
settings
a Measurement
"Connect
the
operator to
and
DUT,
then
connect a
calibration are
! Clear all status registers
press
DUT to
done.
[Return].",Dum$
the
You
analyzer
can now
.
measure
the
DUT
.
320 OUTPUT @Hp4396;"*SRE 4;ESNB 1"
330 ON INTR 7 GOTO Sweep_end
340 ENABLE INTR 7;2
350 OUTPUT @Hp4396;"SING"
360 Measuring:
370 Sweep_end:
GOTO Measuring
!
! \ When iBASIC is used,
! / change "7" to "8"
!
Sweep mode is SINGLE
Lines 310 to 370 enable SRQ interruption for sweep end detection. For details, see Chapter 3.
In line 350, the analyzer executed a single trigger.For more advanced trigger control, see
Chapter 2.
Learning GPIB Remote Control Basics 1-7
Page 20
P
ost-Processing
380
390
Line
380
activates
trace
.
F
or
Transfer
400
410
Line
400
the
Chapter
T
o
Some
4.
Execute
GPIB commands
OUTPUT
(The
space
Y
ou
can
program
100
INPUT
110
OUTPUT
OUTPUT @Hp4396;"MKR
OUTPUT
details
@Hp4396;"SEAM
the
marker
on
using
the
ON"
and
line
marker
Data
OUTPUT
ENTER
@Hp4396;"OUTPMKR?"
@Hp4396;Val1,Val2,Swp
measured
an
data
GPIB
is transferred
Command
require a
numeric parameter
@Hp4396;"CENT 25000000"
between
the command
it
to
be
entered
"Enter
center
@Hp4396;"CENT
and the
each
frequency(Hz).";F_cent
";F_cent
MAX"
390
moves
,
see Chapter
!
to the
! Set
numeric
time
!
!
Output
with
the
Marker
Search
the
1
ON
MAX
marker to
4.
marker
controller.
aP
.
F
For
arameter
or
example:
center frequency
parameter
program
is
is
run.
the maximum
value
details
about
to 25
mandatory
F
or
example:
data
.)
value on
transfer
MHz.
the
,
see
Executing
this
,
d a
Enter
center
frequency (Hz).
25000000
The
analyzer's
T
o
Execute
center
a
frequency
Query
is
set
to
25
MHz.
Any GPIB command that is used with a numeric parameter can also be used as query
command. F
or example
can be combined with a
,the
CENT
numeric
?
, and used as a query command as follows
parameter
command used in the previous example
,
,
10 OUTPUT @Hp4396;"CENT?"
20 ENTER @Hp4396;A
30 PRINT A
The
CENT?
command returns the current center
frequency, which is put into
A
. Executing this
program results in the following:
d a
25000000
By interrogating the analyzer to determine the values of the start and stop frequencies,orthe
center frequency and frequency span, the computer can keep track of the actual frequencies.
1-8 Learning GPIB Remote Control Basics
Page 21
2
Triggering
This chapter
To
trigger
1. Set
Bus
,
(In
External,
sources
2.
Set
describes
a
measurement
the
trigger
or
Internal
are
the
number
source
(free
Video
not
mentioned
of
measurements as:
(Hold)|Single|Number
3. Generate
The
analyzer
the
trigger
trigger
the Analyzer
how
to
from
control
a
the
controller
trigger
,
to:
run)
,
Manual
measurements
event
system
or
Gate
trigger
in
this
guide
.)
and
the
of
Group|Continuous
and
the
analyzer
has
three
states:
from Remote
system
the
following
,
you
analyzer
starts
Idle
,
of
steps
cannot
is
initiated.
a
measurement.
W
aiting
the
trigger
for
Trigger
analyzer
are
.
commonly
from
the
Y
ou
can
,
and
used:
controller
set
the
,
number
Measurement.
so
these
of
Figure 2-1. Trigger System
Triggering the Analyzer from Remote 2-1
Page 22
In
Figure 2-1
1.
After a
2.
By setting
\W
aiting for
3.
At the
a
measurement.
HOLD
\W
,
GPIB
the
Trigger"
aiting
command
number
for
Trigger"
execution,
of
measurements
state
.
state
,
a
the
,
the
trigger
analyzer
analyzer
input
(corresponding
returns
changes
to
from
the
\Idle"
the
to
the trigger
state
\Idle"
.
state to
the
source) starts
Bus
Internal
4.
After
Single
Number
Continuous
T
o
Measure
(free
the
measurement
of
Groups
run)
GPIB
command
measurements
There
is
no
need
measurements
is
complete
goes
to
the
\Idle"
Goes
to
the
measured
After
goes
yet
all
measurements
to
the
\W
Continuously
*TRG
.
for
immediately
,
the
next
state(4-a).
\W
aiting
equals
aiting
or
B
ASIC
a
trigger
.
state
for
Trigger"
zero(4-b).
are
completed,
for
Trigger"
command
input.
depends
state
state(4-b).
The
on
TRIGGER
analyzer
until
goes
triggers
starts
the number
the number
to
\Idle"
the
of measurements
of groups
not
state(4-a).
.
d a
10
!
20
!
30
40
50
60
70
Figure
!
ASSIGN
OUTPUT
OUTPUT
END
2-2.
To
Trigger
@Hp4396
TO
717
@Hp4396;"TRGS
@Hp4396;"CONT"
Measurement
!
When
INT"
iBASIC
Continuously
is
used, change
"717" to
"800"
c b
Set
Trigger
50
OUTPUT
Figure
2-2.
Sample
Source
@Hp4396;"TRGS
Program
INT"
:
T
o
Trigger
Measurements
Continuously
Set the trigger source to internal.
Start Continuous Measurement Sweep
60 OUTPUT @Hp4396;"CONT"
The analyzer changes to the \W
aiting for Trigger" state
. In this program, the internal trigger
source is selected and the analyzer immediately starts continuous measurements.
2-2 Triggering the Analyzer from Remote
Page 23
What can
abort a
you do
to
measurement?
Send the
command:
OUTPUT @Hp4396;"HOLD"
What
are
commands?
other
trigger
The measurement
Instead
of
CONT
OUTPUT
OUTPUT
sweep is
,
you can
use,
@Hp4396;"SING"
@Hp4396;"NUMG
aborted.
parameter
for
single
"
for
number
measurement
of
group
measurements
When you
the
NUMG
commands
T
o
Two
Figure
transfer measurement
parameter
,
see
the
Trigger
methods
2-4
a
of
triggering
.
data
command
\T
o
Trigger
to
synchronize
a
Measurement
Measurement
a
measurement
to
the
From
controller
the
From
from
the
,
you
controller
the
the
Controller
controller
must
use
and
the
Controller"
are
either
analyzer
example
shown
in
the
SING
.
T
o
.
Figure
use
2-3
or
these
and
d a
10
!
20
!
30
40
50
60
70
Figure
!
ASSIGN
OUTPUT
OUTPUT
END
2-3.
To
Trigger
@Hp4396
TO
717
@Hp4396;"TRGS
@Hp4396;"SING"
Measurement
!
When
INT"
iBASIC
From
is
Controller(1)
used,
change
"717"
to
"800"
c b
Set
Set
Figure
Trigger
50
OUTPUT
the
trigger
2-3.
Sample
Source
@Hp4396;"TRGS
source
to
internal.
Program :
INT"
To
Trigger a
Trigger a Measurement
60 OUTPUT @Hp4396;"SING"
The analyzer changes to the \W
aiting for Trigger" state
is selected and the analyzer immediately starts
analyzer goes to the \Idle" state
How can you perform
averaging?
.
When you set the averaging on, you must also set the number
of measurements to the same value as the averaging factor.
For example, if the averaging factor is 10, replace line 60 as
follows:
60 OUTPUT @Hp4396;"NUMG 10"
Measurement from
Controller
(1)
. In this program, the internal source
a measurement. After the measurement, the
Triggering the Analyzer from Remote 2-3
Page 24
How can
you wait
measurement to
completed?
for a
be
When you
controller,
want to
you must
completed. F
return the
or details
wait for
,see
measurement
the measurement
Chapter 3.
data
to
to
the
be
d a
10
!
20 !
Figure 2-4.
To Trigger
Measurement
From
the
Controller(2)
30 !
40 ASSIGN
50 OUTPUT
60 OUTPUT
70 OUTPUT
@Hp4396 TO
717 !
@Hp4396;"TRGS BUS"
@Hp4396;"CONT"
@Hp4396;"*TRG"
When
iBASIC
is
used,
change
"717"
to
"800"
80 END
c b
Figure
Set
Trigger Source
50
OUTPUT
Set
the
trigger
Trigger
a
70 OUTPUT
Triggers
trigger
70
TRIGGER
What
the
as
follows:
is
Execution
(GET)?
2-4.
Sample
@Hp4396;"TRGS
source
to
bus
Measurement
@Hp4396;"*TRG"
analyzer
.
When
7
Group
Trigger
Program
BUS"
.
the
trigger
The
B
*TRG
triggerable
Therefore
code
TRIGGER
:T
o Trigger
source
ASIC
command
command.
instruments
,
to
7(GPIB
bus)
7
is
The
trigger
execute
a Measurement
set
to
bus
,
you
TRIGGER
BASIC
on
all
triggerable
can be
command is
a
BUS
the
command:
from
can
use
used
used
at
the
same
instruments
Controller
the
group
instead
to
trigger
time
on
execution
of
the
.
select
(2)
all
2-4 Triggering the Analyzer from Remote
Page 25
3
Synchronizing
GPIB analyzer
calibration, and
The control
the next
before
This
it
chapter
controller
Uses
the
This
command
commands
Reports the
The
analyzer
functions
summarizing
bit
is
set
the
GPIB
What
control
for
program
instruction.
reads
the
describes
and
the
analyzer
*OPC?
command.
halts
in
the
analyzer's
has
and
events
the
if
there
Command
is
an
SRQ?
programs
reading
must
Also
measurement
two
the
program.
status
a
status
inside
state
of
are
any
R
eference
the Analyzer
that
can
be
used
and
manipulating
wait
until
the
calculation
,
the
control
program
data.
techniques
used
by
.
execution
reporting
the
one
errors
and
generates
analyzer
aspect
in
of
the
program
mechanism
.
The
of
the
the
queue
analyzer
manual.
An
SRQ
(Service
analyzer
needs
ignore
using
to
example
the
the
the
dene
.
The
attention
SRQ
ON
the
,
the
analyzer
INTR
specic
end
from Remote
for
guiding
measurement
data
is
must
wait
the
control
until
SRQ.
that
gives
status
.
F
Request)
or
byte
.
F
or
the
status byte
is
can
of
the
controller
or
it
can
be
commands
event
of
sweep
you
through
data.
processed
until
the
programs
the
analyzer
information
is
an
8-bit
example
an
interrupt
be
setup
setup
to
.
The
that
generates
complete).
an
before
measurement
to
synchronize
completes
about
register
,
the
error queue
register
bit
generated
to
sent
an
.
The
controller
interrupt
Status
Byte
an
the
SRQ
analyzer
continuing
is
completed
the
the
preceding
specic
with
each
summary
assignment,
by
the
SRQ
when
can
program
can
be used
(for
with
bit
see
it
Figure 3-1. SRQ Generation
Synchronizing the Analyzer from Remote 3-1
Page 26
To
Wait
For
the Preceding
Operation to
Complete
d a
10
!
20
! Figure
30
!
40
50
60
70
80
90
100
110
120
130
ASSIGN
!
!
!
OUTPUT
ENTER
!
!
!
END
3-2.
To
@Hp4396
OUTPUT
statement
@Hp4396;"*OPC?"
@Hp4396;A
Next
operation
Wait
TO
717
for
to
the
send
Preceding
!
When
GPIB
Operation
iBASIC
command
is
used,
Complete
change
"717"
to
"800"
c b
Figure
Let
Controller
80
90
In
line
a
1
.
In
line
F
or
example,
follows:
.
.
.
240
250
260
270
.
.
.
Y
ou
cannot
the
status
3-2.
Sample Program:
W
ait
OUTPUT
ENTER
80,
90,
the
the
OUTPUT
OUTPUT
@Hp4396;"*OPC?"
@Hp4396;A
*OPC?
command
controller
in
the
sample
@Hp4396;"RESPDONE"
@Hp4396;"*OPC?"
ENTER @Hp4396;Dum
DISP "Response
use
byte
*OPC?
for
for
these functions
F
or Operation
waits
for the
pauses
the
program
program
in
cal completed."
the functions
.
T
o
W
ait
to Complete
preceding operations
until
Figure
!
!/
listed under
for
the
the analyzer
1-3
(Chapter
!
Calculating
\
Waiting
SRQ (at
Preceding
(OPC)
returns
1),
the
calculation
the
Operation
to
complete
a
*OPC?
cal
coefficients
beginning
to
Complete
and
1
.
command
end
of
the
then
returns
is
used
chapter).
as
Use
3-2 Synchronizing the Analyzer from Remote
Page 27
To
Wait
for Sweep
End
d a
10
!
20
!Figure
30
!
40
ASSIGN
50
OUTPUT
60
OUTPUT
70
OUTPUT
80
ON
90
ENABLE
100
110
120
130
140
OUTPUT
Measuring:GOTO
Sweep_end:
DISP
END
3-3.
@Hp4396
@Hp4396;"TRGS
@Hp4396;"CLES"
@Hp4396;"*SRE
INTR
7
GOTO
INTR
@Hp4396;"SING"
!
"MEASUREMENT
To
Wait
TO
Sweep_end
7;2
Measuring
for
Sweep
717
!
When
INT"
4;ESNB
COMPLETE"
!
!
iBASIC
1"
\
When
/
End
is
iBASIC
used,
is
change
used,
"717"
change
to
"7"
"800"
to "8"
c b
Enable
60
70
Line
60
In
line
70,
enables
Register
Figure
3-4
Figure
Sweep-End Bit
OUTPUT
OUTPUT
clears
the
bit
2of
B
to 0000000000000001
@Hp4396;"CLES"
@Hp4396;"*SRE
all
bits
of
the
command
the
Status
).
3-3.
Sample
4;ESNB
Status Registers
*SRE
4
sets
Byte
Register).
(this
Program :
1"
and the
the
Service Request
The
command
enables
bit
0
T
o
Enable
of
the
W
ait
Enable
ESNB
Event
for
Sweep
Registers
Register
1
sets
Status
End
.
the
Event
Register
to
00000100
Status
B
.
See
(this
Enable
Figure 3-4. Sweep-End Bit Enabling
Synchronizing the Analyzer from Remote 3-3
Page 28
Enable
setting
event
enabled),
of
summary
Registers select
bit 0
(sweep-end) sets
it is
Service Request
bit) generates
of
the
used
which events
Event
Status
bit
to
set
a
Enable
an
Enable
0
of
the
summary
Register
SRQ.
The
in
Event
bit
is
set,
SRQ
the
analyzer
Register
Status
in
the
setting
sets
B
Register
Status
the
bit
6
can
cause
to
1,
the
occurrence
B
.
When
Byte
Register
corresponding
of
the
Status
a
service
this
Byte
request
of the
bit is
(bit 2).
bit
(Event
Register.
(SRQ).
corresponding
set (and
Also,
because bit
Status
By
is
Register
2
B
Enable
Line
select
Line
register
80
90
.
.
.
120
Sweep_end:
80
denes
code
90
enables
(of
SRQ
ON
ENABLE
additional
Wait
Until Measurement
100
110
Measuring:
In
line
100,
details
The
on
controller
Generate
On
a
single
an
SRQ
is
Interrupt
INTR
7
INTR
a
branch.
is
7),
the
an
interrupt
the
controller)
information.
OUTPUT
the
SING
how
to
trigger a
loops
SRQ
sweep
end,
generated.
GOTO
Sweep_end
7;2
!
When
controller
is
goes
from
set
the
interface
by
a
Is Done
@Hp4396;"SING"
GOTO
Measuring
command
triggers
measurement,
back
in
line 110
bit 0
of the
ESB
!
!
SRQ
interrupt
to
Sweep_end
value
a
measurement
see
until
an
is
set
\
When
/
7 (GPIB)
of 2.
See the
Figure
SRQ
(which
iBASIC
is
generated
(Line
120).
when bit
GPIB
and
2-3
.
interrupt
sets
the
occurs
bit
is
2
used,
from the
1 (SRQ
bit)
Command
analyzer
.
of
the
Status
change
"7" to
GPIB interface
of
the
interrupt
R
eference
starts
a
sweep
Byte
Register)
for
"8"
(whose
.
F
or
and
110
Once
Measuring: GOTO
120
Sweep_end:
an
SRQ
is
generated, the
!
Measuring
SRQ interrupt
3-4 Synchronizing the Analyzer from Remote
Loop
until
At
SRQ interrupt,
is disabled.
SRQ
interrupt
jump to
here
Page 29
To
Report Command
Error Occurrence
d a
10
!
20
!
Figure
30
!
40
ASSIGN
50
!
60
DIM
70
OUTPUT
80
OUTPUT
90
ON
INTR
100
ENABLE
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
260
270
280
290
!
!
!
!
!
GOTO
Err_report: !
OUTPUT @Hp4396;"OUTPERRO?"
ENTER
PRINT
PRINT
!
A=SPOLL(@Hp4396)
OUTPUT
ENTER
ENABLE
RETURN
Prog_end:
END
3-5.
@Hp4396
Err$[30]
@Hp4396;"CLES"
@Hp4396;"*SRE
7
GOSUB Err_report
INTR
7;2
OUTPUT
statement
Prog_end
@Hp4396;Err,Err$
"COMMAND
Err,Err$
@Hp4396;"*ESR?"
@Hp4396;Estat
INTR
!
To
TO
7
Report
717
32
ERROR
!
Command
!
When
;*ESE 32"
to
send
DETECTED"
When
iBASIC
Error
iBASIC
!\
!/
is used,
When iBASIC
change "7"
GPIB command
is
used,
Occurrence
change "717"
is used,
to "8"
change
"7"
to
to "800"
"8"
c b
F
or details
Enable
Figure
on SRQ
Error
3-5. Sample
interrupt, see
Bit
Program :
the
\T
o
W
To
Report Command
ait
for
Sweep
End"
Error
example
Occurrence
.
70 OUTPUT @Hp4396;"CLES"
80 OUTPUT @Hp4396;"*SRE 32 ;*ESE 32"
Line 70 clears all bits of the Status
In line 80, the command
*SRE 32
enables bit 5 of the Status Byte Register). The command
Registers and Enable Registers
sets the
Service Request Enable Register to 00100000 (this
*ESE 32
.
sets the Standard Event
Status Enable Register to 00100000 (this enables bit 5 of the Standard Event Status Register
(see Figure 3-6).
Synchronizing the Analyzer from Remote 3-5
Page 30
Figure
3-6.
Command-Error
Bit
Enabling
Report
90
100
110
120
130
140
Command
ON
INTR
7
ENABLE
INTR
!
!
OUTPUT
!
!
Error
GOSUB
Err_report
7;2 !
statement
to send
150 !
160 GOTO
170 Err_report:
If an
GPIB command
the analyzer
OUTPUT
statement:
120 OUTPUT @Hp4396;"CENT "
causes an SRQ interrupt and branch to
Prog_end
(executed
generates an
!
SRQ
between
and
the
controller
Setting center frequency
Err_report
Output Error
180 OUTPUT @Hp4396;"OUTPERRO?"
190 ENTER @Hp4396;Err,Err$
200 PRINT "COMMAND ERROR DETECTED"
210 PRINT Err,Err$
lines
!
100
\
When
/
change
GPIB
and
branches
.
iBASIC
"7"
command
160)
causes
to
is
used,
to
"8"
an
GPIB
command
Err_report
.
F
or
, but no parameter
error
example
,
,
the
These commands retrieve the error number and description.
In the error shown in the line 120 example, the controller displays the following:
3-6 Synchronizing the Analyzer from Remote
Page 31
d a
COMMAND
-109
ERROR
"Missing
DETECTED
parameter"
Return
to
230
240
250
260
270
Lines
230
Line
230
reads
Byte
Register
error
causes
96.
Reading
6).
In
line 240
Register
the
A
reenable
.With
Standard Event
branch to
the interrupt.
Execute
GPIB
A=SPOLL(@Hp4396)
OUTPUT
ENTER
ENABLE
@Hp4396;"*ESR?"
@Hp4396;Estat
INTR
RETURN
to
270
clear
SRQ
the
analyzer's
of
the
address
the
SRQ
and
the
and
Status
line
Bit 5
Byte
250,
of
Standard
Status Register
Err_report
7
before
status
@Hp4396
with
Register
the
command
disables
command
!
When
returning
byte.
(analyzer), and
bit 5
and bit
by
using
*ESR?
Event
by
the
interrupt.
Status
using
iBASIC
The
is
used, change
to
the
main routine
A=SPOLL(@Hp4396)
enters the
6of
the Status
the
SPOLL
reads
the
Register
the
*ESR?
set,
command
Therefore
.
statement reads
value into
Byte
Register
command clears
contents
the
of
value
the
clears
,
the
return
"7" to
set,
SRQ
Standard
of
Estat
the
from
"8"
A
.
The
command
the
value
(status
Event
is
32.
register
Err_report
the
Status
of
byte
Reading
.
A
is
bit
Status
must
Synchronizing the Analyzer from Remote 3-7
Page 32
Page 33
4
Reading
This chapter
Measurement Data
describes
Measurement data
1. Data
2.
The
F
or
additional
The
can
be
present
entire
read
value
trace
ways:
Data arrays
available
.
RAW
D
A
CALIBRA
D
A
T
A
ARRA
T
A
TION
MEMORY
D
A
T
A
TRA
MEMORY
F
or
details
R
eference
Data
about
manual.
format
how
can
be
read
o
the
of
the
information
(or
data
|
In
regard
ARRA
YS
COEFFICIENT
YS
ARRA
YS
CE
ARRA
TRA
CE
ARRA
the
data
|
The
analyzer
to
read
out
trace
marker
on
for
to
YS
YS
processing
measurement
of
the
selectively
(real-imaginary
the
marker
a
specied
the
data
ARRA
provides
data
analyzer
using
functions
number
processing
YS
ow
of
four
data
in
the
data
of
ow
the
transfer
over
the
the
following
markers
and
,
see
the
points)
,
the
analyzer
GPIB
ways:
.
sweep
Function
can
be
following
,
see
Chapter
formats.
.
parameter)
R
eference
read
out
data
arrays
12
is
retrieved.
.
in
the following
are
of
Function
FORM2
FORM3
FORM4
FORM5
Depending
Generally
F
or details
IEEE
IEEE
ASCII
MS-DOS
on the
, binary
on data
32
bit
oating
64
bit
oating
format
R
personal
format, the
data transfer
transfer format,
point
format
point
format
computer
data transfer
format
speed and
(FORM2, FORM3,
see the
GPIB Command
the
or FORM5)
number
is
faster
Reference
of
digits
than
are
ASCII
manual.
changed.
(FORM4).
Reading Measurement Data 4-1
Page 34
To
Read Data
Using the
Marker Search
Function
d a
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
!
! Figure
!
ASSIGN
INPUT
INPUT
"ENTER
"ENTER
OUTPUT
OUTPUT
OUTPUT
ENTER
@Hp4396;Dum
!
OUTPUT
OUTPUT
ON
INTR
ENABLE
OUTPUT
Measuring:
Sweep_end:
OUTPUT
OUTPUT
OUTPUT
ENTER
PRINT
PRINT
END
4-1.
To
Read
Data
@Hp4396
@Hp4396;"CENT
@Hp4396;"SPAN
TO
717
CENTER
FREQUENCY
FREQUENCY
!
SPAN
";F_cent
";F_span
@Hp4396;"*OPC?"
@Hp4396;"CLES"
@Hp4396;"*SRE
7
GOTO
Sweep_end
INTR
7;2
4;ESNB
@Hp4396;"SING"
GOTO
Measuring
!
@Hp4396;"MKR
@Hp4396;"SEAM
ON"
MAX"
@Hp4396;"OUTPMKR?"
@Hp4396;Val1,Val2,Swp
"Max
Val:",Val1;"dB"
"Swp.Prmtr:",Swp,"Hz"
Using
When
Marker
iBASIC
(Hz)",F_cent
(Hz)",F_span
1"
!
\
When
!
/
!
Trigger
!
Measuring
Search
is
iBASIC
Function
used,
change
!
Setting
!
!
!
is
used,
a
Measurement
"717"
to
4396B
change "7"
"800"
to "8"
c b
Search
190
200
Line
190 activates
trace
.
Figure
4-1.
Sample
Maximum V
alue
OUTPUT @Hp4396;"MKR
OUTPUT @Hp4396;"SEAM
the marker
Program
and
line
:
ON"
MAX"
200
T
o
Read
moves
Data
the
Using
marker
Marker
to
the
Search
maximum
Function
value
on
the
4-2 Reading Measurement Data
Marker on Trace
Page 35
What are
the other
marker commands?
You
can activate
sub-markers and
following commands:
SMKR{1-7}
Y
ou
can
move
specied
specied measurement
Y
ou
can
move
specied
specied measurement
Y
ou
can
move
specied
specied
ON
,
DMKR {ON|FIX|TRAC}
the
marker
sweep
sub-markers
sweep
the 1marker
sweep
primary
value
using
parameter
point
using
parameter
point
using the
parameter
part
of
the
1marker
the
following commands:
MKRPRM
MKRP
the
following
SMKRPRM{1-7}
SMKRP{1-7}
following commands:
DMKRPRM
marker
DMKRVAL
using
parameter
parameter
commands:
parameter
parameter
parameter
the
1
1
parameter
1
1
Before
Read
Data
210
220
The
OUTPMKR?
secondary
What
are
value
commands?
executing
OUTPUT
ENTER
command
part
other
specied
marker
these
commands
,
you
must
@Hp4396;"OUTPMKR?"
@Hp4396;Val1,Val2,Swp
of
data,
marker
returns
and
sweep
Y
ou
the
can
get
get
get
get data
You can get the sub-marker value using the following commands:
get primary part of sub-marker value
secondary
value
turn
on
marker
parameter
get
the
marker
primary
secondary
sweep
parameter
point
the
value
.
part
part
number
part
markers
in
to
the
value
of
marker value
of
marker
of
be moved.
following
using
the
value
DMKRAUV
order:
following
parameter
primary
part
commands:
MKRVAL?
MKRAUV?
MKRPRM?
MKRP?
SMKRVAL{1-7}?
of
data,
get secondary part of sub-marker value
get sweep parameter
get data point
number
SMKRAUV{1-7}?
SMKRPRM{1-7}?
SMKRP{1-7}?
You can get the 1marker value using the following commands:
get primary part of 1marker value
get secondary part of 1marker value
get sweep parameter
DMKRVAL?
DMKRAUV?
DMKRPRM?
Reading Measurement Data 4-3
Page 36
To
Get Measurement
Trace Using
ASCII F
ormat
d a
10 !
20 !
30
40
50
60 INPUT
70 INPUT
80 OUTPUT
90 OUTPUT
100
110 OUTPUT
120 OUTPUT
130 ON
140 ENABLE
150
160
170
180
190
200
210
220
230
240
250
260
270
280
290
Figure 4-2.
!
ASSIGN
!
"ENTER CENTER
"ENTER FREQUENCY
!
INTR 7
OUTPUT
Measuring:
Sweep_end:
DIM
Dat(1:801,1:2),Swp(1:801)
OUTPUT
OUTPUT
ENTER
OUTPUT
ENTER
!
OUTPUT
ENTER
FOR
I=1
PRINT
NEXT
@Hp4396
To Get
TO
Measurement Trace
717 !
When iBASIC
FREQUENCY (Hz)",F_cent
SPAN (Hz)",F_span
@Hp4396;"CENT";F_cent
@Hp4396;"SPAN";F_span
@Hp4396;"CLES"
@Hp4396;"*SRE 4;ESNB
GOTO Sweep_end
INTR 7;2
!
!
@Hp4396;"SING"
GOTO
Measuring
!
@Hp4396;"FORM4"
@Hp4396;"OUTPDTRC?"
@Hp4396
USING
"%,K";Dat(*)
@Hp4396;"OUTPSWPRM?"
@Hp4396 USING
"%,K";Swp(*)
@Hp4396;"POIN?"
@Hp4396;Nop
TO
Nop
Swp(I);"Hz",Dat(I,1);"dB"
I
1"
\
/
When
!
!
Using ASCII
is used,
iBASIC
Trigger
is
a Measurement
Measuring
!
For
spectrum
!
"Dat(1:801,1:2)"
!
For
spectrum
!
"Dat(I,1)"
Format
change "717"
used,
change
to
"7"
measurement, change
to
"Dat(1:801)"
measurement,
to
"Dat(I)"
"800"
to
"8"
change
300 END
c b
Figure
Set
the Receive
180
4-2.
Sample
Program
Array
DIM
Dat(1:801,1:2),Swp(1:801)
:
T
o
Get
Measurement
Trace
Using
ASCII
Format
Line 180 sets the array size to the analyzer's maximum number of measurement points (801).
In this example
in which each point has complex data. If
each measurement point has only real data, so you
, it is assumed
that the analyzer is in the network analyzer mode of operation,
you use the analyzer in the spectrum analyzer mode
must set the data array
Dat
as follows:
180 DIM Dat(1:801),Swp(1:801)
280 PRINT Swp(I);"Hz",Dat(I);"dB"
If the number of measurement points changes, then so does the number of data. You must
control the number of entered measurement data (see lines 210 and 230).
4-4 Reading Measurement Data
,
Page 37
Set
Data
Transfer
F
ormat
190
Line
190
tells
Read
Data
200
210
220
230
OUTPDTRC?
In
line
210
ll
the
array
What
arrays?
OUTPUT @Hp4396;"FORM4"
the
analyzer
OUTPUT
ENTER
OUTPUT
ENTER
retrieves D
and 230,
(which is
are other
@Hp4396
@Hp4396
you must
to
use
@Hp4396;"OUTPDTRC?"
USING
@Hp4396;"OUTPSWPRM?"
USING
AT
A TRA
CE ARRA
choose
801 as
data
declared in
Y
command
command,
the
ASCII
"%,K";Dat(*)
"%,K";Swp(*)
%,K
ou can
RA
W
D
D
A
T
A
ARRA
MEMORY
transfer
YS,
and
to
allow
line
180).
retrieve
OUTPDTRC?
see
the
A
T
A
ARRA
YS
ARRA
format.
OUTPSWPRM?
for
an
the
following
in
line
GPIB
Command R
YS
YS
retrieves
insucient
data
arrays
200. F
or details
OUTPRAW{1-4}?
OUTPDATA?
OUTPMEMO?
sweep
number
,
eference
parameters
of
data
exchanging
on each
manual.
.
points
GPIB
to
MEMORY
CALIBRATION
ARRA
YS
SWEEP
P
TRA
CE
ARRA
COEFFICIENT
ARAMETER
YS
ARRA
YS
OUTPMTRC?
OUTPCALC{1-12}?
OUTPSWPRM?
Reading Measurement Data 4-5
Page 38
To
Get Measurement
Two
Figure
programs
4-5
are
shown
.
Figure
Trace Using
to get
the data
4-3
Binary F
arrays using
ormat
binary format
Figure
in Figure
4-5
4-3 and
F
Using
for
the
REDIM
change
measurement
Before running
match to
the analyzer
or
the
external
command
in
the
points
.
the program
controller
(line
220)
number
of
in Figure
type (network
to
allow
4-3
or
spectrum).
,
you
Instrument
number
specied
must
modify
(See
of
in
the
F
or
B
data
the
the
\Set
ASIC
the
Instrument
allows
points
data
then
array
dimension
the
Receive
B
ASIC
for
a
dierent
the
number
declaration.
of
the
data
Array"
arrays
example
to
.)
d a
10
!
20
! Figure
30
!
40
!
50
60
ASSIGN
!
70 INPUT
80 INPUT
90 OUTPUT
100
110
120
130
140
150
OUTPUT @Hp4396;"SPAN";F_span
!
OUTPUT
OUTPUT
ON
ENABLE
160
170
Measuring:GOTO
180
Sweep_end:
190
200
210
220
DIM
OUTPUT
ENTER
REDIM
4-3.
To
Get
Measurement
IEEE
64-bit
@Hp4396
"ENTER
"ENTER
TO
717
CENTER
FREQUENCY
FREQUENCY
SPAN
@Hp4396;"CENT";F_cent
@Hp4396;"CLES"
@Hp4396;"*SRE
INTR
7
INTR
OUTPUT
GOTO
Sweep_end
7;2
@Hp4396;"SING"
4;ESNB
Measuring
!
Dat(1:801,1:2),Swp(1:801)
@Hp4396;"POIN?"
@Hp4396;Nop
Dat(1:Nop,1:2),Swp(1:Nop)
Trace
Floating point
(Hz)",F_cent
(Hz)",F_span
1"
!
!
!
For
!
"Dat(1:801,1:2)"
Using
Format (For
spectrum
External Controller)
measurement,
to
"Dat(1:801)"
change
230 OUTPUT @Hp4396;"FORM3"
240
250 OUTPUT
260 ENTER
ASSIGN @Dt TO 717;FORMAT OFF
@Hp4396;"OUTPDTRC?"
@Dt USING "%,8A";A$
270 ENTER @Dt;Dat(*)
280 ENTER @Dt USING "%,1A";B$
290 OUTPUT @Hp4396;"OUTPSWPRM?"
300 ENTER @Dt USING "%,8A";A$
310 ENTER @Dt;Swp(*)
320 ENTER @Dt USING "%,1A";B$
Figure 4-3.
Sample Program : To Get Measurement Trace Using IEEE 64-bit Floating Point Format
(For External Controller) (1/2)
4-6 Reading Measurement Data
Page 39
330
340
350
360
370
380
c b
ASSIGN
!
FOR
I=1
PRINT
NEXT
END
@Dt
TO
*
TO
Nop
Swp(I);"Hz",Dat(I,1);"dB"
I
!
For spectrum
!
"Dat(I,1)" to
measurement, change
"Dat(I)"
Figure 4-3.
This
program is
format
Set
OFF when
the
190
200
210
220
Line 190
In
this
example
in
which
each
measurement
190
220
360
Lines
200
Line
220
Sample Program
similar to
using the
Receive
DIM
Dat(1:801,1:2),Swp(1:801)
OUTPUT
ENTER
REDIM
sets
each
@Hp4396;Nop
Dat(1:Nop,1:2),Swp(1:Nop)
the
array
,
it
is
point
DIM
Dat(1:801),Swp(1:801)
REDIM
PRINT
and
210
interrogate
resizes
the
:
T
o
Get
Measurement
Point
Format
the ASCII
binary data
(F
or
transfer
transfer
Array
@Hp4396;"POIN?"
size
to
the
analyzer's
assumed
has
point
that
complex
has
only
the
data.
real
analyzer
If
you
data,
Dat(1:Nop),Swp(1:Nop)
Swp(I);"Hz",Dat(I);"dB"
the
receive
array
analyzer
to
match
to
the
External
program.
format.
!
!
maximum
is
in
use
the
so
you
must
determine
data.
Trace
Controller)
However
For
spectrum
Using
(2/2)
,
you
must
measurement,
"Dat(1:801,1:2)"
number
the
network
analyzer
set
the number
of
measurement
analyzer
in
the spectrum
the
data
array
of measurement
IEEE
64-bit
set
the
to
"Dat(1:801)"
mode
analyzer mode
Dat
as follows:
Floating
data
change
points
of
operation,
points
transfer
(801).
,
.
Set
Data
200
210
T
o
use
ENTER
points to the analyzer
Transfer
OUTPUT
ASSIGN
FORM3
the
statement.
F
ormat
@Hp4396;"FORM3"
@Dt
TO
717;FORMAT
computer
This
is
must be
done
by dening
. This path can be used
OFF
!
When
instructed to
an
I/O
to read or write data to the analyzer
that data is in binary rather than ASCII format.
What are other binary
data formats?
You can use the following data transfer formats
changing the GPIB command
IEEE 32 bit oating point format
R
MS-DOS
personal computer format
iBASIC is
stop formatting
path
with
ASCII
FORM3
used, change
the incoming
formatting
"717" to
data with
OFF
.
, as long as
,by
in line 200.
FORM2
FORM5
Reading Measurement Data 4-7
The
I/O
"800"
the
path
Page 40
Read
Data
250
260
270
280
290
300
310
320
FORM3
#6.
This
integer
that
data
At
the
OUTPUT @Hp4396;"OUTPDTRC?"
ENTER
ENTER
ENTER
OUTPUT
ENTER
ENTER
ENTER
has
an
indicates
specifying
order
data
end,
@Dt
@Dt;Dat(*)
@Dt
@Hp4396;"OUTPSWPRM?"
@Dt
@Dt;Swp(*)
@Dt
eight-byte
that
a
the
number
is
maintained
the
terminator
USING
USING
USING
USING
header
xed
length
of
(lines
"%,8A";A$
"%,1A";B$
"%,8A";A$
"%,1A";B$
to
deal
with.
block
bytes
in
260
and
\
lf
^
eoi
"is
The
rst
transfer
the
block
follows
to
300).
sent(lines 280
two bytes
and that
follow
.
and
are the
the next
The header
320).
ASCII characters
6 bytes
must be
form an
read in
so
Figure
4-4.
FORM3
Data
Transfer
F
ormat
4-8 Reading Measurement Data
Page 41
Before
match
running the
the analyzer
program in
type
(network
Figure
or
4-5
,
you
spectrum).
must
(See
modify
the
\Set
the
dimension
the
Receive
of
the
Array"
data
below
arrays
.)
to
d a
10
!
20
!
Figure
30
!
40
!
50
60
70
80
90
100
110
120
130
140
150
ASSIGN
!
INPUT
INPUT
OUTPUT
OUTPUT
!
OUTPUT
OUTPUT @Hp4396;"*SRE
ON
ENABLE
160
170
Measuring:GOTO
180
Sweep_end:
190
200
210
220
230
240
250
260
270
280
290
DIM
OUTPUT
ASSIGN
OUTPUT
ENTER
ENTER
OUTPUT
ENTER
ENTER
ASSIGN
!
300 OUTPUT
310
320
ENTER
FOR
330
340 NEXT
4-5. To
@Hp4396
"ENTER
"ENTER
Get Measurement
IEEE
64-bit
TO
800
CENTER FREQUENCY
FREQUENCY SPAN
@Hp4396;"CENT";F_cent
@Hp4396;"SPAN";F_span
@Hp4396;"CLES"
4;ESNB 1"
INTR
OUTPUT
8GOTO
INTR
@Hp4396;"SING"
Sweep_end
8;2
Measuring
!
Dat(1:802,1:2),Swp(1:802)
@Hp4396;"FORM3"
@Dt
TO
800;FORMAT
@Hp4396;"OUTPDTRC?"
@Dt
USING
"%,8A";A$
@Dt;Dat(*)
@Hp4396;"OUTPSWPRM?"
@Dt
USING
"%,8A";A$
@Dt;Swp(*)
@Dt
TO
*
@Hp4396;"POIN?"
@Hp4396;Nop
I=1 TO
PRINT
Nop
Swp(I);"Hz",Dat(I,1);"dB" !
I
Floating
(Hz)",F_cent
(Hz)",F_span
OFF
Trace Using
point
!
!
Format
For
spectrum
"Dat(1:802,1:2)"
For spectrum
!
"Dat(I,1)"
(For Instrument
measurement,
to
"Dat(1:802)"
measurement, change
to
"Dat(I)"
BASIC)
change
350 END
c b
Figure 4-5.
Sample Program : T
Set the Receive
o Get Measurement Trace Using IEEE 64-bit Floating P
(For Instrument B
ASIC)
Array
oint F
ormat
190 DIM Dat(1:802,1:2),Swp(1:802)
Line 190 sets the array
of measurement points is 801. At end of data, the terminator \lf^
size to the maximum number of data. The analyzer's maximum number
eoi
" is sent (see Figure 4-4).
In this example, it is assumed that the analyzer is in the network analyzer mode of operation,
in which each point has complex data. If you use the analyzer in the spectrum analyzer mode,
each measurement point has only real data, so you must set the data array
Dat
as follows:
Reading Measurement Data 4-9
Page 42
190
DIM Dat(1:802),Swp(1:802)
330
If
the number
B
ASIC allows
Set
Data
200
210
T
o
use
FORM3
ENTER
more
Read
statement.
information,
Data
220
230
240
250
260
270
When
the
all the
program goes
PRINT Swp(I);"Hz",Dat(I);"dB"
of
measurement
for
insucient
Transfer
OUTPUT
ASSIGN
the
computer
This
see
OUTPUT
ENTER
ENTER
F
@Hp4396;"FORM3"
@Dt
TO
is
\Set
@Hp4396;"OUTPTDTRC?"
@Dt
@Dt;Dat(*)
points
data
ormat
800;FORMAT
must
the
same
Data
Transfer
USING
"%,8A";A$
change
in
lines
be
instructed
operation
OFF
OUTPUT @Hp4396;"OUTPSWPRM?"
ENTER @Dt
USING "%,8A";A$
ENTER @Dt;Swp(*)
data
is
transferred
to
the
next
and
no
operation.
data
,
220
that
F
ormat"
is
then
to
270
to stop
left
so
does
(see
formatting the
is
done in
in
Figure
for
the
the
number
\Read
Data
the program
4-3
.
receive
of
data. Instrument
").
incoming data
in Figure
arrays
,
Dat(*)
4-3.
and
with the
F
or
Swp(*)
,
4-10 Reading Measurement Data
Page 43
W
riting Data
Arrays to
5
the Analyzer
Chapter 4
to write
analyzer over
details on
T
o
Note
explained
data
the
Modify
how
to
arrays
the
data
to
GPIB
arrays
the
.
This
in
Calibration
If
you change
frequency
,
coecient
using
the
INPUCALC
coecient
this
way
,
use
the
RECD
read
data
arrays
analyzer
the
allows
analyzer
.
Y
ou
you
can
to
modify
,
see
Data
measurement conditions
NOP,
and
array
array
the
using
are
destroyed
SA
VDST
IFBW)
f
of
the OUTPCALC
1-12
g
command,
A
command to
command.
from
read,
the
this
and
the
analyzer
modify
the
trace
GPIB
Command
(for
instrument
f
1-12
contents
become
save data
,
and
on
example
after
g
?
command
invalid.
.
This
store
the
of the
chapter
the
analyzer's
R
eference
,
ST
exporting
data
ART
and
shows
arrays
display
manual.
frequency
a
calibration
inporting
imported calibration
If
as ST
you want
ATE
to perform
and
recall
how
to the
.
F
or
,
STOP
it
it
again
in
using
d a
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150 OUTPUT
160 OUTPUT @Hp4396;"*SRE 4;ESNB 1"
!
!
Figure
5-1.
To
Modify
!
ASSIGN
@Hp4396
TO
717
!
OUTPUT @Hp4396;"PRES"
OUTPUT @Hp4396;"NA"
INPUT "Enter
INPUT "Enter
OUTPUT
OUTPUT
OUTPUT
@Hp4396;"CENT
@Hp4396;"SPAN
@Hp4396;"HOLD"
center frequency(Hz).",F_cent
frequency span(Hz).",F_span
!
! Calibration
@Hp4396;"CLES"
Calibration Data
!
When
iBASIC is
";F_cent
";F_span
used,
change
"717"
! Set enable STB and ESB
to
"800"
170 INPUT "Connect THRU and press [RETURN] to do CAL.",Dum$
180 OUTPUT @Hp4396;"CALI RESP"
190 ON INTR 7 GOTO Cal_end
200 ENABLE INTR 7;2
! \ When iBASIC is used,
! / change "7" to "8"
210 OUTPUT @Hp4396;"STANC" ! Measure THRU
220 Calibrating:GOTO Calibrating
230 Cal_end: !
240 OUTPUT @Hp4396;"RESPDONE" ! Calculating cal coefficient
250 OUTPUT @Hp4396;"*OPC?" ! \ Wait until calculating ends
260 ENTER @Hp4396;Dum !/
Figure 5-1. Sample Program : To Modify Calibration Data (1/2)
Writing Data Arrays to the Analyzer 5-1
Page 44
270
280
290
300
310
320
330
340
350
360
370 ENTER
380 ENTER
390
400
410
420
430 !
440
450
460
470
480
490
c b
DISP
"Calibration
!
!
Read
Calibration
DIM
Dat(1:801,1:2)
OUTPUT
ENTER
REDIM
ASSIGN
OUTPUT
OUTPUT
@Hp4396;"POIN?"
@Hp4396;Nop
Dat(1:Nop,1:2)
@Dt
@Hp4396;"FORM3"
@Hp4396;"OUTPCALC1?"
@Dt USING
@Dt;Dat(*)
ENTER
@Dt USING
!
!
Modify Calibration
!
Restore Calibration
OUTPUT
OUTPUT
OUTPUT
ASSIGN
OUTPUT
@Hp4396;"INPUCALC1
@Dt
@Dt;Dat(*),END
@Dt
@Hp4396;"SAVC"
END
Complete"
Data
TO
717;FORMAT OFF
"%,8A";Head$
"%,1A";Dum$ !
Data
USING
TO
"#,8A";Head$
*
!
When iBASIC
!
\
!
| When
!
/
Data
";
!
Redraw
is used,
iBASIC is
! When
!
iBASIC is
change "717"
When iBASIC
Trace
change "801"
to "802"
used,delete these
used,
to "800"
is
used,
delete
lines
this
line
This
program
the
data
in
standard,
Read
see
Calibration
290 !
300
310
320
330
340 ASSIGN
350
Figure
measures
the analyzer
Chapter
Read Calibration
DIM
OUTPUT
ENTER
REDIM
OUTPUT
5-1.
Sample
calibration
.
F
or
details
1.
For
details
Program
standards
on
on
Data
Data
Dat(1:801,1:2) !
@Hp4396;"POIN?" !
@Hp4396;Nop !
Dat(1:Nop,1:2) !
@Dt TO
717;FORMAT
@Hp4396;"FORM3"
:
T
o
Modify
,
reads
how
to
obtain
how
to
transfer
When iBASIC
\
| When
/
OFF
Calibration
the
obtained
the
calibration
the
data
is used,
iBASIC is
!
When
iBASIC
!
change "717"
Data
(2/2)
calibration
data
arrays
change
,
see
data,
by
measuring
Chapter
"801"
and restores
to
used,delete these
is
used,
to
"800"
the
4.
"802"
lines
360 OUTPUT @Hp4396;"OUTPCALC1?"
370 ENTER @Dt USING "%,8A";Head$
380 ENTER @Dt;Dat(*)
390 ENTER @Dt USING "%,1A";Dum$
The controller can read out the error coecients using the GPIB
Each point is a real/imaginary pair
number of points in the sweep
, and the number of
.F
or details on data transfer
! When iBASIC is used, delete this line
commands
OUTPCALC{1-12}
points in the array is the same as the
, see Chapter 4.
.
Each calibration type uses only as many arrays as needed, starting with array 1, and each array
stores a specic error coecient. Therefore, it is necessary to know the type of calibration
about to be read out: attempting to read an array not being used in the current calibration
causes the \REQUESTED DATA NOT CURRENTLYAVAILABLE" warning to be displayed. For
assignment of data arrays, see the
GPIB Command Reference
manual.
5-2 Writing Data Arrays to the Analyzer
Page 45
Modify
400
410
420
In
this
portion
contained
Calibration
!
!
Modify
!
of
program,
in
Dat(1:801,1:2)
Data
Calibration
you
modify
.
Data
the
CALIBRA
TION
COEFFICIENT ARRA
Y,
which is
Restore
Modied
430
440
450
460
Line
440
opens
to
restore
Lines
(
END
This
with
can
450 and
).
The
example
the
new
redraw
the
le
Measurement
!
Calibration
Restore
Calibration
Data
OUTPUT @Hp4396;"INPUCALC1
OUTPUT @Dt
OUTPUT
the CALIBRA
USING "#,8A";Head$
@Dt;Dat(*),END
TION COEFFICIENT
data.
460 send
header
sets
CALIBRA
the
trace
Trace
the
is an
trigger
by
with
the
le
input
to
TION
COEFFICIENT
issuing
Modied
header
in
line
HOLD
the
GPIB
Calibration
(
Head$
370.
at
Data
";
),
calibration
line
120.
ARRA
command
Data
ARRAY
The
analyzer
YS
when
SAVC
.
"
description.
1
F
in
data
the
or
the
analyzer
(
Dat(*)
does
trigger
details
.
This
)
and
not
redraw
is
set
to
,
see
the \Redrawing
array
the
terminator
the
HOLD
is
trace
.
You
used
Writing Data Arrays to the Analyzer 5-3
Page 46
What is
ale
header?
When
using
the
be accompanied
this example
data is
,the
congured as
binary
by the
data
le header
data transfer
follows:
transfer
format is
format,
the
that represents
FORM3
transferred
the
data
and
the
transferred
data
length.
must
In
If you
of data
are not
points.
440 OUTPUT
441
442
443
444
445
446
447
448
449
450
460
Lines
440
real
part,
format.
Line
443
the
number
Line
444
Lines
445
array digit
FORM3
reading
Change
the
the
Data
header
program
Transfer
,
you
can
lines
F
create
440
ormat
to
@Hp4396;"POIN?"
ENTER
@Hp4396;Nop
V$=VAL$(Nop*2*8)
Numv=LEN(V$)
Head$="000000"
FOR
I=1
TO
Numv
Head$[7-I,7-I]=V$[Numv-I+1,Numv-I+1]
NEXT
I
!
OUTPUT
OUTPUT
OUTPUT
to
442
8
byte
counts
of
enters 0
to
447
by digit
@Hp4396;"INPUCALC1
@Dt
USING
@Dt;Dat(*),END
calculate
for
the
bytes
as the
place the
from
the
imaginary
number of
transferred.
initial value
number of
the
sixth
number
";
"#,8A";"#6"&Head$
of
bytes
part),
and
represents
characters in
in all
the
header
bytes transferred
array
to
the
rst
it
using
460
as
follows:
transferred
it
in
string
that
arrays
.
to
array
of
the
(8
the
string
contains
the
the
number
byte for
header
header
.
For
example,
003216
5-4 Writing Data Arrays to the Analyzer
if
the
number
of
points
is
201,
the
value
of
Head$
is
.
Page 47
Redrawing
Measurement
Trace
with
Modied
Calibration
Data
480
When
the
analyzer
How
the
OUTPUT @Hp4396;"SAVC"
all
the
calibration
can
trace?
reshape
you
a
trace
modify
(Summary)
coecients
with
T
o
modify
arrays
data
!
are
the
coecients
in
arrays,
Redraw
in
the
Trace
analyzer
.
the trace
the
analyzer.
on the
data processing,
,
send the
display,
Figure 5-2
and GPIB
GPIB command
you rewrite
shows the
relation of
commands
the
SAVC
data
.
to
the
have
Figure
5-2.
Data
Arrays
Reset
*RST
Data
INPURAW{1-4}
corresponding arrays
the data
INPUCALC{1-12}
COEFFICIENT ARRA
DATA to MEMORY command
DATMEM
,
Data
Processing,
and
GPIB Command
command
or
PRES
command
array writing
,
INPUDATA
trace on
commands
command
.
These
the
analyzer's
clears all
and
INPUDTRC
commands
write the
arrays.
display
YS.
command restores the contents in D
immediately
.
CALIBRA
MEMORY ARRAYS, and the contents in D
ARRAYS into MEMORY TRA
Data processing command
SAVC
command executes the data processing CORRECTION
CE ARRA
YS.
with the current RAWARRAYS and CALIBRATION
COEFFICIENT ARRAYS.
commands
TION
ATAARRA
ATATRA
write
reshape
CE
the
YS into
The following examples show how to modify the DATA ARRAYS and DATATRACE ARRAYS.
Writing Data Arrays to the Analyzer 5-5
Page 48
To
Modify Error-Corrected
Data
d a
10 !
20 !
Figure 5-3.
To Modify
Error-Corrected
Data
30 !
40 ASSIGN
@Hp4396
TO
717
!
When
iBASIC
is
used,
change
"717"
to
"800"
50 !
60 OUTPUT
70 OUTPUT
80
90
100
110
120
130
140
150
160
INPUT
INPUT
OUTPUT
OUTPUT
!
INPUT
OUTPUT
OUTPUT
ON
170 ENABLE
180
190
Measuring:
200
Sweep_end:
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350
DISP
!
!
DIM
OUTPUT
ENTER
REDIM
ASSIGN
OUTPUT @Hp4396;"FORM3"
OUTPUT @Hp4396;"OUTPDATA?"
ENTER @Dt
ENTER @Dt;Dat(*)
ENTER @Dt
!
!
@Hp4396;"PRES"
@Hp4396;"NA"
"Enter
"Enter
@Hp4396;"CENT
@Hp4396;"SPAN
"Connect
@Hp4396;"CLES"
@Hp4396;"*SRE
INTR
7
GOTO
INTR
7;2
OUTPUT
@Hp4396;"SING"
"Measurement
Read
Error-Corrected
Dat(1:801,1:2)
@Hp4396;"POIN?"
@Hp4396;Nop
Dat(1:Nop,1:2)
@Dt
TO
USING "%,8A";Head$
USING "%,1A";Dum$
Modify
Error-Corrected Data
center
frequency(Hz).",F_cent
frequency
DUT
and
Sweep_end
GOTO
Measuring
!
Complete"
717;FORMAT
span(Hz).",F_span
";F_cent
";F_span
press
4;ESNB
[RETURN].",Dum$
1"
!
\
!
/
!
When
change
Data
!
When
iBASIC
!
\
!
|
When
iBASIC
!
/
OFF
!
When
! change
! When
Set
iBASIC
"7"
is
used,
iBASIC
iBASIC is
enable
is
used,
to
"8"
change
is
used,
is used,
"717" to
STB
and
ESB
"801" to
delete these
"800"
used,
delete
"802"
lines
this
line
360 !
370 ! Restore Error-Corrected Data
380 OUTPUT @Hp4396;"INPUDATA ";
390 OUTPUT @Dt USING "#,8A";Head$
400 OUTPUT @Dt;Dat(*),END
410 ASSIGN @Dt TO *
420 END
c b
Figure 5-3. Sample Program : To Modify Error-Corrected Data
This program measures the DUT, reads the obtained data, and restores the data in the analyzer.
For details on how to read the data array, see Chapter 4. For information on how to modify the
trace on the display, see the \To Modify Calibration Data"example.
5-6 Writing Data Arrays to the Analyzer
Page 49
Read
Error-Corrected
Data
230
240
250
260
270
280
290
300
310
320
330
OUTPDATA?
transfer
,
see
Restore
370
380
390
400
Line
380
opens
Lines
390
Calibration
! Read
DIM
OUTPUT
ENTER
REDIM
ASSIGN
OUTPUT
OUTPUT
ENTER
ENTER
ENTER
command
Chapter
Modied
! Restore
Error-Corrected
Dat(1:801,1:2)
@Hp4396;"POIN?"
@Hp4396;Nop
Dat(1:Nop,1:2)
@Dt
TO
717;FORMAT
@Hp4396;"FORM3"
@Hp4396;"OUTPDATA?"
@Dt
USING
"%,8A";Head$
@Dt;Dat(*)
@Dt
USING
(line
"%,1A";Dum$
300)
retrieves
4.
Error-Corrected
Error-Corrected Data
!
OUTPUT @Hp4396;"INPUDATA
OUTPUT @Dt
OUTPUT
the
to
400
transfer
Data
"
USING "#,8A";Head$
@Dt;Dat(*),END
D
A
T
A
ARRA
YS
data
in
example).
in
FORM3
Data
When
!
!
!
the
iBASIC
\
|
When
/
OFF
D
A
T
A ARRA
Data
";
analyzer
(a
similar
is
iBASIC
!
When
!
change
!
When
YS in
to
restore
procedure
used,
is
change
used,
iBASIC
"717"
iBASIC
the analyzer
the
data.
is
used
is
is
to
"801"
delete
used,
"800"
used,
.
F
in
the
to "802"
these lines
delete
or
details
\T
o
Modify
this
on
line
data
Writing Data Arrays to the Analyzer 5-7
Page 50
To
Modify Trace
Data
d a
10 !
20 !
Figure 5-4.
To Modify
Trace
Data
30 !
40 ASSIGN
@Hp4396
TO
717
!
When
iBASIC
is
used,
change
"717"
to
"800"
50 !
60 OUTPUT
70 OUTPUT
80
90
100
110
120
130
140
150
160
INPUT
INPUT
OUTPUT
OUTPUT
!
INPUT
OUTPUT
OUTPUT
ON
170 ENABLE
180
190
Measuring:
200
Sweep_end:
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350
DISP
!
!
DIM
OUTPUT
ENTER
REDIM
ASSIGN
OUTPUT @Hp4396;"FORM3"
OUTPUT @Hp4396;"OUTPDTRC?"
ENTER @Dt
ENTER @Dt;Dat(*)
ENTER @Dt
!
!
@Hp4396;"PRES"
@Hp4396;"NA"
"Enter
"Enter
@Hp4396;"CENT
@Hp4396;"SPAN
"Connect
@Hp4396;"CLES"
@Hp4396;"*SRE
INTR
7
GOTO
INTR
7;2
OUTPUT
@Hp4396;"SING"
"Measurement
Read
Trace
Dat(1:801,1:2)
@Hp4396;"POIN?"
@Hp4396;Nop
Dat(1:Nop,1:2)
@Dt
TO
USING "%,8A";Head$
USING "%,1A";Dum$
Modify
Trace Data
center
frequency(Hz).",F_cent
frequency
DUT
and
Sweep_end
GOTO
Measuring
!
Complete"
Data
!
717;FORMAT
span(Hz).",F_span
";F_cent
";F_span
press
4;ESNB
When
[RETURN].",Dum$
1"
!
\
When
!
/
change
iBASIC
!
\
!
|
When
!
/
OFF
!
!
is
iBASIC
When
! change
! When
Set
enable
iBASIC
"7"
to
used,
is
change
used,
iBASIC
"717" to
iBASIC is
STB
is
used,
"8"
delete these
is used,
"800"
used,
and
ESB
"801" to
delete
"802"
lines
this
line
360 !
370 ! Restore Trace Data
380 OUTPUT @Hp4396;"INPUDTRC ";
390 OUTPUT @Dt USING "#,8A";Head$
400 OUTPUT @Dt;Dat(*),END
410 ASSIGN @Dt TO *
420 END
c b
Figure 5-4. Sample Program : To Modify Trace Data
This program measures the DUT, reads the obtained data, and restores the data into the
analyzer.For details on how to read the data array, see Chapter 4.
For details on how to modify the trace on the display, see the \To Modify Calibration Data"
example.
5-8 Writing Data Arrays to the Analyzer
Page 51
Read
Trace
Data
230
240
250
260
270
280
290
300
310
320
330
The
OUTPDTRC?
transfer
,
see
Restore
370
380
390
400
Line
380
opens
Lines
390
Calibration
! Read
DIM
OUTPUT
ENTER
REDIM
ASSIGN
OUTPUT
OUTPUT
ENTER
ENTER
ENTER
Chapter
Modied Trace
!
Trace
Data
Dat(1:801,1:2)
@Hp4396;"POIN?"
@Hp4396;Nop
Dat(1:Nop,1:2)
@Dt
TO
717;FORMAT
@Hp4396;"FORM3"
@Hp4396;"OUTPDTRC?"
@Dt
USING
"%,8A";Head$
@Dt;Dat(*)
@Dt
USING
command
"%,1A";Dum$
(line
300)
4.
Data
Restore
Trace
Data
!
retrieves
OUTPUT @Hp4396;"INPUDTRC
OUTPUT @Dt
OUTPUT
the
and
400
Data
"
USING "#,8A";Head$
@Dt;Dat(*),END
D
A
T
A
TRA
CE
transfer
data
example).
ARRA
in
FORM3
When
!
!
!
YS
iBASIC
\
|
When
/
OFF
";
in
(a
iBASIC
!
!
!
When
trace
the
analyzer
similar
is
used,
When
iBASIC
change
iBASIC
data
in the
procedure
is
"717"
to
restore
change
used,
is
to
is
used,
analyzer.
is
used
"801"
delete
used,
"800"
delete this
For
the
data.
in
the
to "802"
these lines
details
\T
o
Modify
on
data
line
Writing Data Arrays to the Analyzer 5-9
Page 52
Page 53
6
Printing
This chapter
describes
commands.
T
o
Print
Printer
1.
Connect
2.
Turn
Execute
T
o
print
OUTPUT
Set
the
Analyzer
Preparation
a
printer
the
printer
Print
the
screen, execute
800;"PRINALL"
GPIB
address
or Plotting
how
to
print
Display
using
a
parallel
on.
the
folowing
when
you execute
the Analyzer's
the
information
cable
.
on
the
command.
from
an
external
controller
analyzer
Display
display
using
.
GPIB
T
o
Observe
The Basic
interrupt.
Printing
program shown
below gives
an
example
to
detect
printing
end
by
using
a
SRQ
Printing or Plotting the Analyzer's Display 6-1
Page 54
d a
10
!
20
!
Figure
30
!
40
ASSIGN
50
!
60
OUTPUT
70
OUTPUT
80
OUTPUT
90
OUTPUT
100
OUTPUT
120 ON
130 ENABLE
140
150
160
170
OUTPUT
La1:!
GOTO
DISP
6-1.
To Observe
@Hp4396
TO
@Hp4396;"CLES"
@Hp4396;"OSNT
@Hp4396;"OSPT
@Hp4396;"OSE
@Hp4396;"*SRE
INTR 8
GOTO La1
INTR 8;2
@Hp4396;"PRINALL"
La1
"PRINT COMPLETE"
800
512"
0"
512"
128"
Printing
!Catch High
!Disable Low
!Enable OS
!Enable OSR
to Low
Transition
to High
Event Reg.
bit
Transitions
180 !
190
END
c b
Figure
6-1.
Sample
Program
:
To
Observe Printing
6-2 Printing or Plotting the Analyzer's Display
Page 55
7
Controlling
This chapter
at the
same
is
time
for
programmers
.
This
subsystem commands
the
GPIB
Command
If
your
GPIB
has
only
skip
this
T
o
Control
The
analyzer
device
control
chapter
on
to
the
the
.
GPIB
must
GPIB
analyzer
be
.
Instrument B
who
use
both
chapter
.
The
R
eference
one
the
Initially
(or
shows
PROGram
controller
from
active
,
the
other
how
subsystem
for
(either
Instrument
controller
system
controller
controllers
ASIC from
Instrument
to
pass
control
is
part
more
information
an
external
B
ASIC
of
the
GPIB
is
active
,if
there are
B
ASIC
and
of
the
on
computer
(select
.
The
others on
and
how
SCPI
how
or
code
active
the GPIB).
Remote
an
external
to
use
the
PROGram
commands
to
use
SCPI
the
Instrument
7)
when
controlling
controller can
controller
hierarchy
commands
B
ASIC),
pass
.
the
See
.
What is an active
controller?
Figure
The active controller determines which controller can manage the GPIB
(that is
, have control). The GPIB can have only one active controller at a
time. If two or more controllers are on the same bus
from one controller to another
Resetting the GPIB (this operation can only be done by the system
controller), the returns control to the system controller
7-1.
P
ass
Control
, control is passed
.
.
Controlling Instrument BASIC from Remote 7-1
Page 56
What is
system
controller?
In
this
guide
is used
in
,
NN
NN
NN
N
ADDRESSABLE ONLY
it
N
N
N
N
N
is
assumed
N
N
N
N
N
N
N
N
N
N
N
The
controller that
A controller
controller
manual.
N
N
N
N
N
N
N
N
NN
NN
NN
NN
NN
SYSTEM
(non-system
controller
NN
NN
that
NN
NN
N
N
N
N
N
N
N
N
N
N
N
N
N
can be
.F
or details
The analyzer
NN
NN
N
N
N
N
N
N
N
N
N
N
N
NN
NN
NN
CONTROLLER
controller) mode
on
the
the
NN
external
N
N
N
N
mode.
NN
NN
acts as
set as
NN
NN
N
N
N
N
bus
on how
,as
a controller
N
N
(system
.
controller
the
master
either a
to set
controller)
.
However
controller
.
system controller
a controller
,can
,
there
is
the
system
,see
be used
N
N
N
N
N
N
N
N
NN
NN
ADDRESSABLE
or
can
controller
or a
the
in either
NN
NN
NN
NN
NN
N
N
N
N
be
only
non-system
controller's
N
N
N
N
N
N
N
NN
NN
NN
NN
NN
NN
NN
ONLY
one
and
the
N
N
N
system
analyzer
d a
10 !
20 !
Figure
7-2.
To
Receive
Control
(on
Instrument
BASIC)
30 !
40 PRINTER
50
ON
60 Not_active:
70
PRINT
80
!
90
OFF
100
END
IS
701
ERROR
GOTO
!
"HELLO WORLD!"
ERROR
Not_active
c b
In
line
60,
Therefore
When
T
o
pass
control
active
Figure
to
,
print
until
7-2.
out
active
is
passed
control
Sample
to
the
control
to
the
to
Instrument
Program:
printer
is
passed
analyzer
B
at
address
to
,
it
ASIC:
T
o
Receive
the
analyzer
executes
701,
Control
the
,
line
(On
analyzer
the
program loops
70.
Instrument
requires
active
back
B
ASIC)
control.
to
line
30.
d a
PASS
While
active
plotters
Note
CONTROL
the
analyzer
controller
.
717
has
,
the
analyzer
The ability to assert the GPIB interface clear line (IFC) and remote enable line
(REN) are
active control, it
ABORT 7
REMOTE 7
5
4
Return
P
ass
control,
Control
it
can
is
send
free
(On
External
to
address
messages
to and
reserved for the system controller
is denied these functions
assert the
assert
interface clear line (IFC)
the remote enable line (REN)
Controller)
devices to
read replies
.
talk and
listen as
back from
needed. As
printers and
. Even when Instrument B
the
ASIC has
To return active control to the system controller:
d a
PASS CONTROL 721
4
Return
5
Return Control (On Instrument BASIC)
7-2 Controlling Instrument BASIC from Remote
Page 57
Or
, you
can return
control
to
the
external
controller
by
resetting
the
GPIB
as
follows:
d a
ABORT
7
4
Return
5
This returns
Note
T
o
Execute
Return Control
active control
to the
The PROGram
on
the
external
additional
information
an Instrument
system controller
subsystem commands
controller
(On External
.
See
on
the
use
B
ASIC
.
in
the
the
GPIB
Command
of
SCPI
Command
Controller)
following
R
commands
from
programs
eference
.
the
can
be
used
for
External
Controller
Combine the
example
,
to
execute
PROG:EXEC
EDIT
command
command,
with
Instrument
B
ASIC
command
to
be
executed.
F
or
d a
OUTPUT
717;"PROG:EXEC
""EDIT"""
Or
you
can
change
the
double
quoted
term,
""EDIT""
to
a
single
quote
'EDIT
',
as
follows
.
d a
OUTPUT
Be
careful
example
follows
717;"PROG:EXEC
when
you
,
to
execute
.
execute
the
Instrument
'EDIT'"
an
Instrument
B
ASIC
B
ASIC
command
command
\
GET
"FILENAME"
that
requires
",
a
parameter
the
quotation
.
F
or
is
as
d a
OUTPUT 717;"PROG:EXEC ""GET """"FILENAME"""""""
Controlling Instrument BASIC from Remote 7-3
Page 58
To
Run an
Instrument B
ASIC Program
From the
External
Controller
d a
10
! Figure
20
! (On
30
!
40
ABORT 7
50
ASSIGN @Hp4396
60
OUTPUT @Hp4396;"PROG:DEL:ALL"
70
OUTPUT @Hp4396;"PROG:DEF
80
OUTPUT @Hp4396;"10
90
OUTPUT @Hp4396;"20
100
OUTPUT
110
OUTPUT
120
OUTPUT
130
END
7-3. To
Run iBASIC
External Controller)
TO 717
MSI "":INTERNAL"""
GET ""FIG3_3"""
@Hp4396;"30
@Hp4396;"
"
END"
END
@Hp4396;"PROG:EXEC
Program From
#0"
""RUN"""
Ext.Controller
c b
Sample
Y
ou
running
Open
Program :
must
put
the
the Instrument
60
70
Scratch
editor
Send
any
.
the
80
90
100
In
the Instrument
To
the
disk
program.
OUTPUT
OUTPUT
program
@Hp4396;"PROG:DEL:ALL"
@Hp4396;"PROG:DEF
currently
Instrument
OUTPUT
OUTPUT
OUTPUT
@Hp4396;"10
@Hp4396;"20
@Hp4396;"30
B
ASIC
Run
that
(The
the
contains
sample
B
ASIC
B
ASIC
editor
Figure
Instrument
(On
External Controller)
FIG3_3
program
Editor
#0"
existing
in
the
Program
MSI "":INTERNAL"""
GET ""FIG3_3"""
END"
,
the
following
7-3.
B
ASIC
into
the
disk
for
analyzer's
program
Program
built-in
disk
Instrument
Instrument
is
now
From
drive
B
ASIC
B
present:
the
External
of
the
analyzer before
contains
ASIC editor
Controller
FIG3_3
and open
.)
the
d a
10 MSI ":INTERNAL"
20 GET "FIG3_3"
30 END
Close the Instrument B
ASIC Editor
110 OUTPUT @Hp4396;" " END
Sending the
END
command to the analyzer closes the editor.
7-4 Controlling Instrument BASIC from Remote
Page 59
Run
the
Instrument
B
ASIC
Program
120
Line
OUTPUT @Hp4396;"PROG:EXEC
120
runs
the
following
program
in
the
""RUN"""
Instrument
B
ASIC editor:
d a
10
MSI ":INTERNAL"
20
GET "FIG3_3"
30
END
Line
20
T
o
Transfer
retrieves
the
the
FIG3_3
program
Program
and
at
the
to
Instrument B
same
time
runs the
ASIC
program.
d a
10
!
20 !
Figure
7-4.
To
Transfer
the
Program
to
iBASIC
(on
External
Controller)
30 !
40 ABORT
50
60
70
80
90
100
ASSIGN
INPUT
OUTPUT
OUTPUT
ASSIGN
ON
110
120
130
140
150
160
170
Done:
180
190
200
7
@Hp4396
TO
717
"FILENAME?",File_name$
@Hp4396;"PROG:DEL:ALL"
@Hp4396;"PROG:DEF
@File
ERROR
DIM
Line$[1024]
GOTO
TO
File_name$
Done
LOOP
Line$=""
ENTER
OUTPUT
@File;Line$
@Hp4396;Line$
END LOOP
!
OFF
ERROR
OUTPUT
@Hp4396;"
END
#0"
" END
c b
Figure 7-4.
Sample Program : T
This Program transfers the program le in the mass storage of the external controller
Before you run this program, conrm that the le to be transferred is on the mass
o Transfer the Program to Instrument B
ASIC (on External Controller)
.
storage
device.
Open the Instrument BASIC Editor
70 OUTPUT @Hp4396;"PROG:DEL:ALL"
80 OUTPUT @Hp4396;"PROG:DEF #0"
Scratch any program that currently exists in the analyzer's Instrument BASIC editor and open
the editor.
Controlling Instrument BASIC from Remote 7-5
Page 60
Transfer
the
Program
90
100
110
120
130
140
150
160
Transfer
computer
Close
190
Sending
T
o
External
ASSIGN @File
ON
ERROR
DIM
Line$[1024]
LOOP
Line$=""
ENTER
OUTPUT
END
LOOP
the
program
exits
the
the Instrument
OUTPUT
the
analyzer
Load
an
Array in
Controller
TO
GOTO
Done
@File;Line$
@Hp4396;Line$
by
line
loop
and
goes
BASIC
@Hp4396;"
the
END
File_name$
to
the
analyzer
to
line
170.
.
When
Editor
" END
command closes
the editor
an Instrument
all program
.
B
ASIC
lines are
transferred, the
Program
to
the
d a
10
!
20
!
30
40
50
60
70
80
90
Figure
!
ABORT 7
ASSIGN @Hp4396
DIM Passed(1:801,1:2)
OUTPUT @Hp4396;"PROG:NUMB?
ENTER @Hp4396;Passed(*)
END
7-5.
To
Load
TO
iBASIC
717
Program Array
""Dat"";"
(on
External
Controller)
c b
Sample
This program retrieves the array
Program
:
T
o
Load Instrument
generated in the sample program listed in Figure 4-2 when
that program is executed in Instrument
Figure
BASIC. This information is transferred to the external
BASIC
7-5.
Program Array
controller.
First, run the Instrument B
ASIC program
FIG4_2
to store the data into the array
program in Figure 7-5 to transfer the data.
Transfer the Program Array of Instrument BASIC
70 OUTPUT @Hp4396;"PROG:NUMB? ""Dat"";"
80 ENTER @Hp4396;Passed(*)
The
PROG:NUMB? "Dat"
array is entered into
query returns the program array
Passed(1:801,1:2)
.
Dat(1:801,1:2)
7-6 Controlling Instrument BASIC from Remote
(on External
of Figure 4-2. The
Controller)
.Then
run the
Page 61
8
Programming
This chapter
the results
T
o
P
erform
describes
of
the
test.
limit
Limit T
how
to
perform
T
est
est from
limit
tests
,
set
Remote
the
limit
lines
,
test
the
DUT
,
and
transfer
d a
10
!
20
!
Figure
30
!
40
50
60
70
80
90
100
110
120
130
140
150
ASSIGN
!
CLEAR
PRINT
!
DIM
INPUT
FOR
GOSUB
NEXT
!
LOOP
160
170 EXIT
180 INPUT
190 IF
200 GOSUB
210 END
8-1.
Limit
@Hp4396
TO
SCREEN
USING
"10A,15A,15A,15A";"Segment","Swp.Prmtr(Hz)","Upper","Lowe
Table(1:18,1:3)
"Enter
I=1
TO
number
Numb
Loadlimit
I
INPUT
"Do
you
IF An$="N"
"Enter segment
Numb<I THEN
Numb=I
Loadlimit
LOOP
Test
717
!
of
segments
want
to
OR An$="n"
number(<=18)",I
When
edit?
iBASIC
is
(<=18)",Numb
(Y/N)",An$
used,
change
"717"
to
"800"
r"
220 !
230
OUTPUT
@Hp4396;"EDITLIML"
240 OUTPUT @Hp4396;"LIMCLEL"
250 FOR K=1 TO
Numb
260 OUTPUT @Hp4396;"LIMSADD"
270 OUTPUT @Hp4396;";LIMPRM ";Table(K,1)
280 OUTPUT @Hp4396;";LIMU ";Table(K,2)
290 OUTPUT @Hp4396;"LIML ";Table(K,3)
300 OUTPUT @Hp4396;"LIMSDON"
310 NEXT K
320 OUTPUT @Hp4396;"LIMEDONE"
330 OUTPUT @Hp4396;"LIMILINE ON"
340 !
350 INPUT "Connect DUT, and press Enter.",Dum$
Figure 8-1. Sample Program : Limit Test (1/2)
Programming Limit Test from Remote 8-1
Page 62
360
370
380
390
400
410
420
430
440
450
460 ENTER
470 OUTPUT
480
490
500
510
OUTPUT
OUTPUT
ON
ENABLE
@Hp4396;"CLES"
@Hp4396;"*SRE
INTR
7
INTR
OUTPUT
@Hp4396;"SING"
GOTO Sweep_end
Measuring:GOTO
Sweep_end:
OUTPUT
DIM
OUTPUT
@Hp4396;"LIMITEST
Dt(1:801,1:4)
@Hp4396;"OUTPLIMF?"
@Hp4396 USING
@Hp4396;"OUTPFAIP?"
ENTER
IF
PRINT
FOR
@Hp4396;Failp
Failp=0 THEN
" FAIL
I=1 TO
7;2
Measuring
!
Passed
Failp
4;ESNB
1"
!\
When iBASIC
!/
ON"
!
"%,K";Dt(*) !
POINTS "
is used,
\ Output
/
change "7"
test results.
to "8"
520 PRINT
530
540
550
560
570
580
590
600
610
620
630
640
650
660
670
c b
PRINT
PRINT
PRINT
NEXT
I
Passed:
DISP
!
"Program
STOP
!
Loadlimit:
INPUT
INPUT
INPUT
PRINT
"ENTER
"ENTER
"ENTER
I;TAB(11);Table(I,1);TAB(27);Table(I,2);TAB(42);Table(I,3
RETURN
END
"Swp.
"
prmtr
Results
:
";Dt(I,1)
Upper
Lower
"
TAB(5);Dt(I,2);TAB(17);Dt(I,3);TAB(32);Dt(I,4)
End"
!
SWEEP PARAMETER
UPPER
LOWER
LIMIT VALUE",Table(I,2)
LIMIT VALUE",Table(I,3)
(Hz)",Table(I,1)
)
Edit
60
70
Limit
Line
CLEAR SCREEN
PRINT
USING
Figure
"10A,15A,15A,15A";"Segment","Swp.Prmtr(Hz)","Upper","Lower"
8-1.
Sample
Program
:
80 !
90 DIM Table(1:18,1:3)
100 INPUT "Enter number of segments (<=18)",Numb
110 FOR I=1 TO Numb
120 GOSUB Loadlimit
130 NEXT
I
140 !
150 LOOP
160 INPUT "Do you want to edit? (Y/N)",An$
170 EXIT IF An$="N" OR An$="n"
180 INPUT "Enter segment number(<=18)",I
190 IF Numb<I THEN Numb=I
200 GOSUB Loadlimit
210 END LOOP
8-2 Programming Limit Test from Remote
Limit T
est (2/2)
Page 63
610
620
630
640
650
660
Lines
Line
the
.
.
.
Loadlimit: !
INPUT "ENTER
INPUT "ENTER
INPUT "ENTER
PRINT I;TAB(11);Table(I,1);TAB(27);Table(I,2);TAB(42);Table(I,3
RETURN
60
and
90
denes
sweep
parameter
70
print
the
the
table
,
the
SWEEP
UPPER
LOWER
limit
(array
upper
PARAMETER
LIMIT
LIMIT
table
heads
(Hz)",Table(I,1)
VALUE",Table(I,2)
VALUE",Table(I,3)
on
the
Table(1:18,1:3)
limit
value
,
and
B
)
the
ASIC
used
lower
SCREEN.
to
hold
limit
value
the
limit
values
as follows:
.It
)
contains
Lines
you
110
dened
Segment Sweep P
1
2
.
.
.
to
130
call
the
subroutine
in
line
100
(the
arameter
Table(1,1) Table(1,2) Table(1,3)
Table(2,1) Table(2,2) Table(2,3)
.
.
.
Loadlimit
analyzer
can
retain up
Upper Limit Lower Limit
.
.
.
(line 610)
to 18
to edit
and print
segments).
as
.
.
.
many
segments
as
d a
Segment
1
2
3
The
loop
segment
Set
Limit
230
240
250
260
270 OUTPUT @Hp4396;";LIMPRM ";Table(K,1)
280 OUTPUT @Hp4396;";LIMU ";Table(K,2)
290 OUTPUT @Hp4396;"LIML ";Table(K,3)
300 OUTPUT @Hp4396;"LIMSDON"
Swp.Prmtr(Hz)
2.E+6
3.E+6
4.E+6
,
lines
150
to
210,
determines
is
in
the
table
.
Line
OUTPUT
OUTPUT
FOR
@Hp4396;"EDITLIML"
@Hp4396;"LIMCLEL"
K=1
TO
Numb
OUTPUT @Hp4396;"LIMSADD"
Upper
0
10
10
Lower
-10
-20
-10
if
you
want
to
edit
the table
Start to
Clear
Start
to
and conrms
set the
existing
set
limit line
limit
a
segment
that
table
the
Enter sweep parameter
Enter
upper limit
Enter lower limit
Complete the segment
310 NEXT K
320 OUTPUT @Hp4396;"LIMEDONE"
330 OUTPUT @Hp4396;"LIMILINE ON"
Complete the limit line
Set limit line ON
In this portion of the program, the limit table (edited using BASIC) is transferred to the
analyzer.
Programming Limit Test from Remote 8-3
Page 64
Read
the
Limit
T
est
Results
430
440
450
460
470
480
490
500
510
520
530
540
550
560
570
580
The
results
limit,
The
result
as
many
Lines
OUTPUT @Hp4396;"LIMITEST
DIM
Dt(1:801,1:4)
OUTPUT
ENTER
OUTPUT
ENTER
IF
PRINT
FOR
@Hp4396;"OUTPLIMF?"
@Hp4396
@Hp4396;"OUTPFAIP?"
@Hp4396;Failp
Failp=0
THEN
"
I=1
TO
Failp
PRINT
PRINT
PRINT
PRINT
NEXT
Passed:
DISP
OUTPLIMF?
are in
and lower
OUTPFAIP?
is
P
ASS, it
lines
510
to
560
the following
"Swp.
"
Results
TAB(5);Dt(I,2);TAB(17);Dt(I,3);TAB(32);Dt(I,4)
I
!
"Program
command
limit.
command
returns 0
as
the
transferred
print
the
USING
"%,K";Dt(*)
Passed
FAIL
prmtr
:
End"
in
line
450
order: sweep
in line
and
470 returns
the
program
data.
limit
test
result
ON"
POINTS
";Dt(I,1)
Upper
returns
the
parameter
the
goes
as
follows:
!
!
limit
test
,
result
number
to
Passed
\
Output
/
result
of
"
Lower
(0
for
failed
.)
Then
test
for
fail,
points
the
results.
"
failed
0
1
.
array
points
for
no
(When
Dt
.
The
test),
the
is
printed
test
upper
limit
test
with
d a
Swp.Prmtr(Hz)
Result
0
:
1.1925E+7
Upper
20
Lower
-40
Swp.Prmtr(Hz)
Result
0
What
are
other
commands used to
retrieve the test
results?
:
1.2125E+7
Upper
Lower
20
Instead
using the
of
-40
reading
the
OUTPLIMF?
limit
command, you can read out the test
result using the following commands:
At
all measurement points:
At marker
position:
OUTPLIMM?
Both commands return the
pass, 0 for fail,
0
1 for no test), upper limit, and lower
test
results
for
OUTPLIML?
sweep parameter
failed points
, result (1 for
by
limit.
8-4 Programming Limit Test from Remote
Page 65
9
Using
This chapter
T
o
Set
the List
describes
List
Sweep
Sweep Function
how
to
use
the
list
sweep
function
over
GPIB
.
d a
10
!
20
!
Figure
30
!
40
ASSIGN @Hp4396
50
!
60
OUTPUT @Hp4396;"SA"
70
CLEAR
80
PRINT
90
PRINT
100
!
110
DIM
120
INPUT
130
FOR
140
150
160
170
180
190
200
210
220
GOSUB
NEXT
!
LOOP
INPUT
EXIT
INPUT
IF
GOSUB
230 END
240
!
9-1.
List
Sweep
TO 800
!
When
iBASIC
is
used,
change
"717"
SCREEN
"Segment";TAB(9);"Center(Hz)";TAB(20);"Span(Hz)";TAB(30);
TAB(39);"Power(dBm)";TAB(50);"RBW(Hz)"
Table(1:31,1:5)
"Enter
I=1
TO
number
Numb
of
segments
(<=31)",Numb
Loadlist
I
"Do
you
IF
An$="N"
"Enter
Numb<I
THEN
want to
OR
segment
Numb=I
edit? (Y/N)",An$
An$="n"
number(<=31)",I
Loadlist
LOOP
to
"800"
"Points";
250 OUTPUT @Hp4396;"EDITLIST"
260 OUTPUT @Hp4396;"CLEL"
270 FOR K=1 TO Numb
280 OUTPUT
290 OUTPUT
300 OUTPUT @Hp4396;"SPAN
@Hp4396;"SADD"
@Hp4396;"CENT ";Table(K,1)
";Table(K,2)
310 OUTPUT @Hp4396;"POIN ";Table(K,3)
320 OUTPUT @Hp4396;"POWE ";Table(K,4)
330 OUTPUT @Hp4396;"BW ";Table(K,5)
340 OUTPUT @Hp4396;"SDON"
350 NEXT K
360 OUTPUT @Hp4396;"EDITDONE"
370 OUTPUT @Hp4396;"SWPT LIST"
380 !
Figure 9-1. Sample Program : List Sweep (1/2)
Using the List Sweep Function 9-1
Page 66
390
INPUT
400
OUTPUT
410
OUTPUT
420
ON
430
ENABLE
440
450
Measuring:GOTO
460
Sweep_end:
470
DISP
480
STOP
"Connect
@Hp4396;"CLES"
@Hp4396;"*SRE
INTR
8
INTR
OUTPUT
@Hp4396;"SING"
"Program
DUT,
and press
4;ESNB
GOTO Sweep_end
8;2
Measuring
!
End"
Enter.",Dum$
1"
!\
When iBASIC
!/
is used,
change "7"
to "8"
490 !
500 Loadlist:
510
INPUT
520
INPUT
530
INPUT
540
INPUT
550 INPUT
560
PRINT
570
PRINT
580
RETURN
590
c b
END
!
"Enter center
"Enter frequency
"Enter number
"Enter power
"Enter resolution
frequency(Hz)",Table(I,1)
span(Hz)",Table(I,2)
of points",Table(I,3)
level(dBm)",Table(I,4)
band
width(Hz)",Table(I,5)
I;TAB(11);Table(I,1);TAB(20);Table(I,2);TAB(30);Table(I,3
TAB(40);Table(I,4);TAB(50);Table(I,5)
);
Edit
List
70
CLEAR
80
PRINT
90
PRINT
100
!
110
DIM
120
INPUT
130
FOR
140 GOSUB
150 NEXT
Figure
T
able
SCREEN
"Segment";TAB(9);"Center(Hz)";TAB(20);"Span(Hz)";TAB(30);
TAB(39);"Power(dBm)";TAB(50);"RBW(Hz)"
Table(1:31,1:5)
"Enter
I=1
TO
Numb
Loadlist
I
number
9-1.
Sample
of segments
Program
(<=31)",Numb
:
List
Sweep
(2/2)
160 !
170 LOOP
180 INPUT
190 EXIT
200
INPUT
"Do you
IF An$="N"
"Enter
want
to
OR An$="n"
segment
edit?
(Y/N)",An$
number(<=31)",I
210 IF Numb<I THEN Numb=I
220 GOSUB Loadlist
230 END LOOP
.
.
.
500 Loadlist: !
510 INPUT "Enter center frequency(Hz)",Table(I,1)
520 INPUT "Enter frequency span(Hz)",Table(I,2)
530 INPUT "Enter number of points",Table(I,3)
540 INPUT "Enter power level(dBm)",Table(I,4)
550 INPUT "Enter resolution band width(Hz)",Table(I,5)
560 PRINT I;TAB(11);Table(I,1);TAB(20);Table(I,2);TAB(30);Table(I,3);
570 PRINT TAB(40);Table(I,4);TAB(50);Table(I,5)
580 RETURN
"Points";
Lines 70 to 90 print the list table heads on the BASIC screen.
9-2 Using the List Sweep Function
Page 67
Line
center
each
110 denes
frequency,
segment as
the table
frequency
follows:
(array
span,
Table(1:31,1:5)
number
of
points
)
used
,
power
to
hold
level,
the
and
list
values
resolution
.
It
band
contains
width of
the
Resolution
Band Width
as
many
.
.
.
segments
as
Lines
you
Segment Center
Frequency
130
dened
1
2
.
.
.
to
150 call
in
Table(1,1) Table(1,2) Table(1,3) Table(1,4) Table(1,5)
Table(2,1) Table(2,2) Table(2,3) Table(2,4) Table(2,5)
line 120
.
.
.
the subroutine
(The analyzer
Frequency
Span
.
.
.
Loadlist
can retain
Number
Points
(line
up
.
.
.
500)
to
31
P
of
ower
to
edit
and
segments).
Level
.
.
.
print
d a
Segment
1
2
3
The
loop
segment
Set
List
250
260
270
280
290
300
310 OUTPUT
320
330
340 OUTPUT
350
360
370 OUTPUT @Hp4396;"SWPT LIST"
Center(Hz)
100
10000 1000
1000000
,
lines
170
to
230,
determines
is
in
the
table
.
T
able
OUTPUT
OUTPUT
FOR
@Hp4396;"EDITLIST"
@Hp4396;"CLEL"
K=1
TO Numb
OUTPUT
OUTPUT
@Hp4396;"SADD"
@Hp4396;"CENT
OUTPUT @Hp4396;"SPAN
@Hp4396;"POIN ";Table(K,3)
OUTPUT
OUTPUT
@Hp4396;"POWE
@Hp4396;"BW
@Hp4396;"SDON"
NEXT K
OUTPUT
@Hp4396;"EDITDONE"
Stop(Hz)
20
1000
";Table(K,5)
Points
Power(dBm)
100
300
400
if
you
want
";Table(K,1)
";Table(K,2)
";Table(K,4)
0
0
0
to
edit the
Start
Clear
Start
Enter
Enter
Enter
Enter
Enter
table and
to
existing
to
center
frequency
number
power level
resolution
Complete
Complete
Activate list sweep
RBW(Hz)
100
300
100
set
the
limit
set
a
segment
frequency
of
the
segment
the
list
conrms
list
table
span
points
band
table
table
width
that
the
In this portion of the program, the list table (edited
What are other
commands are used to
set the list values?
When setting segment frequencies
center/span denition by using the
parameter
commands, you can dene start/stop frequency by
using:
1.
STAR
parameter/STOP
2.
MKRSTAR/MKRSTOP
When setting the IF band width (with the analyzer in
network analyzer mode), use the
using B
ASIC) is transferred to the analyzer
, instead of setting the
CENT
parameter/SPAN
parameter
commands
commands (Maker to start/stop)
BW
parameter
Using the List Sweep Function 9-3
.
command.
Page 68
Page 69
10
Using
This chapter
operation of
The I/O
port
handler on
the Analyzer's
describes
the
on
the
a
production
I/O
port,
analyzer's
how
line).
see
to
use
the
rear
the
4396B
panel
I/O P
I/O
port
of
Function
communicates
ort
the
analyzer
R
eference
with
with
manual.
external
the
devices
GPIB
.
F
or
(for
general
example
,
a
The
I/O port
8-bit
4-bit
3
grounds
consists of
output
input
The signals IN 0 to
The Instrument B
control the 8-bit I/O port without using GPIB commands
than using an GPIB command. F
Using Instrument B
the following
Figure
15
10-1.
TTL
compatible
I/O
Port
signals:
IN 3 and OUT 0 to OUT 7 can be read and set by GPIB commands
ASIC commands
READIO(15,0)
and
WRITEIO 15,0
can directly
. This operation is faster
or more information on these commands
ASIC with the 4396B
manual.
Using the Analyzer's I/O Port 10-1
.
, see the
Page 70
To
Synchronize External
Handler with
Analyzer
d a
10
!
20
! Figure
30
! with
40
!
50
ASSIGN
60
!
70
!
80
OUTPUT
90
!
100
REPEAT
110
120
130
140
150
160
170
OUTPUT
ENTER
A=BIT(Inpio,3)
UNTIL
!
!
END
10_2.
Synchronization
the
@Hp4396
TO
717
@Hp4396;"OUT8IO
@Hp4396;"INP8IO?"
@Hp4396;Inpio
A=1
Analyzer
!
When
8"
of
an
iBASIC
!
!
!
Waiting
!
!
External
is
used,
Handler
Handler
change
Response
"717"
to
"800"
c b
Figure 10-2.
Sample
Program
: Synchronization
of an
External
Handler
with
the
Analyzer
Send
The
Signal
80
OUTPUT
OUT8IO
command
to
the
@Hp4396;"OUT8IO
parameter
sets
the
OUT
External
command
3
line
to
Figure
Handler
8"
sets
TRUE
10-3.
the
(1).
8-bit
8-Bit
data
Data
value
of
of
the
OUT0-7
OUT
0-7
lines
.
The
OUT8IO
8
Figure 10-4. Sending Signal to an the External Handler
10-2 Using the Analyzer's I/O Port
Page 71
Read
100
110
120
130
140
The
INP8IO?
Lines
Signal
from
the
External
REPEAT !
OUTPUT
ENTER
@Hp4396;"INP8IO?"
@Hp4396;Inpio
A=BIT(Inpio,3)
UNTIL
100
command
to
160
A=1
wait
returns
for
the
the
4-bit
external
handler
Handler
!
!
Waiting
!
!
data
value
to
Handler
of
the
set signal
IN
0-3
on line
Response
lines
.
IN 3
to TRUE
(1).
Figure
10-5.
Reading
Signal
from
the
External Handler
Using the Analyzer's I/O Port 10-3
Page 72
Page 73
11
Using
This chapter
For
your
Total
Harmonic
A
djacent
Occupied
F
or
your
File
transfer
File
transfer
Listing of
T
otal
Most
Harmonic
transmitting
Application Programs
provides
convenience
Channel
the
following
when
Distortion
P
ower
sample
calculating
(THD)
programs:
the
following
Bandwidth
convenience
from
from
the
les
when
the
the
in
the
using
4396B
external
current
the
to
the
controller
directory
le
transfer
external
to
controller
the
of
the
Distortion
devices
and
signal
sources
contain
spectrum
function
4396B
4396B
harmonics
analysis
as
shown
factors:
in
Figure 11-1
.
Figure 11-1.
Harmonic Distortion in a Signal
Using Application Programs 11-1
Page 74
This
program computes
equation:
Where
,
the total
harmonic
T
H
D
=
distortion
p
2
V
2
+
(THD)
2
+
1
V
3
V
1
as
dened
1
1
2
100
[%]
by
the
following
(11
0
1)
V
1
V
2
V
3
.
.
.
THD
takes into
harmonics
Before
be
computed on
Fundamental
The
The
account the
cannot be
running the
the analyzer
[V]
second harmonic
third harmonic
power in
measured, a
program, measure
display
[V]
[V]
all the
nite number
the
signal
(in
the
harmonics
will have
and
display
dBm
format).
.
Because
to
an
suce
.
the
fundamental
innite
number
and
of
the
harmonics
to
d a
10
!
20
!
30
Figure
!
11-2.
Total
Harmonic
Distortion
40 Vf=1
50 ASSIGN
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
OUTPUT
ON
ENABLE
OUTPUT
ENTER
OUTPUT
OUTPUT
OUTPUT
ENTER
Vf=SQR(10^(Vf/10)*.05)
PRINT "Fundamental"
Fr=Ff
I=2
S=0
LOOP
Fh=Ff*I
EXIT IF
OUTPUT
@Hp4396
TO
@Hp4396;"CLES;*SRE
INTR
7
GOTO
Done
INTR
7;2
@Hp4396;"STOP?"
@Hp4396;Fstop
@Hp4396;"PRSMKRS"
@Hp4396;"MKR
@Hp4396;"OUTPMKR?"
@Hp4396;Vf,Vf2,Ff
Fstop<=Fh
@Hp4396;"DMKR
717
!
When
iBASIC
!
\
!
/
ON;SEAM
4;ESNB
When
replace
!
!
96"
iBASIC
"7"
PEAK"
Fundamental
Vf
in
TRAC;MKRPRM ";Fh-Fr/2
is
used,
is
to
used,
"8"
replace
"717"
to
"800"
V
240 OUTPUT @Hp4396;"DMKR ON"
250 OUTPUT @Hp4396;"MKRPRM ";Fr
260 OUTPUT @Hp4396;"PARS ON;SEARSTR"
270 OUTPUT @Hp4396;"SEAM PEAK;DMKR OFF"
280 OUTPUT @Hp4396;"OUTPMKR?"
290 ENTER @Hp4396;Vh,Vh2,F
300 Vh=10^(Vh/10)*.05 ! Vh^2 in V^2
310 PRINT I;" harmonic"
Figure 11-2. Sample Program : Total Harmonic Distortion (THD) (1/2)
11-2 Using Application Programs
Page 75
320
330
340
350
360
370
380
390
400
c b
S=S+Vh
I=I+1
END
LOOP
!
Done:
!
Thd=SQR(S)/Vf*100
PRINT
DISP
"THD=";Thd;"
"PROGRAM
END
%"
FINISHED"
In line
In
lines
120
200
integrates
Line
370
Figure 11-2.
the
marker
to
340
the
squares
calculates
Sample Program
searches
the
marker
.
the
THD
and
for
the
searches
line
380
:
T
otal
fundamental
for
the
harmonics
prints
the
Harmonic
frequency
on
result.
Distortion
.
the
analyzer
(THD)
display
(2/2)
and
Using Application Programs 11-3
Page 76
Adjacent
The
adjacent
adjacent
adjacent
channel
channel
Channel P
channel
power
(that
power
is
, the
leakage
ower Calculation
measurement examines
channel next
ratio to
to the
the power
carrier channel).
of the
the leakage
transmitter (Pl
power transmitted
This program
0
Pc
calculates the
,Ph
0
into an
Pc)
in
dBc
.
Figure
Before
signal
d a
10
20
30
40
50
60
70
80
90
100
110
running
to
the
input
!
!
Figure
!
ASSIGN
Fadj=25000
Fs=16000
Rbw=100
Nop=801
Fspan=80000
Avg=10
!
the
program,
port.
11-4.
@Hp4396
set
Adjacent
TO
up the
717
11-3.
A
measurement,
Channel
!
When
!
Hz
!
Hz
!
Resolution
!
Number
!
Frequency
!
Averaging
djacent
Power
iBASIC
of
Channel
P
ower
calibrate
Calculation
is
used,
bandwidth,
measurement
Span,
Hz
factor
the
change
analyzer
Hz
points
,
and
"717"
connect
to
"800"
the
120 CLEAR SCREEN
130 INPUT "Enter carrier frequency(Hz).",Fcent
140 OUTPUT @Hp4396;"CENT ";Fcent
150 OUTPUT @Hp4396;"SPAN ";Fspan
160 OUTPUT @Hp4396;"BW ";Rbw
170 OUTPUT @Hp4396;"AVERFACT
180 OUTPUT @Hp4396;"FMT NOISE;SAUNIT
";Avg
DBM;ATTAUTO ON;AVER ON"
190 OUTPUT @Hp4396;"HOLD;AVERREST"
200 !
210 INPUT "Connect input port and press Enter.",Dum$
220 DISP "MEASURING"
230 OUTPUT @Hp4396;"TRGS INT"
240 OUTPUT @Hp4396;"CLES"
250 OUTPUT @Hp4396;"*SRE 4;ESNB 1"
Figure 11-4. Sample Program : Adjacent Channel Power Calculation (1/2)
11-4 Using Application Programs
Page 77
260
270
280
290
300
310
320
330
340
350
360
370 ENTER
380
390
400
410
ON
INTR
7
ENABLE
INTR
OUTPUT
Measuring:GOTO
Sweep_end:
DISP
"MEASUREMENT
DIM
D(1:801)
OUTPUT
ASSIGN
OUTPUT
ENTER
@Hp4396;"FORM3"
@Dt
@Hp4396;"OUTPDTRC?"
@Dt
@Dt;D(*)
ENTER
@Dt USING
!
Fch_l=Fcent-Fadj
Fch_h=Fcent+Fadj
GOTO Sweep_end
7;2
@Hp4396;"NUMG
Measuring
!
COMPLETE"
TO
717;FORMAT OFF
USING
"%,8A";Dum$
"%,1A";Dum$
";Avg
!\
When iBASIC
!/
change "7"
!When
!
iBASIC is
change "717"
is used,
to "8"
used,
to "800"
420 Pc=FNPower(D(*),Fspan,Fcent,Fs,Nop,Fcent)
430
440
450
460
470
480
490
500
510
520
530
540
550
560
570
580 DISP
Pl=FNPower(D(*),Fspan,Fch_l,Fs,Nop,Fcent)
Ph=FNPower(D(*),Fspan,Fch_h,Fs,Nop,Fcent)
!
OUTPUT
OUTPUT
OUTPUT
OUTPUT
PRINT
PRINT
@Hp4396;"MKR
ON;SMKR1
@Hp4396;"MKRPRM
@Hp4396;"SMKRPRM1
@Hp4396;"SMKRPRM2
"Carrier
"Power
(MHz):",Fcent/1.E+6
(dBm):",Pc
";Fcent
";Fch_l
";Fch_h
ON;SMKR2
ON"
PRINT
PRINT
PRINT
"Adjacent
"
Channel Freq.
Lo(Hz):",Fch_l
Hi(Hz):",Fch_h
PRINT
PRINT
PRINT
"Adjacent
"
"PROGRAM
Pow.
Pl-Pc(dBc):",Pl-Pc
Ph-Pc(dBc):",Ph-Pc
FINISHED"
590 END
600 !
610 DEF
FNPower(D(*),Fspan,Fch,Fs,Nop,Fcent)
620 Fdelta=Fspan/(Nop-1)
630
640
Ich=(Fch-Fcent)/Fdelta+401
I1=Ich-Fs/2/Fdelta
650 I2=Ich+Fs/2/Fdelta
660 IF I1<1 OR I2>Nop THEN
670 P=0
680 RETURN P
690 END IF
700 S=0
710 FOR I=I1 TO I2
720 S=S+10^(D(I)/10) ! SinmW
730 NEXT I
740 P=S*(Fspan/(Nop-1))
750 P=10*LGT(P) !PindBm
760 RETURN P
770 FNEND
c b
Figure 11-4. Sample Program : Adjacent Channel Power Calculation (2/2)
Using Application Programs 11-5
Page 78
Lines
50
to
bandwidth,
In
lines
610
measurement
total
power
Where
,
D
(
x
)
F
span
N
op
I1,
I2
100
set
the
number
to
is
P
of
760,
the subprogram
points
,
in
calculated
ower
density
Measurement
Number
The
measurement
measurement
measurement
the
area of
by
the following
P
W
spectrum
frequency
of
measurement
point
coecient,
point,
FNPower
and
performs
center frequency
equation:
x
=I2
X
R
=
10 log
10
x
=I1
[dBm/Hz]
span
[Hz]
points
of
left
and
F
adj, Fs
averaging
summation of
,
Fch
D
(
x
)
F
N
op
right
edge
, frequency
factor
, and
span
to
the frequency
[mW]
of
a
channel
span, resolution
typical values
the powers
span,
bandwidth(Fs)
.
by
Fs
. The
(11
0
2)
Occupied
This
program
combined
which 0.5
power
%of
marker.
P
ower
calculates
of
all
the
total
Bandwidth
the
occupied
signal
responses
power
lies
Calculation
bandwidth
contained in
to
the
right
of the
of
the
carrier signal.
the trace
right
.It
maker
It rst
computes
then calculates
and
to
the
left
the
of
point
the
the
for
left
Figure 11-5. 99 % Occupied P
ower Bandwidth
Before running the program, set up the measurement, calibrate the analyzer, and connect the
signal to the input port.
11-6 Using Application Programs
Page 79
d a
10
!
20
!
Figure
30
!
40
50
60
70
80
90
100
ASSIGN
Rbw=100
Nop=801
Fspan=80000.
Avg=10
!
INPUT
110 OUTPUT
120 OUTPUT
130
140
150
160
OUTPUT
OUTPUT
OUTPUT
OUTPUT
11-6.
"Enter
Occupied Power
@Hp4396
carrier
TO
717 !
!
Resolution
!
Number
!
Frequency
!
Averaging
Bandwidth Calculation
When iBASIC
bandwidth, Hz
of measurement
Span, Hz
factor
frequency(Hz).",Fcent
@Hp4396;"SPAN";Fspan
@Hp4396;"CENT";Fcent
@Hp4396;"BW";Rbw
@Hp4396;"FMT NOISE;DET
POS"
@Hp4396;"SAUNIT DBM;ATTAUTO
@Hp4396;"AVERFACT";Avg
is used,
points
ON;AVER ON"
change "717"
to "800"
170 !
180
190
200
210
220
230
240
250
260
270
280
290
300
310
320
330 ENTER
340 ENTER
350 ENTER
INPUT
OUTPUT
OUTPUT
OUTPUT
ON
ENABLE
"Connect
@Hp4396;"HOLD"
@Hp4396;"CLES"
@Hp4396;"*SRE
INTR
7
INTR
OUTPUT
OUTPUT
@Hp4396;"TRGS
@Hp4396;"NUMG";Avg
GOTO
Measuring:GOTO
Sweep_end:
DIM
D(1:801)
DIM
P(1:801)
OUTPUT
ASSIGN
OUTPUT
!
@Hp4396;"FORM3"
@Dt
@Hp4396;"OUTPDTRC?"
@Dt
USING
@Dt;D(*)
@Dt
USING
input
Sweep_end
7;2
Measuring
Get Data
TO
717;FORMAT OFF
"%,8A";Dum$
"%,1A";Dum$
port
4;ESNB
INT"
and press
1"
!
\
When iBASIC
!
/
change
! When
!
change "717"
Enter.",Dum$
is used,
"7"
to "8"
iBASIC
is
used,
to "800"
360 !
370 Power(D(*),P(*),Rbw,Nop,Fspan)
380
390
!
FOR
I=1
TO
Nop
400 A=P(I)/P(Nop)
410 IF A>.005 THEN Lower
420 NEXT I
430 Lower:I1=I
440 FOR I=Nop TO 1 STEP -1
450 A=P(I)/P(Nop)
460 IF A<.995 THEN Upper
470 NEXT I
480 Upper:I2=I
Figure 11-6. Sample Program : Occupied Power Bandwidth Calculation (1/2)
Using Application Programs 11-7
Page 80
490
500
510
520
530
540
550
560
570
580
590
600 SUB
610
620
630
640
650 NEXT
660
c b
OUTPUT
OUTPUT
OUTPUT
OUTPUT
OUTPUT
ENTER
PRINT
PRINT
DISP
@Hp4396;"MKR
@Hp4396;"MKRP
@Hp4396;"DMKR
@Hp4396;"MKRP
@Hp4396;"OUTPMKR?"
@Hp4396;Val,Val2,Flh
"Occupied
Flh;"
"PROGRAM
bandwidth
Hz"
FINISHED"
ON"
";I1
ON"
";I2
END
!
Power(D(*),P(*),Rbw,Nop,Fspan)
S=0
FOR
I=1 TO
Nop
S=S+10^(D(I)/10)
P(I)=S
I
SUBEND
! S
:";
in mW
Figure 11-6.
Lines
40
of
measurement
Lines
390
total
power
Lines
490
spacing
Lines
points
span
example
600
.
(
Fs
of
This
).
.
to
80
to
430
.
Lines
to
540
the
to
660
summation
The
Sample Program
set
the
measurement
points
,
search
440
to
display
markers
.
(subprogram
same
equation
and
from
480
the
is
done
coecient,
averaging
the
left
do
the
marker
Power
)
in
the
(11-2)
:
Occupied
factor
for
the
same
and
1
perform
area
is
used in
to
point
search
marker
a
of
the
the \A
P
ower
frequency
typical
values
where
from
the
on
the
summation
center
djacent
Bandwidth
span,
resolution
.
the
power
right.
0.5
%
power
of
the
frequency
Channel
Calculation
is
0.5
point
power
(
Fch
P
ower
bandwidth,
%
compared
and read
at
the
)
and
the frequency
Calculation
(2/2)
number
to
the
out
the
measurement
"
11-8 Using Application Programs
Page 81
File Transfer
This
section
The
le
storage
(such
as
describes
transfer
device
hard
function
of
disk).
this
Function
how
to use
uses the
the le
external controller
instrument (memory
This
function
allows
transfer function,
to transfer
disk or
you
diskette) and
to:
showing you
les between
an external
a sample
program.
the selected
storage device
Directly
F
or
print
access
example
it
on
processor
Use external
diskette
F
or
.
example,
calibration,
data.
In
single
diskette
to
the
external
P
erform
basic
used
remote
measurement.
for
detailed
Preparation:
Use
the
Store
it
controller
the
settings
Measurement:
Choose
the
external
perform the
data
you
,
you can
a
printer connected
running
on
storage devices
if there
the
amount of
this
case
,it
is impractical
at
a
time
controller
measurement
Y
ou
settings).
keys
on
the
on
the
storage
,
and
store
required
a
necessary
controller
measurement
want to
use on
transfer the
to the
the
external controller
are a
, which
great
have larger
number
the setting
. However
and
do
not
front
device
it
on
for
your measurement.
setting
.
Then, recall
then
using
have
panel
of
an
external
le from
,
the
using
the external
le of
an instrument
external controller
.
capacity
of
measurement
data becomes
to
store
all
of
you
can
realize
storing them
external
to
memorize
to
establish
the
4396B
storage
controller
further
the
,
then transfer
device
those stored
the
the le
GPIB
to
commands
controller.
screen
, and
compared
conditions
extremely
these
settings
this
functionality
on
an
external
with
details
setting required
the
.
Repeat this
and
transfer
set
the
4396B
.
to
paste
large
on
storage
a
few
(such
le
it
for
the
external
it
onto
to
the
which
,
including
the
memory
by
device
GPIB
as
for
your
to
the
procedure
to
the
the
measurement
controller
a
le
in
memory
disk
require
calibration
disk
transferring
.
commands
GPIB
commands
measurement.
external
for
4396B
using
a
or
all
,
word
or
a
them
for
of
and
a
The storage
the LIF
LIF format
device
format.
les,
F
or
only
of
DOS
binary
the
4396B
format
les
allows
les
,
can
you
both
be
transferred.
Binary les
Instrument settings and internal data array (ST
Internal data arrays (D
ATAONL
Y binary)
Graphic images (GRAPHICS)
ASCII les
Internal data arrays (D
Instrument B
ASIC programs
ATAONL
Y
ascii)
to
handle
binary
les
ATE)
les
and
listed
ASCII
below
les
in
can
the
DOS
be
transferred.
format
Using Application Programs 11-9
or
F
or
Page 82
File
Transfer
This
program
directory
desire
.
of
the
from
transfers
storage
4396B
a
specied
device
to
External
le
in
connected
the
to the
Controller
current
directory
external controller
of the
4396B to
, giving
the current
ale
name you
When
Enter
Then,
example
want
it
executed,
the
ENTER
the
to
already
ENTER
ENTER
this
name
of
SOURCE
program
,
SAMPLE.ST
give
on
the
exists
.
SOURCE
DESTINATION
program
a
le
you
FILE
prompts
A
has
storage
FILE
rst
prompts
want
to
NAME
ON
you
to
enter a
been
entered as
device.
NAME
ON INSTRUMENT
FILE
NAME
you to
transfer
.
INSTRUMENT
destination le
the source
Note that
ale
ON CONTROLLER
enter a
source le
name,
?
name as
le name).
with the
shown below(in
Enter the
same
name
? SAMPLE.STA
?
as shown
will
this
le
name
be
overwritten,
below.
you
if
d a
10
!
20
!
Figure
30
!
40
DIM
Src_file$[50],Dst_file$[50]
50
ASSIGN
60
OUTPUT
70
!
80
PRINT
90
INPUT
100
PRINT
110
!
120
PRINT
130
INPUT
140
PRINT
150
!
160
Copy_from_instr(@Hp4396,Src_file$,Dst_file$)
170
!
180
END
190
!
200
!
copy_from_instrument
210
!
220
SUB
Copy_from_instr(@Hp4396,Src_file$,Dst_file$)
11-7.
@Hp4396
File
TO
@Hp4396;"*rst"
"
ENTER
SOURCE
Src_file$
Src_file$
"
ENTER
DESTINATION
Dst_file$
Dst_file$
transfer
717
FILE
(Instrument
NAME
ON
FILE NAME
->
INSTRUMENT
ON
CONTROLLER
Controller)
?
?
";
";
230 DIM Len$[6],Img$[32],Dmy$[2]
240 !
250 ON ERROR GOTO Skip_purge
260 PURGE Dst_file$
270 Skip_purge:
OFF ERROR
280 CREATE Dst_file$,1
290 ASSIGN @Dst_file TO Dst_file$
300 !
Figure 11-7. Sample Program: File Transfer from 4396B to External Controller (1/2)
11-10 Using Application Programs
Page 83
310
320
330
340
350
360
370
380
390
400
410
420 IF
430
440
450
460
470 END
480
490
500
510
520
530
540
550
560
570
580
590
600
610
620
630 DIM
640 OUTPUT
650 ENTER
660 IF
670 PRINT
680
690
CLEAR
OUTPUT
OUTPUT
IF
@Hp4396
@Hp4396;"CLES"
@Hp4396;"ROPEN
FNCheck_error(@Hp4396,"<CPFI:
!
LOOP
OUTPUT
ENTER
ENTER
@Hp4396;"READ?"
@Hp4396
@Hp4396
Block_size=VAL(Len$)
!
Block_size=0 THEN
ENTER
ASSIGN
OUTPUT
@Hp4396 USING
@Dst_file TO
@Hp4396;"CLOSE"
SUBEXIT
IF
!
ALLOCATE
Dat$[Block_size]
Img$="#,"&VAL$(Block_size)&"A"
ENTER
ENTER
OUTPUT
DEALLOCATE
@Hp4396
@Hp4396
@Dst_file
Dat$
!
IF
FNCheck_error(@Hp4396,"<CPFI:
END
LOOP
SUBEND
!
!
Instrument
Error
Check
!
DEF
FNCheck_error(@Hp4396,Str$)
Err$[64]
@Hp4396;"OUTPERRO?"
@Hp4396;Err$
Err$"+0,""No
error"""
"ERROR: ";Str$;"
RETURN
-1
ELSE
""";Src_file$;""""
USING
USING
"#,2A";Dmy$
"#,6A";Len$
"%,A";Dmy$
*
USING
USING
Img$;Dat$
"%,A";Dmy$
USING
Img$;Dat$
THEN
";Err$
ropen>")=-1
read>")=-1
THEN SUBEXIT
THEN
SUBEXIT
700 RETURN 0
710 END IF
720 FNEND
c b
Figure 11-7. Sample Program: File Transfer from 4396B to External Controller (2/2)
Lines 80 to 140 accept the entry of the source
le name and the destination le name
.
Line 160 calls the subprogram to transfer a le from the 4396B to the external controller
Lines 250 to 290 prepare for writing to the destination le.
Lines 310 to 340 prepare for reading the source le to the external controller.
Line 370 executes the query command to read data.
Lines 380 to 400 read the part indicating the length of the xed length block data (see
Figure 11-8) to obtain the length of the data to be transferred.
Lines 420 to 470 check the data length. If the data length is 0, the transfer process is
terminated.
Using Application Programs 11-11
.
Page 84
Depending
reads
the data
Line
530 writes
The
maximum length
source
le is
transferring
Lines
620
to
on the
part.
greater
all of
720
data length
the
data
of
than
the
data
provide
to
the
data
16
is
a
function
obtained
destination
transferred
Kbytes
,
the
completed.
to
in
lines
at
transfer
check
le
a
500
.
time
that
to
520,
is
16
routine
no
error
the
Kbytes
,
lines
has
program
.
Therefore
370
to 560,
occurred
adjusts
,if
the size
is repeated
in the
the
format
4396B.
and
of the
until
File
Transfer
This
program
to
the
external
giving
This
program,
Enter
the
ENTER
Next,
the
example
bytes
.
ENTER
transfers
controller
a
le
name
when
name
of
SOURCE
program
, SAMPLE.ST
SOURCE
from
you
desire
executed,
a
le
FILE
prompts
A has
FILE
Figure
External
a
specied
to
the
.
you
NAME
you
been entered
NAME
rst
want
11-8.
Controller
le
in
current
prompts
to
transfer.
ON
CONTROLLER
to
enter
ON
INSTRUMENT
Fixed
the
directory
the
as the
ENTER SOURCE FILE SIZE ?
Then, the program prompts you to
example, the size of SAMPLE.ST
the destination storage device
already exists
.
enter the destination le name
A
is 12288 bytes). Enter the le name you want to give on
. Note that a
le with the same name will be overwritten, if it
ENTER SOURCE FILE NAME ON INSTRUMENT ?
ENTER SOURCE FILE SIZE ?
ENTER DESTINATION FILE NAME ON CONTROLLER ?
length
current
you
to
size
of the
source
to
4396B
directory
of
the
enter
?
le
?
block
format
of
selected
asource
source le
name).
SAMPLE.STA
SAMPLE.STA
12288
the
storage
storage
le name
as shown
Enter
device
,
as
below
the
size
device
of
shown
correctly
connected
the
4396B
below
(in
this
, as shown below (in this
,
.
in
11-12 Using Application Programs
Page 85
d a
10
!
20
!
30
40
50
60
70
80
90
100
Figure
!
DIM
Src_file$[50],Dst_file$[50]
ASSIGN
OUTPUT
!
PRINT
INPUT
PRINT
11-8.
@Hp4396
File transfer
TO
@Hp4396;"*rst"
"
ENTER
SOURCE FILE
Src_file$
Src_file$
717
(Controller ->
NAME ON
CONTROLLER ?
Instrument)
";
110 !
120 PRINT
130
INPUT
140
PRINT
150
!
160
PRINT
170 INPUT
180
PRINT
190
!
200
Copy_to_instr(@Hp4396,Src_file$,Src_size,Dst_file$)
210
!
220
END
230
!
240
!
250
!
260
SUB
270
280
290
300
310
320
330 OUTPUT
340 OUTPUT
350 IF
" ENTER
SOURCE FILE
SIZE ?
Src_size
Src_size
" ENTER
DESTINATION FILE
NAME ON
INSTRUMENT ?
Dst_file$
Dst_file$
copy_to_instrument
Copy_to_instr(@Hp4396,Src_file$,Src_size,Dst_file$)
DIM
Img$[32]
Max_bsize=16384
!
ASSIGN
@Src_file
TO
Src_file$
!
CLEAR
@Hp4396
@Hp4396;"CLES"
@Hp4396;"WOPEN
FNCheck_error(@Hp4396,"
""";Dst_file$;""""
<CPTI:
wopen>")=-1
THEN
";
";
SUBEXIT
360 Xfr_done=0
370 !
380
390
LOOP
SELECT
(Src_size-Xfr_done)
400 CASE >Max_bsize
410 Block_size=Max_bsize
420 CASE 0
430 ASSIGN @Src_file TO *
440 OUTPUT @Hp4396;"CLOSE"
450 SUBEXIT
460 CASE ELSE
470 Block_size=(Src_size-Xfr_done)
Figure 11-9. Sample Program: File Transfer from External Controller to 4396B (1/2)
Using Application Programs 11-13
Page 86
480
490
500
510
520
530
540
550
560
570
580
590 IF
600
610
SUBEND
620
!
630
!
END
SELECT
Xfr_done=Xfr_done+Block_size
!
ALLOCATE
Dat$[Block_size]
!
Img$="#,"&VAL$(Block_size)&"A"
ENTER
@Src_file
USING
Img$;Dat$
!
Img$="8A,ZZZZZZ,"&VAL$(Block_size)&"A"
OUTPUT
DEALLOCATE
@Hp4396
Dat$
USING
Img$;"WRITE #6",Block_size,Dat$,END
FNCheck_error(@Hp4396," <CPTI:
END
LOOP
Instrument Error
Check
write>")=-1 THEN
SUBEXIT
640 !
650
DEF
FNCheck_error(@Hp4396,Str$)
660
670
680
690
700
710
720
730
740
750
c b
FNEND
DIM
Err$[64]
OUTPUT
ENTER
IF
@Hp4396;"OUTPERRO?"
@Hp4396;Err$
Err$"+0,""No
PRINT
RETURN
ELSE
RETURN
END
IF
"ERROR:
-1
0
error"""
";Str$;"
THEN
";Err$
Figure
Lines
name
Line
Lines
Lines
source
If
the length
length;
data not transferred is 0 at this time
80
to
.
200
calls
340
to
390 to
le size
otherwise
11-8.
180
350
Sample
accept
the
subprogram
prepare
480 calculate
previously entered
of the
remaining data
,
16
Kbytes
Program:
the
entry
for
writing
the length
is
File
of
to
transfer
set
the
source le
the
of the
and the
does not
as
the
Transfer
a
le
le
to the
data
length of
exceed 16
transfer
from
External
name and
from the
external controller
destination storage
that
has
not
the
data
Kbytes
data
length. Note
, the transfer process is terminated.
its
been
that
,
size
it
Controller
and
the
device.
transferred
has
been
is
set
as
that,
to
destination
to the
based
already
the
transfer
if
the
length
4396B
(2/2)
le
4396B
.
on
the
transferred.
data
of
the
Lines 530 to 540 read data, whose amount is specied by the transfer data length, from the
source le
Lines 560 to 570 write data to the
.
destination le in the xed length block format (see
Figure 11-8).
The maximum length of data transferred at a time
source le is greater than 16 Kbytes
, the transfer
is 16 Kbytes
. Therefore, if the size of the
routine, lines 390 to 590, is repeated until
transferring all of the data is completed.
Lines 650 to 750 provide a function to check that no error has occurred in the 4396B.
Note
To transfer a le from the external storage device to the 4396B, you must
check the le size (number of bytes) in advance .
11-14 Using Application Programs
Page 87
Displaying
This
program
List
displays
of
Files
the
list
of
in
the
Current
les
in
Directory
the
current directory
.
d a
10
!
20
!
Figure
30
!
40
ASSIGN
50
OUTPUT
60
!
70
Dir_instr(@Hp4396)
80
!
90
END
100
!
110
! Dir_instr
120
!
130
SUB
Dir_instr(@Hp4396)
140
150
160
170
180
DIM
!
OUTPUT
ENTER
IF
190
200
ELSE
210
220
230
240
250
260
270
END
OUTPUT
ENTER
PRINT
PRINT
PRINT
280 OUTPUT
290
300
ENTER
IF
310
320 OUTPUT
330 ENTER
340
11-9.
@Hp4396
File
TO
list
717
@Hp4396;"*rst"
Stor_dev$[5],Curr_dir$[50],File_name$[13]
@Hp4396;"STODMEMO?"
@Hp4396;A
A=1
THEN
Stor_dev$="MEMO"
Stor_dev$="DISK"
IF
@Hp4396;"CWD?"
@Hp4396;Curr_dir$
"["&Stor_dev$&"]:
"Size[byte] File
"&Curr_dir$
Name"
"------------------------"
@Hp4396;"FNUM?"
@Hp4396;File_count
File_count>=1 THEN
FOR
I=1 TO
File_count
@Hp4396;"FNAME?
";I
@Hp4396;File_name$
OUTPUT
@Hp4396;"FSIZE?
"""&File_name$&""""
350 ENTER @Hp4396;File_size
360 PRINT USING "XX,DDDDDD,XXXX,K";File_size,File_name$
370 NEXT I
380 END IF
390 SUBEND
c b
Figure 11-10. Sample
Program: Displaying List of Files in Current Directory of 4396B
Line 70 calls the subprogram to display the list of the les in the current directory.
Lines 160 to 250 check the storage device currently selected and its current directory name,
and then display the result.
Lines 280 to 290 check the number of the les in the current directory.
If there are any les in the current directory, lines 300 to 380 check the name and size of every
le and display them.
Using Application Programs 11-15
Page 88
The
following is
is
the memory
bytes)
and FILE2.TIF
displayed.
directory
disk
To
view
to DIR1
the output
and
the
(size:
the
list
and
then
result
current
16384
of
the
execute
of
the
directory
bytes)
les
in
this
program,
,
n
and
1
DIR1,
program
assuming
TEST
,
contains
directory
use
the
again.
,
DIR1.
CHAD
that
the
selected
2
les,
FILE1.STA
F
or
size
command to
storage
of a
directory,
change the
device
(size: 24576
-1 is
current
[MEMO]:
Size[byte]
\TEST
File
Name
------------------------
-1
-1
24576
16384
..\
DIR1\
FILE1.STA
FILE2.TIF
11-16 Using Application Programs
Page 89
If
You
Have a
12
Problem
This chapter
If
There
Check all
Most GPIB
If an
Error Message
Check
the error
provides the
Is
No
Response
GPIB addresses
problems are
message
information
From
and
cable
caused
by
an
is Displayed
on
the
analyzer's
you
need
to
an
connections
incorrect
display
correct
the
listed
Instrument
.
address
or
a
bad
.
problems
on
the
or
loose
.
GPIB
GPIB
cable
Bus
.
If \
GPIB
error occurred
1. Get the error
on how to use this
number and description using the
" is displayed:
command, see the \T
Chapter 3.)
2. See \Messages" in the
GPIB Command R
If any other message is displayed:
See \Messages" in the
GPIB Command Reference
OUTPERRO?
command. (F
or information
o Report Command Error Occurrence
eference
manual.
manual.
If You Have a Problem 12-1
"in
Page 90
If the
Disk Cannot
Be Read
Check
1.
the disk.
Put the
disk into
the disk
drive
and
type
as
follows
.
d a
CAT
2. Press
If error
4
Return
message
5
.
is
displayed,
the
disk
is
corrupted
or
the
disk
format
does
not
match.
Use
another disk.
If
you
are
using
the
Check the
1. Put
the
B
ASIC
B
ASIC
Instrument
mass storage
disk
into
the
uses
uses
.
disk
the
both
B
ASIC.
drive
LIF
the
and
external
format,
LIF and
type
controller
but
doesn't use
the DOS
as
follows:
,
format.
DOS format.
Try
again
Instrument
on
using
d a
SYSTEM$("MSI")
2.
Press
4
Return
5
.
d a
3.
:CS80,
If
the
to
match.
mass
700,
storage
If
To
0
volume
you
are
use the
0
mass
does
not match
using
Instrument B
built-in disk
storage
drive,
volume
your disk
ASIC:
mass
specier
drive,
storage
use
volume
the
MSI
specier
statement
must
be
to
:,4
set
it
.
12-2 If You Have a Problem
Page 91
Check
1.
the le
Put the
type.
disk into
the disk
drive and
type as
follows:
d a
CAT
2. Press
4
Return
5
.
d a
CAT
FILE
FIG1_3
FIG2_2
FIG2_3
.
.
.
NAME PRO
.
.
.
If
you
are
Only
an
ASCII
Use
the
If
you
are
T
o
read
The
ASCII
To
read
TYPE
ASCII
PROG
ASCII
using
SA
using
ASCII
a
PROG
REC/FILE
Instrument
type
program
VE/GET
B
ASIC
type
type
program
type
BYTE/REC
6
6
6
B
ASIC
le
can
commands
program, use
le
can
program,
256
256
256
to
use
be
save
GET
be
the
ADDRESS
saved
and
and read.
read
command.
saved
and
READ
DATE
34
22-Jun-92
34
22-Jun-92
34
22-Jun-92
ASCII
read
using
command.
les
.
SA
VE/GET
TIME
11:00
11:00
11:00
commands
.
The
PROG type
commands
If the
Check
GPIB Command
the
preceding
GPIB command.
An GPIB command that requires execution
.
program
Does
le
can
be
Not
W
ork
time (such as changing format or calculating the
calibration coecients) can cause next GPIB command
If you are using such commands
, insert the following command lines:
OUTPUT @Hp4396;"*OPC?"
ENTER @Hp4396;Dum
For details
,see\T
oW
ait F
or the Preceding Operation to Complete
saved
and
to fail.
read
using
" in Chapter 3.
the
STORE/LO
AD
If You Have a Problem 12-3
Page 92
Page 93
A
Manual
Changes
Introduction
This
appendix contains
congurations
in
this manual
listed
on the
Manual
T
o
adapt
changes
Instruments
documented
changes
instrument's
be
documented
In
additions
errors
Agilent
(Errata)
T
of the
applies directly
title page
Changes
this
manual
listed
opposite
manufactured
in
this
supplement
serial
in
to
change
in
echnologies
supplement.
the information
analyzer than
of this
to
your
your
manual.
that
will
number
a
yellow
information,
the
manual.
recommends
the current
to the
manual.
4396B
,
instrument's
after
the
Later
instrument
accompany
is
not
listed
MANU
AL
the
T
o
keep
that you
required to
4396B
see
Network/Spectrum
T
able
serial
printing
the
on
the
CHANGES
supplement
this
periodically request
adapt
printing
A
-1
and T
number
of
this
versions
title
page
supplement.
may
as
date
able A
and
will
shipped
of this
contain
current
this
of
this
Analyzer
-2,
rmware
may
be
documented
with
information
and accurate
the
manual.
and
be
dierent
that
latest
to
earlier
versions
The
serial
number
make
all
the
version.
from
in
a
instrument. If
or
in
T
able
for
correcting
as
possible
MANU
AL
or
information
prex
those
your
A
-1
,
it
may
,
CHANGES
F
or
information concerning
MANU
Turn
version. See
on
AL
the
CHANGE
line
switch or
the
GPIB
serial number
supplement,
execute the
Command
Table
A-1.
contact the
R
eference
Manual Changes
prexes not
nearest Agilent
*IDN?
command
listed on
by
for
information
by Serial
the
title
Technologies
GPIB
to
conrm
on
Number
page
the
Serial Prex or Number Make Manual Changes
Table A
-2. Manual Changes by Firmware V
ersion
Version Make Manual Changes
1.0X Change 1
or
in
the
oce
.
the
rmware
*IDN?
command.
Manual Changes A-1
Page 94
Serial Number
Agilent
number
the
serial
T
echnologies
plate
(see
prex
and
uses
Figure
the last
a two-part,
A-1
) attached
ve digits
Figure
nine-character serial
to the
are the
A
-1.
rear panel.
sux.
Serial
Number
number that
The rst
four digits
Plate
is stamped
and the
on the
letter
serial
are
A-2 Manual Changes
Page 95
Change 1
The
rmware
descriptions
revision
about
this
1.0X
does not
function
support the
in this
manual.
le transfer
function. Please
delete the
Manual Changes A-3
Page 96
Page 97
Index
A
active
address,
ASCII
ASSIGN
averaging,
controller,
1-2
,
1-4
data
transfer,
,
1-6
2-3
7-1
4-4
B
binary
BW
,
9-3
data
transfer,
4-6
C
CALIBRA
CLEL
CONT
TION COEFFICIENT
4-5
, 5-3
,5-5
,
9-3
,
2-2
ARRAYS,
D
data
arrays,
D
A
T
A
data
format,
D
A
T
A
DATMEM
ARRA
TRA
4-1
YS,
4-1
,
4-5
,
5-5
,
5-7
4-1
CE
ARRA
YS,
4-1
,
4-5
,
5-5
,
5-5
E
EDITDONE
EDITLIML
EDITLIST
ENABLE
ENTER
*ESE
ESNB
*ESR?
,
1-8
,
3-5
, 3-3
,3-7
,
9-3
,
8-3
,
9-3
INTR
,
3-4
Event Status Enable Register, 3-5
Event Status Enable Register B, 3-3
Event Status Register B, 3-3
G
group
execution
trigger,
2-4
H
HOLD
,
2-2
I
4-1,
INP8IO?
INPDATA
INPDTRC
INPUCALC{1-12}
INPUCALC{1-12}?
INPUDATA
INPUDTRC
INPURAW{1-4}
Instrument
I/O
port,
,
10-3
,
5-7
,
5-9
,5-5
,5-5
10-1
,
Event
,5-5
,5-3
5-5
Status
Register,
3-3
L
LIMCLEL
LIMEDONE
,
5-9
LIMILINE
LIMITEST
limit
LIML
LIMPRM
LIMSADD
LIMSDON
LIMU
list
,
test,
,
8-3
,
8-3
,
,
,
8-3
sweep,
8-3
,
,
,
8-1
8-3
8-3
8-3
8-3
8-4
9-1
M
maker, 4-2
Manual Changes, A
MEMORY ARRA
MEMORY TRA
-1
YS, 4-1, 4-5
CE ARRA
,5-5
YS, 4-1, 4-5, 5-5
F
le transfer, 11-9
FMT
, 5-5
FORM2
,4-7
FORM3
, 4-7, 4-10
FORM4
,4-5
FORM5
,4-7
FORMAT OFF
, 4-7, 4-10
O
ON INTR
*OPC?
OUT8IO
,3-4
,3-2
, 10-2
OUTPCALC{1-12}?
OUTPDATA?
OUTPDTRC?
OUTPERRO?
OUTPFAIP?
,5-7
,4-5,4-8, 4-10, 5-9
,3-6
,8-4
,5-2
Index-1
Page 98
OUTPLIMF?
OUTPLIML?
OUTPLIMM?
OUTPMARK?
OUTPSWPRM?
OUTPUT
,
8-4
,
8-4
,
8-4
,
4-3
,
4-5
,
4-8,
4-10
,
1-4
P
pass
control,
POIN
,
9-3
POWE
,
9-3
PRINALL
PROGram:DEFine
PROGram:DELete:ALL
PROGram:EXECute
7-1
,
6-1
,
7-4
,
7-4
,
7-3
PROGram[:SELected]:NUMBer
PROGram subsystem,
7-3
S
SADD
,
9-3
SAUNIT
SAVC
SDON
select
serial
Service
service
SING
SPOLL
*SRE
SRQ,
Standard Event
Status Byte
,
7-6
SWPT
system
,
5-5
,
5-5
,
9-3
code,
number,
Request
request
,
2-3
,
3-7
,
3-3,
3-5
3-1
,
9-3
controller,
1-4
A
-2
Enable
(SRQ), 3-1
Status Register,
Register, 3-3
7-1
Register,
,3-5
3-3
3-5
,
3-5
Q
query,
R
RA
W
remote
1-8
D
A
mode,
T
A
ARRA
1-4
YS,
4-1,
4-5,
5-5
T
*TRG
,
2-4
TRGS
BUS
TRGS
INT
TRIGGER
trigger
trigger
,
2-4
,
2-2
,
2-4
source,
system,
2-1
2-1
,
2-2
Index-2
Page 99
Agilent
4396B Network/Spectrum/Impedance
Using Instrument
B
ASIC with
the 4396B
Analyzer
Printed in JAPAN
Page 100
c
Copyright 1997, 2000, 2001, 2003 Agilent Technologies Japan, Ltd.
Loading...