TR6143-bas

Togotech (토론 | 기여)님의 2020년 8월 20일 (목) 16:54 판
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

Advantest TR6143

10     !
20     ! 2020-01-17 배터리 충방전 프로그램
30     ! 2020-01-26 PTC용 표준 VI 측정추가
40     OPTION BASE 1
50     INTEGER No_cycle  !충반전 실험 횟수
60     INTEGER Size,Length,Btn
70     DIM Msg$[25]
80     No_cycle=2   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
90     Wait=.1    !계측기 세팅을 한 후, 첫 측정에서 측정값이 0이 나오는 현상 때문에 잠시 대기 시간
100    GOSUB Dut_select
110    GOSUB Stimulus_select
120    GOSUB Fileopen
130    GOSUB Inst6143_open
140    GOSUB Measure
150    GOSUB Fileclose
160  ! PAUSE
170    STOP
180 Dut_select:  !
190    INTEGER Dut_no
200    Size=4
210    Length=7
220    ALLOCATE Dut$(Size)[Length]
230    Dut$(1)="BATTERY"
240    Dut$(2)="EDLC"
250    Dut$(3)="PTC"
260    Dut$(4)="tau"
270    Msg$="DUT 종류"
280    DIALOG "LIST",Msg$,Btn;SET("ITEMS":Dut$(*),"COLUMNS":Length,"ROWS":Size),RETURN("SELECTION":Dut_no)
290    Dut_no=Dut_no+1
300    SELECT Dut$(Dut_no)
310    CASE "BATTERY"
320      GOSUB Battery_select
330    CASE "EDLC"
340      GOSUB Edlc_select
350    CASE "PTC"
360      GOSUB Ptc_select
370    CASE "tau"
380      GOSUB Tau_select
390    END SELECT 
400    RETURN
410 Battery_select:     !
420    INTEGER Battery_no
430    Size=7
440    Length=8
450    ALLOCATE Battery$(Size)[Length]
460    Battery$(1)="Li"
470    Battery$(2)="NiCd"
480    Battery$(3)="3-NiCd"
490    Battery$(4)="    "
500    Battery$(5)="BAT"
510    Battery$(6)="Li-S4"  !4개 직렬, 각셀을 34970A로 측정
520    Battery$(7)="GrandMax"
530    Msg$="배터리 종류"
540    DIALOG "LIST",Msg$,Btn;SET("ITEMS":Battery$(*),"COLUMNS":Length,"ROWS":Size),RETURN("SELECTION":Battery_no)
550    Battery_no=Battery_no+1
560    RETURN
570 Edlc_select:  !
580    INTEGER Edlc_no
590    Size=4
600    Length=10
610    ALLOCATE Edlc$(Size)[Length]
620    Edlc$(1)="2.7V 0~1F"
630    Edlc$(2)="2.7V 1~10F"
640    Edlc$(3)="5.5V 0~1F"
650    Edlc$(4)="5.5V 1~10F"
660    Msg$="EDLC 종류"
670    DIALOG "LIST",Msg$,Btn;SET("ITEMS":Edlc$(*),"COLUMNS":Length,"ROWS":Size),RETURN("SELECTION":Edlc_no)
680    Edlc_no=Edlc_no+1
690    RETURN
700 Ptc_select:  !
710    INTEGER Ptc_no
720    Size=6
730    Length=6
740    ALLOCATE Ptc$(Size)[Length]
750    Ptc$(1)="SPL1"
760    Ptc$(2)="    "
770    Ptc$(3)="    "
780    Msg$="PTC 종류"
790    DIALOG "LIST",Msg$,Btn;SET("ITEMS":Ptc$(*),"COLUMNS":Length,"ROWS":Size),RETURN("SELECTION":Ptc_no)
800    Ptc_no=Ptc_no+1
810    RETURN
820 Tau_select:  !
830    INTEGER Tau_no
840    Size=6
850    Length=25
860    ALLOCATE Tau$(Size)[Length]
870    Tau$(1)="V12T100"   !12V 100sec
880    Tau$(2)="V12T10"
890    Tau$(3)="    "
900    Msg$="Tau(Time-Constant) 종류"
910    DIALOG "LIST",Msg$,Btn;SET("ITEMS":Tau$(*),"COLUMNS":Length,"ROWS":Size),RETURN("SELECTION":Tau_no)
920    Tau_no=Tau_no+1
930    RETURN
940 Stimulus_select: !
950    SELECT Dut$(Dut_no)
960    CASE "BATTERY"
970      SELECT Battery$(Battery_no)
980      CASE "Li"
990        Vc=4.2!4.2V 충전전압         !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1000       Vd=3.2!3.2V 방전종료전압     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1010       Ic=2  !100mA 충전전류       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1020       Ic_end=.5  !충전 종료 전류   !!내부 저항 !!!!!!!!!!!!!!!!!!!!!!!!
1030       Id=-2  !100mA 방전전류 음수  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1040     CASE "GrandMax"
1050       Vc=4.4!4.2V 충전전압         !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1060       Vd=3.2!3.2V 방전종료전압     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1070       Ic=1  !1A 충전전류       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1080       Ic_end=.2 !200mA 충전 종료 전류   !!내부 저항 !!!!!!!!!!!!!!!!!!!!!!!!
1090       Id=-1  !1A 방전전류 음수  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1100     CASE "NiCd"!표준 1.2V
1110       Vc=1.3!1.5V 충전전압
1120       Vd=.9!0.9V 방전종료전압
1130       Ic=.001!100mA 충전전류
1140       Ic_end=.0005!충전 종료 전류
1150       Id=-.0001!100mA 방전전류 음수
1160     CASE "3-NiCd"!표준 3.6V
1170       Vc=4.7!4.1V 충전전압
1180       Vd=1.5!3.1V 방전종료전압
1190       Ic=.0005!100mA 충전전류
1200       Ic_end=.00035!충전 종료 전류
1210       Id=-5.E-5!100mA 방전전류 음수
1220     CASE "BAT"!표준 3.6V
1230       Vc=3.5!4.1V 충전전압
1240       Vd=2.5!1.V 방전종료전압
1250       Ic=.02!100mA 충전전류
1260       Ic_end=.006!충전 종료 전류
1270       Id=-.005!-10mA 방전전류 음수
1280     CASE "Li-S4"
1290       Vc=16.8!4.2x4 충전전압         4.2x4=16.8     3.7x4=14.8 nominal
1300       Vd=12.8!3.2x4 방전종료전압     3.2x4=12.8
1310       Ic=2  !2A 충전전류
1320       Ic_end=1!충전 종료 전류
1330       Id=-2 !-2A 방전전류 음수
1340     CASE ""
1350       Msg$="충전전류[A], 방전전류[A], 충전종료전류[A], "
1360     END SELECT 
1370   CASE "EDLC"
1380     SELECT Edlc$(Edlc_no)
1390     CASE "2.7V 0~1F"
1400       Vc=2.7        ! 충전전압
1410       Ic=.1         ! 충전전류
1420       Ic_end=Ic*.05 ! 충전 종료 전류는 충전전류의 5%
1430       Id=-.1        ! 100mA 방전전류 음수
1440       Vd=Vc*.05     ! 방전 종료 전압은 충전전압의 5% 이하로 떨어지면
1450     CASE "2.7V 1~10F"
1460       Vc=2.7        ! 충전전압
1470       Ic=.5         ! 충전전류
1480       Ic_end=Ic*.05 ! 충전 종료 전류는 충전전류의 5%
1490       Id=-.5        ! 500mA 방전전류 음수
1500       Vd=Vc*.05     ! 방전 종료 전압은 충전전압의 5% 이하로 떨어지면
1510     CASE "5.5V 0~1F"
1520       Vc=5.5        ! 충전전압
1530       Ic=.1         ! 충전전류
1540       Ic_end=Ic*.05 ! 충전 종료 전류는 충전전류의 5%
1550       Id=-.1        ! 100mA 방전전류 음수
1560       Vd=Vc*.05     ! 방전 종료 전압은 충전전압의 5% 이하로 떨어지면
1570     CASE "5.5V 1~10F"
1580       Vc=5.5        ! 충전전압
1590       Ic=.5         ! 충전전류
1600       Ic_end=Ic*.05 ! 충전 종료 전류는 충전전류의 5%
1610       Id=-.5        ! 500mA 방전전류 음수
1620       Vd=Vc*.05     ! 방전 종료 전압은 충전전압의 5% 이하로 떨어지면
1630     END SELECT 
1640   CASE "PTC"
1650     SELECT Ptc$(Ptc_no)
1660     CASE "SPL1"
1670       Wait=1
1680       Volt_start=0
1690       Volt_stop=12
1700       Volt_step=.05
1710       Limit=2      !2A
1720     END SELECT 
1730   CASE "tau"
1740     SELECT Tau$(Tau_no)
1750     CASE "V12T100"
1760       Volt_set=12  !12V
1770       Time_set=100 !100sec
1780       Limit=2      !2A
1790     CASE "V12T10"
1800       Volt_set=12  !12V
1810       Time_set=10  !100sec
1820       Limit=2      !2A
1830     END SELECT 
1840   END SELECT 
1850 !GOSUB Dialog_string3
1860   RETURN
1870 Fileopen:!
1880   DIM Dhms$[8]
1890   DIM Filename1$[20],Filename2$[20],Filename3$[20]
1900   T=TIMEDATE
1910   Time$=TIME$(T) !하루 추가 +24*3600
1920   Date$=DATE$(T)
1930   Dhms$=Date$[1;2]&Time$[1;2]&Time$[4;2]&Time$[7;2]
1940   Filename1$=Dhms$&".txt"
1950   CREATE Filename1$,1
1960   ASSIGN @File1 TO Filename1$;FORMAT ON
1970   SELECT Dut$(Dut_no)
1980   CASE "BATTERY","EDLC"
1990     T=T+1       !1초 늦게
2000     Time$=TIME$(T)
2010     Date$=DATE$(T)
2020     Dhms$=Date$[1;2]&Time$[1;2]&Time$[4;2]&Time$[7;2]
2030     Filename2$=Dhms$&".txt"
2040     CREATE Filename2$,1
2050     ASSIGN @File2 TO Filename2$;FORMAT ON
2060     SELECT Dut$(Dut_no)
2070     CASE "BATTERY"
2080       IF Battery$(Battery_no)="Li-S4" THEN!직렬배터리 4개에 대한 각 셀별 전압 기록용
2090         T=T+1   !1초 늦게
2100         Time$=TIME$(T)
2110         Date$=DATE$(T)
2120         Dhms$=Date$[1;2]&Time$[1;2]&Time$[4;2]&Time$[7;2]
2130         Filename3$=Dhms$&".txt"
2140         CREATE Filename3$,1
2150         ASSIGN @File3 TO Filename3$;FORMAT ON
2160       END IF 
2170     END SELECT 
2180   END SELECT 
2190   RETURN
2200 Fileclose:!
2210   ASSIGN @File1 TO *
2220   SELECT Dut$(Dut_no)
2230   CASE "BATTERY"
2240     ASSIGN @File2 TO *
2250     IF Battery$(Battery_no)="Li-S4" THEN
2260       ASSIGN @File3 TO *
2270     END IF 
2280   CASE "EDLC"
2290     ASSIGN @File2 TO *
2300   END SELECT 
2310   RETURN
2320 Measure: !
2330   INTEGER I
2340   DIM Cmd$[25],A1$[14],A2$[14],Test$[1]
2350   SELECT Dut$(Dut_no)
2360   CASE "tau","EDLC"
2370     OUTPUT @File1;"No.,Time[s],Volt[V],Curr[A]"
2380   CASE ELSE 
2390     OUTPUT @File1;"No.,Time[m],Volt[V],Curr[A]"
2400   END SELECT 
2410   GOSUB Chart_var
2420   GOSUB Init_chart
2430   Count=0
2440   Time_zero=TIMEDATE
2450   SELECT Dut$(Dut_no)
2460   CASE "BATTERY"
2470     GOSUB Measure_battery
2480   CASE "EDLC"
2490     GOSUB Measure_edlc
2500   CASE "PTC"
2510     GOSUB Measure_vi
2520   CASE "tau"
2530     GOSUB Measure_tau
2540   END SELECT 
2550   RETURN
2560 Measure_battery: !
2570   OUTPUT @File2;"Cycle,Charge Time[m],Charge i Capa[mAh],Charge W Capa[Wh], Discharge Time[m],Discharge i Capa[mAh], Discharge W Capa[Wh]"
2580   FOR I=1 TO No_cycle   !배터리 충방전실험을 5회 실시
2590     C_i_capa=0
2600     C_w_capa=0
2610     D_i_capa=0
2620     D_w_capa=0
2630     GOSUB Cycle
2640     OUTPUT @File2;I,C_time,C_i_capa,C_w_capa,D_time,-D_i_capa,-D_w_capa
2650   NEXT I
2660   RETURN
2670 Measure_edlc: !
2680   OUTPUT @File2;"Cycle,Charge Time[s],Charge i Capa[mAh],Charge W Capa[mWh], Discharge Time[s],Discharge i Capa[mAh], Discharge W Capa[mWh], Capacity[F]"
2690   FOR I=1 TO No_cycle
2700     C_i_capa=0
2710     C_w_capa=0
2720     D_i_capa=0
2730     D_w_capa=0
2740     Capacity=0
2750     GOSUB Cycle
2760     OUTPUT @File2;I,C_time*60,C_i_capa,C_w_capa*1000,D_time*60,-D_i_capa,-D_w_capa*1000,Capacity
2770   NEXT I
2780   RETURN
2790 Measure_vi:  !
2800   FOR Volt=Volt_start TO Volt_stop STEP Volt_step
2810     Cmd$="V5" !32V
2820     Cmd$=Cmd$&" D "&VAL$(Volt)&"V"   !D 2.0V
2830     Cmd$=Cmd$&" D "&VAL$(Limit)&"A"   !D 2.0A
2840     OUTPUT @Src;Cmd$   !"V5 D 1V D 2A"
2850     OUTPUT @Src;"E"    !Operate ON
2860     T=TIMEDATE
2870     Time_elapsed=(T-Time_zero)/60
2880     GOSUB Reading
2890     Curr=Data
2900     GOSUB Data_process
2910     WAIT Wait
2920   NEXT Volt
2930   OUTPUT @Src;"H"      !Operate OFF
2940   RETURN
2950 Measure_tau:  !
2960   Volt=Volt_set
2970   Cmd$="V5"   !32V
2980   Cmd$=Cmd$&" D "&VAL$(Volt)&"V"     !D 12V
2990   Cmd$=Cmd$&" D "&VAL$(Limit)&"A"     !D 2.0A
3000   OUTPUT @Src;Cmd$     !"V5 D 1V D 2A"
3010   OUTPUT @Src;"E"      !Operate ON
3020   Time_zero=TIMEDATE
3030   LOOP
3040     T=TIMEDATE
3050     Time_elapsed=(T-Time_zero)   !second
3060     GOSUB Reading
3070     Curr=Data
3080     GOSUB Data_process
3090   EXIT IF Time_elapsed>Time_set
3100   END LOOP 
3110   OUTPUT @Src;"H"      !Operate OFF
3120   RETURN
3130 Cycle: !
3140   Pre_v=0 !최초 측정 전압=0으로 가정한다.
3150   GOSUB Charge1
3160   GOSUB Charge2
3170   GOSUB Discharge
3180   RETURN
3190 Charge1: !
3200 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3210 !충전. +부호 정전류, 전압제한(전압을 읽는다.)
3220 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3230   Test$="C"
3240   Cmd$="I4"   !2A range
3250   Cmd$=Cmd$&" D "&VAL$(Ic)&"A"     !D 2.0A
3260   Cmd$=Cmd$&" D "&VAL$(Vc)&"V"     !D 4.2V
3270   OUTPUT @Src;Cmd$   !"I4 D 2A D 4.2V"
3280   WAIT Wait
3290   OUTPUT @Src;"E"      !Operate ON
3300   WAIT Wait
3310   C_start_time=TIMEDATE
3320   Pre_t=C_start_time
3330   Curr=Ic
3340   LOOP
3350     T=TIMEDATE
3360     Time_elapsed=(T-Time_zero)/60
3370     GOSUB Reading
3380     Volt=Data
3390  !  IF Volt>Pre_v THEN   !충전 전압이 상승하면
3400     IF ABS(Volt-Pre_v)>=.01 THEN     !전압차가 0.01V 이상이면
3410       GOSUB Data_process
3420       C_i_capa=C_i_capa+(Curr*1000)*((T-Pre_t)/3600)   !mAh = mA x hour
3430       C_w_capa=C_w_capa+Curr*Volt*((T-Pre_t)/3600)     !Wh = A x V x hour
3440       Pre_t=T
3450     END IF 
3460   EXIT IF Volt>=(Vc-.001)    !측정 전압이 충전최고 전압에 도달하면
3470   END LOOP 
3480   OUTPUT @Src;"H"      !Operate OFF
3490   WAIT Wait
3500   RETURN
3510 Charge2:!
3520 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3530 !충전, 충전 최고전압에 도달하면. 정전압, 전류제한(전류를 읽는다.)
3540 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3550   Cmd$="V5"   !32V range
3560   Cmd$=Cmd$&" D "&VAL$(Vc)&"V"     !D 4.2V
3570   Cmd$=Cmd$&" D "&VAL$(Ic)&"A"     !D 2.0A
3580   OUTPUT @Src;Cmd$   !"V5 D 4.2V D 2.0A"
3590   WAIT Wait
3600   OUTPUT @Src;"E"      !Operate ON
3610   WAIT Wait
3620   Pre_v=Ic  !충전 전류(Ic)를 초기값으로 기억한다.
3630   Volt=Vc   !충전전압은 일정하다.
3640   LOOP
3650     T=TIMEDATE
3660     Time_elapsed=(T-Time_zero)/60
3670     GOSUB Reading   !충전전압에 도달되었기 때문에, 서서히 줄어드는 충전 전류를 측정한다.
3680     Curr=Data
3690  !  IF Curr<Pre_v THEN   !측정 전류가 서서히 낮아지면
3700     IF ABS(Curr-Pre_v)>=.01 THEN     !전류차이가 .01A 이상이면
3710       GOSUB Data_process
3720       C_i_capa=C_i_capa+(Curr*1000)*((T-Pre_t)/3600)   !mAh = mA x hour
3730       C_w_capa=C_w_capa+Curr*Volt*((T-Pre_t)/3600)     !WA = A x V x hour
3740       Pre_t=T
3750     END IF 
3760   EXIT IF Curr<=Ic_end+.001   !현재 전류가 종료전류에 도달하면
3770   END LOOP 
3780   C_time=(T-C_start_time)/60
3790   OUTPUT @Src;"H"      !Operate OFF
3800   WAIT Wait
3810   RETURN
3820 Discharge: !
3830 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3840 !방전 전류는 -로 표기한다.
3850 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3860   Test$="D"
3870   Cmd$="I4"   !2A range
3880   Cmd$=Cmd$&" D "&VAL$(Id)&"A"      !D -2.0A
3890   Cmd$=Cmd$&" D "&VAL$(Vc)&"V"     !D 4.2V
3900   OUTPUT @Src;Cmd$   !"I4 D -2A D 4.2V"
3910   WAIT Wait
3920   OUTPUT @Src;"E"      !Operate ON
3930   WAIT Wait
3940   Pre_v=Vc
3950   D_start_time=TIMEDATE
3960   Pre_t=D_start_time
3970   Curr=Id    !방전전류(-값을 갖는다.)는 일정하다.
3980   Set80=0
3990   Set40=0
4000   LOOP
4010     T=TIMEDATE
4020     Time_elapsed=(T-Time_zero)/60
4030     GOSUB Reading   !일정 전류 방전      , 전압이 측정된다.
4040     Volt=Data
4050   ! IF Volt<Pre_v THEN   !측정전압이 서서히 낮아지면(방전이므로)
4060     IF Set80=0 AND Volt<Vc*.8 THEN        !방전전압이 충전전압의 80%가 되면 한번만 수행
4070       V80=Volt
4080       T80=Time_elapsed*60
4090       Set80=1
4100     END IF 
4110     IF Set40=0 AND Volt<Vc*.4 THEN        !방전전압이 충전전압의 40%가 되면 한번만 수행
4120       V40=Volt
4130       T40=Time_elapsed*60
4140       Set40=1
4150     END IF 
4160     IF ABS(Volt-Pre_v)>=.01 THEN     !전압차가 0.01V 이상이면
4170       GOSUB Data_process
4180       D_i_capa=D_i_capa+(Curr*1000)*((T-Pre_t)/3600)   !mAh = mA x hour
4190       D_w_capa=D_w_capa+Curr*Volt*((T-Pre_t)/3600)     !Wh = A x V x hour
4200       Pre_t=T
4210     END IF 
4220   EXIT IF Volt<=Vd+.001    !현재 전압이 방전 최저전압에 도달하면
4230   END LOOP 
4240   D_time=(T-D_start_time)/60
4250   Capacity=Id*(T80-T40)/(V80-V40)  !기울기가 -이므로
4260   OUTPUT @Src;"H"      !Operate OFF
4270   WAIT Wait
4280   RETURN
4290 Data_process: !
4300   Count=Count+1
4310   SELECT Dut$(Dut_no)
4320   CASE "BATTERY","EDLC"
4330     X1=Time_elapsed
4340     Y1=(Volt*2/Vc)*100-100  !전압 [%]
4350     Y2=(Curr/Ic)*100  !전류 [%]
4360   CASE "PTC"
4370     X1=Volt
4380     Y1=Curr
4390     Y2=0
4400   CASE "tau"
4410     X1=Time_elapsed
4420     Y1=Curr
4430     Y2=0
4440   END SELECT 
4450   Y(1)=Y1
4460   Y(2)=Y2
4470   CONTROL @Strip;SET("POINT LOCATION":X1,"VALUES":Y(*))
4480   PRINT "Count=";Count;", T=";PROUND(Time_elapsed,-5);"m, V=";Volt;"V, I=";Curr;"A"
4490   OUTPUT @File1;Count,Time_elapsed,Volt,Curr
4500   Pre_v=Data
4510   SELECT Dut$(Dut_no)
4520   CASE "BATTERY"
4530     IF Battery$(Battery_no)="Li-S4" THEN
4540       GOSUB Reading34970
4550       OUTPUT @File3;Count,V(*)
4560     END IF 
4570   END SELECT 
4580   RETURN
4590 Reading: !
4600   LOOP
4610     GOSUB Reading1
4620   EXIT IF Data<>0
4630   END LOOP 
4640   RETURN
4650 Reading1: !
4660 ! 전압을 측정하면 나타나는 데이터 포맷
4670 ! 12345678901234
4680 !"DV +03.857E+0"   원래
4690 !" DV +03.857E+0"  앞에 공백이 하나 추가되어 나온 적이 있다.
4700 ! 전압를 측정하면 나타나는 데이터 포맷
4710 ! 12345678901234
4720 !"DI +0.6310E+0"   원래
4730   ENTER @Src;A1$
4740   A2$=TRIM$(A1$)   !앞뒤 공백 모두 없앤다
4750   Data=VAL(A2$[3,13])
4760   SELECT Dut$(Dut_no)
4770   CASE "BATTERY"
4780 ! Data=PROUND(Data,-3)  !소수점 3자리. 0.1mA까지 측정되면 너무 많은 데이터가 획득되므로
4790     Data=DROUND(Data,3)!유효수자 3자리
4800   CASE "tau"
4810     WAIT .05  !이보다   빨리 측정못한다.
4820   END SELECT 
4830   RETURN
4840 Reading34970: !
4850   OUTPUT @Sw;"MEAS:VOLT:DC? (@201:204)"
4860   ENTER @Sw;V(*)
4870   RETURN
4880 Inst6143_open: !
4890   ASSIGN @Src TO 714    !advantest TR6143
4900   OUTPUT @Src;"C"       !initialize
4910   OUTPUT @Src;"OM1"     !ascii, OM0=set value, OM1=meas value
4920   SELECT Dut$(Dut_no)
4930   CASE "BATTERY"
4940     IF Battery$(Battery_no)="Li-S4" THEN
4950       GOSUB Inst34970_open
4960     END IF 
4970   END SELECT 
4980   RETURN
4990 Inst34970_open: !
5000   DIM V(4)      !4채널 전압
5010   ASSIGN @Sw TO 709     !Agilent 34970A
5020  ! OUTPUT @Sw;"CONF:VOLT:DC AUTO (@201:204)"
5030   OUTPUT @Sw;"SENS:VOLT:DC:RANG:AUTO ON,(@201:204)"
5040   OUTPUT @Sw;"SENS:VOLT:DC:NPLC 2,(@201:204)"
5050   RETURN
5060 Chart_var:   !
5070   SELECT Dut$(Dut_no)
5080   CASE "BATTERY"
5090     X_origin=0!time=0
5100     X_range=1*60        !1  hours *60min  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5110     X_axis_label$="Elapsed Time [Min]"
5120     Y_origin=-110
5130     Y_range=220
5140     Y_axis_label$="Volt & Current [%]"
5150   CASE "EDLC"
5160     X_origin=0!time=0
5170     X_range=10          !10min  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5180     X_axis_label$="Elapsed Time [Min]"
5190     Y_origin=-110
5200     Y_range=220
5210     Y_axis_label$="Volt & Current [%]"
5220   CASE "PTC"
5230     X_origin=Volt_start
5240     X_range=Volt_stop-Volt_start      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5250     X_axis_label$="Applied Volt [V]"
5260     Y_origin=0
5270     Y_range=Limit
5280     Y_axis_label$="Current [A]"
5290   CASE "tau"
5300     X_origin=0
5310     X_range=Time_set                  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5320     X_axis_label$="Elapsed Time [m]"
5330     Y_origin=0
5340     Y_range=Limit
5350     Y_axis_label$="Current [A]"
5360   END SELECT 
5370   RETURN
5380 Init_chart:   !
5390   DIM X_axis_label$[25],Y_axis_label$[25]
5400   INTEGER Trace_num
5410   INTEGER Screen_dims(1:2),Gwindow_dims(1:4)
5420   REAL Y(1:2)   !Y(1) Volt, Y(2) Current
5430   GESCAPE CRT,36;Screen_dims(*) ! Get screen width and height.
5440  !
5450  ! Set the dimensions of the graphics window using GESCAPE 33 so
5460  ! that it is centered on the screen.
5470  !
5480   Gwindow_dims(1)=Screen_dims(1)*.25 ! X of upper left.
5490   Gwindow_dims(2)=Screen_dims(2)*.2  ! Y of upper left.
5500   Gwindow_dims(3)=Screen_dims(1)*.7  ! Width.
5510   Gwindow_dims(4)=Screen_dims(2)*.6  ! Height.
5520   GESCAPE CRT,33;Gwindow_dims(*)     ! Set graphics window geometry.
5530  !
5540   GESCAPE CRT,35 ! Move the graphics window to the top.
5550  !
5560  ! Create a stripchart.  Make it invisible until all changes are made.
5570  !
5580   ASSIGN @Strip TO WIDGET "STRIPCHART";SET("VISIBLE":0)
5590  !
5600  ! Set the overall attributes.
5610  !
5620   CONTROL @Strip;SET("TITLE":"Data Logger")
5630   CONTROL @Strip;SET("MINIMUM SCROLL":2)
5640   CONTROL @Strip;SET("MOVABLE":0)
5650   CONTROL @Strip;SET("MAXIMIZABLE":0)
5660   CONTROL @Strip;SET("X":0,"Y":0)
5670  !
5680  ! Size the stripchart to exactly fill the graphics window.
5690  !
5700   Vert_borders=26
5710   Horiz_borders=8
5720   Height=Gwindow_dims(4)-Vert_borders
5730   Width=Gwindow_dims(3)-Horiz_borders
5740   CONTROL @Strip;SET("WIDTH":Width,"HEIGHT":Height)
5750  !
5760   CONTROL @Strip;SET("CURRENT AXIS":"X")
5770   CONTROL @Strip;SET("ORIGIN":X_origin,"RANGE":X_range)
5780   CONTROL @Strip;SET("AXIS LABEL":X_axis_label$)
5790  !CONTROL @Strip;SET("DIGITS":5)
5800  !
5810   CONTROL @Strip;SET("CURRENT AXIS":"Y")
5820   CONTROL @Strip;SET("ORIGIN":Y_origin,"RANGE":Y_range)
5830   CONTROL @Strip;SET("AXIS LABEL":Y_axis_label$)
5840  !
5850   CONTROL @Strip;SET("VISIBLE":1) ! Show the stripchart.
5860  !
5870   RETURN
5880   END