Unpacking Program - HP 3456A Operating And Service Manual

Digital voltmeter
Hide thumbs Also See for 3456A:
Table of Contents

Advertisement

Appendix A
A·IB. UNPACKING PROGRAM.
A·19. The following is an unpacking program used to
unpack the 3456A's readings taken in the Packed mode.

Unpacking Program

!
i
w
l
1 0
T h e f o
l o
b y
t h e 3 4 5 6 A .
2 0
!
3 0
chang i n -;t t h e D It 1 s t a t e M e n t
!
40
in
l i ne- 3 13 ,
50
nUf'l e r i c c d
a r ro.y Out
w i l l
be t Q k e n
60
!
70
nUrlbe-r of
r e a d i n g s t a k e- n o
8 0
d a t a p e r
read i n � .
90
1 00
I n t h i s p a r t i c u l a r e x o. rlp l e ,
1 1 0
s t a t e s :
I
Funct i o n :
DCV
1 20
!
1 3 0
D a t a O u t p u t
I
1 4 0
Range:
A u t o range
1 5 0
D e l a y :
13
( 0S T D )
1 6 0
I nt e- g r a t i on T i rl e :
1 70
NUrlbe-r of
R e a d i n g s :
1 8 0
Syst erl O u t p u t
1 90
T r i gg e r :
S i n "" l e
You
2 0 0
2 1 0
can f o l l o w t h e COrlMent
220
u n d e r s t a n d t h e- bas i c o p e ra t i o n
!
230
u n p a c k i n g s u b p rog rarl
!
249
2 5 9
2 6 9
OPT I O N 8 A S E
27 9
D I M
I n : H 3 6 ] , Ou t ( 9 )
2813
OUTPUT 722 ; " P I F I R I B S T D . 1 STI 9STNSO 1 T3"
299
ENTER 722 BFHS 36 NOFORMA T j I r.$
9
399
CALL U n p k 56 ( I n $ , Out ( * »
3 1 9
FOR
1 = 1 T O
329
P R I NT
"�lUMBER
3 3 0
t�EXT
1
3 4 0
E N D
3 5 0
S U B U n p k 56 ( I n $ , O u t ( * »
I N T E G E R N , J , I , B l , B 2 , B3 , B4
369
3 7 0
N=LEN ( I n $ )
T O
3 8 0
J=0
390
FOR
1 = 1
N STEP 4
4913
J = J + l
4 1 9
B t =H.UM ( l n$[ I ] )
429
B2=NUM < I n$[ 1 + 1 ] )
4 4 9
430
B3=NUM ( I n$( 1+2 ] )
459
B4=NUM ( J n$( 1 + 3 )
Out ( J ) = . I *B I T ( B l , 9 ) + . 9 ! * S H I F T ( B2 , 4 ) + . 90 1 * B I NAND ( B 2 , 1 5 ) + . 0 0 0 1 *S H I FT ( B 3 , 4 ) + .
0BBB l * B I NAN D ( B3 , 1 5 ) + . B B B 0 0 1 * S H I F T C B4 , 4 ) + , 000900 1 * B I NAND ( B 4 , 1 5 )
1
46 13
O u t ( J ) = O u t ( J ) * < 1 - 2* B I T ( B l , 1 »
470
NEXT
4 8 0
S U B E N D
A-4
n g p r O g r a M
i l l u s t r a t e s
Y o u
can p r o g r a M t h i s
a n d the- b u f f e r e d t ra n s f eI s t a t ef'lent
is d i Me n s i o n e d to c o n t a i n the- nUrlber of
st r i n g v a r i a b l e
The-
T h a t
t h e 3456A
( F I )
F o r M a t :
P a c k e d
( P I )
( R I )
. 1
L i ne C y c l e-s
9
( 9 S T N )
M o d e :
On
( SD I )
< T 3 )
s t Q t e M e n t s on each
i s beyond t h e
! Spe c i f i es
!
I
f i rst
D i (� e n s i o n s t he s t r i n g v a r i o.b l e and nUM e r i c
!
!
t
C a l l s Unpack i n g
Se
s U P loop t o p r i n t
" ; I j "
VOLTAGE R E A D I N G =
* 1 0 t «
The program is given in the Enchanced Basic (9835A/8
and 98458 Controller) Language.
o n e N e t h o d f o r
r O l,tt i n e t o t a k e-
1
t h e 3456A p r o g ra(� M i n g s y n t a x
i n
f ne 20
,
in
I n $
i s d i Me-tl s i o n e d t o
i s ,
a p a c k e d r e a d i n g c o n t o. l n s 4 b y t e s o f
p
g
M
i s
r Q
r o
� e d t o t h e f o l l o w i n g
( ' l ST ! )
l i ne
scope
Exp l a i n i ng t h e ope r a t i on
of
t h i s rla n u a l .
i n
n u � e r i c a r r a y Out
e l eM e n t
!
!
P rog raNs the 3 4 5 6 A .
E n t e r s 36 data
bytes
rout i n e ;
out t h e nUMber o f
" ; Out ( I )
1 - 2* B I T ( B l , 7 »
* S H I F T ( B I NA N D C B 1 , 1 2 4 ) , 2 »
Model 3456A
f r O N
"
"
tjur)be r
f
r e a d i n g s
any
unpa c k i n g d a t a
o
l i ne 4 0 .
The-
r e a d i l Hs t h a t
4
t i rles t h e
o f t h e p
a
o f
r o g r
rl t o
t h e
o.tTay.
i s
O ut ( ! ) .
i n t o the st r i n g
passes
the
packed
r e a d i n g s t Q k e n .
o
o
I n $ .
dat a .
o

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents