
Programming
Examples
410
!
411
!
Output
data
from
analyzer
412
!
413
OUTPUT
@Nwa;"PRES;"
414
OUTPUT
@Nwa;"POIN201;
SPAN
.5GHZ;
REIP;
SING;
AUTO;
FORM3;
OUTPDATA;"
415
ENTER
@Nwa_data2;Preamble,Size,Data(*)
416
!
417
"First
and
last
data
points
of
output
corrected
data
array
:"
418
"Point:
1";TAB(13);"Real:";Data(0,0);TAB(36);"
Imag:";Data(0,1)
419
"Point:
201";TAB(13);"Real:";Data(200,0);TAB(36);"
Imag:";Data(200,1)
420
!
421
OUTPUT
@Nwa;"MARK1
0;"
!
set
marker
to
first
point
422
LOCAL
@Nwa
423
INPUT
"Corrected
data
array
read.
Press
Return
to
Continue",Input$
424
!
425
!
Input
data
to
analyzer
426
!
427
OUTPUT
@Nwa;"ENTO;
POIN201;"
!
Zero
Trace
for
effect
428
LINPUT
"Data
Zeroed,
Press
Return
To
Write
Data
To
8510",Input$
429
!
430
OUTPUT
@Nwa;"FORM3;
INPUDATA;"
431
OUTPUT
@Nwa_data2;Preamble,Size,Data(*)
432
"Corrected
array
data
Written
(input)
to
8510."
433
RETURN
434
!
435
Example7:
!
FORM1
DATA
CONVERSION
************************
436
!
437
438
"Example
7,
Form1
Data
Conversion"
439
!
440
!
This
example
reads
FORM1
data
(internal
binary
format)
and
converts
441
!
it
to
real
&
imaginary,
linear
magnitude,
log
magnitude
and
phase.
442
!
The
data
arrays
size
will
automatically
adjust
for
any
number
of
443
!
measurement
points.
Converted
values
are
printed
for
the
first
and
444
!
last
points.
445
!
446
OUTPUT
@Nwa;"SING;
MARK1;"
447
OUTPUT
@Nwa;"FORM1;
OUTPDATA;"
!
or
OUTPRAWn;
OUTPDATA;
OUTPFORM;
448
!
or
OUTPDELA;
OUTPMEMO;
449
!
note:
if
using
OUTPFORM,
Data_re(I)
will
be
in
the
current
display
450
!
format
and
Data_im(I)
will
=
0
for
all
display
formats
that
451
!
are
not
plots
of
real
/
imaginary
pairs.
Calculated
linear,
452
!
log
and
phase
values
are
not
valid.
453
ENTER
@Nwa_data2;Preamble,Size
!
Size/6
=
number
of
data
points
454
!
455
REDIM
Form1_data(1:Size/6,2)
!
dimension
0
=
imag
mantissa,
456
!
1
=
real
mantissa
and
2
=
common
exponent
457
!
458
ENTER
@Nwa_data2;Form1_data(*)
!
read
the
data
459
!
460
!
Calculate
Exponent
-
The
exponent
is
represented
by
bits
0-7
of
461
!
the
16
bit
integer,
Form1_data(n,2).
Bit
7
is
the
sign
bit
(1="-",
462
!
0="+").
The
computed
value
is
offset
by
-15
to
give
values
which
463
!
are
in
a
useful
range
for
measurements.
Thus,
for
Form1_data(n,2)
464
!
values
of
0
to
127,
exponents
range
from
-15
to
112
and
for
values
465
!
of
128
to
255,
exponents
range
from
-143
to
-16
respectivly.
This
466
!
gives
a
data
range
of
~
674
to
-860
db
using
db=20*LGT(2^(exponent)).
467
!
An
alternate,
table
method
is
used
to
decode
the
exponent
in
example28.
13-48
GPIB
Programming
Summary of Contents for 8510C
Page 7: ...vii ...
Page 29: ......
Page 61: ......
Page 105: ...FORMAT Functions Figure 4 12 Format Function Block and Format Menu 4 26 Measurement Controls ...
Page 106: ...FORMAT Functions Figure 4 13 Format Selections 1 of 2 Measurement Controls 4 27 ...
Page 107: ...FORMAT Functions Figure 4 14 Format Selections 2 of 2 4 28 Measurement Controls ...
Page 122: ...PARAMETER Functions Figure 4 25 Redefine Parameter Menu Structure Measurement Controls 4 43 ...
Page 175: ......
Page 203: ......
Page 273: ......
Page 297: ......
Page 305: ......
Page 391: ......