Using HP Instrument BASIC
Creating ASP-like IBASIC Programs
Reading HP 4155/56 Data to IBASIC Variables
You can transfer read-out function values or data variable values (output data,
measurement data, and user function values) from the HP 4155/56 to HP
Instrument BASIC (IBASIC) variables.
Transferring Multiple Data.
You can transfer multiple data (such as sweep measurement data) to an array
variable of IBASIC by using
EXECUTE ("READDATAVAR ")
as follows:
EXECUTE ("READDATAVAR 'ID',Id_data")
The above example transfers the drain current data
ID
of a sweep
measurement to the array variable previously dened as
Id_data
.
Following example program gets
VTH.MES
setup le, performs measurement,
then transfers
ID
data to an array. In this example, the array
Id_data
is
dened in line 10, and it has elements 1 to 51.
10 DIM Id_data(1:51)
20 EXECUTE ("GETSETUP 'VTH.MES'")
30 EXECUTE ("SINGLE")
40 EXECUTE ("READDATAVAR 'ID',Id_data")
50 FOR I=1 TO 51
60 PRINT "Id(";I;")=";Id_data(I);"A"
70 NEXT I
80 END
Result with example measurement data is as follows:
Id( 1)= 0.00031 A
Id( 2)= 0.00282 A
Id( 3)= 0.00514 A
Id( 4)= 0.01017 A
.
.
.
Id( 51)= 0.08274 A
Transferring a Single Data.
In the following example, a single data is to transferred to a variable
.For
example,
VTH
is a single data point calculated by a user function that was
dened by the user.
EXECUTE ("READDATAVAR 'VTH',Vthdata")
1-46