87
_____________________________________________________________________________________________
_____________________________________________________________________________________________
(4) Carrying out comparator testing
Summary
This program first makes the comparator settings.
At the end of testing, it displays the numbers of the samples which were
outside the comparator limit.
Sample nos. decided HI for CP:2 5
Sample nos. decided LOW for CP:
All measured results
Sample number: 1
3.8686E-04
.34823
Sample number: 2
3.8704E-04
.34823
Sample number: 3
3.8681E-04
.34843
Sample number: 4
3.8694E-04
.34804
Sample number: 5
3.8698E-04
.34823
Program List
10 OPEN "COM1:9600,N,8,1" FOR RANDOM AS #1
20 PRINT #1, ":PAR1 CP;:PAR3 D"
30 PRINT #1, ":TRIG EXT"
40 PRINT #1, ":HEAD OFF"
50 PRINT #1, ":FREQ 1.234E3"
60 PRINT #1, ":RANG:AUTO ON"
70 PRINT #1, ":LEV CV;:LEV:CVOLT 1.00"
80 PRINT #1, ":COMP:FLIM:MODE ABS;ABS 386.80E-6,386.95E-6"
90 PRINT #1, ":COMP:SLIM:MODE PER;PER 1.0000,OFF,OFF"
100 NUM.SET:
110 INPUT "Number of samples to measure:"; X
120 IF X <= 0 THEN GOTO NUM.SET
130 OPTION BASE 1
140 DIM F.ALL(X), CP(X), F.CP(X), D(X), F.D(X)
150 PRINT #1, ":COMP ON"
160 INPUT "Prepare sample, then press Enter", A$
170 CLS
180 I = 1
190 MEAS.LOOP:
200 PRINT #1, "*TRG;:MEAS?"
210 INPUT #1, F.ALL(I), CP(I), F.CP(I), D(I), F.D(I)
220 I = I + 1
230 IF I > X THEN GOTO MEAS.END
240 CLS
250 PRINT "Prepare sample number ";I;
260 INPUT ", then press Enter", A$
270 GOTO MEAS.LOOP
280 MEAS.END:
290 PRINT #1, ":COMP OFF"
300 CLS
310 PRINT "Sample nos. decided HI for CP:";
320 FOR I = 1 TO X
330
IF F.CP(I) = 1 THEN PRINT I;
340 NEXT I
350 PRINT
360 PRINT "Sample nos. decided LOW for CP:";
370 FOR I = 1 TO X
380
IF F.CP(I) = -1 THEN PRINT I;
390 NEXT I
400 PRINT