0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
II
I
HP
6002A/HP 1000
FTN4,L
PROGRAM
TVOUT(3),11-28-78
(GWG)
TEST
VOUT
C
C
C
INTEGER
VOUT
COMMON
ILU,ILST,IDLU
DATA
NO/2HNO/,BUS/2HBUI
IF(INPRM(ID).EQ.NO)GO
TO
998
6
WR
IT E ( I L U , 1
0)
10
FORMAT("ENTER:
REAL
'VOLTS'
READ(ILU,)VOLTS
998
15
999
IF(VOLTS.GT.50.)GO
TO
999
IF(VOUT(VOLTS).EQ.NO)
GO
TO
999
GO
TO
6
WRITE(ILU,15)
FORMAT(
":
RU
,
TVOUT
, I
LST
, IDLU")
STOP
END
Input parameters saved here.
Obtain input parameters.
50
MEANS
END:
_")
Read
input voltage value from the user
terminal.
If
voltage
is
illegal, terminate the program.
Call function to program the 6002A.
INTEGER
FUNCTION
VOUT(VOLTS),11-07-78
(GWG)
VOLTS
TO
6002A
C
C
USER
PROGRAM
ERROR
CHECKING
MUST
BE
USED
WITH
THIS
C
FUNCTION
CALL,
NO
BUFFERING,
ERRORS
ARE
CHECKED
BY
C
THE
FUNCTI
ON.
C
C
OUT
OF
RANGE
ERROR
= -1
C
INTEGER
REAL
COMMON
DATA
RANGE,OUTV
RESOLU,VOLTS
ILU, ILST,
IDLU
NO/2HNO/,YES/2HYEI
VOUT=YES
IF(VOLTS.LT.O)GO
TO
300
50 IF(VOLTS.GE.10.)GO
TO
100
RESOLU=.01
RANGE=1000
GO
TO
200
100 IF(VOLTS.GE.50.)GO
TO
300
RESOLU=.05
RANGE=2000
200
OUTV=
VOLTS/RESOLU
+.05
+
RANGE
WRITE(IDLU,10)OUTV
10 F
ORMAHI4,1_")
Appendix A of the 6002A Operating and
Service
Manual describes range program-
ming
in
detail.
Note, the underline character must
be
used
to suppress the carriage return and linefeed.
Figure 9-4. Programming 6002A Voltages
9-3