3245A
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$="LIN" ! LIN LOG
300 SELECT Func$
310 CASE "Trans" !트랜스 전압비
320 Fstart=10
330 Fstop=100000
340 Fnop=201
350 Vstart=.1/2.828 ! 0.1Vp-p Vpp=2.828 Vrms
360 Vstop=10/2.828 !10Vp-p
370 Vnop=10
380 OUTPUT @File;"No., Time[s], Vset[V], Vmeas[V]"
390 FOR I=1 TO Fnop
400 Kfreq=(Fstop/Fstart)^(1/(Fnop-1))
410 Freq=Fstart*Kfreq^(I-1)
420 OUTPUT @Source;"FREQ ";Freq
430 FOR J=1 TO Vnop
440 Count=I
450 SELECT Scale$
460 CASE "LOG"
470 Kvolt=(Vstop/Vstart)^(1/(Vnop-1))
480 Vset=Vstart*Kvolt^(J-1)
490 CASE "LIN"
500 Vset=Vstart+(Vstop-Vstart)/(Vnop-1)*(J-1)
510 END SELECT
520 OUTPUT @Source;"APPLY ACV ";Vset
530 WAIT .1
540 OUTPUT @Dmm;"TRIG SGL"
550 ENTER @Dmm;Vmeas
560 T=TIMEDATE-T0
570 DISP Count,"Freq=";Freq;"Set V=";Vset," Meas V=";Vmeas
580 OUTPUT @File;Count,T,Freq,Vset,Vmeas
590 NEXT J
600 NEXT I
610 OUTPUT @Source;"APPLY ACV 0"
620 CASE "V","v" !V출력, V측정
630 Vmin=5 ! 1uV
640 Vmax=10 !10V
650 OUTPUT @File;"No., Time[s], Vset[V], Vmeas[V]"
660 FOR I=1 TO Nop STEP 1
670 Count=I
680 SELECT Scale$
690 CASE "LOG"
700 K=(Vmax/Vmin)^(1/(Nop-1))
710 Vset=Vmin*K^(I-1)
720 CASE "LIN"
730 Vset=Vmin+(Vmax-Vmin)/(Nop-1)*(I-1)
740 END SELECT
750 OUTPUT @Source;"APPLY DCV ";Vset
760 WAIT .1
770 OUTPUT @Dmm;"TRIG SGL"
780 OUTPUT @Dmm;"TRIG SGL"
790 ENTER @Dmm;Vmeas
800 T=TIMEDATE-T0
810 Diff=(Vmeas-Vset)/Vset*100
820 DISP Count,"Set V=";Vset," Meas V=";Vmeas," Diff[%]=";Diff
830 OUTPUT @File;Count,T,Vset,Vmeas
840 NEXT I
850 OUTPUT @Source;"APPLY DCV 0"
860 CASE "I"
870 Imin=1.E-9 ! 1nA에서부터
880 Imax=.1 ! 100mA까지
890 OUTPUT @File;"No., Time[s], Iset[A], Imeas[A]"
900 FOR I=1 TO Nop
910 Count=I
920 K=(Imax/Imin)^(1/(Nop-1))
930 Iset=Imin*K^(I-1)
940 OUTPUT @Source;"APPLY DCI ";Iset
950 WAIT .1
960 OUTPUT @Dmm;"TRIG SGL"
970 ENTER @Dmm;Imeas
980 T=TIMEDATE-T0
990 Diff=(Imeas-Iset)/Iset*100
1000 DISP Count,"Set I=";Iset," Meas I=";Imeas," Diff[%]=";Diff
1010 OUTPUT @File;Count,T,Iset,Imeas
1020 NEXT I
1030 OUTPUT @Source;"APPLY DCI 0"
1040 CASE "i"
1050 OUTPUT @File;"No., Time[s], HP3245A set[A], HP3458A meas[A]"
1060 Count=0
1070 FOR I=-10 TO -1 !0.1A까지만 가능
1080 OUTPUT @Source;"APPLY DCI 0" !그렇다고 0이 나오는 것은 아니다. 입력단자를 short시켜야 한다.
1090 IF I<=-8 THEN
1100 OUTPUT @Dmm;"FUNC DCI ";1.E-7 !범위 0.1uA시작 000.000nA 표시된다.
1110 ELSE
1120 OUTPUT @Dmm;"FUNC DCI ";10^(I+1)
1130 END IF
1140 ! 전루 측정 범위별로 MATH NULL 수행
1150 ! OUTPUT @Dmm;"TRIG SGL"
1160 ! ENTER @Dmm;Tmp
1170 ! OUTPUT @Dmm;"MATH NULL"
1180 ! OUTPUT @Dmm;"TRIG SGL"
1190 ! ENTER @Dmm;Tmp
1200 FOR J=1 TO 9 ! 10을 사용하면, 한 단계 더 높은 범위 1에서 수행되는 것과 겹쳐, NULL 의미에 문제가 된다.
1210 Count=Count+1
1220 Vset=J*10^I ! 최초 출력 전류는 1E-10A부터 시작
1230 IF Vset>.1 THEN STOP ! 전류출력 .1A 초과하면 이상 나오게 프로그래밍되면 정지시킨다.
1240 OUTPUT @Source;"APPLY DCI ";Vset
1250 WAIT .1
1260 OUTPUT @Dmm;"TRIG SGL"
1270 ENTER @Dmm;Vmeas
1280 T=TIMEDATE-T0
1290 DISP Count,"Set I=";Vset," Meas I=";Vmeas
1300 OUTPUT @File;Count,T,Vset,Vmeas
1310 NEXT J
1320 NEXT I
1330 OUTPUT @Source;"APPLY DCI 0"
1340 END SELECT
1350 OUTPUT @Dmm;"TRIG AUTO"
1360 STOP
1370 Fileopen: !
1380 DIM Filename$[20],Dhms$[8]
1390 Time$=TIME$(TIMEDATE)
1400 Date$=DATE$(TIMEDATE)
1410 Dhms$=Date$[1;2]&Time$[1;2]&Time$[4;2]&Time$[7;2]
1420 Filename$=Dhms$&".txt"
1430 CREATE Filename$,1
1440 ASSIGN @File TO Filename$;FORMAT ON
1450 RETURN
1460 END