"3245-01-ibw.txt"의 두 판 사이의 차이
30번째 줄: | 30번째 줄: | ||
270 Nop=101 | 270 Nop=101 | ||
280 Func$="Trans" ! V I i Trans | 280 Func$="Trans" ! V I i Trans | ||
− | 290 Scale$=" | + | 290 Scale$="LOG" ! 전압 스윕 선택 = LIN LOG |
300 SELECT Func$ | 300 SELECT Func$ | ||
310 CASE "Trans" !트랜스 전압비 | 310 CASE "Trans" !트랜스 전압비 | ||
320 Fstart=10 | 320 Fstart=10 | ||
330 Fstop=100000 | 330 Fstop=100000 | ||
− | 340 Fnop=201 | + | 340 Fnop=201 !반드시 2이상 |
− | 350 Vstart=.1/2.828 | + | 350 Vstart=.1 !Vp-p |
− | + | 360 Vstart=Vstart/2.828 ! Vpp=2.828 Vrms | |
− | + | 370 Vstop=10 !Vp-p | |
− | + | 380 Vstop=Vstop/2.828 ! | |
− | + | 390 Vnop=10 !반드시 2이상 | |
− | + | 400 ALLOCATE Vset_array(Vnop) | |
− | + | 410 !!!! 출력 데이터에 헤더 작성 !!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
− | + | 420 OUTPUT @File;"No., Time[s], Freq[Hz]"; | |
− | + | 430 FOR J=1 TO Vnop | |
− | + | 440 SELECT Scale$ | |
− | + | 450 CASE "LOG" | |
− | + | 460 Kvolt=(Vstop/Vstart)^(1/(Vnop-1)) | |
− | + | 470 Vset=Vstart*Kvolt^(J-1) | |
− | + | 480 CASE "LIN" | |
− | + | 490 Vset=Vstart+(Vstop-Vstart)/(Vnop-1)*(J-1) | |
− | + | 500 END SELECT | |
− | + | 510 OUTPUT @File;", ";Vset; | |
− | + | 520 Vset_array(J)=Vset | |
− | + | 530 NEXT J | |
− | 540 | + | 540 OUTPUT @File;"" |
− | 550 | + | 550 !!!! 출력 데이터에 헤더 끝 !!!!!!!!!!!!!!!!!!!!!!!!!!!! |
− | + | 560 FOR I=1 TO Fnop !주파수는 로그 | |
− | + | 570 Count=I | |
− | + | 580 Kfreq=(Fstop/Fstart)^(1/(Fnop-1)) | |
− | + | 590 Freq=Fstart*Kfreq^(I-1) | |
− | + | 600 OUTPUT @Source;"FREQ ";Freq | |
− | + | 610 OUTPUT @File;Count,T,Freq, | |
− | 620 | + | 620 PRINT Count,Freq, |
− | 630 | + | 630 FOR J=1 TO Vnop |
− | 640 | + | 640 Vset=Vset_array(J) |
− | 650 | + | 650 OUTPUT @Source;"APPLY ACV ";Vset |
− | + | 660 WAIT .1 | |
− | 670 | + | 670 OUTPUT @Dmm;"TRIG SGL" |
− | 680 | + | 680 ENTER @Dmm;Vmeas |
− | 690 | + | 690 T=TIMEDATE-T0 |
− | + | 700 PRINT Vmeas, | |
− | + | 710 OUTPUT @File;Vmeas;","; | |
− | + | 720 NEXT J | |
− | 730 | + | 730 PRINT "" |
− | + | 740 OUTPUT @File;"" | |
− | + | 750 NEXT I | |
− | + | 760 OUTPUT @Source;"APPLY ACV 0" | |
− | 770 | + | 770 CASE "V","v" !V출력, V측정 |
− | + | 780 Vmin=5 ! 1uV | |
− | + | 790 Vmax=10 !10V | |
− | + | 800 OUTPUT @File;"No., Time[s], Vset[V], Vmeas[V]" | |
− | + | 810 FOR I=1 TO Nop STEP 1 | |
− | + | 820 Count=I | |
− | + | 830 SELECT Scale$ | |
− | + | 840 CASE "LOG" | |
− | + | 850 K=(Vmax/Vmin)^(1/(Nop-1)) | |
− | + | 860 Vset=Vmin*K^(I-1) | |
− | + | 870 CASE "LIN" | |
− | + | 880 Vset=Vmin+(Vmax-Vmin)/(Nop-1)*(I-1) | |
− | 890 | + | 890 END SELECT |
− | + | 900 OUTPUT @Source;"APPLY DCV ";Vset | |
− | + | 910 WAIT .1 | |
− | + | 920 OUTPUT @Dmm;"TRIG SGL" | |
− | + | 930 OUTPUT @Dmm;"TRIG SGL" | |
− | + | 940 ENTER @Dmm;Vmeas | |
− | + | 950 T=TIMEDATE-T0 | |
− | + | 960 Diff=(Vmeas-Vset)/Vset*100 | |
− | + | 970 DISP Count,"Set V=";Vset," Meas V=";Vmeas," Diff[%]=";Diff | |
− | + | 980 OUTPUT @File;Count,T,Vset,Vmeas | |
− | + | 990 NEXT I | |
− | + | 1000 OUTPUT @Source;"APPLY DCV 0" | |
− | + | 1010 CASE "I" | |
− | + | 1020 Imin=1.E-9 ! 1nA에서부터 | |
− | + | 1030 Imax=.1 ! 100mA까지 | |
− | + | 1040 OUTPUT @File;"No., Time[s], Iset[A], Imeas[A]" | |
− | + | 1050 FOR I=1 TO Nop | |
− | + | 1060 Count=I | |
− | + | 1070 K=(Imax/Imin)^(1/(Nop-1)) | |
− | + | 1080 Iset=Imin*K^(I-1) | |
− | + | 1090 OUTPUT @Source;"APPLY DCI ";Iset | |
− | + | 1100 WAIT .1 | |
− | + | 1110 OUTPUT @Dmm;"TRIG SGL" | |
− | + | 1120 ENTER @Dmm;Imeas | |
− | + | 1130 T=TIMEDATE-T0 | |
− | + | 1140 Diff=(Imeas-Iset)/Iset*100 | |
− | + | 1150 DISP Count,"Set I=";Iset," Meas I=";Imeas," Diff[%]=";Diff | |
− | + | 1160 OUTPUT @File;Count,T,Iset,Imeas | |
− | + | 1170 NEXT I | |
− | + | 1180 OUTPUT @Source;"APPLY DCI 0" | |
− | + | 1190 CASE "i" | |
− | + | 1200 OUTPUT @File;"No., Time[s], HP3245A set[A], HP3458A meas[A]" | |
− | + | 1210 Count=0 | |
− | + | 1220 FOR I=-10 TO -1 !0.1A까지만 가능 | |
− | + | 1230 OUTPUT @Source;"APPLY DCI 0" !그렇다고 0이 나오는 것은 아니다. 입력단자를 short시켜야 한다. | |
− | + | 1240 IF I<=-8 THEN | |
− | + | 1250 OUTPUT @Dmm;"FUNC DCI ";1.E-7 !범위 0.1uA시작 000.000nA 표시된다. | |
− | + | 1260 ELSE | |
− | + | 1270 OUTPUT @Dmm;"FUNC DCI ";10^(I+1) | |
− | + | 1280 END IF | |
− | + | 1290 ! 전루 측정 범위별로 MATH NULL 수행 | |
− | + | 1300 ! OUTPUT @Dmm;"TRIG SGL" | |
− | + | 1310 ! ENTER @Dmm;Tmp | |
− | + | 1320 ! OUTPUT @Dmm;"MATH NULL" | |
− | + | 1330 ! OUTPUT @Dmm;"TRIG SGL" | |
− | + | 1340 ! ENTER @Dmm;Tmp | |
− | + | 1350 FOR J=1 TO 9 ! 10을 사용하면, 한 단계 더 높은 범위 1에서 수행되는 것과 겹쳐, NULL 의미에 문제가 된다. | |
− | + | 1360 Count=Count+1 | |
− | + | 1370 Vset=J*10^I ! 최초 출력 전류는 1E-10A부터 시작 | |
− | + | 1380 IF Vset>.1 THEN STOP ! 전류출력 .1A 초과하면 이상 나오게 프로그래밍되면 정지시킨다. | |
− | + | 1390 OUTPUT @Source;"APPLY DCI ";Vset | |
− | + | 1400 WAIT .1 | |
− | + | 1410 OUTPUT @Dmm;"TRIG SGL" | |
− | + | 1420 ENTER @Dmm;Vmeas | |
− | + | 1430 T=TIMEDATE-T0 | |
− | + | 1440 DISP Count,"Set I=";Vset," Meas I=";Vmeas | |
− | + | 1450 OUTPUT @File;Count,T,Vset,Vmeas | |
− | + | 1460 NEXT J | |
+ | 1470 NEXT I | ||
+ | 1480 OUTPUT @Source;"APPLY DCI 0" | ||
+ | 1490 END SELECT | ||
+ | 1500 OUTPUT @Dmm;"TRIG AUTO" | ||
+ | 1510 STOP | ||
+ | 1520 Fileopen: ! | ||
+ | 1530 DIM Filename$[20],Dhms$[8] | ||
+ | 1540 Time$=TIME$(TIMEDATE) | ||
+ | 1550 Date$=DATE$(TIMEDATE) | ||
+ | 1560 Dhms$=Date$[1;2]&Time$[1;2]&Time$[4;2]&Time$[7;2] | ||
+ | 1570 Filename$=Dhms$&".txt" | ||
+ | 1580 CREATE Filename$,1 | ||
+ | 1590 ASSIGN @File TO Filename$;FORMAT ON | ||
+ | 1600 RETURN | ||
+ | 1610 END | ||
</pre> | </pre> |
2020년 9월 8일 (화) 10:04 판
1 ! volt-std/3245-01-ibw.txt 10 !2018/04/30 HP3245A Universal Source로 출력 + HP3458A DMM으로 측정 20 ! DC 전압: -10.25V ~ +10.25V, 6자리(24비트) 고해상도, 3.5자리(12비트) 저해상도 모드 30 ! 저해상도모드에서는 트리거 가능하다. 40 ! DC 전류: -0.1A ~ +0.1A, 0.1mA~100mA 범위, 0.1nA 해상도 50 ! AC 전압(p-p 전압이다.)/전류 1MHz까지, 펄스는 100kHz까지 60 ! duty cycle은 100kHz까지 5%~95% 70 ! Freq Ref = 1,073,741.824Hz 80 ! APPLY DCV | DCI 90 ! USE CHANA | CHANB = 0 | 100 100 ! TERM FRONT | REAR | OPEN = OFF 110 ! IMP 0 | 50 120 ! ARANGE ON | OFF autorange 130 ! RANGE 140 ! DELAY 0.04sec (default) 150 ! 160 ! xmin, xmax, nop 로그계산방법 170 ! k=(xmax/xmin)^(1/(nop-1)) 180 ! x=xmin*k^(n-1) n=1,...,nop 190 INTEGER I,J,Nop,Count 200 REAL K,Vmin,Vmax,Vset,Vmeas,Tmp 210 GOSUB Fileopen 220 ASSIGN @Source TO 710 !HP 3245A 230 ASSIGN @Dmm TO 722 !HP 3458A 240 ! OUTPUT @Source;"USE CHANB" 250 OUTPUT @Source;"IMP 0" ! 0ohm 50ohm 260 T0=TIMEDATE 270 Nop=101 280 Func$="Trans" ! V I i Trans 290 Scale$="LOG" ! 전압 스윕 선택 = LIN LOG 300 SELECT Func$ 310 CASE "Trans" !트랜스 전압비 320 Fstart=10 330 Fstop=100000 340 Fnop=201 !반드시 2이상 350 Vstart=.1 !Vp-p 360 Vstart=Vstart/2.828 ! Vpp=2.828 Vrms 370 Vstop=10 !Vp-p 380 Vstop=Vstop/2.828 ! 390 Vnop=10 !반드시 2이상 400 ALLOCATE Vset_array(Vnop) 410 !!!! 출력 데이터에 헤더 작성 !!!!!!!!!!!!!!!!!!!!!!!!!!!! 420 OUTPUT @File;"No., Time[s], Freq[Hz]"; 430 FOR J=1 TO Vnop 440 SELECT Scale$ 450 CASE "LOG" 460 Kvolt=(Vstop/Vstart)^(1/(Vnop-1)) 470 Vset=Vstart*Kvolt^(J-1) 480 CASE "LIN" 490 Vset=Vstart+(Vstop-Vstart)/(Vnop-1)*(J-1) 500 END SELECT 510 OUTPUT @File;", ";Vset; 520 Vset_array(J)=Vset 530 NEXT J 540 OUTPUT @File;"" 550 !!!! 출력 데이터에 헤더 끝 !!!!!!!!!!!!!!!!!!!!!!!!!!!! 560 FOR I=1 TO Fnop !주파수는 로그 570 Count=I 580 Kfreq=(Fstop/Fstart)^(1/(Fnop-1)) 590 Freq=Fstart*Kfreq^(I-1) 600 OUTPUT @Source;"FREQ ";Freq 610 OUTPUT @File;Count,T,Freq, 620 PRINT Count,Freq, 630 FOR J=1 TO Vnop 640 Vset=Vset_array(J) 650 OUTPUT @Source;"APPLY ACV ";Vset 660 WAIT .1 670 OUTPUT @Dmm;"TRIG SGL" 680 ENTER @Dmm;Vmeas 690 T=TIMEDATE-T0 700 PRINT Vmeas, 710 OUTPUT @File;Vmeas;","; 720 NEXT J 730 PRINT "" 740 OUTPUT @File;"" 750 NEXT I 760 OUTPUT @Source;"APPLY ACV 0" 770 CASE "V","v" !V출력, V측정 780 Vmin=5 ! 1uV 790 Vmax=10 !10V 800 OUTPUT @File;"No., Time[s], Vset[V], Vmeas[V]" 810 FOR I=1 TO Nop STEP 1 820 Count=I 830 SELECT Scale$ 840 CASE "LOG" 850 K=(Vmax/Vmin)^(1/(Nop-1)) 860 Vset=Vmin*K^(I-1) 870 CASE "LIN" 880 Vset=Vmin+(Vmax-Vmin)/(Nop-1)*(I-1) 890 END SELECT 900 OUTPUT @Source;"APPLY DCV ";Vset 910 WAIT .1 920 OUTPUT @Dmm;"TRIG SGL" 930 OUTPUT @Dmm;"TRIG SGL" 940 ENTER @Dmm;Vmeas 950 T=TIMEDATE-T0 960 Diff=(Vmeas-Vset)/Vset*100 970 DISP Count,"Set V=";Vset," Meas V=";Vmeas," Diff[%]=";Diff 980 OUTPUT @File;Count,T,Vset,Vmeas 990 NEXT I 1000 OUTPUT @Source;"APPLY DCV 0" 1010 CASE "I" 1020 Imin=1.E-9 ! 1nA에서부터 1030 Imax=.1 ! 100mA까지 1040 OUTPUT @File;"No., Time[s], Iset[A], Imeas[A]" 1050 FOR I=1 TO Nop 1060 Count=I 1070 K=(Imax/Imin)^(1/(Nop-1)) 1080 Iset=Imin*K^(I-1) 1090 OUTPUT @Source;"APPLY DCI ";Iset 1100 WAIT .1 1110 OUTPUT @Dmm;"TRIG SGL" 1120 ENTER @Dmm;Imeas 1130 T=TIMEDATE-T0 1140 Diff=(Imeas-Iset)/Iset*100 1150 DISP Count,"Set I=";Iset," Meas I=";Imeas," Diff[%]=";Diff 1160 OUTPUT @File;Count,T,Iset,Imeas 1170 NEXT I 1180 OUTPUT @Source;"APPLY DCI 0" 1190 CASE "i" 1200 OUTPUT @File;"No., Time[s], HP3245A set[A], HP3458A meas[A]" 1210 Count=0 1220 FOR I=-10 TO -1 !0.1A까지만 가능 1230 OUTPUT @Source;"APPLY DCI 0" !그렇다고 0이 나오는 것은 아니다. 입력단자를 short시켜야 한다. 1240 IF I<=-8 THEN 1250 OUTPUT @Dmm;"FUNC DCI ";1.E-7 !범위 0.1uA시작 000.000nA 표시된다. 1260 ELSE 1270 OUTPUT @Dmm;"FUNC DCI ";10^(I+1) 1280 END IF 1290 ! 전루 측정 범위별로 MATH NULL 수행 1300 ! OUTPUT @Dmm;"TRIG SGL" 1310 ! ENTER @Dmm;Tmp 1320 ! OUTPUT @Dmm;"MATH NULL" 1330 ! OUTPUT @Dmm;"TRIG SGL" 1340 ! ENTER @Dmm;Tmp 1350 FOR J=1 TO 9 ! 10을 사용하면, 한 단계 더 높은 범위 1에서 수행되는 것과 겹쳐, NULL 의미에 문제가 된다. 1360 Count=Count+1 1370 Vset=J*10^I ! 최초 출력 전류는 1E-10A부터 시작 1380 IF Vset>.1 THEN STOP ! 전류출력 .1A 초과하면 이상 나오게 프로그래밍되면 정지시킨다. 1390 OUTPUT @Source;"APPLY DCI ";Vset 1400 WAIT .1 1410 OUTPUT @Dmm;"TRIG SGL" 1420 ENTER @Dmm;Vmeas 1430 T=TIMEDATE-T0 1440 DISP Count,"Set I=";Vset," Meas I=";Vmeas 1450 OUTPUT @File;Count,T,Vset,Vmeas 1460 NEXT J 1470 NEXT I 1480 OUTPUT @Source;"APPLY DCI 0" 1490 END SELECT 1500 OUTPUT @Dmm;"TRIG AUTO" 1510 STOP 1520 Fileopen: ! 1530 DIM Filename$[20],Dhms$[8] 1540 Time$=TIME$(TIMEDATE) 1550 Date$=DATE$(TIMEDATE) 1560 Dhms$=Date$[1;2]&Time$[1;2]&Time$[4;2]&Time$[7;2] 1570 Filename$=Dhms$&".txt" 1580 CREATE Filename$,1 1590 ASSIGN @File TO Filename$;FORMAT ON 1600 RETURN 1610 END