c
b
220
Calibrating:
GOTO
Calibrating
230
Cal_end:
!
240
OUTPUT
@Hp4396;"RESPDONE"
!
Calculating
cal
coefficients
250
OUTPUT
@Hp4396;"*OPC?"
!
\
Waiting
calculation
end
260
ENTER
@Hp4396;Dum
!
/
270
DISP
"Response
cal
completed."
280
!
290
!
Measurement
300
INPUT
"Connect
DUT,
then
press
[Return].",Dum$
310
OUTPUT
@Hp4396;"CLES"
!
Clear
all
status
registers
320
OUTPUT
@Hp4396;"*SRE
4;ESNB
1"
330
ON
INTR
7
GOTO
Sweep_end
!
\
When
iBASIC
is
used,
340
ENABLE
INTR
7;2
!
/
change
"7"
to
"8"
350
OUTPUT
@Hp4396;"SING"
!
Sweep
mode
is
SINGLE
360
Measuring:
GOTO
Measuring
370
Sweep_end:
!
380
OUTPUT
@Hp4396;"MKR
ON"
!
Marker
1
ON
390
OUTPUT
@Hp4396;"SEAM
MAX"
!
Search
MAX
400
OUTPUT
@Hp4396;"OUTPMKR?"
!
Output
marker
value
410
ENTER
@Hp4396;Val1,Val2,Swp
420
"Max
val:",Val1;"dB"
430
"Swp.Prmtr:",Swp;"Hz"
440
END
Figure
1-3.
Sample
Program
:
Basic
Measurement
(2/2)
Set
I/O
P
ath
40
ASSIGN
@Hp4396
TO
717
!
When
iBASIC
is
used,
change
"717"
to
"800".
This
operation
allows
you
to
use
@Hp4396 ,
instead
of
717 (or
800 ),
as
the
GPIB
address
in
the
program.
Set
Up
the
Measurement
P
arameters
60
OUTPUT
@Hp4396;"PRES"
!
Preset
4396B
70
OUTPUT
@Hp4396;"CHAN1;NA;MEAS
S21;FMT
LOGM"
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
Y
ou
can
execute
GPIB
commands
in
the
same
sequence
as
key
operation.
Lines
60
and
70
perform
the
same
operation
as
pressing
4
Preset
5
4
Chan
1
5
4
Meas
5
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
ANALYZER
TYPE
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NETWORK
ANALYZER
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
S
PARAMETERS
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Trans:FDW
S21[B/R]
4
F
ormat
5
NNNNNNNNNNNNNNNNNNNNNNN
LOG
MAG
.
In
general,
the
procedure
for
setting
up
measurements
on
the
analyzer
via
GPIB
follows
the
same
sequence
as
performing
the
procedure
manually
.
There
is
no
required
order
,
as
long
as
the
desired
frequency
range
,
number
of
points
,
and
power
level
are
set
before
performing
the
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