63
Chapter 2, Methods For Reading Measurement Results
HP BASIC ‘ON TIMEOUT’ 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 10 seconds. The value
120 ! returned by the function is assigned to the variable Measure_result.
130 !
140 Measure_result=FNMeasure("MEAS:RFR:POW?",10)
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,Time_out_value RECOVER Timed_out
310
OUTPUT Inst_addr;"TRIG:MODE:RETR SING;:TRIG:IMM"
320
OUTPUT Inst_addr;Query_command$
330 ENTER
Inst_addr;Result
340
OUTPUT Inst_addr;"TRIG:MODE:RETR REP"
350 ENABLE
360 RETURN
Result
370 Timed_out:!
380
ON TIMEOUT Bus_addr,Time_out_value GOTO Cannot_recover
390
CLEAR Inst_addr
400
OUTPUT Inst_addr;"TRIG:ABORT;MODE:RETR REP"
410 ENABLE
420 RETURN
9.E+99
430 Cannot_recover:!
440
DISP "Cannot regain control of Test Set."
450 STOP
460 FNEND
Содержание 8921A
Страница 14: ...14 ...
Страница 17: ...Contents 17 3 HP IB Command Guidelines Sequential and Overlapped Commands 72 Guidelines for Operation 73 ...
Страница 24: ...Contents 24 9 Error Messages ...
Страница 25: ...Contents 25 Index 593 ...
Страница 26: ...Contents 26 ...
Страница 27: ...27 1 Using HP IB ...
Страница 58: ...58 Chapter 1 Using HP IB Remote Local Modes ...
Страница 59: ...59 2 Methods For Reading Measurement Results ...
Страница 71: ...71 3 HP IB Command Guidelines ...
Страница 94: ...94 Chapter 3 HP IB Command Guidelines Guidelines for Operation ...
Страница 95: ...95 4 HP IB Commands ...
Страница 100: ...100 Adjacent Channel Power ACP ...
Страница 150: ...150 Display DISPlay space TDMA test TESTs TFReq THLP TIBasic TMAKe TPARm TPRint TSEQn TSPec Returns current screen TX ...
Страница 173: ...173 System System SYSTem ERRor Returns integer value quoted string ...
Страница 236: ...236 Triggering Measurements ...
Страница 237: ...237 5 Advanced Operations ...
Страница 350: ...350 Chapter 6 Memory Cards Mass Storage Using Memory Cards Figure 20 Inserting a Memory Card ...
Страница 360: ...360 Chapter 6 Memory Cards Mass Storage Using External Disk Drives ...
Страница 361: ...361 7 IBASIC Controller ...
Страница 442: ...442 Chapter 7 IBASIC Controller The TESTS Subsystem ...
Страница 559: ...559 Chapter 8 Programming The Call Processing Subsystem Example Programs 11280 SUBEND 11290 ...
Страница 562: ...562 Chapter 8 Programming The Call Processing Subsystem Example Programs ...
Страница 563: ...563 9 Error Messages ...
Страница 592: ...592 ...