EasyManua.ls Logo

HP 5335A - Page 59

HP 5335A
76 pages
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...
T1UUV-I
l
Operation
and
Programming
3-209.
PROGRAMMING
EXAMPLES
3-210.
The
following
HP-1B
programming
examples
are
provided
for
information
and
illus¬
tration
only.
Sample
programs
are
provided
for
both
9825A
and
9835A
Computing
Controllers,
and
assume
a
5335A
address
of
decimal
“3”.
EXAMPLE
1.
A)
TYPICAL
MEASUREMENT
FORMAT
This
program
first
dimensions
a
string
variable
in
the
controller
for
the
incoming
data
and
then
sets
the
5335A
to
its
default
mode
(Initialize)
with
a
gate
time
of
500
ms
(.5
seconds).
The
counter
will
then
make
a
simple
Frequency
A
measurement.
In
step
2
the
controller
will
read
the
measurement
into
string
A,
and
then
step
3
displays
the
information.
After
waiting
for
1
second
(1000
milliseconds),
the
program
loops
back
into
reading
a
"new
measurement"
and
the
cycle
is
repeated.
9825A
EXAMPLE
9835A
EXAMPLE
0
:
c!
i
m
A
T
1
Z
1
\
i
0
DIM
ATi:21
:i
1.
:
wrt
703>
"
i
n
,
q
a
.
S
"
2
0
OUTPUT
7
0
3
;
"
2
r
&
d
7
0
3
•.
A
T
30
(INTER
7
03
>
AT
3
;
dsp
AT
4
0
I)
ISP
A$
4
:
wait
10
0
0
50
WAIT
1000
c;
.
/'!
f’l
A
6
0
GOTO
30
£>
:
*2^
Vj
*.
U
\.J
end
362
7
0
END
EXAMPLE
1.
B)
TYPICAL
MEASUREMENT
FORMAT
This
is
an
example
of
how
the
controller
can
be
used
to
display
a
measurement
once
every
5
seconds.
After
a
measurement
is
accepted
in
step
2,
the
HP-IB's
RFD
(Ready
For
Data)
line
is
held
false
until
another
read
instructions
is
executed.
This
means
that
during
the
wait
statement
in
step
A,
the
RFD
line
is
false.
The
5335A
will
check
the
RFD
line
whenever
it
is
addressed
to
talk
to
make
sure
that
the
listening
device
is
ready
for
data,
if
it
finds
RFD
false
and
the
wait
mode
is
off,
the
counter
will
skip
trying
to
output
the
data
and
start
a
new
measurement.
In
this
example
the
5335A
will
continue
to
make
measurements
without
sending
data
until
5
seconds
have
passed.
After
5
seconds,
the
next
measurement
that
comes
is
sent.
Note
that
this
check
of
the
RFD
line
is
done
for
the
first
character
of
a
measurement
data
string
only.
Subsequent
characters
are
sent
normally.
9825A
EXAMPLE
9835A
EXAMPLE
0
:
d
:i.
m
A
$
[
21
J
1
0
DIM
AT
[2:1
1
1.
:
wrt
703.,
"in
"
20
OUTPUT
703;"i
n
"
r
e
d
7
0
3
,
A
T
3
0
ENTER
703;AT
3
:
dsp
AT
4
0
DISP
AT
4
:
wait
SO00
SO
WAIT
soon
5
:
cf
t
o
-
3
6
0
GOTO
30
6
:
en
d
70
END
*1
2686
3-43

Related product manuals