Stol-01-ibw.txt

Togotech (토론 | 기여)님의 2022년 1월 16일 (일) 21:57 판 (새 문서: STOL 시험 <pre> 10 INTEGER X,Y,Count,Type,Inst 20 DIM Tmp$[2],Cmd$[15] 30 Type=1 !1은 정사각형 0,0에서 Y축 순서대로 40 Inst=2 !1=3478DMM 2=...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

STOL 시험

10     INTEGER X,Y,Count,Type,Inst
20     DIM Tmp$[2],Cmd$[15]
30     Type=1      !1은 정사각형 0,0에서 Y축 순서대로
40     Inst=2      !1=3478DMM 2=3457DMM 3=2420SM
50  !  GOSUB Prober_setup
60     GOSUB Filesave
70  !  GOSUB Inst_setup
80  !  GOSUB Save_head
90  !  GOSUB Run
100    ASSIGN @Ps TO 404
110    ASSIGN @Sw TO 405
120    ASSIGN @Dmm TO 403
130    OUTPUT @Dmm;"OHMF"
140    OUTPUT @Dmm;"NPLC 10"
150    OUTPUT @Sw;"CMON 1"
160    ! DMM 측정
170    DIM Switch$[23]
180    Switch$="100,101,102,103,104,105"
190    OUTPUT @Sw;"OPEN ";Switch$
200    OUTPUT @Dmm;"TRIG SGL"
210    ENTER @Dmm;R0
220    PRINT "R0=";R0
230    W=1/16.     !P=IV V=sqrt(WR), I=sqrt(W/R)
240    V=SQRT(W*R0)
250    PRINT "V=";V
260    IF (V>20) THEN
270      PRINT "전압 20V 초과"
280      STOP
290    END IF 
300    A=SQRT(W/R0)
310    PRINT "A=";A
320    IF (A>2) THEN
330      PRINT "전류 2A 초과"
340      STOP
350    END IF 
360    OUTPUT @Ps;"CURR ";2
370  ! loop 시작
380    Count=0
390    OUTPUT @Outfile;"No., V[V], R0[ohm], R[ohm], R-delta[%]"
400    OUTPUT @Outfile;Count,0,R0
410    LOOP
420      Count=Count+1
430      OUTPUT @Sw;"CLOSE ";Switch$
440      OUTPUT @Ps;"VOLT ";V
450      OUTPUT @Ps;"OUTP ON"
460      WAIT 5 !전압 5초간 인가
470      OUTPUT @Ps;"OUTP OFF"
480      WAIT 5  !5초간 전압 끊고
490      OUTPUT @Sw;"OPEN ";Switch$
500      OUTPUT @Dmm;"TRIG SGL"
510      ENTER @Dmm;R
520      R_delta=(R-R0)/R0*100
530      PRINT "No=";Count;" V=";V;" R=";R;" delta=";PROUND(R_delta,-4)
540      OUTPUT @Outfile;Count,V,R,R_delta
550    EXIT IF ABS(R_delta)>5
560      V=V*(1+.1)
561      I=V/R0
563    EXIT IF I>2
570    EXIT IF V>20
580    END LOOP 
590  ! loop 끝
600    STOP
610 Run: !
620    Count=0
630    T0=TIMEDATE
640    SELECT Type
650    CASE 1
660      FOR X=0 TO 29    !X 개수-1
670        FOR Y=0 TO 29 !Y 개수-1
680          Cmd$="MOX"&VAL$(X)&"Y-"&VAL$(Y)
690          GOSUB Move
700          Count=Count+1
710          T=TIMEDATE-T0
720          GOSUB Read
730          GOSUB Save
740        NEXT Y
750      NEXT X
760    CASE 2
770    END SELECT 
780    GOSUB Inst_init
790    RETURN
800 Prober_setup: !
810    ASSIGN @Probe TO 402
820    RETURN
830 Filesave:     !
840    DIM Outfilename$[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    Outfilename$=Dhms$&".txt"
890    CREATE Outfilename$,1
900    ASSIGN @Outfile TO Outfilename$;FORMAT ON
910    RETURN
920 Inst_setup:    !!! 계측기 셋업
930    SELECT Inst
940    CASE 1
950      ASSIGN @Dmm TO 427 !hp 3478 dmm
960    CASE 2
970      ASSIGN @Dmm TO 403 !hp 3457 dmm
980      OUTPUT @Dmm;"NPLC 10"
990    CASE 3
1000     ASSIGN @Sm TO 424 !Keithley 2420 SourceMeter
1010     OUTPUT @Sm;"ROUT:TERM FRON"       !front terminal
1020     OUTPUT @Sm;"SYST:RSEN ON"         !4-wire
1030     OUTPUT @Sm;"SOUR:FUNC CURR"       !i-source
1040     OUTPUT @Sm;"SOUR:CURR:MODE FIX"
1050     OUTPUT @Sm;"SOUR:CURR:RANG:AUTO ON"
1060     OUTPUT @Sm;"SOUR:CURR:LEV 0.10"   !10mA
1070     OUTPUT @Sm;"SENS:FUNC ""VOLT"""   !v-measure
1080     OUTPUT @Sm;"SENS:VOLT:PROT 10"    !compliance V=10V
1090     OUTPUT @Sm;"VOLT:RANG 10"
1100     OUTPUT @Sm;"FORM:ELEM VOLT,CURR"!출력 데이터는 전압,전류만
1110     OUTPUT @Sm;"SOUR:CLE:AUTO ON"   !측정할 때만 출력 ON/OFF 자동으로
1120   END SELECT 
1130   RETURN
1140 Inst_init:    !!! 계측기 초기화
1150   SELECT Inst
1160   CASE 1
1170   CASE 2
1180     OUTPUT @Dmm;"TRIG AUTO"
1190   CASE 3
1200   END SELECT 
1210   RETURN
1220 Move:!
1230   OUTPUT @Probe;Cmd$
1240   ENTER @Probe;Tmp$
1250   RETURN
1260 Read:!
1270   SELECT Inst
1280   CASE 1
1290     GOSUB Read_3478
1300   CASE 2
1310     GOSUB Read_3457
1320   CASE 3
1330     GOSUB Read_2420
1340   END SELECT 
1350   RETURN
1360 Save:!
1370   SELECT Inst
1380   CASE 1,2
1390     GOSUB Save_dmm
1400   CASE 3
1410     GOSUB Save_2420
1420   END SELECT 
1430   RETURN
1440 Read_3478: !
1450   WAIT 1
1460   ENTER @Dmm;R
1470   RETURN
1480 Read_3457: !
1490   IF Count=1 THEN
1500     OUTPUT @Dmm;"TRIG SGL"
1510     ENTER @Dmm;R
1520   END IF 
1530   OUTPUT @Dmm;"TRIG SGL"
1540   ENTER @Dmm;R
1550 ! OUTPUT @Dmm;"RMATH HIRES"
1560 ! ENTER @Dmm;R1
1570   R=R+R1
1580   RETURN
1590 Save_head:          !
1600   SELECT Inst
1610   CASE 1,2  !dmm
1620     OUTPUT @Outfile;"No.,Time[s],X,Y,R[ohm]"
1630   CASE 3    !source meter
1640     OUTPUT @Outfile;"No.,Time[s],X,Y,Volt[V],Curr[A]"
1650   END SELECT 
1660   RETURN
1670 Save_dmm: !
1680   PRINT Count,INT(T);"sec","X=";X,"Y=";Y,"R=";R
1690   OUTPUT @Outfile;Count,T,X,Y,R
1700   RETURN
1710 Read_2420: !
1720   OUTPUT @Sm;"READ?"
1730   ENTER @Sm;Volt,Curr
1740   RETURN
1750 Save_2420: !
1760   PRINT Count,INT(T);"sec","X=";X,"Y=";Y,"V=";Volt,"i=";Curr
1770   OUTPUT @Outfile;Count,T,X,Y,Volt,Curr
1780   RETURN
1790   END