![Agilent Technologies Agilent 4396B Gpib Programming Manual Download Page 156](http://html.mh-extra.com/html/agilent-technologies/agilent-4396b/agilent-4396b_gpib-programming-manual_2867995156.webp)
Note
When
both
an
external
controller
and
Instrument
B
ASIC
are
used
at
the
same
time
,
the
EXECUTE
command
occasionally
does
not
terminate
normally
.
If
the
external
controller
queries
the
instrument
while
the
4396B
is
sweeping
when
triggered
by
EXECUTE
"SING" ,
the
EXECUTE
command
does
not
terminate
normally
(In
the
worst
case
,
a
system
halt
occurs).
T
o
avoid
this
problem,
it
is
necessary
to
use
an
SRQ
interrupt
technique
that
uses
the
status
register
.
In
this
case
,
the
external
controller
waits
to
send
query
commands
until
Instrument
B
ASIC
completes
the
execution
of
the
EXECUTE
command.
F
or
External
Controller
10
REAL
Meas(1)
20
ASSIGN
@Hp4396
TO
717
30
OUTPUT
@Hp4396;"*CLS;
*OPC?"
40
ENTER
@Hp4396;Opc
50
OUTPUT
@Hp4396;"OSPT
0"
60
ON
INTR
7
GOTO
Anaend
70
OUTPUT
@Hp4396;"PROG:STAT
RUN"
80
!
90
Start:!
100
OUTPUT
@Hp4396;"*CLS;
*OPC?"
110
ENTER
@Hp4396;Opc
120
ENABLE
INTR
7;2
130
Waiting:
GOTO
Waiting
140
Anaend:!
150
OUTPUT
@Hp4396;"PROG:NUMB?
MEAS"
160
ENTER
@Hp4396;Meas(*)
170
Meas(*)
180
OUTPUT
@Hp4396;"*CLS;
*OPC?"
190
OUTPUT
@Hp4396;"PROG:STAT
CONT"
200
GOTO
Start
210
END
F
or
Instrument
B
ASIC
10
REAL
Meas(1)
20
ASSIGN
@Hp4396
TO
800
30
OUTPUT
@Hp4396;"OSE
16384;OSNT
16384;*SRE
128"
40
!
50
LOOP
60
EXECUTE
"ANAOCH1;ANAODATA;ANARFULL"
70
EXECUTE
"SING"
80
EXECUTE
"OUTPMAX?"
90
Meas(0)
=
READIO(8,0)
100
Meas(1)
=
READIO(8,1)
110
PAUSE
120
END
LOOP
B-6
BASIC
Commands
Specic
to
4396B