E5071C
10 CLEAR SCREEN
20 I=0
30 GOSUB Fileopen
40 OUTPUT @File;"No.,Peak[dB],Fc[MHz],BW[MHz],Q[-]"
50 ASSIGN @Na TO 717
60 OUTPUT @Na;":TRIG:SOUR BUS"
70 LOOP
80 I=I+1
90 OUTPUT @Na;":CALC1:MARK:BWID OFF"
100 !샘플이 꼽혔는가?
110 FOR J=1 TO 10 !여러번 확인
120 REPEAT
130 GOSUB Sweep
140 GOSUB Peak
150 UNTIL Peak>-6
160 NEXT J
170 OUTPUT @Na;":SYST:BEEP:COMP:IMM"
180 OUTPUT @Na;":CALC1:MARK:BWID ON"
190 OUTPUT @Na;":CALC1:MARK1:BWID:DATA?"
200 ENTER @Na;Bw,Fc,Q,Peak
210 Bw=Bw/1.E+6
220 Fc=Fc/1.E+6
230 PRINT I,PROUND(Bw,-3),PROUND(Fc,-4),PROUND(Q,-2),PROUND(Peak,-3)
240 OUTPUT @File;I,Peak,Fc,Bw,Q
250 !샘플을 제거했는가?
260 REPEAT
270 GOSUB Sweep
280 GOSUB Peak
290 UNTIL Peak<-10
300 END LOOP
310 Sweep: !
320 OUTPUT @Na;":TRIG:SING"
330 OUTPUT @Na;"*OPC?"
340 ENTER @Na;Tmp
350 RETURN
360 Peak: !
370 OUTPUT @Na;":CALC1:MARK1:Y?"
380 ENTER @Na;Peak
390 RETURN
400 Fileopen: !
410 DIM Filename$[20],Dhms$[8]
420 Time$=TIME$(TIMEDATE)
430 Date$=DATE$(TIMEDATE)
440 Dhms$=Date$[1;2]&Time$[1;2]&Time$[4;2]&Time$[7;2]
450 Filename$=Dhms$&".txt"
460 CREATE Filename$,1
470 ASSIGN @File TO Filename$;FORMAT ON
480 RETURN
490 END