EasyManua.ls Logo

HP 8153A - Page 253

HP 8153A
282 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Using
the
FETCh
Command
-
An
Example
This
example
is
a
subroutine
to
take
a
reading
from
the
second
channel
of
the
power
meter.
The
original
program,
as
written
for
the
HP
8162A
is
given
on
the
left.
The
modified
program,
to
run
on
the
HP
8153A
(in
HP8162A
Compatability
mode),
is
given
on
the
right.
Old
Program
(IIP8153A)
1300
SUB
Singlc'meas{P$)
!310
CLEAR
Rmm
1320
OUTPUT
Piiini;”CSB"
1330
OUTPUT
Pmm;”WVL
2,130iNM;M2;CH2;UI;Tl;ARl
1340
TRIGGER
Pinm
1360
S»-SPOLL(Pmm)
1360
IF
BlT(S,2)-0
THEN
GOTO
1360
1370
ENTER
Piinn;P«
1380
OUTPUT
Pmm;”CSB'’
1390
IX)CAL
Pmm
1400
SUBEND
Now
Program
(HP
81B3A)
1300
SUB
SlngIe'meaa(P4)
1310
CLEAR
Pmin
1320
OUTPUT
Pmm;”CSB”
1330
OUTPUT
PmmC’WVL
2,1301NM;M2;CH2;U1;T1;AR1”
1340
TRIGGER
Pmm
1360S=SPOLL(Pmm)
1360
IF
BIT{S,2)~0
THEN
GOTO
1350
1366
OUTPUT
Pmm;”FETC:POW?"
1370
ENTER
Pmm;PS
1380
OUTPUT
Ptnm;”CSB”
1390
LOCAL
Pmm
1400
SUBEND
Note
Do
not
specify
a
channel
as
part
of
the
FETCh
command,
that
is,
the
syntax
for
the
command
in
the
compatability
mode
is
FETCh[:
SCALar]:FOWer[:
DC]?
Line
No.
1300
Declares
the
subroutine.
P$
is
the
string
in
which
the
reading
is
returned
to
the
calling
program.
1310
Clears
all
the
HP-IB
buffers.
(Pmm
is
the
HP-IB
address
of
the
instrument)
1320
Clears
the
Status
Byte
in
the
instrument.
1330
Sets
up
the
instrument:
Sets
the
wavelength
for
channel
2
to
ISOlnm;
select
MEASure
mode;
select
channel
2;
select
dBm
as
the
units;
set
the
trigger
on;
enable
autoranging.
1340
Trigger
the
instrument.
1350,
1360
Performs
a
serial
poll
of
the
instrument,
until
bit
2
in
the
Status
Byte
is
set.
1365
This
is
the
extra
command
required
by
the
HP
8153A
when
in
HP
8152A
compatability
mode
to
read
a
value
Remote
Operation
H-3