Section
III
3-22
M odel 4085M
- '
This sample program allows the user to manually connect or disconnect ports and
m easurement pins using the softkeys. Connection status is displayed ,on the CRT of
the computer. The print and plot functions of the 4
'
145A are also featured
in
this
program.
' 0
2 0
SAMPLE PROGRAM 3
3 0
!
4 0
S ta r t
5 0
!
60
ON KEY 0 LABEL "
CONNECT
" CALL Connect-p o r t
7 0
ON K E Y 1 LABEL "
D ISCONNECT
.. CALL D i s connect
80
ON KEY 2 LABEL "
Swm_c l ear
" CALL C l ear_swm
9 0
O N K E Y 4 LABEL "PLOT and P R I N T " CALL P l o t-p r i n t
, 0 0
!
1 1 0
Swm_s tatus
1 20
LOOP
1 3 0
D I SP " SELECT w i t h S o f t k ey"
1 4 0
END LOOP
1 5 0
END
1 6 0
!
1 7 0
SUB Connec t_po r t
1 80
I N TEGER P i n_numbe r , Po r t_number
1 90
I NPUT " I NPUT PORT Number : " , Po r t_number
2 0 0
INPUT " I NPUT P I N Numbe r : " , P i n_number
2 1 0
Connect < Po r t_number , P i n_numb e r )
2 2 0
Swm_s tatus
2 3 0
SUBEND
2 4 0
!
2 5 0
SUB D i sconnect
260
I N TEGER P i n number
2 7 0
INPUT " I NPUT P I N Numbe r : " , P i n_number
280
Connec t ( O , P i n_numbe r )
290
Swm_s tatus
3 0 0
SUBEND
3 1 0
!
320
SUB C l ear swm
330
Swm_c l ear
340
Swm_status
3 5 0
SUBEND
360
!
3 7 0
SUB P l o t-pr i n t
380
CoM ISyscoml INTEGER Dcs , Swm , P i n-po r t ( I : 4 8 )
390
D I M Command S [ 2 5 ]
4 0 0
I N T EGER Se l e c t or . Hp_ i b , A_dev i ce , S tatus_byte
4 1 0
Hp_ i b ' D cs D I V 1 0 0
4 2 0
I NPUT " PLOT [ 1 ] o r P R I N T [ 2 ] ?" , Se l ec t o r
4 3 0
I F S e i e c t o r - 1 THEN
4 4 0
A_dev i c e = 5
4 5 0
Command$' ''PL 1 0 0 , 1 0 0 . 5 0 0 0 , 30 0 0 "
4 6 0
ELSE
4 7 0
A_de v i ce "
480
Command$ · " PR"
490
END IF
5 0 0
!
Figure
3-13.
Manual Operation of 4085M (Sheet
I
of
2)