Specifications
Chapter 6 103
Retrieving Measurement Results
Retrieving the Results of Rdc Measurement
6. Retrieving Measurement
Results
Example 6-7 Retrieving the Results of R
dc
Measurement (rdc.bas)
10 REAL L_lim,U_lim,Rdc
20 INTEGER Scode,Rdc_test
30 ASSIGN @Agt4287a TO 717
40 Scode=7
50 L_lim=-5
60 U_lim=5
70 OUTPUT @Agt4287a;":FORM ASC"
80 !
90 ! Rdc measurement setting
100 !
110 OUTPUT @Agt4287a;":CALC:COMP:RDC:LIM ";L_lim;",";U_lim
120 OUTPUT @Agt4287a;":CALC:COMP ON"
130 OUTPUT @Agt4287a;":SOUR:LIST:RDC ON"
140 !
150 ! Trigger source setting
160 !
170 OUTPUT @Agt4287a;":ABOR"
180 OUTPUT @Agt4287a;":TRIG:SOUR MAN"
190 OUTPUT @Agt4287a;":INIT:CONT ON"
200 !
210 ! Status register setting (For SRQ)
220 !
230 OUTPUT @Agt4287a;":STAT:OPER:PTR 0"
240 OUTPUT @Agt4287a;":STAT:OPER:NTR 16"
250 OUTPUT @Agt4287a;":STAT:OPER:ENAB 16"
260 OUTPUT @Agt4287a;"*SRE 128"
270 OUTPUT @Agt4287a;"*CLS"
280 OUTPUT @Agt4287a;"*OPC?"
290 ENTER @Agt4287a;Buff$
300 !
310 ! Triggering and data read
320 !
330 ON INTR Scode GOTO Meas_end
340 ENABLE INTR Scode;2
350 PRINT "Push Trigger Key!"
360 Meas_wait: GOTO Meas_wait
370 Meas_end: OFF INTR Scode
380 OUTPUT @Agt4287a;":DATA:RDC?"
390 ENTER @Agt4287a;Rdc
400 OUTPUT @Agt4287a;":CALC:COMP:DATA:RDC?"
410 ENTER @Agt4287a;Rdc_test
420 !
430 ! Display results
440 !
450 PRINT "Rdc measurement value:";Rdc;
460 IF Rdc_test=1 THEN
470 PRINT " (LIMIT IN)"
480 ELSE
490 PRINT " (LIMIT OUT)"
500 END IF
510 !
520 END