TR6143-vi.txt
Togotech (토론 | 기여)님의 2020년 11월 10일 (화) 10:37 판 (새 문서: Advantest TR6143 <pre> 20 ! 2020-01-17 TR6143-vi.txt 30 OPTION BASE 1 40 INTEGER I,Nop,Count 50 DIM Cmd$[25],A$[13] 60 GOSUB Fileopen 70 GOSUB Inst_open 8...)
20 ! 2020-01-17 TR6143-vi.txt 30 OPTION BASE 1 40 INTEGER I,Nop,Count 50 DIM Cmd$[25],A$[13] 60 GOSUB Fileopen 70 GOSUB Inst_open 80 GOSUB Measure1 !log 90 ! GOSUB Measure2 !linear 100 ! GOSUB Measure 110 STOP 120 Measure2: ! 130 Ilimit=.1 140 Vmin=.0055 150 Vmax=.006 160 Nop=101 170 OUTPUT @Src;"E" !on 180 FOR I=1 TO Nop 190 Vset=Vmin+(Vmax-Vmin)/Nop*(I-1) 200 Vset=PROUND(Vset,-5) 210 Cmd$="V5" 220 Cmd$=Cmd$&" D "&VAL$(Vset)&"V" 230 Cmd$=Cmd$&" D "&VAL$(Ilimit)&"A" 240 OUTPUT @Src;Cmd$ 250 ! WAIT .5 260 GOSUB Reading 270 Volt=Vset 280 Curr=Data 290 PRINT "Count=";I;", T=";PROUND(Time_elapsed,-4);"m, V=";Volt;"V, I=";Curr;"A" 300 OUTPUT @File;I,Volt,Curr 310 NEXT I 320 OUTPUT @Src;"H" !off 330 RETURN 340 Measure1: ! 350 Ilimit=.1 360 Vmin=.01 370 Vmax=1 380 Nop=101 390 OUTPUT @Src;"E" !on 400 FOR I=1 TO Nop 410 K=(Vmax/Vmin)^(1/(Nop-1)) 420 Vset=Vmin*K^(I-1) 430 Vset=PROUND(Vset,-5) 440 Cmd$="V5" 450 Cmd$=Cmd$&" D "&VAL$(Vset)&"V" 460 Cmd$=Cmd$&" D "&VAL$(Ilimit)&"A" 470 OUTPUT @Src;Cmd$ 480 WAIT .2 490 GOSUB Reading 500 Volt=Vset 510 Curr=Data 520 PRINT "Count=";I;", T=";PROUND(Time_elapsed,-4);"m, V=";Volt;"V, I=";Curr;"A" 530 OUTPUT @File;I,Volt,Curr 540 NEXT I 550 OUTPUT @Src;"H" !off 560 RETURN 570 Measure: ! 580 Wait=2 !계측기 세팅을 한 후, 첫 측정에서 측정값이 0이 나오는 현상 때문에 잠시 대기 시간 590 OUTPUT @Src;"OM1" !데이터 출력을 ascii로 600 OUTPUT @Src;"SN 0V, 10V, 0.1V" 610 OUTPUT @Src;"SP 10, 5, 900 SV0 T2" !reverse OFF, Single Trig 620 OUTPUT @Src;"D 2MA" !D2A 한계 2A 630 OUTPUT @Src;"E" !ON 640 OUTPUT @Src;"T9" !Sweep trigger: auto 650 WAIT Wait 660 FOR I=1 TO 100 670 GOSUB Reading 680 NEXT I 690 GOSUB Data_process 700 ! OUTPUT @Src;"H" !Operate OFF 710 RETURN 720 Data_process: ! 730 PRINT "Count=";Count;", T=";PROUND(Time_elapsed,-4);"m, V=";Volt;"V, I=";Curr;"A" 740 RETURN 750 Reading: ! 760 FOR J=1 TO 5 770 ENTER @Src;A$ 771 WAIT .02 780 NEXT J 790 Data=VAL(A$[3,13]) 800 ! Data=PROUND(Data,-5) !유효수자 3자리 810 RETURN 820 Inst_open: ! 830 ASSIGN @Src TO 714 !advantest TR6143 840 RETURN 850 Fileopen: ! 860 DIM Dhms$[8] 870 DIM Filename$[20] 880 T=TIMEDATE 890 Time$=TIME$(T) !하루 추가 +24*3600 900 Date$=DATE$(T) 910 Dhms$=Date$[1;2]&Time$[1;2]&Time$[4;2]&Time$[7;2] 920 Filename$=Dhms$&".txt" 930 CREATE Filename$,1 940 ASSIGN @File TO Filename$;FORMAT ON 950 RETURN 960 END