EasyManuals Logo

HP 4155A Programmer's Guide

HP 4155A
241 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #38 background imageLoading...
Page #38 background image
Using HP Instrument BASIC
Other Basic Features of IBASIC
Branching/Repeating
Table 1-1. Branch and Repeat Keywords of IBASIC
IBASIC Keyword Function
FOR, NEXT
Repeat specied number of times.
IF THEN, ELSE, END IF
Branch.
WHILE, END WHILE
Repeat until specied condition is
false
.
REPEAT, UNTIL
Repeat until specied condition is
true
.
Following program tests 1000 devices, and judges them pass or fail.
1 COM Data(1:1000)
2 DIM Id(1:1000)
10 EXECUTE ("GETSETUP 'SAMPL.MES'")
20 FOR I=1 TO 1000
30 EXECUTE ("SINGLE")
40 EXECUTE ("READDATAVAR 'Id'")
50 IF Id(I)<1E-6 THEN
60 PRINT "FAIL LOWER"
70 Data(I)=1
80 ELSE
90 IF Id(I)>1E-4 THEN
100 PRINT "FAIL HIGHER"
110 Data(I)=2
120 ELSE
130 PRINT "PASS"
140 Data(I)=0
150 END IF
160 END IF
170 NEXT I
180 CALL Save_data
190 END
200 !
210 SUB Save_data
220 COM Data(*)
230 CREATE "data_file",1
240 ASSIGN @File TO "data_file";FORMAT ON
250 OUTPUT @File;Data(*)
260 ASSIGN @File TO *
270 SUBEND
1-21

Table of Contents

Other manuals for HP 4155A

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP 4155A and is the answer not in the manual?

HP 4155A Specifications

General IconGeneral
BrandHP
Model4155A
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals