53
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
Содержание 8920B
Страница 10: ...10 ...
Страница 16: ...Contents 16 9 Error Messages Index 673 ...
Страница 17: ...17 1 Using HP IB ...
Страница 48: ...48 Chapter 1 Using HP IB Remote Local Modes ...
Страница 49: ...49 2 Methods For Reading Measurement Results ...
Страница 61: ...61 3 HP IB Command Guidelines ...
Страница 84: ...84 Chapter 3 HP IB Command Guidelines Guidelines for Operation ...
Страница 85: ...85 4 HP IB Commands ...
Страница 90: ...90 Adjacent Channel Power ACP ...
Страница 116: ...116 Configure I O Configure ...
Страница 156: ...156 Call Processing ...
Страница 162: ...162 Display DISPlay space TDMA test TESTs TFReq THLP TIBasic TMAKe TPARm TPRint TSEQn TSPec Returns current screen TX ...
Страница 185: ...185 System System SYSTem ERRor Returns integer value quoted string ...
Страница 242: ...242 Common Command Descriptions ...
Страница 251: ...251 5 Advanced Operations ...
Страница 377: ...377 7 IBASIC Controller ...
Страница 458: ...458 Chapter 7 IBASIC Controller The TESTS Subsystem ...
Страница 640: ...640 Chapter 8 Programming The Call Processing Subsystem Example Programs 11280 SUBEND 11290 ...
Страница 643: ...643 9 Error Messages ...
Страница 672: ...672 ...
Страница 682: ...Index 682 ...