TR6143-all.txt
Togotech (토론 | 기여)님의 2023년 3월 16일 (목) 17:25 판 (새 문서: Advantest TR6143 <pre> 10 ! Advantest TR6143 <pre> 20 ! 2020-01-17 배터리 충방전 프로그램 30 ! 2020-01-26 PTC용 표준 VI 측정추가 40 OPTION BAS...)
10 ! [[Advantest TR6143]] <pre> 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=100 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 90 Wait=.1 !계측기 세팅을 한 후, 첫 측정에서 측정값이 0이 나오는 현상 때문에 잠시 대기 시간 100 GOSUB Dut_select 110 GOSUB Stimulus_select 120 GOSUB Inst_select 130 GOSUB Fileopen 140 GOSUB Measure 150 GOSUB Fileclose 160 GOSUB Inst_close 170 ! PAUSE 180 STOP 190 Inst_select: ! 계측기 선택 200 INTEGER Inst_no 210 Size=5 220 Length=7 230 ALLOCATE Inst$(Size)[Length] 240 Inst$(1)="TR6143" 250 Inst$(2)="66332A" 260 Msg$="계측기 종류" 270 DIALOG "LIST",Msg$,Btn;SET("ITEMS":Inst$(*),"COLUMNS":Length,"ROWS":Size),RETURN("SELECTION":Inst_no) 280 Inst_no=Inst_no+1 290 SELECT Inst$(Inst_no) 300 CASE "TR6143" 310 GOSUB Inst6143_open 320 CASE "66332A" 330 GOSUB Inst66332_open 340 END SELECT 350 RETURN 360 Cycle: ! 370 Pre_v=0!최초 측정 전압=0으로 가정한다. 380 SELECT Inst$(Inst_no) 390 CASE "TR6143" 400 GOSUB Charge1 410 GOSUB Charge2 420 GOSUB Discharge 430 ! GOSUB Charge1 440 ! GOSUB Charge2 450 CASE "66332A" 460 SELECT Dut$(Dut_no) 470 CASE "Phone" ! only charge 480 GOSUB Charge1 490 GOSUB Charge2 500 CASE ELSE 510 GOSUB Charge1 520 GOSUB Charge2 530 GOSUB Discharge 540 END SELECT 550 END SELECT 560 RETURN 570 Dut_select: ! 580 INTEGER Dut_no 590 Size=6 600 Length=7 610 ALLOCATE Dut$(Size)[Length] 620 Dut$(1)="PRI-BAT" !1차 전지 630 Dut$(2)="BATTERY" !2차 전지 640 Dut$(3)="EDLC" 650 Dut$(4)="PTC" 660 Dut$(5)="tau" 670 Dut$(6)="Phone" 680 Msg$="DUT 종류" 690 DIALOG "LIST",Msg$,Btn;SET("ITEMS":Dut$(*),"COLUMNS":Length,"ROWS":Size),RETURN("SELECTION":Dut_no) 700 Dut_no=Dut_no+1 710 SELECT Dut$(Dut_no) 720 CASE "PRI-BAT" 730 GOSUB Pri_bat_select 740 CASE "BATTERY" 750 GOSUB Battery_select 760 CASE "EDLC" 770 GOSUB Edlc_select 780 CASE "PTC" 790 GOSUB Ptc_select 800 CASE "tau" 810 GOSUB Tau_select 820 CASE "Phone" 830 GOSUB Phone_select 840 END SELECT 850 RETURN 860 Pri_bat_select: ! 870 INTEGER Pri_bat_no 880 Size=3 890 Length=4 900 ALLOCATE Pri_bat$(Size)[Length] 910 Pri_bat$(1)="BR" !3V 920 Pri_bat$(2)="CR" !3V 930 Pri_bat$(3)="1.5V" 940 Msg$="1차 전지 종류" 950 DIALOG "LIST",Msg$,Btn;SET("ITEMS":Pri_bat$(*),"COLUMNS":Length,"ROWS":Size),RETURN("SELECTION":Pri_bat_no) 960 Pri_bat_no=Pri_bat_no+1 970 RETURN 980 Battery_select: ! 990 INTEGER Battery_no 1000 Size=14 1010 Length=12 1020 ALLOCATE Battery$(Size)[Length] 1030 Battery$(1)="Li" 1040 Battery$(2)="Li 1.5V" 1050 Battery$(3)="NiMH 8000mAh" 1060 Battery$(4)="NiCd" 1070 Battery$(5)="3-NiCd" 1080 Battery$(6)="4-NiCd" 1090 Battery$(7)="6-NiCd" !7.2V 1100 Battery$(8)="BAT" 1110 Battery$(9)="Li-S4" !4개 직렬, 각셀을 34970A로 측정 1120 Battery$(10)="GrandMax" 1130 Battery$(11)="Li-S7" !7개 직렬 1140 Battery$(12)="Li-S2" !2개 직렬 1150 Battery$(13)="Pb12V" ! 1160 Battery$(14)="LFP12V" ! 1170 Msg$="배터리 종류" 1180 DIALOG "LIST",Msg$,Btn;SET("ITEMS":Battery$(*),"COLUMNS":Length,"ROWS":Size),RETURN("SELECTION":Battery_no) 1190 Battery_no=Battery_no+1 1200 RETURN 1210 Edlc_select: ! 1220 INTEGER Edlc_no 1230 Size=5 1240 Length=10 1250 ALLOCATE Edlc$(Size)[Length] 1260 Edlc$(1)="2.7V 0~1F" 1270 Edlc$(2)="2.7V 1~10F" 1280 Edlc$(3)="2.7V 10~F" 1290 Edlc$(4)="5.5V 0~1F" 1300 Edlc$(5)="5.5V 1~10F" 1310 Msg$="EDLC 종류" 1320 DIALOG "LIST",Msg$,Btn;SET("ITEMS":Edlc$(*),"COLUMNS":Length,"ROWS":Size),RETURN("SELECTION":Edlc_no) 1330 Edlc_no=Edlc_no+1 1340 RETURN 1350 Ptc_select: ! 1360 INTEGER Ptc_no 1370 Size=6 1380 Length=6 1390 ALLOCATE Ptc$(Size)[Length] 1400 Ptc$(1)="SPL1" 1410 Ptc$(2)=" " 1420 Ptc$(3)=" " 1430 Msg$="PTC 종류" 1440 DIALOG "LIST",Msg$,Btn;SET("ITEMS":Ptc$(*),"COLUMNS":Length,"ROWS":Size),RETURN("SELECTION":Ptc_no) 1450 Ptc_no=Ptc_no+1 1460 RETURN 1470 Tau_select: ! 1480 INTEGER Tau_no 1490 Size=6 1500 Length=25 1510 ALLOCATE Tau$(Size)[Length] 1520 Tau$(1)="V12T100" !12V 100sec 1530 Tau$(2)="V12T10" 1540 Tau$(3)=" " 1550 Msg$="Tau(Time-Constant) 종류" 1560 DIALOG "LIST",Msg$,Btn;SET("ITEMS":Tau$(*),"COLUMNS":Length,"ROWS":Size),RETURN("SELECTION":Tau_no) 1570 Tau_no=Tau_no+1 1580 RETURN 1590 Phone_select: ! 1600 INTEGER Phone_no 1610 Size=2 1620 Length=25 1630 ALLOCATE Phone$(Size)[Length] 1640 Phone$(1)="5V 1A" 1650 Phone$(2)="4.2V 1A" 1660 Msg$="Phone 공급 전압전류" 1670 DIALOG "LIST",Msg$,Btn;SET("ITEMS":Phone$(*),"COLUMNS":Length,"ROWS":Size),RETURN("SELECTION":Phone_no) 1680 Phone_no=Phone_no+1 1690 RETURN 1700 Stimulus_select:! 1710 SELECT Dut$(Dut_no) 1720 CASE "PRI-BAT" !방전만 한다. 1730 SELECT Pri_bat$(Pri_bat_no) 1740 CASE "BR" 1750 Vd=.2 !방전종료전압 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1760 Vc=3. !기본 1770 Id=-.01 !10mA 방전전류 음수 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1780 CASE "CR" 1790 Vd=.2 !방전종료전압 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1800 Vc=3. !기본 1810 Id=-.01 !10mA 방전전류 음수 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1820 CASE "1.5V" 1830 Vd=.2 !방전종료전압 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1840 Vc=1.5 !기본 1850 Id=-.01 !10mA 방전전류 음수 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1860 END SELECT 1870 CASE "BATTERY" 1880 SELECT Battery$(Battery_no) 1890 CASE "Li" 1900 Vc=4.2 !4.2V 충전전압 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1910 Vd=3.2 !3.2V 방전종료전압 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1920 Ic=2 !100mA 충전전류 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1930 Ic_end=.5 !충전 종료 전류 !!내부 저항 !!!!!!!!!!!!!!!!!!!!!!!! 1940 Id=2 !100mA 방전전류 음수 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1950 CASE "Li 1.5V" 1960 Vc=4.2 !4.2V 충전전압 !! 1970 Vd=1. !3.2V 방전종료전압 !! 1980 Ic=.1 !200mA 충전전류 !! 1990 Ic_end=.02 !충전 종료 전류 !!내부 저항 !! 2000 Id=-.1 !200mA 방전전류 음수 !! 2010 CASE "GrandMax" 2020 Vc=4.4!4.2V 충전전압 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2030 Vd=3.2!3.2V 방전종료전압 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2040 Ic=5 !1A 충전전류 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2050 Ic_end=.5 !200mA 충전 종료 전류 !!내부 저항 !!!!!!!!!!!!!!!!!!!!!!!! 2060 Id=-5 !1A 방전전류 음수 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2070 CASE "NiMH 8000mAh" 2080 Vc=1.5 !1.5V 충전전압 +0.3V 2090 Vd=.9 !0.9V 방전종료전압 -0.3V 2100 Ic=1.9 !100mA 충전전류 2110 Ic_end=.4 !충전 종료 전류 2120 Id=-1.9 !100mA 방전전류 음수 2130 CASE "NiCd"!표준 1.2V 2140 Vc=1.5 !1.5V 충전전압 +0.3V 2150 Vd=.9 !0.9V 방전종료전압 -0.3V 2160 Ic=2 !100mA 충전전류 2170 Ic_end=.1 !충전 종료 전류 2180 Id=-1 !100mA 방전전류 음수 2190 CASE "3-NiCd" !표준 3.6V 2200 Vc=4.5!4.1V 충전전압 3x1.5=4.5V 2210 Vd=2.7!3.1V 방전종료전압 3x0.9=2.7V 2220 Ic=.05 !100mA 충전전류 2230 Ic_end=.025 !충전 종료 전류 2240 Id=-.05 !100mA 방전전류 음수 2250 CASE "4-NiCd" !표준 3.6V 2260 Vc=4*1.25 ! 충전전압 4x1.5=6.0V 2270 Vd=4*1.15 ! 방전종료전압 4x0.9=3.6V 2280 Ic=.05 !100mA 충전전류 2290 Ic_end=.01 !충전 종료 전류 2300 Id=-.05 !100mA 방전전류 음수 2310 CASE "6-NiCd" !표준 7.2V 2320 Vc=9. ! 충전전압 6x1.5V=9.0V 2330 Vd=5.4! 방전종료전압 6x0.9V=5.4V 2340 Ic=.2 ! 200mA 충전전류 2350 Ic_end=.1 !충전 종료 전류 2360 Id=-.2 !200mA 방전전류 음수 2370 CASE "BAT"!표준 3.6V 2380 Vc=3.5!4.1V 충전전압 2390 Vd=2.5!1.V 방전종료전압 2400 Ic=.02!100mA 충전전류 2410 Ic_end=.006!충전 종료 전류 2420 Id=-.005!-10mA 방전전류 음수 2430 CASE "Li-S4" 2440 Vc=16.8!4.2x4 충전전압 4.2x4=16.8 3.7x4=14.8 nominal 2450 Vd=12.8!3.2x4 방전종료전압 3.2x4=12.8 2460 Ic=2 !2A 충전전류 2470 Ic_end=1!충전 종료 전류 2480 Id=-2 !-2A 방전전류 음수 2490 CASE "Li-S7" !18650 2500 Vc=4.2*7 !29.4 !4.2x7V 충전전압 2510 Vd=2.5*7 ! 22.4 !3.2x7V 방전종료전압 2520 Ic=1 !1A 충전전류 2530 Ic_end=.05 !충전 종료 전류 !!내부 저항 !! 2540 Id=-2 !1A 방전전류 음수 2550 CASE "Li-S2" !18650 2560 Vc=4.2*2 !29.4 !4.2x7V 충전전압 2570 Vd=2.5*2 ! 22.4 !3.2x7V 방전종료전압 2580 Ic=1 !1A 충전전류 2590 Ic_end=.1 !충전 종료 전류 !!내부 저항 !! 2600 Id=-1 !1A 방전전류 음수 2610 CASE "Pb12V" ! 2620 Vc=14.4 !14.4 충전전압 13.6V 안전 2630 Vd=10.5 ! 11.7 10.5 방전종료전압 2640 Ic=1 !1A 충전전류 2650 Ic_end=.1 !충전 종료 전류 !!내부 저항 !! 2660 Id=-1 !1A 방전전류 음수 2670 CASE "LFP12V" ! 2680 Vc=3.65*4 !14.6 2690 Vd=2.5*4 !10.0 방전종료전압 2700 Ic=5 !1A 충전전류 2710 Ic_end=.1 !충전 종료 전류 !!내부 저항 !! 2720 Id=-1 !1A 방전전류 음수 2730 CASE "" 2740 Msg$="충전전류[A], 방전전류[A], 충전종료전류[A], " 2750 END SELECT 2760 CASE "EDLC" 2770 SELECT Edlc$(Edlc_no) 2780 CASE "2.7V 0~1F" 2790 Vc=2.7 ! 충전전압 2800 Ic=.1 ! 충전전류 2810 Ic_end=Ic*.05 ! 충전 종료 전류는 충전전류의 5% 2820 Id=-.1 ! 100mA 방전전류 음수 2830 Vd=Vc*.05 ! 방전 종료 전압은 충전전압의 5% 이하로 떨어지면 2840 CASE "2.7V 1~10F" 2850 Vc=2.7 ! 충전전압 2860 Ic=.5 ! 충전전류 2870 Ic_end=Ic*.05 ! 충전 종료 전류는 충전전류의 5% 2880 Id=-.5 ! 500mA 방전전류 음수 2890 Vd=Vc*.05 ! 방전 종료 전압은 충전전압의 5% 이하로 떨어지면 2900 CASE "2.7V 10~F" 2910 Vc=2.7 ! 충전전압 2920 Ic=2. ! 충전전류 2A 최대 2930 Ic_end=Ic*.5 ! 충전 종료 전류는 충전전류의 50% 2940 Id=-2 ! 500mA 방전전류 음수 2950 Vd=Vc*.05 ! 방전 종료 전압은 충전전압의 5% 이하로 떨어지면 2960 CASE "5.5V 0~1F" 2970 Vc=5.5 ! 충전전압 2980 Ic=.1 ! 충전전류 2990 Ic_end=Ic*.05 ! 충전 종료 전류는 충전전류의 5% 3000 Id=-.1 ! 100mA 방전전류 음수 3010 Vd=Vc*.05 ! 방전 종료 전압은 충전전압의 5% 이하로 떨어지면 3020 CASE "5.5V 1~10F" 3030 Vc=5.5 ! 충전전압 3040 Ic=.5 ! 충전전류 3050 Ic_end=Ic*.05 ! 충전 종료 전류는 충전전류의 5% 3060 Id=-.5 ! 500mA 방전전류 음수 3070 Vd=Vc*.05 ! 방전 종료 전압은 충전전압의 5% 이하로 떨어지면 3080 END SELECT 3090 CASE "PTC" 3100 SELECT Ptc$(Ptc_no) 3110 CASE "SPL1" 3120 Wait=1 3130 Volt_start=0 3140 Volt_stop=12 3150 Volt_step=.05 3160 Limit=2 !2A 3170 END SELECT 3180 CASE "tau" 3190 SELECT Tau$(Tau_no) 3200 CASE "V12T100" 3210 Volt_set=12 !12V 3220 Time_set=100 !100sec 3230 Limit=2 !2A 3240 CASE "V12T10" 3250 Volt_set=12 !12V 3260 Time_set=10 !100sec 3270 Limit=2 !2A 3280 END SELECT 3290 CASE "Phone" 3300 SELECT Phone$(Phone_no) 3310 CASE "5V 1A" 3320 Vc=5 ! 3330 Ic=.1 !1A 3340 Ic_end=.01 !충전 종료 전류 3350 Id=0 !그래프 그리기 위해 3360 Vd=3 !그래프 그리기 위해 3370 CASE "4.2V 1A" 3380 Vc=4.2 !4.2V 충전전압 3390 Ic=1 3400 Ic_end=.01 3410 Id=0 !그래프 그리기 위해 3420 Vd=3 !그래프 그리기 위해 3430 END SELECT 3440 END SELECT 3450 !GOSUB Dialog_string3 3460 RETURN 3470 Fileopen:! 3480 DIM Dhms$[8] 3490 DIM Filename1$[20],Filename2$[20],Filename3$[20] 3500 T=TIMEDATE 3510 Time$=TIME$(T) !하루 추가 +24*3600 3520 Date$=DATE$(T) 3530 Dhms$=Date$[1;2]&Time$[1;2]&Time$[4;2]&Time$[7;2] 3540 Filename1$=Dhms$&".txt" 3550 CREATE Filename1$,1 3560 ASSIGN @File1 TO Filename1$;FORMAT ON 3570 SELECT Dut$(Dut_no) 3580 CASE "BATTERY","EDLC" 3590 T=T+1 !1초 늦게 3600 Time$=TIME$(T) 3610 Date$=DATE$(T) 3620 Dhms$=Date$[1;2]&Time$[1;2]&Time$[4;2]&Time$[7;2] 3630 Filename2$=Dhms$&".txt" 3640 CREATE Filename2$,1 3650 ASSIGN @File2 TO Filename2$;FORMAT ON 3660 SELECT Dut$(Dut_no) 3670 CASE "BATTERY" 3680 IF Battery$(Battery_no)="Li-S4" THEN!직렬배터리 4개에 대한 각 셀별 전압 기록용 3690 T=T+1 !1초 늦게 3700 Time$=TIME$(T) 3710 Date$=DATE$(T) 3720 Dhms$=Date$[1;2]&Time$[1;2]&Time$[4;2]&Time$[7;2] 3730 Filename3$=Dhms$&".txt" 3740 CREATE Filename3$,1 3750 ASSIGN @File3 TO Filename3$;FORMAT ON 3760 END IF 3770 END SELECT 3780 END SELECT 3790 RETURN 3800 Fileclose:! 3810 ASSIGN @File1 TO * 3820 SELECT Dut$(Dut_no) 3830 CASE "BATTERY" 3840 ASSIGN @File2 TO * 3850 IF Battery$(Battery_no)="Li-S4" THEN 3860 ASSIGN @File3 TO * 3870 END IF 3880 CASE "EDLC" 3890 ASSIGN @File2 TO * 3900 END SELECT 3910 RETURN 3920 Measure: ! 3930 INTEGER I 3940 DIM Cmd$[25],A1$[14],A2$[14],Test$[1] 3950 SELECT Dut$(Dut_no) 3960 CASE "tau","EDLC" 3970 OUTPUT @File1;"No.,Time[s],Volt[V],Curr[A]" 3980 CASE ELSE 3990 OUTPUT @File1;"No.,Time[m],Volt[V],Curr[A]" 4000 END SELECT 4010 GOSUB Chart_var 4020 GOSUB Init_chart 4030 Count=0 4040 Time_zero=TIMEDATE 4050 SELECT Dut$(Dut_no) 4060 CASE "PRI-BAT" 4070 GOSUB Measure_pri_bat 4080 CASE "BATTERY" 4090 GOSUB Measure_battery 4100 CASE "EDLC" 4110 GOSUB Measure_edlc 4120 CASE "PTC" 4130 GOSUB Measure_vi 4140 CASE "tau" 4150 GOSUB Measure_tau 4160 CASE "Phone" 4170 GOSUB Measure_phone 4180 END SELECT 4190 RETURN 4200 Measure_pri_bat: ! 4210 GOSUB Discharge_pri 4220 RETURN 4230 Measure_battery: ! 4240 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]" 4250 FOR I=1 TO No_cycle !배터리 충방전실험을 n회 실시 4260 C_i_capa=0 4270 C_w_capa=0 4280 D_i_capa=0 4290 D_w_capa=0 4300 GOSUB Cycle 4310 OUTPUT @File2;I,C_time,C_i_capa,C_w_capa,D_time,-D_i_capa,-D_w_capa 4320 NEXT I 4330 RETURN 4340 Measure_phone: ! 4350 GOSUB Cycle 4360 RETURN 4370 Measure_edlc: ! 4380 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]" 4390 FOR I=1 TO No_cycle 4400 C_i_capa=0 4410 C_w_capa=0 4420 D_i_capa=0 4430 D_w_capa=0 4440 Capacity=0 4450 GOSUB Cycle 4460 OUTPUT @File2;I,C_time*60,C_i_capa,C_w_capa*1000,D_time*60,-D_i_capa,-D_w_capa*1000,Capacity 4470 NEXT I 4480 RETURN 4490 Measure_vi: ! 4500 FOR Volt=Volt_start TO Volt_stop STEP Volt_step 4510 Cmd$="V5" !32V 4520 Cmd$=Cmd$&" D "&VAL$(Volt)&"V" !D 2.0V 4530 Cmd$=Cmd$&" D "&VAL$(Limit)&"A" !D 2.0A 4540 OUTPUT @Src;Cmd$ !"V5 D 1V D 2A" 4550 OUTPUT @Src;"E" !Operate ON 4560 T=TIMEDATE 4570 Time_elapsed=(T-Time_zero)/60 4580 GOSUB Reading 4590 Curr=Data 4600 GOSUB Data_process 4610 WAIT Wait 4620 NEXT Volt 4630 OUTPUT @Src;"H" !Operate OFF 4640 RETURN 4650 Measure_tau: ! 4660 Volt=Volt_set 4670 Cmd$="V5" !32V 4680 Cmd$=Cmd$&" D "&VAL$(Volt)&"V" !D 12V 4690 Cmd$=Cmd$&" D "&VAL$(Limit)&"A" !D 2.0A 4700 OUTPUT @Src;Cmd$ !"V5 D 1V D 2A" 4710 OUTPUT @Src;"E" !Operate ON 4720 Time_zero=TIMEDATE 4730 LOOP 4740 T=TIMEDATE 4750 Time_elapsed=(T-Time_zero) !second 4760 GOSUB Reading 4770 Curr=Data 4780 GOSUB Data_process 4790 EXIT IF Time_elapsed>Time_set 4800 END LOOP 4810 OUTPUT @Src;"H" !Operate OFF 4820 RETURN 4830 Charge1: ! 4840 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4850 !충전. +부호 정전류, 전압제한(전압을 읽는다.) 4860 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4870 Test$="C" 4880 SELECT Inst$(Inst_no) 4890 CASE "TR6143" 4900 Cmd$="I4" !2A range 4910 Cmd$=Cmd$&" D "&VAL$(Ic)&"A" !D 2.0A 4920 Cmd$=Cmd$&" D "&VAL$(Vc)&"V" !D 4.2V 4930 OUTPUT @Src;Cmd$ !"I4 D 2A D 4.2V" 4940 WAIT Wait 4950 OUTPUT @Src;"E" !Operate ON 4960 WAIT Wait 4970 CASE "66332A" 4980 OUTPUT @Src;"VOLT ";Vc 4990 OUTPUT @Src;"CURR ";Ic 5000 END SELECT 5010 C_start_time=TIMEDATE 5020 Pre_t=C_start_time 5030 Curr=Ic 5040 LOOP 5050 T=TIMEDATE 5060 Time_elapsed=(T-Time_zero)/60 5070 GOSUB Reading 5080 SELECT Inst$(Inst_no) 5090 CASE "TR6143" 5100 Volt=Data 5110 CASE "66332A" 5120 Data=Volt 5130 END SELECT 5140 ! IF Volt>Pre_v THEN !충전 전압이 상승하면 5150 IF ABS(Volt-Pre_v)>=.01 THEN !전압차가 0.01V 이상이면 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 5160 GOSUB Data_process 5170 C_i_capa=C_i_capa+(Curr*1000)*((T-Pre_t)/3600) !mAh = mA x hour 5180 C_w_capa=C_w_capa+Curr*Volt*((T-Pre_t)/3600) !Wh = A x V x hour 5190 Pre_t=T 5200 END IF 5210 ! EXIT IF Volt>=((1*Vc)+.01) !측정 전압이 충전최고 전압 에 도달하면 5220 EXIT IF Volt>=((1*Vc))-.001 !측정 전압이 충전최고 전압 에 도달하면 5230 END LOOP 5240 !!!!!!!!! 마지막 기록 5250 GOSUB Data_process 5260 C_i_capa=C_i_capa+(Curr*1000)*((T-Pre_t)/3600) !mAh = mA x hour 5270 C_w_capa=C_w_capa+Curr*Volt*((T-Pre_t)/3600) !Wh = A x V x hour 5280 !!!!!!!!! 5290 ! OUTPUT @Src;"H" !Operate OFF 5300 ! WAIT Wait 5310 RETURN 5320 Charge2:! 5330 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 5340 !충전, 충전 최고전압에 도달하면. 정전압, 전류제한(전류를 읽는다.) 5350 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 5360 SELECT Inst$(Inst_no) 5370 CASE "TR6143" 5380 Cmd$="V5" !V5 32V range 5390 Cmd$=Cmd$&" D "&VAL$(Vc-.005)&"V" !D 4.2V 5400 Cmd$=Cmd$&" D "&VAL$(Ic*1)&"A" !D 2.0A 5410 OUTPUT @Src;Cmd$ !"V5 D 4.2V D 2.0A" 5420 WAIT Wait 5430 ! OUTPUT @Src;"E" !Operate ON 5440 ! WAIT Wait 5450 CASE "66332A" 5460 OUTPUT @Src;"VOLT ";Vc 5470 OUTPUT @Src;"CURR ";Ic 5480 END SELECT 5490 Pre_v=Ic !충전 전류(Ic)를 초기값으로 기억한다. 5500 Volt=Vc !충전전압은 일정하다. 5510 LOOP 5520 T=TIMEDATE 5530 Time_elapsed=(T-Time_zero)/60 5540 GOSUB Reading !충전전압에 도달되었기 때문에, 서서히 줄어드는 충전 전류를 측정한다. 5550 SELECT Inst$(Inst_no) 5560 CASE "TR6143" 5570 Curr=Data 5580 CASE "66332A" 5590 Data=Curr 5600 END SELECT 5610 ! IF Curr<Pre_v THEN !측정 전류가 서서히 낮아지면 5620 IF ABS(Curr-Pre_v)>=.01 THEN !전류차이가 .01A 이상이면 !!!!!!!!!!!!!!!!!!!!! 5630 GOSUB Data_process 5640 C_i_capa=C_i_capa+(Curr*1000)*((T-Pre_t)/3600) !mAh = mA x hour 5650 C_w_capa=C_w_capa+Curr*Volt*((T-Pre_t)/3600) !WA = A x V x hour 5660 Pre_t=T 5670 END IF 5680 EXIT IF Curr<=1*Ic_end !현재 전류가 종료전류 105% 에 도달하면 5690 END LOOP 5700 !!!!! 마지막 기록 5710 GOSUB Data_process 5720 C_i_capa=C_i_capa+(Curr*1000)*((T-Pre_t)/3600) !mAh = mA x hour 5730 C_w_capa=C_w_capa+Curr*Volt*((T-Pre_t)/3600) !WA = A x V x hour 5740 !!!!! 5750 C_time=(T-C_start_time)/60 5760 ! OUTPUT @Src;"H" !Operate OFF 5770 ! WAIT Wait 5780 RETURN 5790 Discharge: ! 5800 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 5810 !방전 전류는 -로 표기한다. 5820 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 5830 Test$="D" 5840 SELECT Inst$(Inst_no) 5850 CASE "TR6143" 5860 Cmd$="I4" !2A range 5870 Cmd$=Cmd$&" D "&VAL$(Id)&"A" !D -2.0A 5880 Cmd$=Cmd$&" D "&VAL$(Vc)&"V" !D 4.2V 5890 OUTPUT @Src;Cmd$ !"I4 D -2A D 4.2V" 5900 WAIT Wait 5910 OUTPUT @Src;"E" !Operate ON 5920 WAIT Wait 5930 CASE "66332A" 5940 OUTPUT @Src;"VOLT ";Vd 5950 OUTPUT @Src;"CURR ";-Id !양수이어야한다. 5960 END SELECT 5970 Pre_v=Vc 5980 D_start_time=TIMEDATE 5990 Pre_t=D_start_time 6000 Curr=Id !방전전류(-값을 갖는다.)는 일정하다. 6010 Set80=0 6020 Set40=0 6030 LOOP 6040 T=TIMEDATE 6050 Time_elapsed=(T-Time_zero)/60 6060 GOSUB Reading !일정 전류 방전 , 전압이 측정된다. 6070 SELECT Inst$(Inst_no) 6080 CASE "TR6143" 6090 Volt=Data 6100 CASE "66332A" 6110 Data=Volt 6120 END SELECT 6130 ! IF Volt<Pre_v THEN !측정전압이 서서히 낮아지면(방전이므로) 6140 IF Set80=0 AND Volt<Vc*.8 THEN !방전전압이 충전전압의 80%가 되면 한번만 수행 6150 V80=Volt 6160 T80=Time_elapsed*60 6170 Set80=1 6180 END IF 6190 IF Set40=0 AND Volt<Vc*.4 THEN !방전전압이 충전전압의 40%가 되면 한번만 수행 6200 V40=Volt 6210 T40=Time_elapsed*60 6220 Set40=1 6230 END IF 6240 IF ABS(Volt-Pre_v)>=.01 THEN !전압차가 0.005V 이상이면 기록한다 !!!!!!!!!!!!!!!!! 6250 GOSUB Data_process 6260 D_i_capa=D_i_capa+(Curr*1000)*((T-Pre_t)/3600) !mAh = mA x hour 6270 D_w_capa=D_w_capa+Curr*Volt*((T-Pre_t)/3600) !Wh = A x V x hour 6280 Pre_t=T 6290 END IF 6300 EXIT IF Volt<=(Vd+.01) !현재 전압이 파워서플라이 세팅값 이하로 떨어지지 않기 때문에 0.01V 6310 END LOOP 6320 !!!! 마지막 기록 6330 GOSUB Data_process 6340 D_i_capa=D_i_capa+(Curr*1000)*((T-Pre_t)/3600) !mAh = mA x hour 6350 D_w_capa=D_w_capa+Curr*Volt*((T-Pre_t)/3600) !Wh = A x V x hour 6360 !!!!!!!! 6370 D_time=(T-D_start_time)/60 6380 IF (V80-V40)<>0 THEN 6390 Capacity=Id*(T80-T40)/(V80-V40)!기울기가 -이므로 6400 END IF 6410 OUTPUT @Src;"H" !Operate OFF 6420 WAIT Wait 6430 RETURN 6440 Discharge_pri: ! 6450 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 6460 !방전 전류는 -로 표기한다. 6470 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 6480 Test$="D" 6490 Cmd$="I4" !2A range 6500 Cmd$=Cmd$&" D "&VAL$(Id)&"A" !D -2.0A 6510 Cmd$=Cmd$&" D "&VAL$(Vc)&"V" !D 4.2V 6520 OUTPUT @Src;Cmd$ !"I4 D -2A D 4.2V" 6530 WAIT Wait 6540 OUTPUT @Src;"E" !Operate ON 6550 WAIT Wait 6560 Pre_v=Vc 6570 D_start_time=TIMEDATE 6580 Pre_t=D_start_time 6590 Curr=Id !방전전류(-값을 갖는다.)는 일정하다. 6600 LOOP 6610 T=TIMEDATE 6620 Time_elapsed=(T-Time_zero)/60 6630 GOSUB Reading !일정 전류 방전 , 전압이 측정된다. 6640 Volt=Data 6650 ! IF Volt<Pre_v THEN !측정전압이 서서히 낮아지면(방전이므로) 6660 IF ABS(Volt-Pre_v)>=.01 THEN !전압차가 0.01V 이상이면 6670 GOSUB Data_process 6680 D_i_capa=D_i_capa+(Curr*1000)*((T-Pre_t)/3600) !mAh = mA x hour 6690 D_w_capa=D_w_capa+Curr*Volt*((T-Pre_t)/3600) !Wh = A x V x hour 6700 Pre_t=T 6710 END IF 6720 EXIT IF Volt<=Vd+.01 !현재 전압이 방전 최저전압에 도달하면 6730 END LOOP 6740 D_time=(T-D_start_time)/60 6750 OUTPUT @File1;"discharge i capa [mAh]=,",D_i_capa 6760 OUTPUT @File1;"discharge w capa [Wh]=,",D_w_capa 6770 OUTPUT @Src;"H" !Operate OFF 6780 WAIT Wait 6790 RETURN 6800 Data_process: ! 6810 Count=Count+1 6820 SELECT Dut$(Dut_no) 6830 CASE "PRI-BAT" 6840 X1=Time_elapsed 6850 Y1=(Volt*2/Vc)*100-100 !전압 [%] 6860 Y2=(Curr/Id)*100 !전류 [%] 6870 CASE "BATTERY","EDLC" 6880 X1=Time_elapsed 6890 Y1=(Volt*2/Vc)*100-100 !전압 [%] 6900 Y2=(Curr/Ic)*100 !전류 [%] 6910 CASE "PTC" 6920 X1=Volt 6930 Y1=Curr 6940 Y2=0 6950 CASE "tau" 6960 X1=Time_elapsed 6970 Y1=Curr 6980 Y2=0 6990 END SELECT 7000 Y(1)=Y1 7010 Y(2)=Y2 7020 CONTROL @Strip;SET("POINT LOCATION":X1,"VALUES":Y(*)) 7030 PRINT "Count=";Count;", T=";PROUND(Time_elapsed,-5);"m, V=";Volt;"V, I=";Curr;"A" 7040 IF NOT (Dut$(Dut_no)="BATTERY" AND No_cycle>5000) THEN !1000회 실험은 데이터를 저장하지 않는다. 7050 OUTPUT @File1;Count,Time_elapsed,Volt,Curr 7060 END IF 7070 Pre_v=Data 7080 SELECT Dut$(Dut_no) 7090 CASE "BATTERY" 7100 IF Battery$(Battery_no)="Li-S4" THEN 7110 GOSUB Reading34970 7120 OUTPUT @File3;Count,V(*) 7130 END IF 7140 END SELECT 7150 RETURN 7160 Reading: ! 7170 SELECT Inst$(Inst_no) 7180 CASE "TR6143" 7190 LOOP 7200 GOSUB Reading_tr6143 7210 EXIT IF Data<>0 7220 END LOOP 7230 CASE "66332A" 7240 GOSUB Reading_66332a 7250 END SELECT 7260 RETURN 7270 Reading_tr6143: ! 7280 ! 전압을 측정하면 나타나는 데이터 포맷 7290 ! 12345678901234 7300 !"DV +03.857E+0" 원래 7310 !" DV +03.857E+0" 앞에 공백이 하나 추가되어 나온 적이 있다. 7320 ! 전압를 측정하면 나타나는 데이터 포맷 7330 ! 12345678901234 7340 !"DI +0.6310E+0" 원래 7350 ENTER @Src;A1$ 7360 A2$=TRIM$(A1$) !앞뒤 공백 모두 없앤다 7370 Data=VAL(A2$[3,13]) 7380 SELECT Dut$(Dut_no) 7390 CASE "BATTERY" 7400 ! Data=PROUND(Data,-3) !소수점 3자리. 0.1mA까지 측정되면 너무 많은 데이터가 획득되므로 7410 Data=DROUND(Data,3)!유효수자 3자리 7420 CASE "tau" 7430 WAIT .05 !이보다 빨리 측정못한다. 7440 END SELECT 7450 RETURN 7460 Reading_66332a: ! 7470 OUTPUT @Src;"MEAS:VOLT?" 7480 ENTER @Src;Volt 7490 OUTPUT @Src;"MEAS:CURR?" 7500 ENTER @Src;Curr 7510 RETURN 7520 Reading34970: ! 7530 OUTPUT @Sw;"MEAS:VOLT:DC? (@201:204)" 7540 ENTER @Sw;V(*) 7550 RETURN 7560 Inst6143_open: ! 7570 ASSIGN @Src TO 714 !advantest TR6143 7580 OUTPUT @Src;"C" !initialize 7590 OUTPUT @Src;"OM1" !ascii, OM0=set value, OM1=meas value 7600 SELECT Dut$(Dut_no) 7610 CASE "BATTERY" 7620 IF Battery$(Battery_no)="Li-S4" THEN 7630 GOSUB Inst34970_open 7640 END IF 7650 END SELECT 7660 RETURN 7670 Inst66332_open: ! 7680 ASSIGN @Src TO 709 7690 OUTPUT @Src;"OUTP ON" 7700 SELECT Dut$(Dut_no) 7710 CASE "BATTERY" 7720 IF Battery$(Battery_no)="Li-S4" THEN 7730 GOSUB Inst34970_open 7740 END IF 7750 END SELECT 7760 RETURN 7770 Inst34970_open: ! 7780 DIM V(4) !4채널 전압 7790 ASSIGN @Sw TO 709 !Agilent 34970A 7800 ! OUTPUT @Sw;"CONF:VOLT:DC AUTO (@201:204)" 7810 OUTPUT @Sw;"SENS:VOLT:DC:RANG:AUTO ON,(@201:204)" 7820 OUTPUT @Sw;"SENS:VOLT:DC:NPLC 2,(@201:204)" 7830 RETURN 7840 Inst_close: ! 7850 SELECT Inst$(Inst_no) 7860 CASE "TR6143" 7870 CASE "66332A" 7880 OUTPUT @Src;"OUTP OFF" 7890 END SELECT 7900 RETURN 7910 Chart_var: ! 7920 SELECT Dut$(Dut_no) 7930 CASE "PRI-BAT" 7940 X_origin=0!time=0 7950 X_range=1*60 !1 hours *60min !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 7960 X_axis_label$="Elapsed Time [Min]" 7970 Y_origin=-110 7980 Y_range=220 7990 Y_axis_label$="Volt & Current [%]" 8000 CASE "BATTERY" 8010 X_origin=0!time=0 8020 X_range=1*60 !1 hours *60min !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8030 X_axis_label$="Elapsed Time [Min]" 8040 Y_origin=-110 8050 Y_range=220 8060 Y_axis_label$="Volt & Current [%]" 8070 CASE "EDLC" 8080 X_origin=0!time=0 8090 X_range=60 !10min !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8100 X_axis_label$="Elapsed Time [Min]" 8110 Y_origin=-110 8120 Y_range=220 8130 Y_axis_label$="Volt & Current [%]" 8140 CASE "PTC" 8150 X_origin=Volt_start 8160 X_range=Volt_stop-Volt_start !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8170 X_axis_label$="Applied Volt [V]" 8180 Y_origin=0 8190 Y_range=Limit 8200 Y_axis_label$="Current [A]" 8210 CASE "tau" 8220 X_origin=0 8230 X_range=Time_set !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8240 X_axis_label$="Elapsed Time [m]" 8250 Y_origin=0 8260 Y_range=Limit 8270 Y_axis_label$="Current [A]" 8280 CASE "Phone" 8290 X_origin=0!time=0 8300 X_range=1*60 !1 hours *60min !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8310 X_axis_label$="Elapsed Time [Min]" 8320 Y_origin=-110 8330 Y_range=220 8340 Y_axis_label$="Volt & Current [%]" 8350 END SELECT 8360 RETURN 8370 Init_chart: ! 8380 DIM X_axis_label$[25],Y_axis_label$[25] 8390 INTEGER Trace_num 8400 INTEGER Screen_dims(1:2),Gwindow_dims(1:4) 8410 REAL Y(1:2) !Y(1) Volt, Y(2) Current 8420 GESCAPE CRT,36;Screen_dims(*) ! Get screen width and height. 8430 ! 8440 ! Set the dimensions of the graphics window using GESCAPE 33 so 8450 ! that it is centered on the screen. 8460 ! 8470 Gwindow_dims(1)=Screen_dims(1)*.25 ! X of upper left. 8480 Gwindow_dims(2)=Screen_dims(2)*.2 ! Y of upper left. 8490 Gwindow_dims(3)=Screen_dims(1)*.7 ! Width. 8500 Gwindow_dims(4)=Screen_dims(2)*.6 ! Height. 8510 GESCAPE CRT,33;Gwindow_dims(*) ! Set graphics window geometry. 8520 ! 8530 GESCAPE CRT,35 ! Move the graphics window to the top. 8540 ! 8550 ! Create a stripchart. Make it invisible until all changes are made. 8560 ! 8570 ASSIGN @Strip TO WIDGET "STRIPCHART";SET("VISIBLE":0) 8580 ! 8590 ! Set the overall attributes. 8600 ! 8610 CONTROL @Strip;SET("TITLE":"Data Logger") 8620 CONTROL @Strip;SET("MINIMUM SCROLL":2) 8630 CONTROL @Strip;SET("MOVABLE":0) 8640 CONTROL @Strip;SET("MAXIMIZABLE":0) 8650 CONTROL @Strip;SET("X":0,"Y":0) 8660 ! 8670 ! Size the stripchart to exactly fill the graphics window. 8680 ! 8690 Vert_borders=26 8700 Horiz_borders=8 8710 Height=Gwindow_dims(4)-Vert_borders 8720 Width=Gwindow_dims(3)-Horiz_borders 8730 CONTROL @Strip;SET("WIDTH":Width,"HEIGHT":Height) 8740 ! 8750 CONTROL @Strip;SET("CURRENT AXIS":"X") 8760 CONTROL @Strip;SET("ORIGIN":X_origin,"RANGE":X_range) 8770 CONTROL @Strip;SET("AXIS LABEL":X_axis_label$) 8780 !CONTROL @Strip;SET("DIGITS":5) 8790 ! 8800 CONTROL @Strip;SET("CURRENT AXIS":"Y") 8810 CONTROL @Strip;SET("ORIGIN":Y_origin,"RANGE":Y_range) 8820 CONTROL @Strip;SET("AXIS LABEL":Y_axis_label$) 8830 ! 8840 CONTROL @Strip;SET("VISIBLE":1) ! Show the stripchart. 8850 ! 8860 RETURN 8870 END