10 !2020/05/01 Yokogawa 7651 DC Source로 출력 + HP3458A DMM으로 측정
20 ! DC 전압: 10mV +-12.0000mV 100mV +-120.000mV 1V +-1.20000V 10V +-12.0000V 30V +-32.000V
30 ! DC 전류: 1mA +-1.20000mA(10nA) 10mA +-12.0000mA 100mA +-120.000mA(1uA)
40 ! 기능: DCV F1, 범위 10mV:R2, 100mV:R3, 1V:R4, 10V:R5, 30V:R6
50 ! DCA F5, 범위 1mA:R4, 10mA:R5, 100mA:R6
60 ! 세팅: S+nn.nnEnn 또는 S-0.00001
70 ! 자동범위에서 세팅: SA
80 ! 출력 ON/OFF: O0 및 O1
90 ! 트리거: E - 기능,범위,출력값,출력ON/OFF 명령어 뒤에 반드시 사용해야 한다.
100 ! 출력값 확인: OD, 출력 헤더 H0, H1 - 헤더 없고 있고
150 ! xmin, xmax, nop 로그계산방법
160 ! k=(xmax/xmin)^(1/(nop-1))
170 ! x=xmin*k^(n-1) n=1,...,nop
180 INTEGER I,J,Nop,Count
190 REAL K,Vmin,Vmax,Vset,Vmeas,Tmp
200 Nop=101
210 GOSUB Fileopen
220 ASSIGN @Source TO 703 !
230 ASSIGN @Dmm TO 722 !HP 3458A
240 T0=TIMEDATE
250 Func$="I"
260 OUTPUT @Source;"H0" !출력데이터에서 헤더 off
270 OUTPUT @Source;"O1" !output ON
280 OUTPUT @Source;"E"
290 SELECT Func$
300 CASE "V","v" !V출력, I측정
310 OUTPUT @Source;"F1"
320 OUTPUT @Source;"E"
330 Vmin=1.E-7 ! 0.1uV
340 Vmax=32 !32V
350 OUTPUT @File;"No., Time[s], Yokogawa7651 set[V], HP3458A meas[V]"
360 FOR I=1 TO Nop
370 Count=I
380 K=(Vmax/Vmin)^(1/(Nop-1))
390 Vset=Vmin*K^(I-1)
400 OUTPUT @Source;"SA";Vset
410 OUTPUT @Source;"E"
420 GOSUB Source_dataout
430 Vset=Set
440 WAIT .1
450 OUTPUT @Dmm;"TRIG SGL"
460 ENTER @Dmm;Vmeas
470 T=TIMEDATE-T0
480 DISP Count,"SP=";Vset,"PV=";Vmeas
490 OUTPUT @File;Count,T,Vset,Vmeas
500 NEXT I
510 OUTPUT @Source;"APPLY DCV 0"
520 CASE "I"
530 OUTPUT @Source;"F5"
540 OUTPUT @Source;"E"
550 Imin=1.E-8 ! 10nA에서부터
560 Imax=.12 ! 120mA까지
570 OUTPUT @File;"No., Time[s], Yokogawa7651 set[A], HP3458A meas[A]"
580 FOR I=1 TO Nop
590 Count=I
600 K=(Imax/Imin)^(1/(Nop-1))
610 Iset=Imin*K^(I-1)
620 OUTPUT @Source;"SA ";Iset
630 OUTPUT @Source;"E"
640 GOSUB Source_dataout
650 Iset=Set
660 WAIT .1
670 OUTPUT @Dmm;"TRIG SGL"
680 ENTER @Dmm;Imeas
690 T=TIMEDATE-T0
700 DISP Count,"Set I=";Iset," Meas I=";Imeas
710 OUTPUT @File;Count,T,Iset,Imeas
720 NEXT I
730 OUTPUT @Source;"APPLY DCI 0"
740 END SELECT
750 OUTPUT @Source;"O0" !output OFF
760 OUTPUT @Source;"E"
770 OUTPUT @Dmm;"TRIG AUTO"
780 STOP
790 Source_dataout: !!
800 OUTPUT 703;"OD"
810 ENTER 703;Set
820 RETURN
830 Fileopen: !
840 DIM Filename$[20],Dhms$[8]
850 Time$=TIME$(TIMEDATE)
860 Date$=DATE$(TIMEDATE)
870 Dhms$=Date$[1;2]&Time$[1;2]&Time$[4;2]&Time$[7;2]
880 Filename$=Dhms$&".txt"
890 CREATE Filename$,1
900 ASSIGN @File TO Filename$;FORMAT ON
910 RETURN
920 END