Getting Started on Programming the HP 4155A/4156A
Programming for Data Extraction
460 OUTPUT @File;Vth
.
.
.
630 UNTIL Stop$="S" OR Stop$="s"
The above program repeats appending
Vth
variable value to a DOS le in
ASCII format.
In addition to numeric data, array data and string data can be stored to a
le as in following examples:
Array data:
1 DIM Vth(1:100)
.
.
.
340 INPUT "Enter file name to store data",File$
350 CREATE File$,1
360 ASSIGN @File TO File$;FORMAT ON
.
.
.
390 FOR I=1 TO 100
.
.
.
440 OUTPUT @Hp415x;":DATA? 'VTH'"
450 ENTER @Hp415x;Vth(I)
460 NEXT I
470 OUTPUT @File;Vth(*)
.
.
.
String data:
10 DIM Data$[10](1:100)
20 CREATE "DATAFILE",1
30 ASSIGN @File TO "DATAFILE";FORMAT ON
40 FOR I=1 TO 100
50 Data$(I)="ABC"
60 NEXT I
70 OUTPUT @File;Data$(*)
.
.
.
4. Close the I/O path.
To close an I/O path to a le,
ASSIGN
the path name to an * (asterisk) as in
the following example:
340 INPUT "Enter file name to store data",File$
350 CREATE File$,1
360 ASSIGN @File TO File$;FORMAT ON
.
.
.
460 OUTPUT @File;Vth
.
.
.
590 ASSIGN @File TO *
In this program, line 590 closes the I/O path that was opened by line 360.
3-20