Advantest TR6143
10 ! [[Advantest TR6143]] <pre>
20 ! 2020-01-17
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 OUTPUT @File;"No., Elapsed-Time[s], Applied-Volt[V], Measured-Curr[A]"
360 Ilimit=.1 !전류한계
370 Vmin=.001 !시작 전압
380 Vmax=1 !종료 전압
390 Nop=401 !NOP
400 OUTPUT @Src;"E" !on
410 Cmd$="V4" !V limit = 3.2V V5=32V V6=110V
420 OUTPUT @Src;Cmd$
430 Cmd$=Cmd$&" D "&VAL$(Ilimit)&"A"
440 OUTPUT @Src;Cmd$
450 T0=TIMEDATE
460 FOR I=1 TO Nop
470 K=(Vmax/Vmin)^(1/(Nop-1))
480 Vset=Vmin*K^(I-1)
490 Vset=PROUND(Vset,-5)
500 Cmd$=" D "&VAL$(Vset)&"V" !전압 세팅
510 OUTPUT @Src;Cmd$
520 WAIT .01
530 T1=TIMEDATE-T0
540 GOSUB Reading
550 Volt=Vset
560 Curr=Data
570 PRINT "Count=";I;", T=";PROUND(T1,-4);"s, V=";Volt;"V, I=";Curr;"A"
580 OUTPUT @File;I,T1,Volt,Curr
590 NEXT I
600 OUTPUT @Src;"H" !off
610 RETURN
620 Measure: !
630 Wait=2 !계측기 세팅을 한 후, 첫 측정에서 측정값이 0이 나오는 현상 때문에 잠시 대기 시간
640 OUTPUT @Src;"OM1" !데이터 출력을 ascii로
650 OUTPUT @Src;"SN 0V, 10V, 0.1V"
660 OUTPUT @Src;"SP 10, 5, 900 SV0 T2" !reverse OFF, Single Trig
670 OUTPUT @Src;"D 2MA" !D2A 한계 2A
680 OUTPUT @Src;"E" !ON
690 OUTPUT @Src;"T9" !Sweep trigger: auto
700 WAIT Wait
710 FOR I=1 TO 100
720 GOSUB Reading
730 NEXT I
740 GOSUB Data_process
750 ! OUTPUT @Src;"H" !Operate OFF
760 RETURN
770 Data_process: !
780 PRINT "Count=";Count;", T=";PROUND(Time_elapsed,-4);"m, V=";Volt;"V, I=";Curr;"A"
790 RETURN
800 Reading: !
810 FOR J=1 TO 1
820 ENTER @Src;A$
830 WAIT .01
840 NEXT J
850 Data=VAL(A$[3,13])
860 ! Data=PROUND(Data,-5) !유효수자 3자리
870 RETURN
880 Inst_open: !
890 ASSIGN @Src TO 714 !advantest TR6143
900 RETURN
910 Fileopen: !
920 DIM Dhms$[8]
930 DIM Filename$[20]
940 T=TIMEDATE
950 Time$=TIME$(T) !하루 추가 +24*3600
960 Date$=DATE$(T)
970 Dhms$=Date$[1;2]&Time$[1;2]&Time$[4;2]&Time$[7;2]
980 Filename$=Dhms$&".txt"
990 CREATE Filename$,1
1000 ASSIGN @File TO Filename$;FORMAT ON
1010 RETURN
1020 END