HP 5501A Operating And Service Manual page 150

Laser transducer system
Hide thumbs Also See for 5501A:
Table of Contents

Advertisement

Table
4-73.
70746A
Binary
Interface
Typical
Program
(Cont'd)
PROGRAM
COMMENT
25:
I-F
F
=
1
for
Y-Axis.
1
26:
gsb
"in"
I
Subroutine
to
input
the
number
from
the
10746A
Card.
28: fmt 1,2fl0.0,f10.7
29:
wrt
.l,r3-160,r4-160,C
30:
if
abs(X-r3)c=r1/(.158*C)
and
abs
(Y-r4)<=r2/
(.158*C)
gto
"newdest"
31: gto "newsample"
33: if B>=61440;gto "er"
I
Store
the
Y-location
i n
r4.
1
35:
int
(B/4096)+D
X
format
fixed
0
places
to
right
of
decimal.
Y
format.
C
Compensation
format.
Fixed
7
places
t o
right
of
decimal.
Display
raw
counts.
If
X
and Y
are
within
tolerance,
get
anothe
destination;
if
not,
resample.
This
could
also
be
done
by
checking
for
system
null.
The
error
checking
subroutine
("er")
picks
this
up
as
an
error,
but
drops
out
of
the
routine
for
system
null.
Sample
again.
Reads
in
bits
31-16.
Complements
if
negative.*
See
Figure
4-20.
If
bits
31-28
are
all
1' s
go
to
error
checking
routine.
Refer
t o
step
45.
Read
i n
bits
15-0.
Complements
if
negative.
See
Figure
4-2E.
I
D
contains
bits
31-28
decimal
point
information.
37:
(65536*Bffi)
*tnt(2-D)--B;
ret
38:
"cnv"
:A/(1.58248e-4*C)
+I-A;
ret
39:
"out":wtb
2 , 4
40: int (A/65536)--B;
if B>32767; B-65536-8
41:
wtb 2 , B
42:
A-65536*int(A/65536)-B;
if
B>32767;
B-65536+B
43:
wtb
2, B
44:
ret
45:
"erw:int(B/256)-
2 - B ;
15-B+B
46:
if
B>=8;prt
"vol
error";
B-8+B;
0+D
1
B
=
Bits
27-16
B*2116
+
bits
15-0.
2-D
applies
decimal
point.
Subroutine
to
convert
destination
t o
fringes
and
add
preset
(168).
"out"
is
a
subroutine
to
output
a
32-bit
number
in
2' s
complement
form
from
two
16-bit
words
in
positive-true
form.
4=4P=load
data
into
10746A
1/O
buffer.
See
Figure
4-2F.
B
is
bits
31-16
Output
bits
31-16
to
10746A.
See
Figure
4-2G.
B
is
bits
15-0.
Convert
to
2s
complement.
Output
bits
15-0
t o
10746A.
See
Figure
4-2G
from
step
15.
Output
is
completed.
Transfer
command
needs
t o
be
given.
B
=
Bits
31-16.
Initially
-240
clears
bits
31-28 which
indicates
an
error.
Bits
27-24
need
to
be
complemented
by
subtracting
from
15.
If
Bit
27,
Vol
error
clear
bit
27.
*Range
of
9825
16
bit
words
=
+32,767
to
-32,768.

Advertisement

Table of Contents
loading

Table of Contents