57
Chapter 2, Methods For Reading Measurement Results
HP BASIC ‘MAV’ Example Program
10 COM /Io_names/ INTEGER Inst_addr,Bus_addr
20 CLEAR SCREEN
30 Inst_addr=714
40 Bus_addr=7
50
CLEAR Inst_addr
60 OUTPUT
Inst_addr;"TRIG:ABORT"
70 OUTPUT
Inst_addr;"*RST"
80 OUTPUT Inst_addr;"DISP RFAN"
90
!
100 ! Execute a call to the Measure function with a request to measure RF
110 ! power. The time out value is specified as 50 seconds. The value
120 ! returned by the function is assigned to the variable Measure_result.
130 !
140 Measure_result=FNMeasure("MEAS:RFR:POW?",50)
150 !
160 ! Check the result of the function call.
170 !
180 IF Measure_result=9.E+99 THEN
190 PRINT "Measurement failed."
200 ELSE
210 PRINT "Power = ";Measure_result
220 END IF
230 END
240 !***********************************************************
250 ! Recommended Technique:
260 !***********************************************************
270 DEF FNMeasure(Query_command$,Time_out_value)
280 COM /Io_names/ INTEGER Inst_addr,Bus_addr
290 DISABLE
300 ON TIMEOUT Bus_addr,5 GOTO Timed_out
310 OUTPUT Inst_addr;"TRIG:MODE:RETR SING;:TRIG:IMM"
320 OUTPUT Inst_addr;Query_command$
330 Start_time=TIMEDATE
340 REPEAT
350 WAIT .1
360 Status_byte=SPOLL(Inst_addr)
370 IF BIT(Status_byte,4) THEN
380 ENTER Inst_addr;Result
390 OUTPUT Inst_addr;"TRIG:MODE:RETR REP"
400 ENABLE
410 RETURN Result
420 END IF
430 UNTIL TIMEDATE-Start_time>=Time_out_value
440 Timed_out:!
450 ON TIMEOUT Bus_addr,5 GOTO Cannot_recover
460 CLEAR Inst_addr
470 OUTPUT Inst_addr;"TRIG:ABORT;MODE:RETR REP"
480 RETURN 9.E+99
490 Cannot_recover: !
500 DISP "Cannot regain control of Test Set."
510 STOP
520 FNEND
Summary of Contents for 8920B
Page 10: ...10 ...
Page 16: ...Contents 16 9 Error Messages Index 673 ...
Page 17: ...17 1 Using HP IB ...
Page 48: ...48 Chapter 1 Using HP IB Remote Local Modes ...
Page 49: ...49 2 Methods For Reading Measurement Results ...
Page 61: ...61 3 HP IB Command Guidelines ...
Page 84: ...84 Chapter 3 HP IB Command Guidelines Guidelines for Operation ...
Page 85: ...85 4 HP IB Commands ...
Page 90: ...90 Adjacent Channel Power ACP ...
Page 116: ...116 Configure I O Configure ...
Page 156: ...156 Call Processing ...
Page 185: ...185 System System SYSTem ERRor Returns integer value quoted string ...
Page 242: ...242 Common Command Descriptions ...
Page 251: ...251 5 Advanced Operations ...
Page 377: ...377 7 IBASIC Controller ...
Page 458: ...458 Chapter 7 IBASIC Controller The TESTS Subsystem ...
Page 640: ...640 Chapter 8 Programming The Call Processing Subsystem Example Programs 11280 SUBEND 11290 ...
Page 643: ...643 9 Error Messages ...
Page 672: ...672 ...
Page 682: ...Index 682 ...