프루버
10 !프루버를 수동으로 조작할 때 자동으로 측정하는 프로그램
20 !hp 3478A DMM
30 !hp 4284A LCR
40 !Keithley 2420 SourceMeter
50 DIM Infilename$[20],Outfilename$[20],Dhms$[8]
60 INTEGER I,J,X,X_pre,Y,Y_pre,Zup,Len
70 DIM Tmp$[1]
80 Time$=TIME$(TIMEDATE)
90 Date$=DATE$(TIMEDATE)
100 Dhms$=Date$[1;2]&Time$[1;2]&Time$[4;2]&Time$[7;2]
110 Outfilename$=Dhms$&".txt"
120 CREATE Outfilename$,1
130 ASSIGN @Outfile TO Outfilename$;FORMAT ON
140 ASSIGN @Probe TO 402
150 Inst=3
160 Zup=220 ! 척 Z UP일 때 높이
170 SELECT Inst
180 CASE 1 !3478A
190 ASSIGN @Dmm TO 427
200 OUTPUT @Outfile;"No.,Time,X,Y,R"
210 CASE 2 !4284A
220 ASSIGN @Lcr TO 417
230 OUTPUT @Lcr;"TRIG:SOUR BUS"
240 OUTPUT @Lcr;"ABORT;:INIT"
250 OUTPUT @Outfile;"No.,Time,X,Y,A-value,B-value"
260 CASE 3 !2420
270 ASSIGN @Sm TO 424
280 OUTPUT @Sm;"FORM:ELEM VOLT, CURR"
290 OUTPUT @Sm;"SOURCE:CLEAR:AUTO ON"
300 OUTPUT @Outfile;"No.,Time,X,Y,Volt,Curr"
310 END SELECT
320 I=0
330 T0=TIMEDATE
340 LOOP
350 ! 척 UP될때까지 기다린다.
360 LOOP
370 OUTPUT @Probe;"?ZO" !현재 척높이는? Znnnn
380 WAIT .1
390 ENTER @Probe;Res_z$
400 Len=LEN(Res_z$)
410 Zheight=VAL(Res_z$[2,Len]) ![start;length] [start,stop]
420 Zheight=INT(Zheight/10) ! 0.1단위이므로
430 EXIT IF Zheight=Zup
440 END LOOP
450 I=I+1
460 ! 이 때 다이좌표를 읽는다.
470 GOSUB Read_xy
480 T1=TIMEDATE-T0
490 SELECT Inst
500 CASE 1 !3478A
510 ENTER @Dmm;R
520 PRINT I,INT(T1);"sec","X=";X,"Y=";Y,"R=";R
530 OUTPUT @Outfile;I,T1,X,Y,R
540 CASE 2 !4284A
550 OUTPUT @Lcr;"TRIGGER:IMMEDIATE"
560 OUTPUT @Lcr;"FETCH?"
570 ENTER @Lcr;A,B,C
580 PRINT I,INT(T1);"sec","X=";X,"Y=";Y,"A=";A,"B=";B
590 OUTPUT @Outfile;I,T1,X,Y,A,B
600 CASE 3 !2420
610 OUTPUT @Sm;"READ?"
620 ENTER @Sm;Volt,Curr
630 PRINT I,INT(T1);"sec","X=";X,"Y=";Y,"V=";Volt,"i=";Curr
640 OUTPUT @Outfile;I,T1,X,Y,Volt,Curr
650 END SELECT
660 ! 다음위치 이동 때까지 대기한다.
670 X_pre=X!현재 위치 기억
680 Y_pre=Y
690 LOOP
700 GOSUB Read_xy
710 EXIT IF X<>X_pre
720 EXIT IF Y<>Y_pre
730 END LOOP
740 END LOOP
750 STOP
760 Read_xy: !!!
770 LOOP
780 OUTPUT @Probe;"?P" !현재 다이좌표는?
790 ENTER @Probe;Res_xy$ !Xn...Yn...
800 EXIT IF POS(Res_xy$,"X")=1
810 END LOOP
820 Len=LEN(Res_xy$)
830 ! POS(A$,B$) A$에서 B$ 위치. 0 이면 없다.
840 X=VAL(Res_xy$[2,POS(Res_xy$,"Y")-1]) !두번째부터 Y등장 바로앞까지
850 Y=VAL(Res_xy$[POS(Res_xy$,"Y")+1,Len]) !Y등장 다음부터 len까지
860 RETURN
870 END